Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I18N Special Pages extras
#51
(2014-12-24, 23:40:00)bensayers Wrote:
(2014-12-14, 05:10:53)bensayers Wrote: Fatal error: Call to undefined function getPagesXmlValues() in [file-path-here]/plugins/SpecialPagesExtras/SPEClass.php on line 109
(2014-12-24, 21:58:28)mganko Wrote: It's weird I cannot reproduce that error.
When do you see that error? Are you using i18n navigation plugin?
Yes, here are the plugins I'm using: Branded Login, Default Content, DynPages, Fancybox Plugin, i18n Base, i18n Gallery, i18n, i18n Search, i18n Special Pages, Imagizer, Simple Input Tabs, Small Plugin Toolkit, i18n Special Pages extras, Multi User.

I only see the error when I try to edit the navigation to reorder the pages, but it's the exact same error on several different sites I've developed. Is there any additional info i can provide to help you troubleshoot? I can give you access to the server (via PM) if that helps. Thanks, happy holidays!

Ok, now I think i know where is the problem. I will fix it in next release. (in about 1 week)
http://flexphperia.net - my portfolio
Reply
#52
(2014-12-24, 21:56:22)mganko Wrote:
(2014-12-18, 06:47:38)linden Wrote: HI. Like the plugin and the extra types of fields that can be created. And i found a use for the "multi text field" but cant figure out how to render it properly. if i use <?php get_special_field('whatever'); ?> it outputs the fields with the "||" separator as mentioned here. But how can I use this? I would like to render it like <p>"field"</p> for each for example. Anyone who can help me achieve this? Thanks.

Use php
PHP Code:
explode 
function to make an array and next create loop that will create <p> element for each item.

Thank You. Though I am only a front-end developer so i am not that well off writing my own php code. Would you mind giving an example of the code i could use?
Reply
#53
Hello,

I am going round in circles with this plugin, which simply refuses to save its configuration files.

GS v.3.3.4;
I18N Special Pages extras v.1.18;
I18N Special Pages v.1.3.2.

Hosting: OVH France;
Apache v2.2;
PHP v.5.5;
No (or minimal) caching ('environment=development');
All directories are chmod 0755;
All files are chmod 0644;
Nothing fancy in gsconfig.php;
Standard default .htaccess.

No errors from GS, Apache, PHP or browser (Firefox) console.

I can set up a new Special Page and its corresponding file is saved correctly (data/other/i18n_special_specialpage.xml) but there is no extras file (data/other/i18n_special-specialpage-extras.xml).

Everything works fine here on my test server, so I guess it's something to do with the OVH environment, but the complete lack of error feedback is a bit of a mystery.

Any suggestions anyone?

03/01/2015 - Edit to add: It seems that SPE never calls SPESettings:Confusedave(), but I'm at the limit of my debugging skills.
--
Nick.
Reply
#54
(2014-12-25, 03:19:47)mganko Wrote: Ok, now I think i know where is the problem. I will fix it in next release. (in about 1 week)

Great, thanks Mganko - let me know if you need a beta tester. I have the plugin installed on several websites.
Reply
#55
Hi!

I really love this plugIn and the newest updates (was working with 1.12 up until now).

I especially love the new browser, but I'm afraid I can't use it yet, as it is not possible to select a folder instead of a single image.

