2012-11-12, 07:50:11
(This post was last modified: 2012-11-12, 14:28:32 by jason.dixon.email.)
(2012-11-11, 23:10:01)Timbow Wrote: I am really looking forward to trying this plugin out. Is version 1.x pretty much in it's final form now, tested, approved and recommended?Yeah, though I'm pretty-fying it with javascript at the moment. Not too far off putting out version 1.9 which has a bunch of little fixes and some new warning messages etc to make things easier for users.
Then I'm thinking in 2.0 I'll make a proper configuration screen.
(2012-11-12, 04:56:17)hameau Wrote: A saved empty tab is pre-filled with the default text (either the plugin built-in default or the optional parameter) on next edit and, yes, it's saved and rendered.
Yeah I'm working on this one now. Should be sorted next upload.
Quote:No output doesn't necessarily give false: I have come unstuck with GS when an empty array was returned, for example. No output, but not nothing returned.
In fact, (return_tab_content( ... )) on an empty tab returns the string "There was a problem with your Tab request.", which is, of course, True.
Yeah my bad with that error message.
I may be a little overzealous in putting error messages everywhere.
You can be sure though, that an empty tab request will not give you anything other than a string of characters or NULL. But I can probably make it return "false" if it finds nothing to be extra sure.
EDIT: Actually as a side note, that specific error "There was a problem with your Tab request." comes up when your tab 'request' is wrong. ie: wrong syntax. That is likely because that request tab only accepts the "specific" style syntax. Or in other words using an -> in the string. Trying your tab request with an arrow might work:
Code:
return_tab_request("->mytab");
Quote:One other snag I found today, is that this code breaks SIT:
PHP Code:<?php insert_page_content('tabone');
insert_page_content('tabtwo'); ?>
Only the first instance is recognised. This alternative works as expected:
PHP Code:<?php insert_page_content('tabone'); ?>
<?php insert_page_content('tabtwo'); ?>
Also, SIT does not understand PHP comments, so this will still show a tab:
PHP Code:<?php //insert_page_content('tabone'); ?>
In a combination of these points, this will show tab tabone, but not tabtwo:
PHP Code:<?php //insert_page_content('tabone');
insert_page_content('tabtwo'); ?>
That nearly drove me round the bend before I found out !
Haha, sorry. That would be the fault of my regular expression:
Code:
/<\?php.*?\binsert_page_content\(([^)]*?)\);?.*?\?>/si
Looks like I need to update it.
Thanks for this feedback, again! It's really helpful.
And p.s. if anyone reading this is particularly good with reg expressions take a look at this one and give me some pointers?