Folks, I'm pleased to let you know that I've made some more improvements to the plugin system based on the early feedback from the community. In the latest SVN of 1.1, you'll see the following mods:
- Early plugin validation: it's easy to mistype the name of the included file in install.php... The plugin system will now tell you early that something is wrong
- Plugin architecture now allows you to register entire directories as components in your install.php file... If you want to see an example of how it's done, check out the install.php for QFCKEditor.
- QPluginInstaller error reporting system revamp. It was pretty broken :-).
- Automating plugin installations: there's now a file under _devtools that lets you do an "unattended install" of the several plugins at once, so that you don't have to click-click-click on the Plugin Manager. Just place any of the plugin .zip files under includes/tmp/plugin.install, and launch the assets/_core/php/_devtools/plugin_unattended.php file in your browser. That utility will attempt to install every one of the plugins in that folder, and give you detailed status on the results.
Also, you'll notice that the QCubed examples site now hosts the examples for all plugins.
And, the plugin repository now has links to the demos of all plugins.
Wait, I almost forgot - QFCKEditor is now a plugin :)

Tronics - feel free to upload a patch for your work (in a ticket), I'd love to see your improvement get included into 1.1 (but please do more than just comment out the line - do investigate what was happening :-))
I think it is obvious what happened:
sizeof($strPath) always returns 1
this is a string NOT an array so the right function is
strlen($strPath)
--
I do not understand our svn tree very well.
There are so many copies in there that I do not know where to patch against?
Also the patches in the tracker do not work well it always says the directory structure is not matching and if I want to patch against the experimantal/qcubed2jquery branch. Which I usually do. Example: metadatagrid
Tronics - thanks for a speedy reply. It may very well be that it's the problem of strlen vs sizeof... i'm curious as to why it works on so many boxes, though (peculiarity of PHP implementations?). Feel free to just change it directly in the SVN.
Our SVN tree works as follows:
- framework // this is where all the files related to the QCubed framework live. Rules for checkins into subdirectories of this are strict (code review required, etc)
---> branches
----------> 1.1 // the latest bits for the 1.1 branch
----------> 1.0 // the latest bits for the 1.0 branch
---> tags // various (old and not so old) releases that went out - for example, 1.0RC2
- plugins // source + distributable packages of the plugins
- experimental // branches of the 1.1 codebase where people are experimenting, before integrating their work back into the official 1.1 branch. There are no restrictions on checkins / code quality here (it's just a playground).
the reason is that their stringpath is not beginning with / as this looks always for the first character.
As I used absolute paths there is the /
I tried to change in SVN but my login is not permitted to do that.
Can you give me some rights for that? Thanks.
Sorry, I thought you already had rights to the SVN... Can you create a ticket and attach a patch? Sorry for the trouble, I just want to make sure we're not misunderstanding anything.
There is an error when trying to install any plugin with the path:
Line 89: // Remove trailing slash if it's there
Line 90: if ($strPath[sizeof($strPath) - 1] == "/") { <- IT GETS ALWAYS CUT OFF HERE
Line 91: $strPath = substr($strPath, 0, -1);
Line 92: }
Line 93: $result = array();
Line 94: $dh = opendir($strPath);
Line 95: while (($file = readdir($dh)) !== false) {
Line 96: if($file != "." && $file != "..") {
Line 97: if (!is_dir($file)) {
Line 98: array_push($result, $file);
Line 99: }
--
Example FckEditor cannot be installed because it tries to open directory:
/qcubed_authentification/includes/tmp/plugin.tmp/7db7c5/j
instead of
/qcubed_authentification/includes/tmp/plugin.tmp/7db7c5/js
tronics - thanks for the feedback! It seems that your system configuration is quite different from the ones we've tested on... Can you debug into the installer, and see if you can reproduce / fix this?
Problemfile:
/qcubed_authentification/includes/qcubed/_core/framework/QFolder.class.php
here you can see it:
Line 89
if ($strPath[sizeof($strPath) - 1] == "/") {
die (sizeof($strPath) ." ". ($strPath)) ; <----------- This is 1 /qcubed_authentification/includes/tmp/plugin.tmp/516611/js !!!!!
$strPath = substr($strPath, 0, -1);
So if ($strPath[sizeof($strPath) - 1] == "/") is the troublemaker!
--
By the way in the SVN Checkout which is the right branch for the upcoming 1.1 release?
C:\qcubed_svncheckout\framework\branches\1.1 is MISSING the examples and doesn't have wwwroot like C:\qcubed_svncheckout\framework\branches\1.0
This lookes messed up.
The directory structure has changed significantly for 1.1
Everything is in wwwroot by default, and examples are now located at /assets/_core/php/examples
I have commented out the line and have already installed several plugins..
I'd love it if the QArchive class was reimplemented using a class like that. Great find, Vexed!
Is anyone up to do this work?
Hello Alex
I did three new pluging, I'm wondering how is the best way to share
1. upload directly to SVN
2. create a ticket on Trac
3. Upload a zip in post to the forum
Regards
enzo
Enzo - that's great news, thanks for doing this! I encourage you to read through the Packaging Plugins tutorial. When you're done, feel free to upload your files to the Plugins folder of SVN: http://trac.qcu.be/projects/qcubed/browser/plugins, and then add a link to your plugin to the Plugins Directory (http://trac.qcu.be/projects/qcubed/wiki/plugins).
Let me know if you have any questions!
Thanks again!
-Alex
Great job!
That's fantastic. :)
Thanks for all the hard work!
BTW, I tried out http://examples.qcu.be/assets/plugins/QJqDock/example/qjqdock.php# and it doesn't seem to do the roll-over?
Thanks a bunch, Vexed. Dock example: fixed! Stupid typo on my part (case sensitivity on Linux...)
I got a question by reading through the examples. Would it be possible to do a plugin that has on its own a directory structure and lot of files? I'm thinking about a plugin for the great YAML CSS framework (http://www.yaml.de/en/home.html), which I use with QCodo currently and maybe others would like that too.
It could be connected to QCubed by a just one css file which points to the YAML directory thats installed by the plugin.
It definitely is possible to have a plugin that uses lots of files. Take a look at the QFCKEditor plugin (http://trac.qcu.be/projects/qcubed/browser/plugins/QFCKEditor) and its configuration file, it'll help you get started.
how to install manually? There is a server without zip support we are working on.
Which folder, what to do?
Thanks.
I'm afraid there's no way to manually do this; we are not planning to support manual installation of plugins. That said, it would be great if we could support servers that don't have ZIP enabled (where you just CAN'T install zip on the PHP config) - this can be done by modifying the QArchive.class.php, the extractZip function... You could write an alternate implementation that uses a shell exec call for the unzip tool, thus achieving the same functionality. I'd be really grateful if you could invest time into that, we'd definitely include it into 1.1.
I think this works without an extension:
http://www.phpconcept.net/pclzip/index.en.php
Ok, I managed to get a shell and install the zip module.