![]() |
Trying to convert a plugin
I need to convert a plugin so the code works in VB4
Here is the code, can anyone please help me convert it. I am having some difficulties on how to change this to be biable in VB$ Code:
if ($_REQUEST['do'] == 'editthread' AND $threadinfo['open'] != 10) { |
Give this a try, not 100% sure but it should work
Code:
if ($_REQUEST['do'] == 'editthread' AND $threadinfo['open'] != 10) |
That didn't work, I am cuirous if its due to the string {vb:raw posticons} needing to be escaped due to maybe some conflicts with PHP or not
|
In plugins, you don't use the new template syntax. You need to use, for instance, '.$vbphrase[redirect_threads_to_url].'
|
I got that part, but how would I be able to refer to the {vb:raw posticons} portion in the code and also outbut something like {vb:raw posticons} since $posticons doesn't work
thanks |
I really don't understand what you mean. You want to modify the variable $posticons? On what page? When I do a search for $posticons in the files, I get several hits. So, which one of those pages are you looking to do something to? And did you pick an appropriate hook location?
|
Hook: threadmanage_start
Template: threadadmin_editthread What the code did was look for the instance of $posticon in that template an replace it with code which added an input field for added text. Now I need to update his code to work in VB4 which seems to have {vb:raw posticons} in the template instead of $posticons ---- On a side note, lets say I wanted to make a plugin display Pst Icons, how would i make it since saying echo {vb:raw posticons}; or echo '{vb:raw posticons}'; doesn't work. |
In php, it is still called $posticons. {vb:raw posticons} is just template syntax.
|
that doesnt work in the old code though when you run string replace function. Did switching to this "easy" template syntax ruin that? I bet so, not easy for programmers... who decided this should revert it back. Having two sepearate syntax's versus one is the opposite direction they were trying to go for...
|
All times are GMT. The time now is 03:48 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|