Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications

Reply
 
Thread Tools
Great Affiliate Page for your Forum Details »»
Great Affiliate Page for your Forum
Version: 1.01, by mikey1991 mikey1991 is offline
Developer Last Online: Jul 2021 Show Printable Version Email this Page

Category: Forum Home Enhancements - Version: 3.8.2 Rating:
Released: 04-20-2009 Last Update: Never Installs: 18
Template Edits
Re-useable Code Additional Files Translations  
No support by the author.

Okay, so here is a little template edit/hack that will add an official looking affiliates page to your forum.

Firstly, you'll need to go to the AdminCP -> Styles & Templates -> YourSkin* -> Add New Template, we'll name it "custom_Affiliates" (note the custom_ and the capital "A", these are very important.)

In your new template, copypaste the contents of the "GENERIC_SHELL" template. Which is as follows:

HTML Code:
$stylevar[htmldoctype]
<html xmlns="http://www.w3.org/1999/xhtml" dir="$stylevar[textdirection]" lang="$stylevar[languagecode]" id="vbulletin_html">
<head>
$headinclude
<title>$vboptions[bbtitle] - Affiliates</title>
</head>
<body>
$header
$navbar

$HTML

$footer
</body>
</html>
Now, heres the cool part, see that $HTML, up there in the template? Thats what you want to change in your new template.

so, here goes, find:
HTML Code:
$HTML
and replace it with:

HTML Code:
<div class="spacer"></div>



<div class="spacer"></div>

<div align="center">

<table class="tborder" border="0" cellpadding="6" cellspacing="1" width="95%">
<tbody>
<tr>
		<td class="tcat" colspan="4">Affiliates</td>
	</tr>
</tbody>
<tbody>
<tr>


<center>
<td class="alt2" width="5%"><img title="Affiliates" src="images/Aff1.png" alt="Affiliates" border="0"></td>
<td class="alt1"><div class="smallfont">

<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>

</div></td>
<td class="alt2" width="5%"><img title="Affiliates" src="images/Aff2.png" alt="Affiliates" border="0"></td>
<td class="alt1"><div class="smallfont">

<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>

</div></td>

	</tr>
</tbody>
</table>
<a href="http://parlancia.com"><div class="smallfont">Affiliates Page created by Mad Mikey</a></div>
</div>
Then, upload the two attached images (or two of your own choosing, name them Aff1 and Aff2, and make sure that they are *.png's) to http://yoursite.com/yourforumdir*/images (if you don't have a forum directory, upload to /images).

This should result in a page like this:

Image: http://i43.tinypic.com/2lxz76x.png

LIVE DEMO

Now, we add a link to it, where people can click it, so lets add a link to the navbar, shall we?

so, go to AdminCP -> Styles & Templates -> YourSkin* -> Navigation & Breadcrumb Templates -> navbar

find:
HTML Code:
<td class="vbmenu_control"><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></td>
Add below:

HTML Code:
<td class="vbmenu_control"><a href="misc.php?do=page&template=Affiliates"><abbr title="visit our affiliates today, click here!">Affiliates</abbr></a></td>
Now there should be a link on your navbar called "Affiliates" and when you hover your mouse over it, it will say in a little popup hoverbox thingy (yes, I know, that name is too awesome) "visit our affiliates today, click here!"... Feel free to customise that.

Just customise the template to your liking now, so, lets be sure, here is how the tag works:
Code:
<a href="HTTP://YOUR LINK GOES HERE.COM" target="_blank" title="THIS IS WHAT VISITORS WITHOUT IMAGES ENABLED WILL SEE">This is the link that people click to access your affiliates site.</a><br>
So, your finished template will look like this:

HTML Code:
$stylevar[htmldoctype]
<html xmlns="http://www.w3.org/1999/xhtml" dir="$stylevar[textdirection]" lang="$stylevar[languagecode]" id="vbulletin_html">
<head>
$headinclude
<title>Affiliates - $vboptions[bbtitle]</title>
</head>
<body>
$header
$navbar

<div class="spacer"></div>

<div class="spacer"></div>

<div align="center">

<table class="tborder" border="0" cellpadding="6" cellspacing="1" width="95%">
<tbody>
<tr>
		<td class="tcat" colspan="4">Affiliates</td>
	</tr>
</tbody>
<tbody>
<tr>


