Simple Machine Codes
October 23, 2018, 07:44:04 pm
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to SMC, the best place for your SMF For Free Codes
 
  Home Help Search Arcade Gallery Affiliates Code Index Staff List Calendar Members Login Register  

Add Box Under Stats

Pages: [1]   Go Down
  Print  
Author Topic: Add Box Under Stats  (Read 1864 times)
Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,671



View Profile WWW
« on: May 17, 2007, 07:28:09 pm »

Place this in your Headers or Footers:
Code:
<script>
function add_box_stats(){
//Created by Agent Moose (smcodes.smfforfree3.com)
var title = "TITLE";
var content = "CONTENT";

if(location.href.match(/index.php/)){
var table = document.getElementsByTagName("Table");
for(x=0;x<table.length;x++){
if(table[x].innerHTML.match(/Most Online Today:/i)){
table[x].innerHTML += "<table border='0' width='100%' cellspacing='1' cellpadding='4' class='bordercolor'><tr><td class='titlebg' colspan='2'>"+title+"</td></tr><tr><td class='windowbg2' width='100%'><span class='middletext'>" + content + "</span></td></tr></table>";
};};};};
add_box_stats();
</script>
Just change the TITLE part to the title you want for it, then change CONTENT to your text.  You may use HTML if you wish.
« Last Edit: May 02, 2008, 09:37:42 pm by Agent Moose » Report Spam   Logged

Social Buttons

deathwilldie
100 Club Member

Offline Offline

Posts: 214


View Profile WWW
« Reply #1 on: May 18, 2007, 10:53:42 pm »

This is an awesome code.  Are you able to put other codes in it like an Affiliate Box thing?
Report Spam   Logged

Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,671



View Profile WWW
« Reply #2 on: May 19, 2007, 10:58:07 am »

Yep Smiley.  You could use any HTML you want to with it.
Report Spam   Logged

Myrtle
The Girl With The Forum.
100 Club Member

Offline Offline

Gender: Female
Posts: 480


Death Note(Credits to Kai): Myrtle_Gail, Myr-chan


View Profile WWW
« Reply #3 on: February 05, 2008, 06:37:52 am »

What does it specifically do?
Report Spam   Logged

Celebrus
Artificially Conscious
Administrator

Offline Offline

Gender: Male
Posts: 1,337


aka Omikron


View Profile WWW
« Reply #4 on: February 05, 2008, 06:40:56 am »

It adds a box in the stats region of your forum. What the box contains is your choice. Wink
Report Spam   Logged

Myrtle
The Girl With The Forum.
100 Club Member

Offline Offline

Gender: Female
Posts: 480


Death Note(Credits to Kai): Myrtle_Gail, Myr-chan


View Profile WWW
« Reply #5 on: February 05, 2008, 09:01:19 am »

I tried it on my test forum and it won't work. Is it only me?
Report Spam   Logged

Agent Moose Jr.
Ultra Contagious
Global Moderator

Offline Offline

Gender: Male
Posts: 1,044



View Profile WWW
« Reply #6 on: February 05, 2008, 02:23:18 pm »

make sure you have this in ur header

Code:
<script src="jquery.js"></script>
Report Spam   Logged

Newest:

Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum | Buy traffic for your forum/website

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy