Log in

View Full Version : How to insert a conditional inside a plugin


valdet
02-02-2008, 09:20 PM
Hi there,

I woudl like to know if it is possible to insert some type of conditional in a plugin, so I restrict a particular thing only to one thread
Like this
<if condition="$thread[threadid] == xx">
Use my trick
<else />
dont use it
</if>

maybe this needs a PHP conditional in teh shape of
if (!$vbulletin->thread['threadid'] AND $vbulletin->thread['xx']) {
plugin code;
}

Any quick help is appreciated.

Lynne
02-02-2008, 09:37 PM
plugins need php. The format of the conditional ($vb-> thread vs $thread vs $threadinfo vs ??) may have to be played with depending on which plugin is being used.

valdet
02-02-2008, 09:39 PM
I am using the [you] hack found here.
https://vborg.vbsupport.ru/showthread.php?p=1434344

while people are having fun at the specific thread at each other, they have started to use it in other threads too, therefore my point.

Does anyone got an advice

Boofo
02-02-2008, 10:09 PM
Have you tried asking in that thread? ;)

Maybe explain what you are trying to do and we can figure it out there.

valdet
02-02-2008, 10:51 PM
Have you tried asking in that thread? ;)

Maybe explain what you are trying to do and we can figure it out there.

OK i posted the question there as well. I hope for some helpful advices.