Edited by Amfidiusz, 12 December 2011 - 01:37 PM.
IP.Board 2.3: Random text on the main page
Started by Amfidiusz, Jan 23 2009 07:40 AM
17 replies to this topic
#1
Posted 23 January 2009 - 07:40 AM
This is the support topic for the tutorial Random text on the main page. Please post here if you have any questions or feedback.
#2
Posted 23 January 2009 - 12:38 PM
Nice one!
Maybe i use this on my board.
Thanks man!
Maybe i use this on my board.
Thanks man!
Dawid Pieron
intermedia - owner, developer and ip.board modder
Need custom mod, conversion service, any ip.board related job or support for any of my paid mods or services?
www | mail | facebook | twitter | buy licence
intermedia - owner, developer and ip.board modder
Need custom mod, conversion service, any ip.board related job or support for any of my paid mods or services?
www | mail | facebook | twitter | buy licence
#3
Posted 23 January 2009 - 07:35 PM
Very good this topic, I put in my forum, thanks for sharing.
Edited by Londonms, 23 January 2009 - 07:35 PM.
#4
Posted 23 January 2009 - 07:56 PM
Thanks mod.. I guess Thanks Dude.....
oops.... when i edit text it don't work
<font size=2><left><font color=blue><script language="JavaScript">
<!--
var r_text = new Array ();
r_text[0] = "Ghusa aqal ka dushman hai";
r_text[1] = "Jo Muhabat se waqif nahi woh Khudah se waqif nahi";
r_text[2] = "Ehtmaad Muhabat ki pehli sehari hai";
r_text[3] = "Porn and violent content is not allowed!";
r_text[4] = "ShoutBox is available only to registered users";
r_text[5] = "Do not advertise your own board!";
r_text[6] = "Jab Tumhare Dill Main Kisi ke liye "Nafrat" paida hone lage To Foran us ki "Achayoun" ko Yaad krne Lago'";
r_text[7] = "Afsos, Ke Logon Ko Apney Honey Ki Khushi Kam aor Doosro'n Ke Honey Ka Gham Ziyada Hai";
r_text[8] = "Acha Doost kho dena, khud ko kho dena hai";
r_text[9] = "Muhabat Esi Cheez hai jo sehknay ky aur kisi ky bataney ki nahi hai";
r_text[10] = "If you use this script, say at least Thanks";
r_text[11] = "If you use this script, say at least Thanks";
var i = Math.round(11*Math.random());
document.write(r_text[i]);
//-->
</script></font></font></left>
not working after editing
oops.... when i edit text it don't work
<font size=2><left><font color=blue><script language="JavaScript">
<!--
var r_text = new Array ();
r_text[0] = "Ghusa aqal ka dushman hai";
r_text[1] = "Jo Muhabat se waqif nahi woh Khudah se waqif nahi";
r_text[2] = "Ehtmaad Muhabat ki pehli sehari hai";
r_text[3] = "Porn and violent content is not allowed!";
r_text[4] = "ShoutBox is available only to registered users";
r_text[5] = "Do not advertise your own board!";
r_text[6] = "Jab Tumhare Dill Main Kisi ke liye "Nafrat" paida hone lage To Foran us ki "Achayoun" ko Yaad krne Lago'";
r_text[7] = "Afsos, Ke Logon Ko Apney Honey Ki Khushi Kam aor Doosro'n Ke Honey Ka Gham Ziyada Hai";
r_text[8] = "Acha Doost kho dena, khud ko kho dena hai";
r_text[9] = "Muhabat Esi Cheez hai jo sehknay ky aur kisi ky bataney ki nahi hai";
r_text[10] = "If you use this script, say at least Thanks";
r_text[11] = "If you use this script, say at least Thanks";
var i = Math.round(11*Math.random());
document.write(r_text[i]);
//-->
</script></font></font></left>
not working after editing
Edited by UZ3R, 23 January 2009 - 08:08 PM.
#5
Posted 24 January 2009 - 04:13 AM
UZ3R, on Jan 23 2009, 02:56 PM, said:
Thanks mod.. I guess Thanks Dude.....
oops.... when i edit text it don't work
not working after editing
oops.... when i edit text it don't work
not working after editing
You're welcome
Please, do not place quote marks inside the text which is your variable. Use instead \" . The corrected text you provided should go as follows:
<font size=2><left><font color=blue><script language="JavaScript"> <!-- var r_text = new Array (); r_text[0] = "Ghusa aqal ka dushman hai"; r_text[1] = "Jo Muhabat se waqif nahi woh Khudah se waqif nahi"; r_text[2] = "Ehtmaad Muhabat ki pehli sehari hai"; r_text[3] = "Porn and violent content is not allowed!"; r_text[4] = "ShoutBox is available only to registered users"; r_text[5] = "Do not advertise your own board!"; r_text[6] = "Jab Tumhare Dill Main Kisi ke liye \"Nafrat\" paida hone lage To Foran us ki \"Achayoun\" ko Yaad krne Lago'"; r_text[7] = "Afsos, Ke Logon Ko Apney Honey Ki Khushi Kam aor Doosro'n Ke Honey Ka Gham Ziyada Hai"; r_text[8] = "Acha Doost kho dena, khud ko kho dena hai"; r_text[9] = "Muhabat Esi Cheez hai jo sehknay ky aur kisi ky bataney ki nahi hai"; r_text[10] = "If you use this script, say at least Thanks"; r_text[11] = "If you use this script, say at least Thanks"; var i = Math.round(11*Math.random()); document.write(r_text[i]); //--> </script></font></left></font>
Can you see the difference?

