vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=229)
-   -   Mini Mods - MFF Tag Cloud In Footer (https://vborg.vbsupport.ru/showthread.php?t=187731)

mcyates 08-09-2008 10:00 PM

MFF Tag Cloud In Footer
 
This is a really simple script which will add a tag cloud in the footer of your site (or wherever you put the code). Simply add this code:

Code:

<!-- TAG CLOUD -->
<center><script>
var advertiser = new Array();

advertiser[0]=["http://islandforum.net"," The Island"];
advertiser[1]=["http://www.myfootballforum.com"," My Football Forum"];
advertiser[2]=["http://www.myfootballforum.com"," Add Your Link Here"];

for( i=0; i<advertiser.length; i++){size = 8+(Math.random()*10);if( size < 9 ){color = 'red'}else if( size > 9 && size < 11 ){color = '#ffffff'}else if( size > 12 && size < 13 ){ color = 'yellow'}else if( size > 14 && size < 16 ){ color = '#ffffff'}else{color = '#ffffff';}document.write("<span style='font-size:"+size+"px;margin: 15px;'>");document.write("<a href='"+advertiser[i][0]+"' style='color:"+color+";text-decoration: none;' target='_blank'>"+advertiser[i][1]+"</a>");document.write("</span> ");}</script>
</center><br>
<!-- TAG CLOUD -->

It is all manual and to add or remove links you will have to edit the template where you add the code. Its a great hack as each time the page reloads, the links will be a different colour and size each time. You can change the size and the colour of the links in the bottom part of the code to whatever you want.

Demo is here, look at the footer:

http://www.myfootballforum.com/links.php

Brandon Sheley 08-11-2008 05:59 AM

I don't see then in your demo?

PoetJA-1975 08-11-2008 12:34 PM

Nevermind - That's not a tagcloud Dude - That's some sort of advertisement which you could easily have done with html. No need for javascript :-/

JAcquii.

nirvana43 08-11-2008 01:09 PM

nice one. Thanks man.


All times are GMT. The time now is 09:59 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.02760 seconds
  • Memory Usage 1,713KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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