Welcome, Guest. Please Login or Register.
April 25, 2024, 10:22:45 AM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Completed mods  |  [Done 1.5.3] Recent Posts Next/Prev mod « previous next »
Pages: [1] 2 Reply Ignore Print
Author Topic: [Done 1.5.3] Recent Posts Next/Prev mod  (Read 11301 times)
Zulu
Full Member
***
Posts: 104


I'm no longer a llama, I'm a Monkey

WWW
[Done 1.5.3] Recent Posts Next/Prev mod
« on: June 12, 2002, 12:10:47 AM »
Reply with quote

This mod enables you to browse trough your most recent posts screen.

Download v 1.0

- Can't go below zero
- Can't go above the amount of posts
- Posts numbering though all the pages
- Add's a space in 'returnto the boardindex'

Fixed to work in YaBBSE 1.5.3 (and probably 1.5.2/1.5.1, but get 1.5.3 anyway ;))


« Last Edit: May 22, 2003, 11:52:58 AM by Zulu » Logged

Webby @ RFI
Formerly known as PtPazuzu
Trushna
Noobie
*
Posts: 49


Re:[code] Recent Posts Prev/Next mod
« Reply #1 on: June 12, 2002, 02:19:12 PM »
Reply with quote

exactly what it does?
Logged

( 18/6/2002 ) * FIFA vs Italy : 2 - 1 *
Zulu
Full Member
***
Posts: 104


I'm no longer a llama, I'm a Monkey

WWW
Re:[code] Recent Posts Prev/Next mod
« Reply #2 on: June 12, 2002, 07:11:28 PM »
Reply with quote

Here's a image.. It adds a prev/next option to the recent posts, so u can view more then 10.
Logged

Webby @ RFI
Formerly known as PtPazuzu
add_effect
Full Member
***
Posts: 140


heh heh

Re:[code] Recent Posts Prev/Next mod
« Reply #3 on: June 12, 2002, 10:27:26 PM »
Reply with quote

Hey, that's nice! Easier to find the recent topic. Awesome work, buddy.
Logged

:: Innocence and Experience ::
David
Destroyer Dave
Global Moderator
YaBB God
*****
Posts: 5761


I'm not a llama!

WWW
Re:[code] Recent Posts Prev/Next mod
« Reply #4 on: June 17, 2002, 04:59:27 AM »
Reply with quote

I love this mod but will you please put it in a boardmod format.
Logged

sensovision
Full Member
***
Posts: 100


WWW
Re:[code] Recent Posts Prev/Next mod
« Reply #5 on: August 24, 2002, 08:56:25 PM »
Reply with quote

I like it too, it's great...:) Thank you!
Logged

Denis

Are you good with the graphic? check out our design logo contest!
PioneeR
Llama Hunter
YaBB God
*****
Posts: 767


Re:[code] Recent Posts Prev/Next mod
« Reply #6 on: December 08, 2002, 12:16:34 AM »
Reply with quote

I have tried to get this to work with 1.41 (with speedup). But not had much luck.

The first ten show.. but when i click next... nothing posts appear (although the variable increases by ten)

Any php heads care to help?  ;D
Logged
PioneeR
Llama Hunter
YaBB God
*****
Posts: 767


Re:[code] Recent Posts Prev/Next mod
« Reply #7 on: December 10, 2002, 07:51:58 PM »
Reply with quote

Nope.. still cant get this to work on my 1.4.1+speedup mod.

Arghhhhhhhhhhhhh!

I feel better now  ;D
Logged
PioneeR
Llama Hunter
YaBB God
*****
Posts: 767


Re:[code] Recent Posts Prev/Next mod
« Reply #8 on: December 26, 2002, 05:22:09 PM »
Reply with quote

Had another stab at this. Still cant get it to work!!

I thought I could just add LIMIT $start,$display to the SELECT bits.. but nope.

Anyone get this to work with 1.4.1 with latest speedup mod or with 1.5.0??
« Last Edit: December 26, 2002, 05:38:30 PM by PioneeR » Logged
Zulu
Full Member
***
Posts: 104


I'm no longer a llama, I'm a Monkey

