Simple Machine Codes
March 29, 2024, 01:28:57 am
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  

Latest Topic Tab

Pages: [1]   Go Down
  Print  
Author Topic: Latest Topic Tab  (Read 262 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,672



View Profile WWW
« on: November 20, 2007, 10:32:26 pm »

Footers
Code:
<script>
var TabNewsBoard = "BOARD"

if(window.ActiveXObject){var TabNews = new ActiveXObject("Microsoft.XMLHTTP");}else{var TabNews = new XMLHttpRequest();};
//Created by Agent Moose (smcodes.smfforfree3.com)
var loc = window.location.href.split('index.php')[0];
TabNews.open("GET",loc+"/index.php/board,"+TabNewsBoard,true);
TabNews.onreadystatechange = function(){
if(TabNews.readyState == 4){
var moose = document.createElement("div");
moose.innerHTML = TabNews.responseText;
var topic = moose.getElementsByTagName("span");
for(x=0;x<topic.length;x++){
if(topic[x].id.match(/msg/i) && topic[x].parentNode.className == "windowbg" && topic[x].parentNode.innerHTML.match(/newicon/i)){
$(".maintab_back:contains(Logout),.maintab_back:contains(Register)").after('<td class="maintab_last">&#'+'8195;</td><td class="maintab_first"/><td valign="top" class="maintab_back">'+topic[x].innerHTML+'</td>');
};};};};
TabNews.send("");
</script>

After relising this wasn't the code that was request, I decided to go ahead and post it.  It makes a new tab up top with a link with the Latest topic that was posted in.

BOARD = The board ID that you want the topic to be from.
« Last Edit: November 21, 2007, 12:50:46 pm by Agent Moose » Report Spam   Logged

Share on Facebook Share on Twitter

Agent Moose Jr.
Ultra Contagious
Global Moderator

Offline Offline

Gender: Male
Posts: 1,045



View Profile WWW
« Reply #1 on: January 04, 2008, 01:11:52 pm »

nice job
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

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