Simple Machine Codes
April 19, 2024, 12:18:59 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  

Auto Text

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

Offline Offline

Gender: Male
Posts: 2,672



View Profile WWW
« on: July 02, 2007, 07:20:07 pm »

Footers or Headers:
Code:
<script>
function auto_text() {
//Created by Agent Moose at smcodes.smfforfree3.com
var autotext = new Array();
autotext[autotext.length] = ["TEXT TO TYPE","TEXT TO SHOW"]

var post = document.getElementsByTagName("div");
for(x=0;x<post.length;x++){
for(z=0;z<autotext.length;z++){
if(post[x].innerHTML.match(autotext[z][0]) && post[x].className == "post"){
post[x].innerHTML = post[x].innerHTML.replace(autotext[z][0],autotext[z][1]);
};};};};
auto_text();
</script>
This is a code that just makes you type less.

TEXT TO TYPE = The text you will need to type to show the TEXT TO SHOW PART. (I recomend using weird symbles and not just a word.)
TEXT TO SHOW = The text that will show up when you type in the TEXT TO TYPE part.

So, if I did this:
Code:
autotext[autotext.length] = ["[welcome]","Welcome to the forums!"]
You would type [welcome] into the post, then when people are veiwing the post, it will show Welcome to the Forums!.

Remember, you can use HTML,as long as you use single quotations...
You can add more Auto Text thingys by adding more of these lines...
Code:
autotext[autotext.length] = ["TEXT TO TYPE","TEXT TO SHOW"]
« Last Edit: May 02, 2008, 09:00:27 pm by Agent Moose » Report Spam   Logged

Share on Facebook Share on Twitter

Celebrus
Artificially Conscious
Administrator

Offline Offline

Gender: Male
Posts: 1,337


aka Omikron


View Profile WWW
« Reply #1 on: July 28, 2007, 05:49:13 am »

I modified this for a spoiler code. It doesn't work. Maybe it is just IE, so could you go check my test forum: vikhyatstestforum3.smfforfree3.com
Report Spam   Logged

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