WWW
Re:[code] Recent Posts Prev/Next mod
« Reply #9 on: December 27, 2002, 10:27:11 PM »
Reply with quote

Sorry.. haven't been here a little while  :-\ I'm going to try and get this one for 1.5  :D
Logged

Webby @ RFI
Formerly known as PtPazuzu
PioneeR
Llama Hunter
YaBB God
*****
Posts: 767


Re:[code] Recent Posts Prev/Next mod
« Reply #10 on: December 27, 2002, 10:31:08 PM »
Reply with quote

 ;D
Logged
Zulu
Full Member
***
Posts: 104


I'm no longer a llama, I'm a Monkey

WWW
Re:[code] Recent Posts Prev/Next mod
« Reply #11 on: December 28, 2002, 12:13:04 AM »
Reply with quote

Here it is  ;D

Download Zip

You can see it working at my site: www.clan-rfi.com

I'm going to try and do something with $modSettings['totalMessages'] to let it not give a 'empty' page when you enter a enourmous value for Rstart...

I've solved a little bug too.. I'd give a white screen with a little output if you have no posts (seldom.. but who knows ;))

The template_header and $yytitle should not be in the while loop.
Logged

Webby @ RFI
Formerly known as PtPazuzu
PioneeR
Llama Hunter
YaBB God
*****
Posts: 767


Re:[code] Recent Posts Prev/Next mod
« Reply #12 on: December 28, 2002, 01:13:30 AM »
Reply with quote

I love this mod!

I am still on 1.4.1 (with latest speedup mod).. not gone to 1.5.0 yet (waiting for the dust to settle!! also only just recently moved from 1.3.1...)

What would I need to change to get this to work for my board??

I tried to 'adjust' your mod to fit... but as I dont know what I am doing.. it didnt work.

Heres a copy of my recentposts... if you could help. You would be my members HERO  ;D

