SMF For Free Support Forum
Signup For Free Forum
July 30, 2010, 05:57:52 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to SMF For Free. The best free SMF Host
 
   Home   Help Search Arcade Gallery Login Register  

Pages: 1 [2] 3
  Print  
Author Topic: [Code] Add Custom Message V1  (Read 5909 times)
0 Members and 1 Guest are viewing this topic.
Pietra Atomica
SMF For Free Full Member
*
Offline Offline

Posts: 243


'Tis true.


View Profile
« Reply #15 on: March 04, 2008, 07:17:27 pm »

Not for me... !
Code:
<a href="http://s153.photobucket.com/albums/s209/Madcap22/?action=view¤t=gamergraphicsbanner.jpg" target="_blank"><img src="http://i153.photobucket.com/albums/s209/Madcap22/gamergraphicsbanner.jpg" border="0" alt="Photobucket"></a>
<script src="http://209.85.48.12/9581/134/upload/p4217340.ibf">//Jquery code</script>

Code:
<script>
function custom_message(){
$(function(){
//Created by Agent Moose (smcodes.smfforfree3.com)
var message = new Array()
message[1] = ["Madcap22","<img src=http://i258.photobucket.com/albums/hh261/pkgods/pikastaff.gif>"]

if(location.href.match(/topic/i)){
for(f=0;f<message.length;f++){
$("td b a:contains("+message[f][0]+")").after("<div class='windowbg2'><span class='smalltext'><b>Custom Message:</b><br>"+message[f][1]+"</span></div>");
};};});}
custom_message();
</script>
New headers/footers
Logged
simply sibyl
Global Moderator
*
Offline Offline

Posts: 13697



View Profile WWW
« Reply #16 on: March 04, 2008, 07:24:33 pm »

try it this way:

Code:
<script>
function custom_message(){
$(function(){
//Created by Agent Moose (smcodes.smfforfree3.com)
var message = new Array()
message[0] = ["Madcap22","<img src='http://i258.photobucket.com/albums/hh261/pkgods/pikastaff.gif'>"]

if(location.href.match(/topic/i)){
for(f=0;f<message.length;f++){
$("td b a:contains("+message[f][0]+")").after("<div class='windowbg2'><span class='smalltext'><b>Custom Message:</b><br>"+message[f][1]+"</span></div>");
};};});}
custom_message();
</script>


Logged

Pietra Atomica
SMF For Free Full Member
*
Offline Offline

Posts: 243


'Tis true.


View Profile
« Reply #17 on: March 04, 2008, 07:29:00 pm »

Ok. Worked. Thank you!  Smiley
Logged
simply sibyl
Global Moderator
*
Offline Offline

Posts: 13697



View Profile WWW
« Reply #18 on: March 04, 2008, 07:30:06 pm »

Ok. Worked. Thank you!  Smiley

you are welcome  Wink
Logged

FinishTheFight
SMF For Free Member
*
Offline Offline

Posts: 26



View Profile WWW
« Reply #19 on: April 27, 2008, 06:48:51 pm »

Forum Url: http://romescape.smfforfree2.com
 I can not get mine to work I have tried the code in the headers and footers. It does not work for any of the three members. Will you tell me what is wrong.

Code:
<script>
function custom_message(){
$(function(){
//Created by Agent Moose
//More codes at smcodes.smfforfree3.com
var message = new Array()
message[0] = ["FinishTheFight","<font color='#FF0000'>RomeScape Admin</font>"]
message[1] = ["Brandon","<font color='#FF0000'>RomeScape Owner</font>"]
message[2] = ["dumb cow1","<font color='#FF0000'>RomeScape President</font>"]

if(location.href.match(/topic/i)){
for(f=0;f<message.length;f++){
$("td b a").contains(message[f][0]).after("<div cl***='windowbg2'><span cl***='smalltext'><b>Custom Message:</b><br>"+message[f][1]+"</span></div>");
};};});}
custom_message();
</script>
Logged


Code:
Respect the admins and they will respect you
Follow the Rules
SMF RULES!!!!!!!
LaundryLady
Helpers
*
Offline Offline

Posts: 3230


Internet Challenged


View Profile
« Reply #20 on: April 27, 2008, 07:14:08 pm »

See if this works.

Code:
<script>
function custom_message(){
$(function(){
//Created by Agent Moose
//More codes at smcodes.smfforfree3.com
var message = new Array()
message[0] = ["FinishTheFight","<font color='#FF0000'>RomeScape Admin</font>"]
message[1] = ["Brandon","<font color='#FF0000'>RomeScape Owner</font>"]
message[2] = ["dumb cow1","<font color='#FF0000'>RomeScape President</font>"]

if(location.href.match(/topic/i)){
for(f=0;f<message.length;f++){
$("td b a").contains(message[f][0]).after("<div class='windowbg2'><span class='smalltext'><b>Custom Message:</b><br>"+message[f][1]+"</span></div>");
};};});}
custom_message();
</script>
Logged

