Simple Machine Codes
April 18, 2024, 05:45:12 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  
  Show Posts
Pages: [1] 2 3 ... 49
1  Official / Announcements / MOVED: ATTENTION AGENT MOOSE! on: November 30, 2018, 07:36:25 pm
This topic has been moved to Staff Room.

http://smcodes.smfforfree3.com/index.php?topic=1212.0
2  Forum Coding / SMF For Free Codes / Password Protect Topics v2 on: May 17, 2010, 12:02:52 am
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
3  Forum Coding / SMF For Free Codes / SMC's Code Index on: April 30, 2010, 10:21:18 am
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
4  Forum Coding / SMF For Free Codes / Tabbed Categories on: March 26, 2010, 12:17:50 am
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
5  Forum Coding / SMF For Free Codes / Flaoting Tabs on: December 03, 2009, 07:42:39 am
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
6  Forum Coding / SMF For Free Codes / Save Headers/Footers to Admin Notepad Button on: November 23, 2009, 03:21:55 pm
Footers:
Code:
<script type="text/javascript">
//Created by Agent Moose (http://www.revolution-x.org)
$("input[name*='cmdS']").after(" <input type='button' id='Save2ANotes' value='Save Headers/Footers to Admin Notepad' />"); (document.getElementById("Save2ANotes")) ? document.getElementById("Save2ANotes").onclick = function(){$.post(smf_scripturl + "?action=savenote",{txtnotes: "HEADERS:\n" + $('[name*=txth]').val() + "\n\nFOOTERS:\n" + $('[name*=txtf]').val()}); document.forms[3].submit();} : void(0);
</script>

NOTE:  This code uses Ad Free Credits!

The title says it all.  This adds a button next to the "Save Headers Footers" button labeled "Save Headers/Footers to Admin Notepad".  It's pretty much a way to backup your headers and footers with the press of a button Smiley

When you click the button, it saves the Headers and Footers, and it saves all the information you have in them into the Admin Notepad.

Enjoy Smiley

7  Forum Coding / SMF For Free Codes / New Search Bar on: September 21, 2009, 07:14:28 am
Footers:
Code:
<script type="text/javascript">
var a = document.getElementsByTagName("form");
for(x=0;x<a.length;x++){
//Created by Agent Moose (revolutionx.smfforfree3.com)
if(a[x].action.match(/action=search2/i) && a[x].parentNode.valign == "top" && a[x].nowrap == "nowrap" && a[x].parentNode.parentNode.parentNode.parentNode.id == "upshrinkHeader2" && location.href.match(/board,(\d+)./i)){
a[x].innerHTML = "<form id='searchform' name='searchform' accept-charset='ISO-8859-1' method='post' action='" + smf_scripturl + "action=search2'><input type='text' style='width: 190px;' name='search'/><input id='brd" + RegExp.$1 + "' type='hidden' checked='checked' value='" + RegExp.$1 + "' name='brd[" + RegExp.$1 + "]'/><input type='submit' value='Search' name='submit'/></form>"
};};
</script>

Original Request: http://revolutionx.smfforfree3.com/index.php/topic,1073.0.html

This code is very simple.  It changes the search bar you have up top, to make it only search the board that you are in.  If you are on the index page, or any other page that doesn't deal with a board, it will search the whole forum Smiley

Enjoy Smiley

EDIT:
Code Updated
8  Forum Coding / SMF For Free Codes / User Widget on: September 21, 2009, 07:14:08 am
Footers:
Code:
<script type="text/javascript">
var yes = "Welcome {user}.";
var no = "Please <a href='" + smf_scripturl + "?action=login'>Login</a> or <a href='" + smf_scripturl + "?action=join'>Register</a>";

