|
Agent Moose
|
 |
« on: May 17, 2007, 07:40:07 pm » |
|
Add this to your Headers if you don't have it already. If you already have it, don't add it: <script src="/jquery.js"></script> Place in Footers or Headers This adds a box with a custom message under the user you choose name in a topic. Change USERNAME to the members username, and change CUSTOM MESSAGE to the message that the user wants. Too add more message for people, just add more of these lines: message[message.length] = ["USERNAME","CUSTOM MESSAGE"]; <script> function custom_message(){ //Created by Agent Moose (smcodes.smfforfree3.com) var message = new Array(); message[message.length] = ["USERNAME","CUSTOM MESSAGE"];
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 30, 2008, 07:33:33 pm by Agent Moose »
|
Logged
|
Want to know how good your board is? Why not get it reviewed at Revolution X!

|
|
|
|
|
|
Kimmie
|
 |
« Reply #1 on: May 17, 2007, 09:53:58 pm » |
|
now THIS one is COOL!! (not that all your other codes arent  ). This might be an alternative way to do the "warn" thing that alot of people are wanting to do.  Can you use image urls where you would put the "message" part or does it have to be all text?
|
|
|
|
|
Logged
|
|
|
|
|
Agent Moose
|
 |
« Reply #2 on: May 17, 2007, 10:24:28 pm » |
|
You can use Images. You can use any HTML in it.
|
|
|
|
|
Logged
|
Want to know how good your board is? Why not get it reviewed at Revolution X!

|
|
|
nevermorestr
SMF For Free Newbie
Offline
Posts: 10
|
 |
« Reply #3 on: May 17, 2007, 11:56:23 pm » |
|
That is a very good one Agent Moose! Thanx for sharing that with us. I took the liberty of removing the <b>Custom Message:</b> for my purposes as I'm going to use it for a "title". Is there a way to colorize the message? I've played around with it but to no avail.
|
|
|
|
|
Logged
|
|
|
|
|
Kimmie
|
 |
« Reply #4 on: May 18, 2007, 12:42:09 am » |
|
That is a very good one Agent Moose! Thanx for sharing that with us. I took the liberty of removing the <b>Custom Message:</b> for my purposes as I'm going to use it for a "title". Is there a way to colorize the message? I've played around with it but to no avail. use this code: <font color=??> Text </font> (where ?? is the color you are wanting to use). It will work.
|
|
|
|
|
Logged
|
|
|
|
nevermorestr
SMF For Free Newbie
Offline
Posts: 10
|
 |
« Reply #5 on: May 18, 2007, 01:11:01 am » |
|
Is there a way to colorize the message? I've played around with it but to no avail. use this code: <font color=??> Text </font> (where ?? is the color you are wanting to use). It will work. Ok, I've tried 3 different ways and haven't been able to colorize. I end up with the custom messages not appearing at all for my efforts until I delete what I've added. message[0] = ["USERNAME","CUSTOM MESSAGE"] Would you give me an example using the above code? Or do I need to place it else where? (I know my way around BBCode but with HTML.... no.  ) Thanks Kimmie for the quick response.
|
|
|
|
« Last Edit: May 18, 2007, 01:12:44 am by nevermorestr »
|
Logged
|
|
|
|
|
Kimmie
|
 |
« Reply #6 on: May 18, 2007, 01:20:27 am » |
|
you can see mine here on my test site: http://theplayground.smfforfree2.com/index.php/topic,13.0.htmlThe code I used was this: <script> function custom_message(){ $(function(){ //Created by Agent Moose //More codes at smcodes.smfforfree3.com var message = new Array() message[0] = ["Kimmie","<font color=#FFCC99>Testing out custom message</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> Mine still shows the "custom message" part, but yours should work if you do it like I did in the above code. Just remembe that your color codes, etc need to be inside the "".
|
|
|
|
|
Logged
|
|
|
|
nevermorestr
SMF For Free Newbie
Offline
Posts: 10
|
 |
« Reply #7 on: May 18, 2007, 02:14:41 am » |
|
Ah ha! I had the codes on the outside at one point. So close yet so far away...
Thanx again Kimmie.
|
|
|
|
|
Logged
|
|
|
|
LaundryLady
Global Moderator
Offline
Posts: 3056
Internet Challenged
|
 |
« Reply #8 on: May 18, 2007, 07:54:21 am » |
|
Forum Url: http://thelaundryroom.smfforfree2.comAgent Moose: Is there any way to make the custom message an image? If there is, it would allow me to give my members their custom images that they had on another forum. I have fiddled around with it, but I am no coder by far. I have tried BBC, HTML and just plain urls and the only thing that does show is the code itself. Thanks LaundryLady Test site: http://thebacklot.smfforfree3.com
|
|
|
|
|
Logged
|
|
|
|
|
Kimmie
|
 |
« Reply #9 on: May 18, 2007, 09:15:18 am » |
|
use this code for images: <img src="url">
and make sure the code is inside the "" that are already in the code and it should work.
|
|
|
|
|
Logged
|
|
|
|
LaundryLady
Global Moderator
Offline
Posts: 3056
Internet Challenged
|
 |
« Reply #10 on: May 18, 2007, 09:51:49 am » |
|
It works, Oh Happy Day. Thank You, Kimmie. You gave me this: <img src="url"> But it didn't work, so I changed it to: <img src=url> That works fine. Thank you for all your guidance.
|
|
|
|
« Last Edit: May 18, 2007, 10:01:19 am by LaundryLady »
|
Logged
|
|
|
|
|
Kimmie
|
 |
« Reply #11 on: May 18, 2007, 10:05:30 am » |
|
It works, Oh Happy Day. Thank You, Kimmie. You gave me this: <img src="url"> But it didn't work, so I changed it to: <img src=url> That works fine. Thank you for all your guidance. your welcome. Sorry I was in a hurry and forgot to tell you to take out the "" I had on there showing you where the url goes. 
|
|
|
|
|
Logged
|
|
|
|
|
Agent Moose
|
 |
« Reply #12 on: May 18, 2007, 03:11:20 pm » |
|
I would recomend useing this: <img src='URL'> You can't use double quotes inside double quotes when useing Jquery or Javascript. That just messes the code up. So, if you wanted to use a color code, you wouldn't use this: <font color="#FF0000"> But you would use this: <font color='#FF0000'> So yea, no double quotes, just single quotes.
|
|
|
|
|
Logged
|
Want to know how good your board is? Why not get it reviewed at Revolution X!

|
|
|
Artemis Fowl
SMF For Free Full Member
Offline
Posts: 243
Ah-temis.... Arty.
|
 |
« Reply #13 on: March 04, 2008, 06:58:47 pm » |
|
Forum Url: http://gamersgraphics.smfforfree4.comI've been trying for 20 minutes or more getting it to represent my image  Here is my code for header: <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="jquery.js"></script> Footers: <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>
I can't find anything wrong. I've tried 50 times to get the image to work. Nothing.
|
|
|
|
|
Logged
|
"In London, it is generally a female name, after the Greek goddess of archery. But every now and then a male comes along with such a talent for hunting that he earns the right to use the name."
|
|
|
simply sibyl
Global Moderator
Offline
Posts: 11806
On vacation until July 6th
|
 |
« Reply #14 on: March 04, 2008, 07:08:10 pm » |
|
I just tried it. It will work with this in the header instead of <script src="jquery.js"></script> <script src=" http://209.85.48.12/9581/134/upload/p4217340.ibf">//Jquery code</script> (seems to be happening with a few codes all of a sudden) I have sent a note to Moose to check into this.
|
|
|
|
« Last Edit: March 04, 2008, 07:13:13 pm by simply sibyl »
|
Logged
|
|
|
|
|
|
|