usergallery and{$view}=404!?

Creating and modifying plugins.
Post Reply
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

usergallery and{$view}=404!?

Post 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"?
Ciao, Stephan
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post 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?
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post 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...
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

@garvin
This might help template authors somewhat...?!
Oh yeah. loving it!!
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post 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?
Post Reply