FinishTheFight
SMF For Free Member
*
Offline Offline

Posts: 26



View Profile WWW
« Reply #21 on: April 27, 2008, 11:13:51 pm »

 Tried in Headers and Footers no luck Sad Does this work in smfforfree2.
Logged


Code:
Respect the admins and they will respect you
Follow the Rules
SMF RULES!!!!!!!
Vice
SMF For Free Full Member
*
Offline Offline

Posts: 133


Photoshop Userbars :d


View Profile WWW
« Reply #22 on: April 28, 2008, 01:15:10 am »

Forum Url: http://pimpagescape.smfforfree4.com
Woah cool, i amn't going to use this but i viewd on forums and looks pretty sweet gj!
Logged

Agent Moose
Moderator
*****
Offline Offline

Posts: 825


Do not PM me for Code Support or Request


View Profile
« Reply #23 on: April 28, 2008, 02:29:42 pm »

FinishTheFight, I see why this work.  I haven't updated this code since we got the new version of Jquery on SMF for Free.  HEre, try this:
Code:
<script>
function custom_message(){
$(function(){
//Created by Agent Moose
//More codes at smcodes.smfforfree3.com
var message = new Array()
message[0] = ["FinishTheFight","<font color='#FF0000'>RomeScape Admin</font>"]
message[1] = ["Brandon","<font color='#FF0000'>RomeScape Owner</font>"]
message[2] = ["dumb cow1","<font color='#FF0000'>RomeScape President</font>"]

if(location.href.match(/topic/i)){
for(f=0;f<message.length;f++){
$("td b a:contains(" + message[f][0] + ")").after("<div class='windowbg2'><span class='smalltext'><b>Custom Message:</b><br>"+  message[f][1] + "</span></div>");
};};});}
custom_message();
</script>
Logged

Check out Revolution X's Brand new Code Index!
FinishTheFight
SMF For Free Member
*
Offline Offline

Posts: 26



View Profile WWW
« Reply #24 on: April 28, 2008, 09:13:52 pm »

 I tried in headers and footers, no luck!
Logged


Code:
Respect the admins and they will respect you
Follow the Rules
SMF RULES!!!!!!!
simply sibyl
Global Moderator
*
Offline Offline

Posts: 13697



View Profile WWW
« Reply #25 on: April 28, 2008, 09:20:30 pm »

FinishtheFight.. Im taking a look at it.. first off remove this from your header..   
er not sure what that is there for but it wont do anything

Code:
<script src="http://romescape.smfforfree2.com/"></script>
Logged

simply sibyl
Global Moderator
*
Offline Offline

Posts: 13697



View Profile WWW
« Reply #26 on: April 28, 2008, 09:32:00 pm »

FinishtheFight.  I just tried the updated code on my server 2 test site and it works fine.

Try this.

Put this in your header in place of the other jquery script code

Code:
<script src="/jquery.js"></script>

Put this in your footer.
(this has only your name in it for now.. lets see that that works first ok?)

Code:
<script>
function custom_message(){
$(function(){
//Created by Agent Moose
//More codes at smcodes.smfforfree3.com
var message = new Array()
message[0] = ["FinishTheFight","<font color='#FF0000'>RomeScape Admin</font>"]

if(location.href.match(/topic/i)){
for(f=0;f<message.length;f++){
$("td b a:contains(" + message[f][0] + ")").after("<div class='windowbg2'><span class='smalltext'><b>Custom Message:</b><br>"+  message[f][1] + "</span></div>");
};};});}
custom_message();
</script>
« Last Edit: April 28, 2008, 09:37:01 pm by simply sibyl » Logged

lordtentei
SMF For Free Member
*
Offline Offline

Posts: 55


View Profile
« Reply #27 on: August 24, 2008, 12:30:46 am »

I am using this code as of this moment but it seems the message is at the wrong place..

I believe that the message must be in the message area but mine.. it's under my username..

Can someone help me?!

thanks in advance!
Logged
Agent Moose
Moderator
*****
Offline Offline

Posts: 825


Do not PM me for Code Support or Request


View Profile
« Reply #28 on: August 24, 2008, 02:33:39 pm »

Thats the right place for it Tongue  The only one that didn't have it in that place was the one that was on my forum (SMC).
Logged

Check out Revolution X's Brand new Code Index!
lordtentei
SMF For Free Member
*
Offline Offline

Posts: 55


View Profile
« Reply #29 on: August 25, 2008, 12:13:21 am »

Thats the right place for it Tongue  The only one that didn't have it in that place was the one that was on my forum (SMC).
ok i see!

BTW, how can I remove the word "custom message"?
Logged


Pages: 1 [2] 3
  Print  
 
Jump to:  



Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
Hostgator Hosting
Page created in 0.667 seconds with 16 queries. (Pretty URLs adds 0.292s, 3q)