<center>
<td class="alt2" width="5%"><img title="Affiliates" src="images/Aff1.jpg" alt="Affiliates" border="0" WIDTH="80" HEIGHT="80"></td>
<td class="alt1"><div class="smallfont">

<a href="index.php" target="_blank" title="Parlancia Forums">Parlancia Forums</a><br />
<a href="http://therogueforums.com" target="_blank" title="The Rogue Forums">The Rogue Forums</a><br />
<a href="http://gamelair.com" target="_blank" title="GameLair">Gamelair</a><br />
<a href="http://zeroboards.net" target="_blank" title="ZeroBoards">ZeroBoards</a><br />

</div></td>
<td class="alt2" width="5%"><img title="Affiliates" src="images/Aff2.jpg" alt="Affiliates" border="0" WIDTH="80" HEIGHT="80"></td>
<td class="alt1"><div class="smallfont">

<a href="http://s1.zetaboards.com/DeviousTyrantRP" target="_blank" title="Devious Tyrant RP">Devious Tyrant RP</a><br>
<a href="http://www.foxhound-clan.com/" target="_blank" title="Foxhound">Foxhound</a><br>
<a href="http://www.davidalphin.com" target="_blank" title="David Alphin Forums">David Alphin Graphics</a><br>
<a href="http://www.mindtwistforums.com/" target="_blank" title="Mind Twist Forums">Mind Twist Forums</a><br>

</div></td>

	</tr>
</tbody>
</table>

</div>
<a href="http://parlancia.com"><div class="smallfont">Affiliates Page created by Mad Mikey</a></div>
<br />
$footer
</body>
</html>
Woot, All finished! you can access your finished poage from this link: http://yoursite.com/yourforumdir/misc.php?do=page&template=Affiliates

And you're all done =D

Wow, long read.

IF YOU USE THIS HACK AND LIKE IT, PLEASE CLICK INSTALLED.

To Do:
Make an Image\Flash Alternative
================================================== =============================================


*= Changes depending on board

(IF ANYONE CAN HELP ME MAKE THIS INTO A PRODUCT THAT CAN BE IMPORTED, IT WOULD BE GREATLTY APPRECIATED)

PRODUCT FOR THIS TEMPLATE EDIT

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 04-22-2009, 07:54 AM
tipoboy's Avatar
tipoboy tipoboy is offline
 
Join Date: Dec 2005
Location: scotland
Posts: 693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Noosphere View Post
I really like this
Any chance you could show me how to insert code to add 2 more boxes directly below the 2 affiliate boxes?

Great job!
just duplicate the code below the affiliates row as follows:

Code:
<table class="tborder" border="0" cellpadding="6" cellspacing="1" width="95%">
<tbody>
<tr>
  <td class="tcat" colspan="4">Affiliates</td>
 </tr>
</tbody>
<tbody>
<tr>

<center>
<td class="alt2" width="5%"><img title="Affiliates" src="images/Aff1.jpg" alt="Affiliates" border="0" WIDTH="80" HEIGHT="80"></td>
<td class="alt1"><div class="smallfont">
<a href="index.php" target="_blank" title="Parlancia Forums">Parlancia Forums</a><br />
<a href="http://therogueforums.com" target="_blank" title="The Rogue Forums">The Rogue Forums</a><br />
<a href="http://gamelair.com" target="_blank" title="GameLair">Gamelair</a><br />
<a href="http://zeroboards.net" target="_blank" title="ZeroBoards">ZeroBoards</a><br />
</div></td>
<td class="alt2" width="5%"><img title="Affiliates" src="images/Aff2.jpg" alt="Affiliates" border="0" WIDTH="80" HEIGHT="80"></td>
<td class="alt1"><div class="smallfont">
<a href="http://s1.zetaboards.com/DeviousTyrantRP" target="_blank" title="Devious Tyrant RP">Devious Tyrant RP</a><br>
<a href="http://www.foxhound-clan.com/" target="_blank" title="Foxhound">Foxhound</a><br>
<a href="http://www.davidalphin.com" target="_blank" title="David Alphin Forums">David Alphin Graphics</a><br>
<a href="http://www.mindtwistforums.com/" target="_blank" title="Mind Twist Forums">Mind Twist Forums</a><br>
</div></td>
 </tr>
 <tr>

