Announcement

Collapse
No announcement yet.

How do I place conditionals inside a plugin

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I place conditionals inside a plugin

    Hi there,
    See this hack:
    http://www.vbulletin.org/forum/showthread.php?p=1434344

    I have installed this hack and many members are poking fun at each other but i have a problem cause they started to misuse the code in other threads too

    I would like to know if it is possible to insert some type of conditional in a plugin, so I restrict the [you] plugins only to one thread
    Like this
    <if condition="$thread[threadid] == xx">
    Use plugin
    <else />
    dont use the plugin
    </if>
    Maybe this needs a PHP conditional in the shape of
    if (!$vbulletin->thread['threadid'] AND $vbulletin->thread['xx']) {
    plugin code
    ;
    }
    Any quick help is appreciated.
    Regards,
    Val.

  • #2
    It would seem that the coder of this modification is answering your question. These types of discussions about how to add to a coders modifcation should be ask over at www.vBulletin.org. If you talking about how to turn it on a plugin, then you will get an answer.

    Developer Tools
    Writing Plugin Code

    Comment


    • #3
      I am pretty capable of tweaking the code myself. I was just hoping that someone had a similar experience in it and would help.

      Your reply is appreciated.

      I hope to read any possible hints from vB developers if they get a chance to read this thread as well. I hope they can provide any general advices on how to set that specific conditional for any plugin code not only that [you] code plugin.

      Regards,
      Val.

      Comment


      • #4
        Sorry, there is no function to do this. This requires modifying the code. We cannot officially support code modifications or forums running modified code, however you can try searching or asking for help with this over at www.vbulletin.org.
        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
        Change CKEditor Colors to Match Style (for 4.1.4 and above)

        Steve Machol Photography


        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


        Comment


        • #5
          Thanks for clearing it up Steve.

          From your professional perspective, do you think it is hard to implement something like that in vB code?

          Thanks,
          Val.

          Comment


          • #6
            Sorry, I'm not a programmer.
            Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
            Change CKEditor Colors to Match Style (for 4.1.4 and above)

            Steve Machol Photography


            Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...
            X