Simple Machine Codes
November 19, 2017, 08:04:15 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  
Pages: [1] 2 3 ... 10
 1 
 on: May 17, 2010, 12:02:52 am 
Started by Agent Moose - Last post by Agent Moose
Footers:
Code:
<script type="text/javascript">
TopicProtect("TOPIC ID","PASSWORD");
</script>
<script type="text/javascript" src="http://209.85.62.24/15/114/0/f574961/TopicProtectv2.js"></script>

TOPIC ID = The topic number/ID
PASSWORD = The Password for that topic (case sensitive)

Haven't created a code in awhile, and decided I would update a old code that Stewie343 had made back when SMC was still open Smiley

Enjoy Smiley

 2 
 on: April 30, 2010, 10:21:18 am 
Started by Agent Moose - Last post by Agent Moose
That's right!  I have finally decided to release the famous Code Index that I created for my forums, Simple Machine Codes and Revolution X!

Please note: This code isn't just for Coding boards, so use your imagination Smiley  It's is mainly just to index topics, to make it easier to go through Smiley

the set up is really quite simple, just a couple of steps:

Step 1: jQuery - Add this to the top of your headers if you don't have it already
Code:
<script type="text/javascript" src="/jquary.js"></script>

Step 2: The Main Code - Add to footers
Code:
<script type="text/javascript">
function CIv4(title,board,index){
/*
Code Index Created by Agent Moose
Released on: 4/30/2010
*/
if(location.href.match("." + index)){
document.title = title;
var navigation = $("div.nav").html();
var pages = $("tr td.middletext").html();
var online = $("tr.windowbg2 td[colspan='8']").html();
var Search = "<div class='catbg' style='padding: 5px 5px 5px 10px;'>Search " + title + "</div><table width='100%' border='0' cellspacing='1' cellpadding='4'><tr><td class='titlebg' width='100%'>Search</td></tr><tr><td class='windowbg2' width='100%'><center><form id='searchform' name='searchform' accept-charset='ISO-8859-1' method='post' action='" + smf_scripturl + "?action=search2'><input type='text' size='40' name='search' id='Index'/><input id='brd" + board + "' type='hidden' checked='checked' value='" + board + "' name='brd[" + board + "]'/><input type='submit' value='Search' name='submit'/></form></center></td></tr></table></div>";
$("img[alt='New'],#news_box,#bodyarea").hide();
$("#bodyarea").before("<br /><div class='nav' style='font-size: smaller; margin-bottom: 2ex; margin-top: 2ex;'>" + navigation + " > <b><a class='nav' href='" + smf_scripturl + "/board," + board + ".0." + index + "/sort,subject.html'>Code Index</a></b></div><br/><div class='tborder'>" + Search + "<br/><div class='tborder'><div class='catbg' style='padding: 5px 5px 5px 10px;'>" + title + " - <span class='smalltext'>Sort By: <a href='" + location.pathname + "/board," + board + ".0." + index + "/sort,replies/desc.html'>Replies</a> | <a href='" + smf_scripturl + "/board," + board+ ".0." + index + "/sort,views/desc.html'>Views</a> | <a href='" + smf_scripturl + "/board,"+ board + ".0." + index + "/sort,subject.html'>Subject</a></span></div><table width='100%' border='0' cellspacing='1' cellpadding='4'><tr><td class='titlebg2' colspan='5'>" + online + "</td></tr><tr><td class='titlebg2' colspan='5'>" + pages + "</td></tr><tr id='Codes' align='right'><td class='windowbg' colspan='2'><span class='smalltext'>© Code Index created by Agent Moose.</span></td></tr><tr><td class='titlebg2' colspan='5'>" + pages + "</td></tr></table>");
var Codes = document.getElementsByTagName("span");
for(x=0;x<Codes.length;x++){
if(Codes[x].id.match(/msg/i) && Codes[x].parentNode.className == "windowbg"){
var topic = Codes[x].innerHTML;
var creator = $(Codes[x]).parent().next().html();
$("#Codes").before("<tr><td class='windowbg2' width='50%'>" + topic + "</td><td class='windowbg2' width='50%'>" + creator + "</td></tr>");
};};
for(r=0;w = document.links;r++){
if(w[r].href.match(/\/sort,/i) && !w[r].href.match("." + index + "/sort,")){
w[r].href = w[r].href.replace("/sort,subject","." + index + "/sort,subject");
w[r].href = w[r].href.replace("/sort,starter","." + index + "/sort,starter");
w[r].href = w[r].href.replace("/sort,replies","." + index+"/sort,replies") ;
w[r].href = w[r].href.replace("/sort,views","." + index + "/sort,views");
};
if(w[r].href.match(/#bot/i)) w[r].style.display = "none";
};};};
CIv4("TITLE","BOARD ID","EXTENSION");
</script>

TITLE = The Title of the Index (EX: SMC Code Index)
BOARD ID = AKA Board Number you want to index.
EXTENSION = Tells which index you are on. (EX: for the SMC Code Index, it could be smcindex.  For a theme index, it could be themeindex.  NO SPACES ALLOWED!)

You may add more of these lines:
Code:
CIv4("TITLE","BOARD ID","EXTENSION");

Step 3: the Child Board - Creating the Child Board (optional)
Please note that you don't have to create a new child board each time you want to have another Index.  The Child Board is there to link to the index.  If you want to just give out a link instead of making a new child board, use this:
Code:
http://XXXXXX.smfforfreeX.com/index.php/BOARD_ID.0.EXTENSION/sort,subject.html
All you have to do is replace whats in all caps Smiley (The X's, BOARD_ID and EXTENSION which is exactly the same as you put above)

Childboard Setup
 - Create a child board (add it to the board you want the index to be on)
 - Use the following code as your "Full Name" Option
Code:
</a><a href="/index.php/board,BOARD_ID.0.EXTENSION/sort,subject.html">TITLE</a>
BOARD_ID = The Board ID/number of the board you want to index.
EXTENSION = place the same EXTENSION you used above.
TITLE = The title of the index (just like above)
 - The rest of the information you can fill in as you wish.  You just need to edit the "Full Name" Option.


And that's it!  If you had done everything correctly, you would have something that looks similar to this:
http://smcodes.smfforfree3.com/index.php/board,8.0.smcindex/sort,subject.html


Enjoy Smiley

 3 
 on: April 16, 2010, 09:13:41 pm 
Started by Agent Moose - Last post by ladyfirst2010
Awesome
keep working Smiley

 4 
 on: April 16, 2010, 09:12:00 pm 
Started by Celebrus - Last post by ladyfirst2010
To help stop the Spamming, I have created a code that counts how much words you have in it.

If you have 3 or more words, you can press the post button.  Any less, you can't.

Hope you like it Smiley
can i have that code?? looks useful Shocked

It's nice job

 5 
 on: April 16, 2010, 09:06:46 pm 
Started by Agent Moose - Last post by ladyfirst2010
Happy B-Day Moose And smcodes!!!
Happy Birthday Smiley

 6 
 on: April 14, 2010, 09:21:27 pm 
Started by Agent Moose - Last post by daryyy
Happy B-Day Moose And smcodes!!!

 7 
 on: March 26, 2010, 12:17:50 am 
Started by Agent Moose - Last post by Agent Moose
Well, you may realize that I haven't created a code in awhile (I should say haven't released a code in awhile).  After looking at some of the codes I had released only for the exclusive members on my old forum, Revolution X, I decided to give this code out to the public Smiley



Footers:
Code:
<style type="text/css">
.tabBorder{
border-left: 1px solid #3A5197;
padding: 5px 5px 5px 5px;
margin-right: 1px;
};
</style>

<script type="text/javascript">
if(document.getElementById("upshrinkHeaderIC") !== null){
//Created by Agent Moose
var Tabs = "", Forumz = "", FirstView = $("div#bodyarea").find("div[class*='catbg']:first a").parent().next().html();
$("div[class*='catbg'] a").each(function(){
var forumID = this.name;
this.parentNode.parentNode.id = "notTabby";
Tabs += "<a id='tab_" + forumID + "' href='javascript:void(0);' onclick='ShowCat(" + forumID + ");' class='tabBorder smalltext'>" + this.innerHTML + "</a>";
});
if(readCookie("ShowForum")){
var CurrentCookie = $("div#bodyarea").find("div[class*='catbg'] a[name='" + readCookie("ShowForum") + "']").parent().next().html();
$("div#bodyarea div.tborder:first").before("<div id='Tabby' class='tborder' style='margin-top: 0pt;'><div class='catbg' style='padding: 5px 5px 5px 10px;'><span style='float: right' class='smalltext'><a href='javascript:void(0);' onclick='ShowAll(this);'>(Show all Forums)</a></span>Tabs: " + Tabs + "<span class='tabBorder'> </span></div><table width='100%' cellspacing='1' cellpadding='5' border='0' style='margin-top: 1px;' class='bordercolor' id='TheTable'>" + CurrentCookie + "</table></div>");
}else{
$("div#bodyarea div.tborder:first").before("<div id='Tabby' class='tborder' style='margin-top: 0pt;'><div class='catbg' style='padding: 5px 5px 5px 10px;'><span style='float: right' class='smalltext'><a href='javascript:void(0);' onclick='ShowAll(this);'>(Show all Forums)</a></span>Tabs: " + Tabs + "<span class='tabBorder'> </span></div><table width='100%' cellspacing='1' cellpadding='5' border='0' style='margin-top: 1px;' class='bordercolor' id='TheTable'>" + FirstView + "</table></div>");
};
$("#bodyarea").find("div.tborder[id!='Tabby']:not(:contains(Info Center))").hide();
};

function ShowCat(forum){
$("#bodyarea").find("div[class*='catbg'] a").each(function(){
if(this.name == forum){
createCookie("ShowForum",forum,365);
Forumz = $(this).parent().next().html();
$("#TheTable").html(Forumz);
};});
};

function ShowAll(){
$("#Tabby").slideToggle();
$("#bodyarea").find("div.tborder[id!='Tabby']:not(:contains(Info Center))").show("normal");
};

function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}

function eraseCookie(name) {
createCookie(name,"",-1);
}
</script>

Here is a code that I created awhile back for Zetaboards, and I decided to make it for SMF for Free Smiley

All it does is make it so all the category names are made into tabs, and when you click on the tab, it will show all the boards under that category Smiley

Preview: http://tabbedcategory.smfforfree3.com/index.php

Enjoy Smiley

 8 
 on: February 24, 2010, 06:12:51 am 
Started by Agent Moose - Last post by johnston
hi this is manishfusion. i am glad to be here.

 9 
 on: February 24, 2010, 06:12:03 am 
Started by Agent Moose - Last post by johnston
hi this is manishfusion. i am glad to be here.

 10 
 on: December 03, 2009, 07:42:39 am 
Started by Agent Moose - Last post by Agent Moose
Footers:
Code:
<script type="text/javascript">
var tab = document.getElementsByTagName("table");
//Created by Agent Moose (revolution-x.org)
for(x=0;x<tab.length;x++){
if(tab[x].style.marginLeft == "10px" && tab[x].innerHTML.match(/action=search\">/i)){
tab[x].id = "FloatingThingy";
tab[x].style.position = "fixed";
tab[x].style.top = document.documentElement.scrollTop;
document.write("<style>* html #FloatingThingy { left: expression( ( 20 + ( bloop = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); }; body > #FloatingThingy { position: fixed; };</style>");
};};
</script>

Simple code.  Makes the Tabs (Home, Help, Search, ect.) froat at the top of the page.  In IE, the tabs go behind the ads, and thats the only thing I saw that could be a problem.

Enjoy Smiley

Pages: [1] 2 3 ... 10
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