Page 1 of 1

usergallery and{$view}=404!?

Posted: Sun Oct 08, 2006 9:29 pm
by stm999999999
a {$view} in my plugin_usergallery_imagedisplay.tpl or plugin_usergallery.tpl shows in the output a "404".

Is this "a good idea"?

Posted: Sun Oct 08, 2006 11:17 pm
by mgroeninger
Nope, that doesn't seem like a good idea...

I'm not familiar with the view variable, though. Do you know of any plugins that are using it? Or how it is set? (I might be doing something wrong in the way the plugin is being called, but I'm not sure what that might be.)

As Garvin mentioned in this thread, I have been using the "staticpage_pagetitle" for my plugins. Are we changing this?

Posted: Sun Oct 08, 2006 11:28 pm
by mgroeninger
Ok, I tested the staticpage plugin and $view is "404" for it too...

Is this something I need to start setting to "plugin" in my code?

It only takes a quick:

Code: Select all

$serendipity['smarty']->assign('view', 'plugin');
Am I right in assuming that $view is not set by seredipity core for plugins? I should have an update for usergallery relatively soon, and I can include this if that is correct...

Posted: Mon Oct 09, 2006 12:59 pm
by garvinhicking
Hi Matt!

Exactly, it can be set like this. I've just also patched the core so that 'view' is set to 'plugin' in case a plugin takes on the 'entry_display' event hook.

This might help template authors somewhat...?!

(BTW, the 'view' variable is usually set by $serendipity['view'] in index.php and include/genpage.inc.php)

Best regards,
Garvin

Posted: Thu Nov 23, 2006 4:58 pm
by carl_galloway
@garvin
This might help template authors somewhat...?!
Oh yeah. loving it!!

Posted: Thu Nov 23, 2006 6:32 pm
by carl_galloway
I've tested all of the plugins that I can think of that actually take control of the page, such as contact form, static pages, user gallery etc, but I notice the faq plaugin doesn't seem to play nice. Can someone take a look at its view settings and see if it can be changed to plugin?