var name = document.getElementsByTagName("span");
//Created by Agent Moose (revolutionx.smfforfree3.com)
for(v=0;v<name.length;v++){
if(name[v].innerHTML.match(/Hello <b>(.*)<\/b>/i)){
var username = RegExp.$1;
if(yes.match(/{user}/i)) yes = yes.replace(/{user}/i,username);
};};
var O_o = document.getElementsByTagName("td");
for(o_O=0;o_O<O_o.length;o_O++){
if(O_o[o_O].className == "catbg" && O_o[o_O].height == "32" && username){
O_o[o_O].innerHTML = "<span style='float: right;'>" + yes + "</span>" + O_o[o_O].innerHTML;
}else if(O_o[o_O].className == "catbg" && O_o[o_O].height == "32" && !username){
O_o[o_O].innerHTML = "<span style='float: right;'>" + no + "</span>" + O_o[o_O].innerHTML;
};};
</script>

Original Request: http://revolutionx.smfforfree3.com/index.php/topic,1010.0.html

This code will add either "Welcome {user}" or "Please Login or Register" to the top where it shows your board name. If you have a banner for your forum, this code will not look very well on your forum.

Edit as you wish Smiley  If you put {user} in the var yes = ""; part, it will show the users' username Smiley

Enjoy Smiley
9  Forum Coding / SMF For Free Codes / User Notice on: July 21, 2009, 11:46:42 pm
Footers:
Code:
<script type="text/javascript">
var Symbol = "SYMBOL";
var NoticeText = "NOTICE TEXT";

var Notice = new Array(); var z = 0;
Notice[z++] = ["NAME","REASON"];

//Created by Agent Moose (revolutionx.smfforfree3.com)
var name = document.getElementsByTagName("span");
for(v=0;v<name.length;v++){
if(name[v].innerHTML.match(/Hello <b>(.*)<\/b>/i)){
var username = RegExp.$1;
};};
for(x=0;x<Notice.length;x++){
if(username == Notice[x][0]){
document.getElementById("bodyarea").innerHTML = '<div style="border: 2px dashed rgb(204, 51, 68); margin: 2ex; padding: 2ex; color: black; background-color: rgb(255, 228, 233);"><div style="float: left; width: 2ex; font-size: 2em; color: red;">' + Symbol + '</div><b style="text-decoration: underline;">' + Notice[x][0] + '</b><br/><div style="padding-left: 6ex;">' + NoticeText + Notice[x][1] + '</div></div>' + document.getElementById("bodyarea").innerHTML;
};};
</script>
Original Request: http://revolutionx.smfforfree3.com/index.php/topic,856.0.html

This will add a notice box to a certain user, which the admin can specify Smiley

SYMBOL = The Symbol that will be left of the text (example: "!!")
NOTICE = the Text before the Username (example: "Notice: Username")
NAME = The User you want the notice box to show up for
REASON = The reason why that user is getting the notice.

Enjoy Smiley
10  Forum Coding / SMF For Free Codes / Change the Moved Topic Message on: July 21, 2009, 11:45:03 pm
Code:
<script type="text/javascript">
var moved = "MESSAGE";

var na = document.getElementsByTagName("span");
for(me=0;me<na.length;me++){
if(na[me].innerHTML.match("ello <b>(.*)</b")){
var usehername = RegExp.$1;
if(moved.match("[USER]")) moved = moved.replace("[USER]",usehername);
};};
var mo = document.getElementsByTagName("textarea");
for(ve=0;ve<mo.length;ve++){
if(mo[ve].name == "reason"){
mo[ve].value = moved;
};};
</script>

Original Request: http://revolutionx.smfforfree3.com/index.php/topic,918.0.html

This code lets you change the Move Topic Message.

MESSAGE = The Message that the moved topic message will be changed to.

There are a couple of things you may use:
[BOARD] = The Board the topic has been moved to.
[USER] = The username of the person who moved it.
[TOPIC URL] = The Topic URL of the topic that was moved.

if you want to add line spaces, add \n for each one.

So, if I had this:
Code:
This topic has been moved to [BOARD] by [USER].\n\n[TOPIC URL]

It would look like this:
Quote
This topic has been moved to [BOARD] by [USER].

[TOPIC URL]

Now, this code edits the Moved Topic Message box, making it so all you have to do is press the Move button when moving a topic.

