Short by & Paginas?

Gestart doorAllard0 reacties41 weergaven

1 berichten · pagina 1 van 1

Allard

Lid · Topicstarter

Berichten
970
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Beste,

Ik heb het volgende script. Het haalt alle reacties op van een YouTube video. Zeer knap. Maar ik heb een probleem. Hij sorteert niet op tijd? Hier is mijn script. Je kunt het zien op; http://allard.s2.one2xs.com/comments.php. Zie je het staan? En dan nog wat. Kan ik het opdelen in paginas? Nu laat hij alleen de eerste 50 zien. Maar ik wil ze allemaal zien. Maar dan wel op paginas.

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/ini_set"]ini_set[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]display_errors[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/error_reporting"]error_reporting[/URL][COLOR= #007700]([/COLOR]E_ALL[COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/require"]require[/URL] [COLOR= #DD0000]./includes/class/import.class.php[/COLOR][COLOR= #007700];[/COLOR]

[COLOR= #0000BB]$youtube[/COLOR] [COLOR= #007700]= new[/COLOR] YoutubeComment[COLOR= #007700]();[/COLOR]
[COLOR= #0000BB]$youtube[/COLOR][COLOR= #007700]->[/COLOR]setCommentsForVideoId [COLOR= #007700]([/COLOR] [COLOR= #DD0000]jM4zvChNFKc[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]50[/COLOR] [COLOR= #007700],[/COLOR] [COLOR= #0000BB]1[/COLOR] [COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$info[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$youtube[/COLOR][COLOR= #007700]->[/COLOR]getInfo[COLOR= #007700]();[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<table>[/COLOR][COLOR= #007700];[/COLOR]

[URL="http://www.php.net/for"]for[/URL] [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$i[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]0[/COLOR] [COLOR= #007700];[/COLOR] [COLOR= #0000BB]$i[/COLOR][COLOR= #007700]<[/COLOR][COLOR= #0000BB]$info[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]count[/COLOR][COLOR= #007700]] ;[/COLOR] [COLOR= #0000BB]$i[/COLOR][COLOR= #007700]++ ) {[/COLOR]

    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<tr><td width="170"><b><a href="http://youtube.com/user/[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$info[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]writer[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]] .[/COLOR][COLOR= #DD0000]">[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$info[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]writer[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]] .[/COLOR][COLOR= #DD0000]</a></b><br>[/COLOR][COLOR= #007700];[/COLOR]

      [COLOR= #0000BB]$daterecomment[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$info[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]date[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]];[/COLOR]
      [COLOR= #0000BB]$datenow[/COLOR] [COLOR= #007700]=[/COLOR] date_create[COLOR= #007700]([/COLOR][COLOR= #0000BB]$info[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]date[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]]);[/COLOR]
      [COLOR= #0000BB]$dateplace[/COLOR] [COLOR= #007700]=[/COLOR] date_create[COLOR= #007700]([/COLOR][URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Y-m-d H:i:s[/COLOR][COLOR= #007700]));[/COLOR]
      [COLOR= #0000BB]$interval[/COLOR] [COLOR= #007700]=[/COLOR] date_diff[COLOR= #007700]([/COLOR][COLOR= #0000BB]$datenow[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$dateplace[/COLOR][COLOR= #007700]);[/COLOR]
      [COLOR= #0000BB]$day_interval[/COLOR] [COLOR= #007700]=[/COLOR]  [COLOR= #0000BB]$interval[/COLOR][COLOR= #007700]->[/COLOR]format[COLOR= #007700]([/COLOR][COLOR= #DD0000]%R%d dag geleden[/COLOR][COLOR= #007700]);[/COLOR]

    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$day_interval[/COLOR] [COLOR= #007700]<=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
           [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$interval[/COLOR][COLOR= #007700]->[/COLOR]format[COLOR= #007700]([/COLOR][COLOR= #DD0000]%R%h uur geleden[/COLOR][COLOR= #007700]);
    }[/COLOR]
        [URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$day_interval[/COLOR] [COLOR= #007700]<[/COLOR] [COLOR= #0000BB]31[/COLOR][COLOR= #007700]) {[/COLOR]
           [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$day_interval[/COLOR] [COLOR= #007700]<=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]) {[/COLOR]
           [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$interval[/COLOR][COLOR= #007700]->[/COLOR]format[COLOR= #007700]([/COLOR][COLOR= #DD0000]%R%d dag geleden[/COLOR][COLOR= #007700]);
    }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
           [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$interval[/COLOR][COLOR= #007700]->[/COLOR]format[COLOR= #007700]([/COLOR][COLOR= #DD0000]%R%d dagen geleden[/COLOR][COLOR= #007700]);
    }
  }[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]</td><td><br />[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$info[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]text[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]] .[/COLOR][COLOR= #DD0000]<br><br></td></tr>[/COLOR][COLOR= #007700];
}[/COLOR]
?>
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