function RecentPosts (){
   global $settings,$txt,$yytitle,$censored,$scripturl,$enable_ubbc,$enable_notification,$menusep,$db_prefix;
   global $cgi,$img,$color,$imagesdir,$realNames;
   $display = 50;

   $request = mysql_query("
      SELECT ID_MSG
      FROM {$db_prefix}messages
      WHERE 1
      ORDER BY posterTime DESC
      LIMIT 0,$display");
   $messages = array();
   while ($row = mysql_fetch_array($request))
      $messages[] = $row['ID_MSG'];

   if (count($messages))
   {
      $request = mysql_query("
         SELECT m.smiliesEnabled, m.posterTime, m.ID_MSG, m.subject, m.body, m.ID_TOPIC, t.ID_BOARD, b.name as bname, c.name as cname, t.numReplies, m.ID_MEMBER, m2.ID_MEMBER AS ID_FIRST_MEMBER, m.posterName, m2.posterName AS firstPosterName, IFNULL(mem.realName,m.posterName) AS posterDisplayName,IFNULL(mem2.realName,m2.posterName) AS firstPosterDisplayName
         FROM {$db_prefix}messages as m,{$db_prefix}messages AS m2,{$db_prefix}topics as t,{$db_prefix}boards as b,{$db_prefix}categories as c
            LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER=m.ID_MEMBER)
            LEFT JOIN {$db_prefix}members AS mem2 ON (mem2.ID_MEMBER=m2.ID_MEMBER)
         WHERE m.ID_MSG IN (" . implode(',', $messages) . ")
            AND m2.ID_MSG=t.ID_FIRST_MSG
            AND t.ID_TOPIC=m.ID_TOPIC
            AND b.ID_BOARD=t.ID_BOARD
            AND c.ID_CAT=b.ID_CAT
            AND (FIND_IN_SET('$settings[7]',c.memberGroups)!=0 OR c.memberGroups='' OR '$settings[7]'='Administrator' OR '$settings[7]'='Global Moderator')" .
            ($timelimit > 0 ? "AND m.posterTime>" . (time()-$timeLimit) : '') . "
         ORDER BY m.posterTime DESC");

      $yytitle = $txt[214];
      template_header();

      $counter = 0;

      while ($row = mysql_fetch_array($request))
      {
         $counter ++;
         if ($row['ID_MEMBER'] != '-1')
         {
            $euser=urlencode($row['posterName']);
            $row['posterName'] = "<a href=\"$scripturl?action=viewprofile;user=$euser\">$row[posterDisplayName]</a>";
         }
         if ($row['ID_FIRST_MEMBER'] != '-1')
         {
            $euser=urlencode($row[firstPosterName]);
            $row['firstPosterName'] = "<a href=\"$scripturl?action=viewprofile;user=$euser\">$row[firstPosterDisplayName]</a>";
         }

         $message = $row['body'];

         CensorTxt($message);
         CensorTxt($row['subject']);

         if($enable_ubbc)
            $message = DoUBBC($message,$row['smiliesEnabled']);

         if($enable_notification)
            $notify = "$menusep<a href=\"$scripturl?board=$row[ID_BOARD];action=notify;threadid=$row[ID_TOPIC];start=$row[numReplies]\">$img[notify_sm]</a>";
         $row['posterTime'] = timeformat($row['posterTime']);


         print <<<EOT
<table border="0" width="100%" cellspacing="1" bgcolor="$color[bordercolor]">
<tr>
   <td align=left bgcolor="$color[titlebg]" class="titlebg"><font class="text1" color="$color[titletext]" size=2> $counter </font></td>
   <td width="75%" bgcolor="$color[titlebg]" class="titlebg"><font class="text1" color="$color[titletext]" size="2"><b> $row[cname] / $row[bname] / <a href="$scripturl?board=$row[ID_BOARD];action=display;threadid=$row[ID_TOPIC];start=$row[numReplies]">$row[subject]</a></b></font></td>
   <td align=right bgcolor="$color[titlebg]" class="titlebg" nowrap> <font class="text1" color="$color[titletext]" size="2">$txt[30]: $row[posterTime] </font></td>
</tr>
<tr>
   <td colspan=3 bgcolor="$color[catbg]" class="catbg"><font class="catbg" size=2>$txt[109] $row[firstPosterName] | $txt[22] $txt[525] $row[posterName]</font></td>
</tr>
<tr>
   <td colspan=3 bgcolor="$color[windowbg2]" valign=top height=40 class="windowbg2"><font size=2>$message</font></td>
</tr>
<tr>
   <td colspan=3 bgcolor="$color[catbg]" class="windowbg"><font size=2>
       <a href="$scripturl?board=$row[ID_BOARD];action=post;threadid=$row[ID_TOPIC];start=$row[numReplies];title=Post+reply">$img[reply_sm]</a>$menusep<a href="$scripturl?board=$row[ID_BOARD];action=post;threadid=$row[ID_TOPIC];quote=$row[ID_MSG];title=Post+reply">$img[replyquote]</a>$notify
   </font></td>
</tr>
</table><br>
EOT;
      }
   }

   print <<<EOT
<font size="1"><a href="$cgi">$txt[236]</a>
$txt[237]<br></font>
EOT;
   footer();
   obExit();
}
Logged
PioneeR
Llama Hunter
YaBB God
*****
Posts: 767


Re:[code] Recent Posts Prev/Next mod
« Reply #13 on: December 28, 2002, 11:06:10 AM »
Reply with quote

Not sure I have done right but.. I replaced the recentposts function I had (1.4.1 with speedup mod) with the one from 1.5.0

Applied your mod... seems to work fine  ;D

Is it possible to show the correct post number? At the moment.. when you click next.. you get posts 1-10. Would be nice if it changed to 11-20 etc etc  ;D
« Last Edit: December 28, 2002, 11:10:29 AM by PioneeR » Logged
Zulu
Full Member
***
Posts: 104


I'm no longer a llama, I'm a Monkey

WWW
Re:[code] Recent Posts Prev/Next mod
« Reply #14 on: December 28, 2002, 04:29:36 PM »
Reply with quote

Giving a quick look @ your recent.php that copying from 1.5.0 should work I think  8)
The numbering is a nice option yeah.. I'll see if i can put it in  :D
Logged

Webby @ RFI
Formerly known as PtPazuzu
Pages: [1] 2 Reply Ignore Print 
YaBB SE Community  |  Development  |  Completed mods  |  [Done 1.5.3] Recent Posts Next/Prev mod « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.147 seconds with 20 queries.