runnerjp Posted August 22, 2006 Share Posted August 22, 2006 hey just had help with gttin this script to work...now i need to tweak it a llis their away so in between each post it displayes this image [url=http://www.runnerselite.com/image/runner.gif]http://www.runnerselite.com/image/runner.gif[/url] to split them upalso if you look at the page its on [url=http://www.runnerselite.com]www.runnerselite.com[/url] you can see that the username and the message does not have a space inbetween it so its all crunched together is their away so a can add [ (space): ] to it if you get me....basicly space it out??heres code [code]<?php#################################include("chatbox/connect.php");#################################mysql_connect($host,$dbuser,$dbpass) or die(mysql_error());// Select the database.mysql_select_db($dbname) or die(mysql_error());$query = "SELECT poster, message FROM ch_messages order by id DESC LIMIT 5";$result = mysql_query($query);$marquee = "";while($r=mysql_fetch_array($result)){ $marquee.= $r[poster]. ''. $r[message]. '</a>';}echo "<marquee><font size='3'>". $marquee. "</font></marquee>";?>[/code] Link to comment https://forums.phpfreaks.com/topic/18336-code-needs-addin-toeditin-lol-good-php-help-needed/ Share on other sites More sharing options...
Barand Posted August 22, 2006 Share Posted August 22, 2006 $marquee.= $r[poster]. '  '. $r[message]. '</a>'; Link to comment https://forums.phpfreaks.com/topic/18336-code-needs-addin-toeditin-lol-good-php-help-needed/#findComment-78784 Share on other sites More sharing options...
runnerjp Posted August 22, 2006 Author Share Posted August 22, 2006 sweet thanks....any idea about adding the pictureand changein the text to white... tride to add codes in and keep gttin errors... simple i know yet its l8 lol had bad day need to fin of this so i can sleep well 2night haha cheers Link to comment https://forums.phpfreaks.com/topic/18336-code-needs-addin-toeditin-lol-good-php-help-needed/#findComment-78788 Share on other sites More sharing options...
Corona4456 Posted August 22, 2006 Share Posted August 22, 2006 [code]$i = 0;while($r=mysql_fetch_array($result)){ $posts[$i] = $r[poster].' - '. $r[message]. ''; ++$i;}$marquee = implode("<img src='http://www.runnerselite.com/image/runner.gif'>", $posts)[/code] Link to comment https://forums.phpfreaks.com/topic/18336-code-needs-addin-toeditin-lol-good-php-help-needed/#findComment-78794 Share on other sites More sharing options...
Barand Posted August 22, 2006 Share Posted August 22, 2006 [code][trycode]<?phpwhile($r=mysql_fetch_array($result)){ $marquee.= $r[poster]. ' '. $r[message]. '<img src="image/runner.gif">';}echo "<marquee><font size='3'>". $marquee. "</font></marquee>";?>[/code]Do you really want whit text on a white background?<span style="color: white"> text here </span> Link to comment https://forums.phpfreaks.com/topic/18336-code-needs-addin-toeditin-lol-good-php-help-needed/#findComment-78796 Share on other sites More sharing options...
runnerjp Posted August 22, 2006 Author Share Posted August 22, 2006 well i want the white text on a black background u see :D where do i add the white text code :P Link to comment https://forums.phpfreaks.com/topic/18336-code-needs-addin-toeditin-lol-good-php-help-needed/#findComment-78798 Share on other sites More sharing options...
runnerjp Posted August 22, 2006 Author Share Posted August 22, 2006 just like to say tho that the image link worked :D:D nice 1 yeey lol just white text and its dun :P Link to comment https://forums.phpfreaks.com/topic/18336-code-needs-addin-toeditin-lol-good-php-help-needed/#findComment-78800 Share on other sites More sharing options...
Barand Posted August 22, 2006 Share Posted August 22, 2006 [quote author=runnerjp link=topic=105232.msg420240#msg420240 date=1156281349]where do i add the white text code [/quote]Where you want the white text Link to comment https://forums.phpfreaks.com/topic/18336-code-needs-addin-toeditin-lol-good-php-help-needed/#findComment-78802 Share on other sites More sharing options...
Corona4456 Posted August 22, 2006 Share Posted August 22, 2006 [code]echo "<marquee><font size='3'><span style='color: white'>". $marquee. "</span></font></marquee>"[/code]Or do:[code]echo "<marquee><font size='3' color='#ffffff'>". $marquee. "</font></marquee>"[/code] Link to comment https://forums.phpfreaks.com/topic/18336-code-needs-addin-toeditin-lol-good-php-help-needed/#findComment-78804 Share on other sites More sharing options...
runnerjp Posted August 22, 2006 Author Share Posted August 22, 2006 white text works... pciture doesnt :([code]<?php#################################include("chatbox/connect.php");#################################mysql_connect($host,$dbuser,$dbpass) or die(mysql_error());// Select the database.mysql_select_db($dbname) or die(mysql_error());$query = "SELECT poster, message FROM ch_messages order by id DESC LIMIT 5";$result = mysql_query($query);$marquee = "";$i = 0;while($r=mysql_fetch_array($result)){ $posts[$i] = $r[poster].' - '. $r[message]. ''; ++$i;}$marquee = implode("<img src='http://www.runnerselite.com/image/runner.gif'>", $posts)}echo "<marquee><font size='3'><span style='color: white'>". $marquee. "</span></font></marquee>"?>code]error on line 19[/code] Link to comment https://forums.phpfreaks.com/topic/18336-code-needs-addin-toeditin-lol-good-php-help-needed/#findComment-78806 Share on other sites More sharing options...
Barand Posted August 22, 2006 Share Posted August 22, 2006 The ' ' isn't quite right.Can you post the marquee code you are now using.PS Just refreshed the page and don't see any marquee text/images Link to comment https://forums.phpfreaks.com/topic/18336-code-needs-addin-toeditin-lol-good-php-help-needed/#findComment-78811 Share on other sites More sharing options...
runnerjp Posted August 22, 2006 Author Share Posted August 22, 2006 [code]<?php#################################include("chatbox/connect.php");#################################mysql_connect($host,$dbuser,$dbpass) or die(mysql_error());// Select the database.mysql_select_db($dbname) or die(mysql_error());$query = "SELECT poster, message FROM ch_messages order by id DESC LIMIT 5";$result = mysql_query($query);$marquee = "";$i = 0;while($r=mysql_fetch_array($result)){ $posts[$i] = $r[poster].' - '. $r[message]. ''; ++$i;}$marquee = implode("<img src='http://www.runnerselite.com/image/runner.gif'>", $posts)}echo "<marquee><font size='3'><span style='color: white'>". $marquee. "</span></font></marquee>"?>code][/code]thats code....since i added the picture script its all gone got an error on 19th line Link to comment https://forums.phpfreaks.com/topic/18336-code-needs-addin-toeditin-lol-good-php-help-needed/#findComment-78812 Share on other sites More sharing options...
Corona4456 Posted August 22, 2006 Share Posted August 22, 2006 Well you won't see the image if there is only 1 post entry.I intentionally did it that way. If you want the image to show even with 1 post than I would recommend:[code]while($r=mysql_fetch_array($result)){ $posts[$i] = "<img src='http://www.runnerselite.com/image/runner.gif'>".$r[poster].' - '. $r[message]; ++$i;}$marquee = implode("", $posts)."<img src='http://www.runnerselite.com/image/runner.gif'>";[/code]Your choice though :) Link to comment https://forums.phpfreaks.com/topic/18336-code-needs-addin-toeditin-lol-good-php-help-needed/#findComment-78813 Share on other sites More sharing options...
runnerjp Posted August 22, 2006 Author Share Posted August 22, 2006 ok i added[code]<?php#################################include("chatbox/connect.php");#################################mysql_connect($host,$dbuser,$dbpass) or die(mysql_error());// Select the database.mysql_select_db($dbname) or die(mysql_error());$query = "SELECT poster, message FROM ch_messages order by id DESC LIMIT 5";$result = mysql_query($query);$marquee = "";$i = 0;while($r=mysql_fetch_array($result)){ $posts[$i] = "<img src='http://www.runnerselite.com/image/runner.gif'>".$r[poster].' - '. $r[message]; ++$i;}$marquee = implode("", $posts)."<img src='http://www.runnerselite.com/image/runner.gif'>";}echo "<marquee><font size='3'><span style='color: white'>". $marquee. "</span></font></marquee>"?>[/code]and still its not showin up :( error on line 19 Link to comment https://forums.phpfreaks.com/topic/18336-code-needs-addin-toeditin-lol-good-php-help-needed/#findComment-78815 Share on other sites More sharing options...
Barand Posted August 22, 2006 Share Posted August 22, 2006 what error message Link to comment https://forums.phpfreaks.com/topic/18336-code-needs-addin-toeditin-lol-good-php-help-needed/#findComment-78819 Share on other sites More sharing options...
Corona4456 Posted August 22, 2006 Share Posted August 22, 2006 [code]echo "<marquee><font size='3'><span style='color: white'>". $marquee. "</span></font></marquee>"[/code]doesn't have a [b];[/b] at the end... could that be the problem? Link to comment https://forums.phpfreaks.com/topic/18336-code-needs-addin-toeditin-lol-good-php-help-needed/#findComment-78820 Share on other sites More sharing options...
runnerjp Posted August 22, 2006 Author Share Posted August 22, 2006 Parse error: syntax error, unexpected '}' in /home/runnerse/public_html/chatbox/maq.php on line 19 Link to comment https://forums.phpfreaks.com/topic/18336-code-needs-addin-toeditin-lol-good-php-help-needed/#findComment-78821 Share on other sites More sharing options...
runnerjp Posted August 22, 2006 Author Share Posted August 22, 2006 ok done it i deleted the { lolis their away to control the speed of the marquee ? Link to comment https://forums.phpfreaks.com/topic/18336-code-needs-addin-toeditin-lol-good-php-help-needed/#findComment-78823 Share on other sites More sharing options...
runnerjp Posted August 22, 2006 Author Share Posted August 22, 2006 and to stop long gap between posts take alook and ull see what i mean [url=http://www.runnerselite.com]www.runnerselite.com[/url] Link to comment https://forums.phpfreaks.com/topic/18336-code-needs-addin-toeditin-lol-good-php-help-needed/#findComment-78824 Share on other sites More sharing options...
Corona4456 Posted August 22, 2006 Share Posted August 22, 2006 Change this:[code]<marquee><font size='3'><span style='color: white'>". $marquee. "</span></font></marquee>[/code]To:[code]<marquee scrolldelay='90'><font size='3'><span style='color: white'>". $marquee. "</span></font></marquee>[/code]The scroll delay doesn't necessarily have to be 90... change it to your liking :) Link to comment https://forums.phpfreaks.com/topic/18336-code-needs-addin-toeditin-lol-good-php-help-needed/#findComment-78826 Share on other sites More sharing options...
runnerjp Posted August 22, 2006 Author Share Posted August 22, 2006 will it stop the massive lag at end between going to 1st message?? Link to comment https://forums.phpfreaks.com/topic/18336-code-needs-addin-toeditin-lol-good-php-help-needed/#findComment-78827 Share on other sites More sharing options...
runnerjp Posted August 22, 2006 Author Share Posted August 22, 2006 nope it didnt :( lol rite what i mean is it says 1st message then streight 2 second then massive lag till it loops over again like so[move]hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message hello this is my 1st message...this is my second message [/move] Link to comment https://forums.phpfreaks.com/topic/18336-code-needs-addin-toeditin-lol-good-php-help-needed/#findComment-78854 Share on other sites More sharing options...
runnerjp Posted August 22, 2006 Author Share Posted August 22, 2006 see the big gap.... i would rlly like it like this[move]hello this is my 1st message...this is my second message....hello this is my 1st message...this is my second message....hello this is my 1st message...this is my second message....[/move] Link to comment https://forums.phpfreaks.com/topic/18336-code-needs-addin-toeditin-lol-good-php-help-needed/#findComment-78856 Share on other sites More sharing options...
HeyRay2 Posted August 22, 2006 Share Posted August 22, 2006 This should help you customize your marquee to how you want it:http://www.htmlcodetutorial.com/_MARQUEE.html Link to comment https://forums.phpfreaks.com/topic/18336-code-needs-addin-toeditin-lol-good-php-help-needed/#findComment-78861 Share on other sites More sharing options...
Barand Posted August 22, 2006 Share Posted August 22, 2006 Feature of marquee - waits for existing text to clear before restartingChain several sets together so gap only appears every 40 cycles say[code]<?php$marquee = implode("<img src='http://www.runnerselite.com/image/runner.gif'>", $posts);for ($i=0; $i=40; $i++) $marqueeText .= $marquee;echo "<marquee><font size='3'><span style='color: white'>". $marqueeText. "</span></font></marquee>"[/code] Link to comment https://forums.phpfreaks.com/topic/18336-code-needs-addin-toeditin-lol-good-php-help-needed/#findComment-78864 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.