<center>
<td class="alt2" width="5%"><img title="Affiliates" src="images/Aff1.jpg" alt="Affiliates" border="0" WIDTH="80" HEIGHT="80"></td>
<td class="alt1"><div class="smallfont">
<a href="index.php" target="_blank" title="Parlancia Forums">Parlancia Forums</a><br />
<a href="http://therogueforums.com" target="_blank" title="The Rogue Forums">The Rogue Forums</a><br />
<a href="http://gamelair.com" target="_blank" title="GameLair">Gamelair</a><br />
<a href="http://zeroboards.net" target="_blank" title="ZeroBoards">ZeroBoards</a><br />
</div></td>
<td class="alt2" width="5%"><img title="Affiliates" src="images/Aff2.jpg" alt="Affiliates" border="0" WIDTH="80" HEIGHT="80"></td>
<td class="alt1"><div class="smallfont">
<a href="http://s1.zetaboards.com/DeviousTyrantRP" target="_blank" title="Devious Tyrant RP">Devious Tyrant RP</a><br>
<a href="http://www.foxhound-clan.com/" target="_blank" title="Foxhound">Foxhound</a><br>
<a href="http://www.davidalphin.com" target="_blank" title="David Alphin Forums">David Alphin Graphics</a><br>
<a href="http://www.mindtwistforums.com/" target="_blank" title="Mind Twist Forums">Mind Twist Forums</a><br>
</div></td>
 </tr>
</tbody>
</table>
Reply With Quote
  #13  
Old 04-22-2009, 03:58 PM
mikey1991's Avatar
mikey1991 mikey1991 is offline
 
Join Date: Oct 2008
Location: United Kingdom
Posts: 654
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Noosphere View Post
I really like this
Any chance you could show me how to insert code to add 2 more boxes directly below the 2 affiliate boxes?

Great job!
See the first big block of code?

Copy
Code:
<tbody>
<tr>

<center>
<td class="alt2" width="5%"><img title="Affiliates" src="images/Aff1.png" alt="Affiliates" border="0"></td>
<td class="alt1"><div class="smallfont">

<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>

</div></td>
<td class="alt2" width="5%"><img title="Affiliates" src="images/Aff2.png" alt="Affiliates" border="0"></td>
<td class="alt1"><div class="smallfont">

<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>
<a href="#" target="_blank" title="Your Link Here">Your Link Here</a><br>

</div></td>
and put it before the </table> tags otherwise you'll just get two boxes on top of one another.
Reply With Quote
  #14  
Old 04-22-2009, 10:41 PM
Noosphere Noosphere is offline
 
Join Date: May 2008
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome - thanks so much!
Reply With Quote
  #15  
Old 04-23-2009, 02:43 AM
mikey1991's Avatar
mikey1991 mikey1991 is offline
 
Join Date: Oct 2008
Location: United Kingdom
Posts: 654
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're welcome
Reply With Quote
  #16  
Old 05-01-2009, 03:31 AM
mikey1991's Avatar
mikey1991 mikey1991 is offline
 
Join Date: Oct 2008
Location: United Kingdom
Posts: 654
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Made into a product and added as an Add-On, see first post.
Reply With Quote
  #17  
Old 05-08-2009, 03:28 PM
Fastbird's Avatar
Fastbird Fastbird is offline
 
Join Date: Aug 2005
Posts: 135
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Going to install this tonight! Thanks for the hack!
Reply With Quote
  #18  
Old 05-08-2009, 11:08 PM
mikey1991's Avatar
mikey1991 mikey1991 is offline
 
Join Date: Oct 2008
Location: United Kingdom
Posts: 654
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, you might want to check out the product, too, it's listed as an add-on.
Reply With Quote
  #19  
Old 09-07-2009, 09:18 AM
Keesa Keesa is offline
 
Join Date: Oct 2007
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

demo is dead.
Reply With Quote
  #20  
Old 09-09-2009, 01:33 AM
ShawneyJ's Avatar
ShawneyJ ShawneyJ is offline
 
Join Date: Jul 2006
Location: Australia
Posts: 1,758
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is actually pretty damn good m8, thanks.
Reply With Quote
  #21  
Old 05-03-2010, 11:52 PM
ARKphoenix2k ARKphoenix2k is offline
 
Join Date: Jul 2007
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey, i really like this mod, but how can i add it to my main forum page? Right at the bottom under Forum Statistics. I've seen it on a couple of forums.
Reply With Quote
Reply

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

Forum Jump


All times are GMT. The time now is 10:36 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06207 seconds
  • Memory Usage 2,379KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (6)bbcode_html
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete