vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   Forum Home Enhancements - Great Affiliate Page for your Forum (https://vborg.vbsupport.ru/showthread.php?t=211791)

mikey1991 04-20-2009 10:00 PM

Great Affiliate Page for your Forum
 
1 Attachment(s)
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

mikey1991 04-21-2009 01:50 AM

1 Attachment(s)
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.

Jasem 04-21-2009 08:46 AM

This is great!! thank you!

DariuS7 04-21-2009 10:45 AM

Ooh fancy.

Sweeks 04-21-2009 12:21 PM

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

mikey1991 04-21-2009 04:01 PM

Quote:

Originally Posted by Sweeks (Post 1795892)
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.

Sweeks 04-21-2009 04:11 PM

Thanks matey. I will have this installed in a moment :)
________
Health store

Sweeks 04-21-2009 04:19 PM

Can I remove the link at the bottom?
________
Shemale Naomi

mikey1991 04-21-2009 05:48 PM

Quote:

Originally Posted by Sweeks (Post 1796087)
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 :)

Noosphere 04-22-2009 02:57 AM

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!

tipoboy 04-22-2009 07:54 AM

Quote:

Originally Posted by Noosphere (Post 1796459)
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>


mikey1991 04-22-2009 03:58 PM

Quote:

Originally Posted by Noosphere (Post 1796459)
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.

Noosphere 04-22-2009 10:41 PM

Awesome - thanks so much!

mikey1991 04-23-2009 02:43 AM

You're welcome :)

mikey1991 05-01-2009 03:31 AM

Made into a product and added as an Add-On, see first post.

Fastbird 05-08-2009 03:28 PM

Going to install this tonight! Thanks for the hack!

mikey1991 05-08-2009 11:08 PM

Thanks, you might want to check out the product, too, it's listed as an add-on. :)

Keesa 09-07-2009 09:18 AM

demo is dead.

ShawneyJ 09-09-2009 01:33 AM

this is actually pretty damn good m8, thanks.

ARKphoenix2k 05-03-2010 11:52 PM

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.

betts02 06-27-2010 06:41 PM

Great mod, Edited it to go in a custom extra navbar and changed the name of the template to my needs

DannyITR 12-31-2010 03:34 PM

Is there a fix for this for vb4?

DannyITR 01-10-2011 05:39 PM

Anything?

DannyITR 01-19-2011 03:19 PM

Anyone at all?

Lon 02-15-2011 10:33 PM

I can try to create a fix for Vb4.

mikey1991 02-28-2011 03:26 PM

Quote:

Originally Posted by DannyITR (Post 2141889)
Is there a fix for this for vb4?

this mod is for vB3, it will not work with vB4, therefore cannot be 'fixed'

DannyITR 03-13-2011 02:20 PM

Quote:

Originally Posted by mikey1991 (Post 2167899)
this mod is for vB3, it will not work with vB4, therefore cannot be 'fixed'

Absolutely it can be "fixed". With a few adjustments it will work with VB4. Then it would be "fixed".

DannyITR 03-13-2011 02:28 PM

To get this working in VB4 you need to use the correct generic shell template for vb4. The instructions for creating a link in the navbar won't work but you can access the page using the same link: misc.php?do=page&template=Affiliates.

Quote:

{vb:stylevar htmldoctype}
<html xmlns="http://www.w3.org/1999/xhtml"<vb:if condition="$vboptions['enablefacebookconnect']"> xmlns:fb="http://www.facebook.com/2008/fbml"</vb:if> dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">
<head>
{vb:raw headinclude}
<title>Affiliates</title>

{vb:raw headinclude_bottom}
</head>
<body>

{vb:raw header}

{vb:raw navbar}



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


HTML goes here


{vb:raw footer}
</body>
</html>


All times are GMT. The time now is 06:04 PM.

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.01508 seconds
  • Memory Usage 1,862KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (6)bbcode_html_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (28)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete