Berichten in shoutbar herhalen

Gestart doorShahiem8 reacties43 weergaven

9 berichten · pagina 1 van 1

Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nou , ik heb een shoutbar maar hij moet de berichten blijven herhale, Hoe doe ik dat?

<script type="text/javascript">
var shoutNumer = 1;
var endPosition = 0;
function nextShout () {
    endPosition = -Math.round((63*shoutNumer));
    shoutNumer++;
    if(shoutNumer == 20)
    { 
        shoutNumer = 0;
    }
    setTimeout("nextShout()", 5000);
    moveShout();
}
function moveShout() {
    currentPosition = parseInt(document.getElementById(shoutBox).style.top);
    if(currentPosition != endPosition){
        document.getElementById(shoutBox).style.top = currentPosition + Math.floor((endPosition - currentPosition)/17) +px;
        setTimeout("moveShout()", 10);
    }
}
setTimeout("nextShout()", 5000);
</script>    
             <div style="width: 500px; height: 50px; margin: 0 0 10px 0; overflow: hidden; position: relative;">
    <div id="shoutBox" style="position: absolute; top: 0; width: 100%;">
                    [COLOR= #0000BB]<?php
$querys[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT b.bericht, b.id, b.userid, m.uName, m.uCol, m.uId FROM berichtenbalk AS b, member_accounts AS m WHERE m.uId = b.userid ORDER BY b.id DESC LIMIT 0,8"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
?>      
[COLOR= #0000BB]<?php[/COLOR]
                [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$querys[/COLOR][COLOR= #007700]) >[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
                {[/COLOR]
                    [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$querys[/COLOR][COLOR= #007700]))
                    {[/COLOR]
?>

                        <div class="shout" id="shout_73" style="height: 48px; background: #E2E2E2; border: 1px #000 solid;">
            <table cellspacing="0" cellpadding="0" width="100%">
                <tr>
                    <td width="40" style="padding-top: 6px; padding-left: 5px;">
                    <a href="http://MindClip.webqie.nl/">
                    <img src="http://www.webqie.nl/avatar/MindClip.jpg" border="0" width="35" height="35"/>                    </td>
                    <td style="padding-left: 7px;">
                                <span style="font-weight: bold;width: 150px;"><a href="[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$site[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]link[/COLOR][COLOR= #007700]][/COLOR] ?>/profiel/profiel/profielid=[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uId[/COLOR][COLOR= #007700]]);[/COLOR] ?>">[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uName[/COLOR][COLOR= #007700]]);[/COLOR] ?></a></span>: [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]]);[/COLOR] ?> 
                                    </td>
                </tr>
            </table>
        </div>    
[COLOR= #0000BB]<?php[/COLOR]
                    [COLOR= #007700]}
                }[/COLOR]
                [URL="http://www.php.net/else"]else[/URL]
                [COLOR= #007700]{[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]De berichtenbalk is leeg[/COLOR][COLOR= #007700];
                }[/COLOR]
?>
        </div>    
        </div>
0
Miel

Lid

Berichten
4.462
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Minimaal 20 shouts hebben, en dan doet ie dat.
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Dit is de shoutbar van webQie en dan wat PHP toegevoegd.
Heb je rechten om te gebruiken?
0
Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
1. Wie zegt dat ik het niet ga aanpasen.
2. Jij gebruikte zelf een shoutbar voor je site Linspin.
0
Erik

Lid

Berichten
7.109
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
En die shoutbar komt van Zikle af. emo
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
@2:
Die site is niet van mij emo?
0
Krm

Lid

Berichten
6.235
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
if(shoutNumer == 20)

als er 20 shouts zijn gaat hij dat doen volgens mij
0
Berichten
1.641
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
bloos volgens mij gaat dat niet werken..
0
Berichten
1.168
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
zet hem gewoon in een for van 1000 yummie
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren