PDA

View Full Version : Help with mod making


cono1717
05-21-2009, 06:08 PM
Ok so as you know I am skinner at vBulletin. I'm not the best nor do I claim to be but I wanted to delve in to coding, so I checked out a tutorial (the video one..I forget which) and followed it and made my mod.

Everything works however it requires template edits how to I make these edit's go into the exported XML OR how do I create a custom template containing the code and add that to the navbar template. (I want it to appear there)

I tried creating a custom template called sponsor and placing

$sponsor in the navbar but it didn't work.

The only thing that worked was raw html <td><div> e.t.c but as I said earlier when I exported the XML from my test site and imported it to my live site the navbar template edit did not follow, I am sure this is something simple but just cannot find it.

Thanks,

Connor

PS sorry if I explained it terribly.

Lynne
05-21-2009, 06:28 PM
You need to have a plugin (or add this at the bottom of a plugin) to eval the template to use (this uses a template_hook):
eval('$template_hook[template_hook_name_here] .= " ' . fetch_template('your_template') . '";');or without a template_hook:
eval('$sponsor = "' . fetch_template('your_template') . '";');

And, you would select your product name when you edit your template and then it will export with it. You need to be in debug mode to do this.

cono1717
05-21-2009, 07:20 PM
And, you would select your product name when you edit your template and then it will export with it. You need to be in debug mode to do this.

I am in Debug mode how do I select my product before editing template.

Lynne
05-21-2009, 07:27 PM
If you are in debug mode, then when editing the template in the Master Style, you should see Product at the top and you would choose your product there.

EnIgMa1234
05-21-2009, 07:40 PM
That only works when adding new templates.

You can either add the edits needed in the .txt file and include it in your mod folder or you can do an automatic template edit (See article forum).

Lynne
05-21-2009, 08:10 PM
That only works when adding new templates.

Yes, you are right. I was talking about the template he created.

cono1717
05-22-2009, 11:02 AM
Well thanks to everyone! I got my mod working and am just about to release it, it's a simple starting mod but I hope to get better at it.

I must say another HUGE thanks to the support of vb.org's members.

Thanks