which package of tinyMCE is to be used? - php

I want to use tinyMCE for adding content to front end. I got a link for downloading latest version of tinyMCE
But I am confused to choose among TinyMCE 3.5.5 development package and TinyMCE 3.5.5.
Please let me know which one is suitable to implement. I am using php 5.2 with symfony 1.0 framework.
Thanks

Navigating to the official tinymce download page you will be offered 3 different versions of tinymce:
TinyMCE 3.5.5 regular package
TinyMCE 3.5.5 jQuery package
TinyMCE 3.5.5 development package
The first one is the package for regular production use. This is usefull if you do not wish to make any changes to existing core files or add any custom plugins.
The second one is called "jQuery package". This one allows a developer to treat the tinymce editor instances as jQuery objects and use jQuery style like operations. (I strongly advise everyone not to use this package, because it is a source of trouble and is slow when it comes to keyboard input handling due to the object creation overhead).
The last one is a developer package. This one contains the regular build and can be used in the same way. By including tiny_mce_dev.js instead of the regular tiny_mce.js the non-minified tinymce files like classes and plugins are getting loaded and easier debugging is possible. It is a good choice to use this package if the downloader plans to write own plugins or develop/use a very complex tinymce configuration setting.

It does not really matter which one you choose, both with be exactly the same. The only difference is that TinyMCE Developer version will allow you to make changes to the source (which is javascript).
I have been using TinyMCE for a couple years now for custom Content Management Systems, and I have never felt the need or had a reason to edit the source.
Conclusion: The regular version 3.5.5 will almost certainly be good enough.

Use either one.
The Dev package just gives you bunch of extra stuff including a non-minified version of the script.

Related

Same composer package in 2 different WordPress plugins

We have developed 2 WordPress plugins which are using same composer package.
Depending on plugin versions the package included in plugin may be changed, we constantly add new functionality to our package.
The problem is that for example plugin A have version 1.0.0 of package, and plugin B have version 1.0.1, WordPress loads only one package , from plugin which loaded first, so if plugin A loaded first then plugin B will use version 1.0.0 package.
We are including autoload.php on both plugins.
Is it possible to do some configuration in WordPress or from composer side to make every plugin load and work with package included on his vendor folder ?
Is it possible to do some configuration in WordPress or from composer side to make every plugin load and work with package included on his vendor folder ?
In general no. The option about namespace rewriting has already been given by Chris Haas, so if you need to rely on different code behind the same global static names, you have to provide a different name for each version.
Another option is you align both plugins to rely on the same dependency version-stability. The example you give with 1.0.0 and 1.0.1 versions, the API should be compatible and it should not be an issue (if the package follows semantic versioning).
From the context of your question, it seems the dependency has not yet matured enough that this is an option practically.
Instead it should be possible to have the plugin which is currently based on 1.0.0 to use 1.0.1 as well. Then the version conflict is solved, as now it is the same version and can use the same names. This may not be an ideal solution, but could get you back to a working version fast and gives you more room to consider a better way in the future (e.g. having a build for those plugins that use scoping).
Additionally you could/should wrap all access to third-party libraries once in your own code so that such problems aren't that deep reaching (dependency issues tend to be harder to resolve). This methodology is independent to Wordpress or Composer, just a recommendation on how to interface to third-party dependencies (or even Wordpress itself[1], which you may know better).
If however what you ask here is already such a wrapper you build your own (e.g. in form of a composer package), consider to adhere to semantic versioning and stabilize its API first.
PHP has no built-in utility to create archives apart from PHAR, e.g. that you can have imports via names but to different code. This is likely also the reason why Composer does not support it and instead provides PSR-0/PSR-4, classmap and file inclusion autoload configuration.
As you have the scenario to share the same namespaces across the plugins - there is no other option actually as it runs in the same PHP process - the first one wins. You may however make your own plugins interoperable so that they can establish a loading order in their own hierarchy, e.g. to prefix the one autoloader before the other conditionally if it exists.
I'd probably go with scoping in the first place and only share build utilities between the plugins nowadays and have a nice package for each plugin afterwards. Yes, scoping can be PITA, but if you have this early on, you don't have to solve this later which is much harder.
Compare for the level of WordPress plugins WordPress Plugin: How do I avoid "tight coupling"? and Multiple Custom Metabox Help - both well dated so it is easier to not take code verbatim but to develop own conclusions.