I added the following code to the normal image browser, to enable this:
PHP Code:
if ($subPath != '') {
  
$mySubDir = ($subPath == '' '' $subPath.'/');
  
$folderpath $fullPath.$mySubDir;
  echo 
'<a href="javascript:void(0)" onclick="submitLink(\''.$folderpath.'\')">select this folder</a><br/><br/>';

... but at the momen't I'm not sure how to change the new browser.
That feature would be really cool, as I often need to select the whole folder...

Best regards
Kida
Reply
#56
Bump!

(2014-12-27, 21:59:11)hameau Wrote: I am going round in circles with this plugin, which simply refuses to save its configuration files.

03/01/2015 - Edit to add: It seems that SPE never calls SPESettings:Confusedave(), but I'm at the limit of my debugging skills.

Anyone? I don't necessarily want a solution, just some idea of how to find out what's (not) happening.
--
Nick.
Reply
#57
New version 1.19

New options: now you can define width of every special field in % or px units.

http://get-simple.info/extend/plugin/i18...xtras/768/




(2015-01-15, 17:54:42)hameau Wrote: Bump!

(2014-12-27, 21:59:11)hameau Wrote: I am going round in circles with this plugin, which simply refuses to save its configuration files.

03/01/2015 - Edit to add: It seems that SPE never calls SPESettings:Confusedave(), but I'm at the limit of my debugging skills.

Anyone? I don't necessarily want a solution, just some idea of how to find out what's (not) happening.

Please check 1.19 version
http://flexphperia.net - my portfolio
Reply
#58
(2015-02-02, 22:51:09)mganko Wrote: Please check 1.19 version

Sorry, no change (post 53). Special Pages works as expected, but Special Pages Extras never saves any configuration.

If I make changes on a different installation (my test server), I can transfer the data/other/i18n_special-<specialpage>-extras.xml file and the configuration will work, but cannot be changed.

I can try any suggestions or give you ftp access to a test site.

Thanks.
--
Nick.
Reply
#59
(2015-02-03, 00:42:43)hameau Wrote:
(2015-02-02, 22:51:09)mganko Wrote: Please check 1.19 version

Sorry, no change (post 53). Special Pages works as expected, but Special Pages Extras never saves any configuration.

If I make changes on a different installation (my test server), I can transfer the data/other/i18n_special-<specialpage>-extras.xml file and the configuration will work, but cannot be changed.

I can try any suggestions or give you ftp access to a test site.

Thanks.


I have sended you PM message with my email address. Please send me FTP details and GS backend credentials.
http://flexphperia.net - my portfolio
Reply
#60
sounds like a permission issue, turn debugging on and check error log
also spe functions might be spotty on 5.2, oh this is your class nm, i read spl.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#61
(2015-02-04, 03:46:54)shawn_a Wrote: sounds like a permission issue, turn debugging on and check error log
also spe functions might be spotty on 5.2, oh this is your class nm, i read spl.

This is related to issue that orderd of loading plugins may be different on different hosts: https://github.com/GetSimpleCMS/GetSimpl...ssues/1001

Will be fixed in future plugin version.
http://flexphperia.net - my portfolio
Reply
#62
(2015-02-05, 17:48:16)mganko Wrote: This is related to issue that orderd of loading plugins may be different on different hosts ...

I experimented some more. It seems that the host is loading the plugins in reverse alphabetical order.

I did search and replace in all SpecialPagesExtras files:
Code:
rpl -R SpecialPagesExtras aSpecialPagesExtras
and renamed
  • SpecialPagesExtras.php -> aspecialpagesextras.php
  • SpecialPagesExtras (folder) -> aspecialpagesextras
Everything is now working as expected.

This is definitely not connected to file datestamp, nor to the order in which plugins were copied to the GS installation. (See also this old post.)

The PHP manual talks of 'the order of files in the filesystem', but I don't know what the host's filesystem is. From an ssh terminal, ls -l lists alphabetically (as expected), but ls -lU has no obvious order.
--
Nick.
Reply
#63
(2014-12-25, 03:19:47)mganko Wrote: Ok, now I think i know where is the problem. I will fix it in next release. (in about 1 week)

Hi mganko, I just installed the latest version (1.9) and it still has the conflict with the Multi User plugin. My special pages display fine on the front end of the site but any changes I make with SpecialPagesExtras aren't being saved. I'm unable to edit the navigation structure as well - when I try, this is the message I see:

Fatal error: Call to undefined function getPagesXmlValues() in /home/clientname/public_html/plugins/SpecialPagesExtras/SPEClass.php on line 111
Reply
#64
(2015-02-19, 21:42:30)hameau Wrote: I experimented some more. It seems that the host is loading the plugins in reverse alphabetical order.

I did search and replace in all SpecialPagesExtras files:
Code:
rpl -R SpecialPagesExtras aSpecialPagesExtras
and renamed
  • SpecialPagesExtras.php -> aspecialpagesextras.php
  • SpecialPagesExtras (folder) -> aspecialpagesextras
Everything is now working as expected.

This is definitely not connected to file datestamp, nor to the order in which plugins were copied to the GS installation. (See also this old post.)

The PHP manual talks of 'the order of files in the filesystem', but I don't know what the host's filesystem is. From an ssh terminal, ls -l lists alphabetically (as expected), but ls -lU has no obvious order.

I can confirm that Nick's fix resolved my problems with the Multi-User plugin and reordering the i18n navigation. It would be great if these changes could be included on GS Extend.
Reply
#65
filesystems load files arbitrarily, you cannot guarantee the order, instead plugins should properly init after the common hook, NOT WHEN INCLUDED.


https://github.com/GetSimpleCMS/GetSimpl...ssues/1001

I think there is a custom order plugin anyway , anyone know if it works still ?
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#66
(2015-02-25, 09:40:00)shawn_a Wrote: filesystems load files arbitrarily, you cannot guarantee the order, instead plugins should properly init after the common hook, NOT WHEN INCLUDED.
Shawn, I know that my 'solution' is nothing more than a pragmatic hack that happens to work in this case. However, aiui, the plugin loading order, though not predictable from server to server, is consistent for a given installation.

There seems to be some evidence that Ubuntu-based (kernel? filesystem?) servers treat files in reverse alphabetical order, which is what let me to the string substitution and it happened to work for me. Now, I also understand that my string substitution will have changed the file sizes, which may just have pushed the filesystem into treating it differently, for example, but for the moment, I'm delighted and I can get on with other things.

I know that you're already looking into more robust ways of determining plugin loading order in v3.4, which is, imo, now necessary. There are several cases in Extend of plugins to extend and improve other plugins, which necessarily must load in a specific order. If this feature (plugin loading order) is not available, it means that the original plugin must be forked and changed, leading to all sorts of problems for support and management of the whole system.

The only alternative would be to have a managed and curated Extend and who would do that? It's pretty amazing that Extend has continued to work as well as it does, for so long, given that it is more or less free (as in speech) for anyone to add anything, which says a lot for this community.
--
Nick.
Reply
#67
Tell me about it, I can revamp extend when 3.4 is released probably.
3.4 will allow users to modify order, but plugins themselves ( again catch 22 ) is a bit harder to engineer , I can maybe add a priority arguments to register_plugin(), and sort by that, or add an argument for an array of dependencies, plugin id and version, but plugin id is hard to nail down, we do not do a good job keeping them unique in extend, also the issue of not knowing anything but filename before we load a plugin other than relying on the api, we would need plugins to have some kind of manifest or file header to parse before including it.

And then use some intelligent looping through all plugins dependencies and using a logical ordering based on that, however it can still fail if there are cyclical dependencies. So a core solution is difficult, a specific use case and user one is much easier to manage, hence the GSPLUGINORDER, maybe i can cherry pick that into 3.3.6

another idea is to disable special pages, and having extras load it itself as a dependency, problem is this changes the relative include path, including from an include presents other interesting issues in php, but might be worth looking into, plugins basically have to be included in global scope also, since we still use globals for alot.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#68
Another idea for this case, is that I18N Special Pages itself has some hook(s) to allow Special Pages Extras do its stuff exactly where it needs to.
Reply
#69
(2015-02-26, 00:30:54)shawn_a Wrote: So a core solution is difficult, a specific use case and user one is much easier to manage, hence the GSPLUGINORDER, maybe i can cherry pick that into 3.3.6
(Considering the general case, not just this particular pair of plugins.)

I think GSPLUGINORDER would be a sensible middle ground solution. If it's possible to backport it to 3.3.x, so much the better, but it ought to be a workable solution going forwards. It's only necessary (so far) for plugins that modify other plugins, so it won't be an unmanageable situation.

Automated dependency-based loading is a can of worms that should stay firmly closed, imo. GetSimple, remember ... ;-)
--
Nick.
Reply
#70
Yeh the way I see these plugins are hacks to begin with. Since we have no dependancoes in core they have to be.