Enjoy Smiley
11  Forum Coding / SMF For Free Codes / Add more Fonts on: June 28, 2009, 12:06:53 pm
Footers:
Code:
<script type="text/javascript">
var FontFace = new Array();var w = 0;
FontFace[w++] = "Arial";
FontFace[w++] = "Arial Black";
FontFace[w++] = "Arial Narrow";
FontFace[w++] = "Book Antiqua";
FontFace[w++] = "Century Gothic";
FontFace[w++] = "Comic Sans MS";
FontFace[w++] = "Courier New";
FontFace[w++] = "Fixedsys";
FontFace[w++] = "Franklin Gothic Medium";
FontFace[w++] = "Garamond";
FontFace[w++] = "Georgia";
FontFace[w++] = "Lucida Console";
FontFace[w++] = "Lucida Sans Unicode";
FontFace[w++] = "Microsoft Sans Serif";
FontFace[w++] = "Palatino Linotype";
FontFace[w++] = "System";
FontFace[w++] = "Tahoma";
FontFace[w++] = "Times New Roman";
FontFace[w++] = "Trebuchet MS";
FontFace[w++] = "Verdana";

var Options = "";
//Created by Agent Moose (revolutionx.smfforfree3.com)
for(x=0;x<FontFace.length;x++){
Options += "<option value='" + FontFace[x] + "'>" + FontFace[x] + "</option>";
};
$("a img[src*='bbc/face.gif']").each(function(){
var Selection = "<select id='FONT' style='margin-bottom: 1ex;'><option value='' selected='selected'>Change Font</option>" + Options + "</select>";
$(this).parent().after(Selection);
this.parentNode.style.display = "none";
});
$("#FONT option").click(function(){
surroundText('[font=' + this.value.toLowerCase() + ']', '[/font]', document.forms.postmodify.message); this.selectedIndex = 0; document.forms.postmodify.message.focus(document.forms.postmodify.message.caretPos);
});
</script>

Original Request: http://revolutionx.smfforfree3.com/index.php/topic,796.0.html

This code will replace the Font Face type () with a selection box, alowing you to choose a font that you would like to use.

Easy and Effective Smiley

If you would like to add more fonts, add more of these lines:
FontFace[w++] = "FONT NAME";

If you would like to remove any of the fonts that are already in the code, you may go ahead and do so.

