PDA

View Full Version : New to pugins - suggestions?


ditchmonkey
11-19-2008, 05:06 PM
I need a plugin that is an array of code snippets associated with forum id numbers. In the templates - a template variable would be inserted and a code snippet would be displayed based on the forum currently being viewed.

Is there code somewhere for this already?

Thanks!

Dismounted
11-20-2008, 03:41 AM
<if condition="$foruminfo['forumid'] == X">SHOW THIS</if>

ditchmonkey
11-20-2008, 04:43 PM
I've done that in the templates before but I have a lot of values to assign so I need to do it in a plugin and assign a value to the variable. The template will just contain the variable.

I'm wondering about the proper syntax

<if condition="$foruminfo['forumid'] == X">$template_var="this is a forum specific string"</if>

Or something like that........

Dismounted
11-21-2008, 07:44 AM
Just do a switch statement in your plugin, and assign all the data to one variable. Use that variable in your template (without any conditionals).