Member
Member
Daxeno   2007-01-04, 15:09
#1

Is there any way we can make a link to view all comment for the Stopdesign Theme?

Member
Member
thinkdreams   2007-01-04, 15:57
#2

Dax-

You could hack this function to show everything I would imagine:

`function show_latest_comments($number) {

      echo '';

      echo '[list]';

      $comments = query_full_array("SELECT c.id, i.title, i.filename, a.folder, a.title AS albumtitle, c.name, c.website,"

        . " c.date, c.comment FROM ".prefix('comments')." AS c, ".prefix('images')." AS i, ".prefix('albums')." AS a "

        . " WHERE c.imageid = i.id AND i.albumid = a.id ORDER BY c.id DESC LIMIT $number");            

      $thiscomment = 'odd';  

      foreach ($comments as $comment) {

        $author = $comment['name'];

        $album = $comment['folder'];

        $image = $comment['filename'];

        $albumtitle = $comment['albumtitle'];

            if ($comment['title'] == "")  {

              $title = $image;

            } else {

              $title = $comment['title'];

            } 

        $website = $comment['website'];

        $comment = truncate_string($comment['comment'], 123); 

        $link = $albumtitle.' / '.$title ;

        $short_link = my_truncate_string($link, 20);      

        echo "$author commented on $short_link:$comment";              

        if('odd'==$thiscomment) { $thiscomment = 'even'; } else { $thiscomment = 'odd'; }  

      }

      echo '[/list]';

      echo '';

  }`
Member
Member
thinkdreams   2007-01-04, 15:57
#3

The key would be removing the LIMIT from the SQL query I think.

Member
Member
Daxeno   2007-01-04, 21:52
#4

But how?

because i have a comments link on my page yet you can only view it if you log in as an admin.

Member
Member
thinkdreams   2007-01-04, 22:08
#5

Dax-

All you have to do is place the code above in your custom functions file, and then call it wherever you want to display all your comments.

thus, would display the latest comments anywhere on your page you want.

Member
Member
Daxeno   2007-01-05, 19:29
#6

Thanks a Lot TD! i'll try to test this.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.