Need Small Fix for custom Mod

TechN9ne1730

New Member
I am trying to write my first add on in quite some time, so my coding skills are a bit rusty. Can some one help me fire out where I went wrong?
 

alexD

New Member
I will give it a shot and see where your coding is off what are you trying to do with this and have you included the correct hook?
 

TechN9ne1730

New Member
Basically just trying to write a plug in to put the new thread button in the show thread template. I know there is a template edit for this but I would rather accomplish it via a plug in so that the manual edit doesnt need to be done every time a new skin is added.

As for the hook I cant confirm this but I believe I have used the right one. I am using the "parse_templates" hook. This is the error i get when I enable it:
Parse error: syntax error, unexpected T_STRING in /public_html/forum/global.php(614) : eval()'d code on line 1210.
 

w00t!

New Member
TechN9ne1730 said:
Basically just trying to write a plug in to put the new thread button in the show thread template. I know there is a template edit for this but I would rather accomplish it via a plug in so that the manual edit doesnt need to be done every time a new skin is added.

As for the hook I cant confirm this but I believe I have used the right one. I am using the "parse_templates" hook. This is the error i get when I enable it:
This error is caused because you use ' (single quotes) on str_replace string put \ before all single quotes (like $show[\'largereplybutton\'])

i'm not test it :p

(sorry for bad the english)
 

alexD

New Member
Sorry mate i just checked it out and so far all I was able to see is your used xml`s CDATA to send the plugins title which you should only use the pares data info from xml for the actually php code other then that I havent fully checked it i`ll look on vbulletin.org for hooks and there locations and will try to come up with a working model also you may wont to add and execution order instead of the product attribute you used in your <plugin> tag. I`ll work on this tonite after school and will host the hooks heres for anyone who would like to make mods.
 

alexD

New Member
Yeah I havent yet found any source but i do have a ebook that I`ll post on here and it shows how to make mods.
 

alexD

New Member
You used single quotes instead of double quotes for the string replace function the rest seems solid you might check to make sure that its using the right classes I`ll check vb or that mod your making plugin for.
 

TechN9ne1730

New Member
Well i applied the fixes you guys mentioned above and have uploaded the new xml. It does not cause any error but simply refuses to work as there is not a "new thread" button showing up in show thread.
 

alexD

New Member
Ok sorry I`m late to the show I`m pretty sure theres no hook named parse_template and that they used cache_template or template_cache let me look again but in the mean time I have the hooks xml file here I`ll test some of them out and see where that goes and I`ll also look to see how they set the template cache. The xml file is for 3.7.4 but you can ind the 3.7.3 version in the includes/xml/hooks_vbulletin.xml directory.
 

TechN9ne1730

New Member
Parse_Templates is under <hooktype type="general">. If my server quits acting a fool i will try showthread_start and some other hooks to. Here is the hooks for 3.8 Beta 2
 

TechN9ne1730

New Member
Ok changed to showhread_start for the hook and made some small tweaks and got it down to one small error:
Parse error: syntax error, unexpected T_VARIABLE in /test/showthread.php(112) : eval()'d code on line 14
 

alexD

New Member
Sorry i havent been on the net in a few days i`ll look at your new one and i`ll see what i can do but for today i have school but i`ll work on it tonite.
 

Mohan

New Member
sick%20tree_47ff78f6dad7f.jpg

Here you are mate. a hand
 
Top