Jump to content


- - - - -

IP.Board 2.3: Random text on the main page


  • Please log in to reply
17 replies to this topic

#1 Amfidiusz

Amfidiusz

    Advanced Member

  • Members
  • PipPipPipPip
  • 72 posts
  • Location:Amsterdam
  • Real Name:Adrian
  • IPB Version:v3.0.x
Contributor

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.

Edited by Amfidiusz, 12 December 2011 - 01:37 PM.


#2 DawPi

DawPi

    in search of lost time..

  • Modders
  • PipPipPipPipPipPipPipPipPip
  • 2,214 posts
  • Location:Cracow, Poland
  • Real Name:David
  • IPB Version:v3.2.x
Contributor

Posted 23 January 2009 - 12:38 PM

Nice one!

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

#3 Londonms

Londonms

    Member

  • Banned
  • PipPipPip
  • 21 posts
  • IPB Version:v3.0.x

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 UZ3R

UZ3R

    Member

  • Banned
  • PipPipPip
  • 21 posts
  • Real Name:Niks
  • IPB Version:v2.2.x

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

Edited by UZ3R, 23 January 2009 - 08:08 PM.


#5 Amfidiusz

Amfidiusz

    Advanced Member

  • Members
  • PipPipPipPip
  • 72 posts
  • Location:Amsterdam
  • Real Name:Adrian
  • IPB Version:v3.0.x
Contributor

Posted 24 January 2009 - 04:13 AM

View PostUZ3R, 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

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? ;)

Posted Image

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 UZ3R

UZ3R

    Member

  • Banned
  • PipPipPip
  • 21 posts
  • Real Name:Niks
  • IPB Version:v2.2.x

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


Posted Image

Edited by UZ3R, 24 January 2009 - 05:34 PM.


#7 Amfidiusz

Amfidiusz

    Advanced Member

  • Members
  • PipPipPipPip
  • 72 posts
  • Location:Amsterdam
  • Real Name:Adrian
  • IPB Version:v3.0.x
Contributor

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:
<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 UZ3R

UZ3R

    Member

  • Banned
  • PipPipPip
  • 21 posts
  • Real Name:Niks
  • IPB Version:v2.2.x

Posted 25 January 2009 - 11:55 AM

thanks buddy ........ working like Rocket ....

#9 UZ3R

UZ3R

    Member

  • Banned
  • PipPipPip
  • 21 posts
  • Real Name:Niks
  • IPB Version:v2.2.x

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

#10 Amfidiusz

Amfidiusz

    Advanced Member

  • Members
  • PipPipPipPip
  • 72 posts
  • Location:Amsterdam
  • Real Name:Adrian
  • IPB Version:v3.0.x
Contributor

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 rodrigo

rodrigo

    Coder

  • IM Supporters
  • PipPipPipPipPip
  • 126 posts
  • Location:cliffside park, nj
  • Real Name:rodrigo
  • IPB Version:v3.0.x

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 Martin

Martin

    But but, it's not only only!

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 7,081 posts
  • Location:Hammerfest, Norway
  • Real Name:Martin Aronsen
  • IPB Version:v3.2.x
Contributor

Posted 26 January 2009 - 06:47 PM

Probably due to the issue the OP explained here.

#13 Amfidiusz

Amfidiusz

    Advanced Member

  • Members
  • PipPipPipPip
  • 72 posts
  • Location:Amsterdam
  • Real Name:Adrian
  • IPB Version:v3.0.x
Contributor

Posted 27 January 2009 - 12:51 AM

View Postm4rtin, on Jan 26 2009, 01:47 PM, said:

Probably due to the issue the OP explained here.
As far as I know, links require quotation marks and therefore they will not work with this script. However, I may be wrong. Wait for a response of someone more experienced ;)

Edited by Amfidiusz, 27 January 2009 - 08:32 AM.


#14 Martin

Martin

    But but, it's not only only!

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 7,081 posts
  • Location:Hammerfest, Norway
  • Real Name:Martin Aronsen
  • IPB Version:v3.2.x
Contributor

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>";


#15 Kev

Kev

    Advanced Member

  • Members
  • PipPipPipPip
  • 53 posts
  • Real Name:Kev
  • IPB Version:v2.3.x

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

#16 katiare

katiare

    Novice

  • Members
  • PipPip
  • 5 posts
  • Real Name:katiare
  • IPB Version:v2.3.x

Posted 27 March 2009 - 08:40 PM

View PostKev, 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

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 Kev

Kev

    Advanced Member

  • Members
  • PipPipPipPip
  • 53 posts
  • Real Name:Kev
  • IPB Version:v2.3.x

Posted 28 March 2009 - 10:24 AM

Thank You Katiare,

Added the code and it worked perfect.


Thanks

Kev

#18 katiare

katiare

    Novice

  • Members
  • PipPip
  • 5 posts
  • Real Name:katiare
  • IPB Version:v2.3.x

Posted 28 March 2009 - 02:10 PM

View PostKev, on Mar 28 2009, 11:24 AM, said:

Thank You Katiare,

Added the code and it worked perfect.


Thanks

Kev


You're welcome! Glad I could help!  ;)




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users