Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications
FAQ Community Calendar Today's Posts Search

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
  #2  
Old 04-21-2009, 01:50 AM
mikey1991's Avatar
mikey1991 mikey1991 is offline
 
Join Date: Oct 2008
Location: United Kingdom
Posts: 654
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Upload Aff1.png and Aff2.png to "yoursite.com/yourforum/images"

sample.png is a screenshot of what it should look like.

~RESERVED~


Remember to click install if you use this. All the people who have replied haven't clicked install, even if they say they're going to be using it.
Attached Images
File Type: jpg Aff1.jpg (4.5 KB, 0 views)
File Type: jpg Aff2.jpg (4.5 KB, 0 views)
File Type: jpg sample.jpg (48.9 KB, 0 views)
Reply With Quote
  #3  
Old 04-21-2009, 08:46 AM
Jasem's Avatar
Jasem Jasem is offline
 
Join Date: Feb 2006
Location: www.menokia.com
Posts: 594
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is great!! thank you!
Reply With Quote
  #4  
Old 04-21-2009, 10:45 AM
DariuS7 DariuS7 is offline
 
Join Date: Mar 2009
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ooh fancy.
Reply With Quote
  #5  
Old 04-21-2009, 12:21 PM
Sweeks Sweeks is offline
 
Join Date: Jul 2008
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Rather nice, will try an install later on

Thank you for this.

EDIT: Just noticed on your example it says "Parlancia better viewed in Firefox", does the same go for this template or is it cross browser compatible?

Thanks
________
Hawaii dispensary
Reply With Quote
  #6  
Old 04-21-2009, 04:01 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 Sweeks View Post
Rather nice, will try an install later on

Thank you for this.

EDIT: Just noticed on your example it says "Parlancia better viewed in Firefox", does the same go for this template or is it cross browser compatible?

Thanks
That statement is there because we don't support internet explorer related errors, and we have optimised certain templates for FireFox, that's all. This template is cross browser enabled, feel free to try it in safari, opera, IE 6,7,8 and chrome.
Reply With Quote
  #7  
Old 04-21-2009, 04:11 PM
Sweeks Sweeks is offline
 
Join Date: Jul 2008
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks matey. I will have this installed in a moment
________
Health store
Reply With Quote
  #8  
Old 04-21-2009, 04:19 PM
Sweeks Sweeks is offline
 
Join Date: Jul 2008
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can I remove the link at the bottom?
________
Shemale Naomi
Reply With Quote
  #9  
Old 04-21-2009, 05:48 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 Sweeks View Post
Can I remove the link at the bottom?
You may, though I would appreciate it if some sort of link was left, either to this page, or my forum
Reply With Quote
  #10  
Old 04-22-2009, 02:57 AM
Noosphere Noosphere is offline
 
Join Date: May 2008
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
Reply


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 01:46 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05788 seconds
  • Memory Usage 2,363KB
  • Queries Executed 24 (?)
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
  • (1)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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (3)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete