vBulletin Modifications

create templates

Welcome to vBHackers.com! - vBHackers Updates:

Go Back   vBulletin Modifications > General vBulletin Section > General vBulletin Support

Reply
 
LinkBack Thread Tools
Old 09-29-2006, 01:32 PM   #11
cdembek@hotmail.com's Avatar
Join Date: Jan 2006
Location: North East
cdembek@hotmail.com is on a distinguished road

Default

Quote:
Originally Posted by rogersnm
Here it is: replace $variable with your variable and template with your template name:
You must first be a registered member to view any code.

what would be an example of a variable??

b/c I entered this into my navbar template as follows

eval('$sponsor = "' . fetch_template('sponsor') . '";');

but it only displayed
eval('$sponsor = "' . fetch_template('sponsor') . '";');

does this have to be entered in to a php file, if so where??




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 09-29-2006, 02:31 PM   #12
Coder
BigJohnny's Avatar
Join Date: Jul 2006
BigJohnny is on a distinguished road

Default

it needs to be placed in a plugin, and assigned a product.

go to your plugins manager, and add a new plugin.
give it a name, and select the appropriate hook.

then you will be able to use $sponsor.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-04-2006, 02:21 PM   #13
cdembek@hotmail.com's Avatar
Join Date: Jan 2006
Location: North East
cdembek@hotmail.com is on a distinguished road

Default

Ok..

I created a plugin php code with the eval statement from above

assigned to vbulletin for a product

Used global_complete for the hook

anything I am missing??

btw where can I read more about these things?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-04-2006, 02:56 PM   #14
cdembek@hotmail.com's Avatar
Join Date: Jan 2006
Location: North East
cdembek@hotmail.com is on a distinguished road

Default

Well I added $sponsor to my header template (at the bottom) and nothing... so I must be missing something




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-04-2006, 04:41 PM   #15
Coder
BigJohnny's Avatar
Join Date: Jul 2006
BigJohnny is on a distinguished road

Default

Probably used the wrong hook. maybe also didnt change the names (EDIT) I just changed my plugin to global_start and it still shows up fine. as a matter of fact i can now use my $varible anywhere on the board.

first, where are you wanting the sponsor template to show up?

if you want it to show on your forumhome, then you would use the forumhome_start hook and put this code in that hook.

You must first be a registered member to view any code.
What this does; Every time the forumhome template is loaded, it executes this code, which loads the template into the $sponsor variable.
Once that is loaded, anywhere on forumhome that it sees $sponsor, it spits out the contents of that variable....

at least i think this is how it works.

im not sure about the global hooks, so ive been using specific hooks.

Also, you may not have set the plugin to active when you created it.

If there is a strikethrough on the title of the plugin, then it isnt active.

Last edited by BigJohnny; 10-04-2006 at 04:46 PM.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-04-2006, 04:43 PM   #16
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

Well he said the header ;) You could try putting:
You must first be a registered member to view any code.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-04-2006, 04:48 PM   #17
Coder
BigJohnny's Avatar
Join Date: Jul 2006
BigJohnny is on a distinguished road

Default

i missed that.

by why does he need to eval the header? he wants to put sponsor, plus header is already eval'd .... its put there by $header :p




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-04-2006, 04:50 PM   #18
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

Because if the header is evaled before you eval the sponsor variable then the variable will be empty, this might be the case so it might be fixed by doing that.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-04-2006, 04:59 PM   #19
Coder
BigJohnny's Avatar
Join Date: Jul 2006
BigJohnny is on a distinguished road

Default

then he needs to find where the header is being evaled, and insert his sponsor code in that hook??




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-04-2006, 05:00 PM   #20
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

No, he just needs to use the code I gave him.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create new page for ghost members? KingYes General vBulletin Support 7 06-09-2006 04:38 PM
is there a way to create multiple annoments jeneepen General vBulletin Support 4 06-05-2006 10:42 PM
create subdomains automatic premium vBulletin Modification Requests 1 12-29-2005 08:28 AM
Copy Templates for All Skins grindking vBulletin Modification Requests 6 05-31-2005 11:56 AM
Search for some dark colors templates sighuu General vBulletin Support 0 11-22-2004 01:33 PM


All times are GMT -3. The time now is 08:35 PM.


SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. (Patent Pending)