Carlos solution is of course desired, make plugins extensible to begin with using hooks, but overloading outdated plugins or extending even maintained ones is definetly a need for the community,

I also kind of agree with hameau that the complexity of this should be kept to a minimum.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#71
(2015-02-26, 12:06:03)shawn_a Wrote: Carlos solution is of course desired, make plugins extensible to begin with using hooks, but overloading outdated plugins or extending even maintained ones is definetly a need for the community,

I can understand the probable reluctance of authors to provide hooks for extensions (support nightmare) and I don't think it's reasonable to expect them to do it. I can also understand the reluctance of extension plugin writers to fork something that is still actively maintained, although there is nothing wrong with this (GPL) and is probably the Right Way, but that also leads to a nightmare of support.

On the other hand, a plugin that is unmaintained and the author has disappeared from the forum should certainly be forked if someone wants to take it on, with due reference to the original work. Perhaps a flag on the unmaintained plugin (in Extend) so that the original source code remains available, rather than removing it.
--
Nick.
Reply
#72
Yeah but plugins are not necessarily gpl.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#73
Hello,
How to display the Multi image field on the page?
When I use get_special_field_image('image') I get a few links with the separator.

Please help
Reply
#74
(2015-03-11, 07:06:10)lamamasters Wrote: Hello,
How to display the Multi image field on the page?
When I use get_special_field_image('image') I get a few links with the separator.

Please help

Use explode function like this:

PHP Code:
$array explode('||'return_special_field('image'));
for (
$i 0$i count($array); $i++) {
    echo <
img src="'. $array[$i] .'" />;

http://flexphperia.net - my portfolio
Reply
#75
nono use foreach much easier to write and read, and faster then counting each iteration ( and your missing quotes )
PHP Code:
$images explode('||'get_special_field_image('image'));
foreach(
$images as $image){
  echo 
'<img src="'.$image.'">';


and if you need $i for index or something

PHP Code:
foreach($images as $key=>$image){
  
//   echo  $key; // zero based index
  
echo $key.'<img src="'.$image.'">';

NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply




Users browsing this thread: 1 Guest(s)
Free HDTV Channels Residential Solar Panels