Upgrading FCKeditor to CKeditor

I'm using FCKeditor which is deprecated for years.
I need to upgrade to CKeditor (to at least 4.4+ however the CKeditor documentation doesn't specify the minimum requirements for each version. What is the PHP version required etc?
Sadly CKeditor has no forum to ask general questions they refer all questions to stackoverflow.
Does anyone knows the minimum requirements?
https://docs.ckeditor.com/ckeditor4/docs/#!/guide/dev_savedata says:
CKEditor helps you create content but it is the role of your website or application to deal with the data created in this way. Saving data is a server-side operation and you are free to implement the save functionality on your own, in any way you like. CKEditor is a pure JavaScript component and it does not offer anything more than JavaScript methods and events to access the data so that you could save it on the server.
As far as I can tell from this description, and from personal experience of the editor, it is an entirely client-side tool. It does not have any server-side component. It doesn't rely on or require PHP in any way at all. You can integrate it with any server-side language or framework to decide to, just by making HTTP requests to / from the server.
The editor is a client side tool, I´m using the editor for years now, with any PHP-version... but PHP is not required at all. You can manage the CKEditor data with other server side languages also.
But there are differences between CKEditor 4 and CKEditor 5: Version 5 requires node.js , see the documentation here
See the documentation
And there the instructions. ..

Social Engine Customization

We(small group) have a SocialEngine based project and we made lots and lots of changes in 4.6.0 version including core modules, now we struggle to update to 4.8.0 which is a pain in the ass so question:
Which logic to implement in new version of social engine where will be stored our modified code that will help for future update?
We are trying using Decorator Pattern, creating another folder(modules2) for example there creating clones of modules and using only modified files(which is currently unsuccessfully).
You can to compare your files with the latest upgrade package files with Softwares like WinMerge and copy new changes in SocialEngine core to your modified files. Don't forget the database queries in application/MODULE_NAME/settings/my-upgrade sql file of each module. It's gonna take time but I don't think there's any easier solutions.
See, thats where git or subversion comes handy , you exactly know where the code is changed .

How to exclude library from autocomplete in Netbeans?

As I try to use the auto-complete pop-up window in Netbeans on my PHP project, a huge swath of CakePHP methods tend to fill the window, and it makes finding what I need more difficult. (I'm not even using CakePHP in the project...)
Is there a way to prevent CakePHP which I am not using, or generically any other library, from showing up in that window?
Thanks.
Update:
Disabling cakephp did remove it from the autocomplete window, but it looks like my primary issue is with the fact that netbeans didn't seem to know what object I am referring to in these cases (because it is a global/defined elsewhere)
When it knows the exact class it provides a proper list of methods to choose from. There seems to be a "red dot" graphic beside methods related to the object, and this "thought bubble" type graphic beside ones that are just grabbed from all libraries netbeans knows about
The only way I have in my mind for this moment is to disable the CakePHP plugin. I have installed it separately so the path in my IDE is Tools -> Plugins -> User Installed Plugins (which is PHP CakePHP Framework).

sublime text 3 hints as in NetBeans

is there any extension that provide hints (autocomplete) in Sublime Text 3 as it in NetBeans?
Not just php functions but all object methods, attributes and so on. Basicly it is usefull when you use OOP, frameworks etc.
You should take a look at SublimeCodeIntel. Quite nice, and works not only with PHP.
You can install it via Package Control. The GitHub repository of the project also tells you how to install, if not using Package Control. (I happened to have bugs with the package control version, so I also installed without package control, but first try that, my friends didn't have my issue.)
Keep in mind, that Sublime does not have an API that would make possible the same user experience. With this extension you'll get lists like the autocomplete. These lists can also contain PHPDoc, but not in a separate tooltip window, like in Netbeans. IMHO it still is very-very useful, and it might satisfy you.
you can use "Intelli​Docs" plugin
https://sublime.wbond.net/packages/IntelliDocs
press F2 key on the function
but not working in the popup
ya you can install AndyPhp package in sublime text 3.

Categories