Enjoy Smiley
12  Forum Coding / SMF For Free Codes / Password Protect Webpage on: June 16, 2009, 08:04:43 am
Footers:
Code:
<script type="text/javascript">
function PassProWeb(p,w){
if(location.href.match("/" + p + ".php") || location.href.match("ezportal;sa=page;" + p) && !location.href.match("pass=" + w)){
document.getElementById("bodyarea").innerHTML = "<div class='tborder' id='PassProWeb'><div class='catbg' st" + "yle='padding: 6px; vertical-align: middle; text-align: center;'>Board Protected</div><div><table border='0' width='100%' cellspacing='1' cellpadding='4' class='bordercolor'><tr><td class='windowbg2' width='100%'><center><br><i>Enter Password:<br>(Password is Case Sensitive)</i><br /><input type='text' id='ppw' /><br /><br /><input type='button' onclick='PressMe(\"" + w + "\");' value='Enter' /></center></td></tr></table></div></div>";
};};
function PressMe(pW){
var pw = document.getElementById("ppw");
if(pw.value == pW){
if(location.href.match(/\/pages\//i)) window.location.href = window.location.href + "?pass=" + pW;
if(location.href.match(/ezportal;sa=page;p/i)) window.location.href = window.location.href + ";pass=" + pW;
}else if(pw.value == ""){
alert("Enter a Password");
}else{
alert("Password is incorrect");
};};
PassProWeb("PAGE","PASSWORD");
</script>

Original request:http://revolutionx.smfforfree3.com/index.php/topic,695.0.html

This code lets you add a Password, that is case sensitive, to a webpage you have created.  It works in either the Webpage Editor webpages, or the ez-portal pages Smiley

PAGE = The name of the page,
 - If you want to use the Webpage Editor Page, use the Name of the webpage.  You need the correct name too, so go to that webpage and look at the URL, you will see something like this:
Quote
http://XXXXXXXX.smfforfreeX.com/pages/XXXXXXXX/test.php
The red text is the text that you will put for the name of the webpage.
 - If you want to use the ezPortal page, go to it and you will see something like this:
Quote
http://XXXXXXXX.smfforfreeX.com/index.php?action=ezportal;sa=page;p=1
Again, the red text is the part you would put for the name part.
PASSWORD = The password for that page.  The password is case sensative.

Here are two examples of how to edit the code:
Code:
PassProWeb("test","moose");
PassProWeb("p=1","Agent");

Also, to add more pages to protect, add more of these lines:
Code:
PassProWeb("PAGE","PASSWORD");

Enjoy Smiley
13  Forum Coding / SMF For Free Codes / Change "Topic:" Text on: June 12, 2009, 08:31:38 am
Footers:
Code:
<script type="text/javascript">
var new = "Text; ";

var c = document.getElementById("top_subject");
//Created by Agent Moose (revolutionx.smfforfree3.com)
var subj = c.innerHTML.split("Topic:")[1];
c.innerHTML = new + subj;
</script>

You know how when you're viewing a topic, and it says: Topic: (topic)  (Read (number) times)?  Now you can change that text!

Just edit this line:
Code:
var new = "Text; ";

Enjoy Smiley
14  Forum Coding / SMF For Free Codes / Word Counter v1 on: June 03, 2009, 11:51:27 am
Footers:
Code:
<script type="text/javascript">
var NumWords = 3;

//Created by Agent Moose (revolutionx.smfforfree3.com)
var username = $("td.titlebg2 span b").not($("td.titlebg2 span b:contains(News)")).html();
if(username){
if(location.href.match(/action=post/i)){
$("textarea[name='message']").after("<span id='SMC_Count'>Total words typed: <b>0</b></span>");
}else if(location.href.match(/topic,/i) && document.forms.postmodify.message){
$("tr#quickReplyOptions td[width='25%']").html("<span id='SMC_Count'>Total words typed: <b>0</b></span>");
};
if(location.href.match(/action=post/i) || location.href.match(/topic,/i) && document.forms.postmodify.message){
$("input[value='Post'],input[value='Preview']").attr("disabled","disabled");
document.forms.postmodify.message.onkeyup = function(){
var Words = document.forms.postmodify.message.value.split(/ /g); var Count = 0;
for(i=0;i<Words.length;i++) if(Words[i].length > 2) Count++;
var Bar = Count * 2;
$("#SMC_Count").html("Total words typed: <b>" + Count + "</b>");
if(Count < NumWords) $("input[value='Post'],input[value='Preview']").attr("disabled","disabled");
if(Count >= NumWords) $("input[value='Post'],input[value='Preview']").attr("disabled","");
};};
};
</script>

Well, I decided to finally release this code.  Its not the same as the one we have on here, but its all you need Tongue

This code makes it so if you have under a certain amount of words in a post, you can't post that post.

See this line at the top of the code?
Code:
var NumWords = 3;
The 3 is how many words you need enable to submit a post Smiley

Enjoy Smiley
15  Forum Coding / SMF For Free Codes / Certain Image on a Certain Page on: May 30, 2009, 08:59:20 pm
Headers:
Code:
<script type="text/javascript">
function CertainBanner(tab,img){ if(location.href.match("action=" + tab)) document.write("<center><img src='" + img + "' /></center>"); };
CertainBanner("SECTION","URL");
</script>
Original Request: http://www.smfsupport.com/support/code_requests/request_certain_banners_for_certain_pages-t27113.0.html

SECTION = The page you want the image to show
To get the SECTION part, click on one of the tabs and look in the URL for the red part:
Quote
?action=forum

That would be the part you need to put in the SECTION part of the code.

URL = The URL of the image.

Here is an example of how to edit the code:
Code:
CertainBanner("admin","http://i56.photobucket.com/albums/g188/yort124/lick.gif");
The SECTION part is "admin", which I got from "?action=admin", meaning that the image specified would only appear on the admin section of the forum.

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