You can also use \n for a second line, \' for inverted coma and \\ for backslash.
Edited by Amfidiusz, 24 January 2009 - 04:20 AM.
#6
Posted 24 January 2009 - 05:22 PM
ya.......... working Fine Now Muha... Love u <blink> </blink>
just add this if ppl want blinking text
@ Amfidiusz
Can u Make a little box where this text appear.... it will look more good wat u think?
A Box appear including text
just add this if ppl want blinking text
@ Amfidiusz
Can u Make a little box where this text appear.... it will look more good wat u think?
A Box appear including text
Edited by UZ3R, 24 January 2009 - 05:34 PM.
#7
Posted 24 January 2009 - 05:53 PM
As I mentioned, the script is fully editable. You can put any HTML code before and after it. If you want it to blink (only in Firefox), just use:
Everything depends on your personal feeling of aesthetics.
<blink> [script] </blink>If you want to put it in a table, use the following formula:
<table border="1" width="100%"> <tr> <td> [script] </td> </tr> </table>
Everything depends on your personal feeling of aesthetics.
#8
Posted 25 January 2009 - 11:55 AM
thanks buddy ........ working like Rocket ....
#9
Posted 25 January 2009 - 12:42 PM
one thing more
if i want to put background image of border then what is the code thanks
if i want to put background image of border then what is the code thanks
#10
Posted 26 January 2009 - 12:51 AM
You've been banned but I'll answer anyway 
<table border="1" width="100%"> <tr> <td background="[IMG%DIR]"> [script] </td> </tr> </table>
#11
Posted 26 January 2009 - 04:41 PM
i tried adding links within this and it stops working. is there a way to go about doing so?
#12
Posted 26 January 2009 - 06:47 PM
Probably due to the issue the OP explained here.
My: Modifications · Tutorials · Twitter

#13
Posted 27 January 2009 - 12:51 AM
m4rtin, on Jan 26 2009, 01:47 PM, said:
Probably due to the issue the OP explained here.
Edited by Amfidiusz, 27 January 2009 - 08:32 AM.
#14
Posted 27 January 2009 - 01:46 AM
Links do not require "", nor do the string have to start and end with ".
var = '<a href="test.com">this works</a>'; var1 = "<a href='test.com'>so do this</a>"; Var2 = "<a href=\"test.com\">and this</a>";
My: Modifications · Tutorials · Twitter

#15
Posted 18 March 2009 - 06:26 PM
Hello people,
Im stuck with the <blink></blink> part of the edit.. I have placed it everywhere but cant get it to blink.
Any help please, Also i use Firefox as i read it dont work on I.E
Thanks Kev
Im stuck with the <blink></blink> part of the edit.. I have placed it everywhere but cant get it to blink.
Any help please, Also i use Firefox as i read it dont work on I.E
Thanks Kev
#16
Posted 27 March 2009 - 08:40 PM
Kev, on Mar 18 2009, 07:26 PM, said:
Hello people,
Im stuck with the <blink></blink> part of the edit.. I have placed it everywhere but cant get it to blink.
Any help please, Also i use Firefox as i read it dont work on I.E
Thanks Kev
Im stuck with the <blink></blink> part of the edit.. I have placed it everywhere but cant get it to blink.
Any help please, Also i use Firefox as i read it dont work on I.E
Thanks Kev
This way worked for me:
r_text[0] = "<blink><i>Random Love & Marriage Quote: \"Marriage is not just spiritual communion, it is also remembering to take out the trash.\"</i></blink>";
#17
Posted 28 March 2009 - 10:24 AM
Thank You Katiare,
Added the code and it worked perfect.
Thanks
Kev
Added the code and it worked perfect.
Thanks
Kev
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users





Contributor












