March 29, 2024, 10:18:08 am
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to Revolution X, where Coding meets Graphics.
 
  Home Help Search Arcade Affiliates Staff List Calendar Members Login Register  

Description V3

Pages: [1]   Go Down
  Print  
Author Topic: Description V3  (Read 387 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Administrator
Adminitrator
Offline Offline

Gender: Male
Posts: 1,470



View Profile WWW
Badges: (View All)
Tenth year Anniversary Nineth year Anniversary Search
« on: November 07, 2008, 06:38:01 pm »

Footers:
Code:
<script>
var text = "Description: ";

$("a").each(function(){
//Created by Agent Moose (smcodes.smfforfree3.com)
if(this.innerHTML.match(/\[des=.*\]/i) && this.parentNode.id.match(/msg/i)){
this.innerHTML = this.innerHTML.replace(/\[des=(.+?)\]/i,"");
$(this).parent().append("<br /><span class='smalltext'>" + text + RegExp.$1 + "</span>");
};});
if(location.href.match(/topic,/i) || location.href.match(/action=post/i)){
$("a.nav,span.smalltext a").each(function(){
if(this.innerHTML.match(/\[des=.*\]/i)) {
this.innerHTML = this.innerHTML.replace(/\[des=(.+?)\]/i,"");
};});
$("h1,#top_subject").each(function(){
if(this.innerHTML.match(/\[des=.*\]/i)){
this.innerHTML = this.innerHTML.replace(/\[des=(.+?)\]/i, ", $1");
};});
if(location.href.match(/action=post;board=/i)){
$("table tr td input[name='subject']").parent().parent().after("<tr><td id='caption_description' align='right' style='font-weight: bold;'>  Description: </td><td><input type='text' maxlength='80' size='80' tabindex='1' name='description' id='description'/></td></tr>");
var ugh = document.getElementsByTagName("input");
for(s=0;s<ugh.length;s++){
if(ugh[s].name == "post") ugh[s].onclick = des_V3;
};};};
function des_V3(){
var rawr = document.getElementsByTagName("input");
for(x=0;x<rawr.length;x++){
if(rawr[x].name == "subject" && !document.getElementById("description").value == ""){
rawr[x].value += "[des=" + document.getElementById("description").value + "]";
};};};
</script>

I beleive it was Spoken who wanted me to fix this code, so I did ^_^

This will add a box under the Subject when your making a post.  You may place what ever next you would like in that box, and that text you put will be added under the thread title when viewing the threads Smiley

Enjoy Smiley  <--(I wonder how long I have been putting that there)
Report Spam   Logged


Share on Facebook Share on Twitter

Mojobojo82
MVP
MVP
Offline Offline

Gender: Male
Posts: 838


View Profile
Badges: (View All)
« Reply #1 on: June 22, 2009, 04:34:51 am »

Cool code.

And lol @
Enjoy  Smiley  <--(I wonder how long I have been putting that there)
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