Welcome, Guest. Please Login or Register.
May 04, 2025, 10:35:02 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.4.x & 1.3.x] Speedup your Boardindex NEW Version 2! « previous next »
Pages: 1 2 3 [4] 5 6 ... 10 Reply Ignore Print
Author Topic: [Done 1.4.x & 1.3.x] Speedup your Boardindex NEW Version 2!  (Read 25781 times)
Compuart
Quality, Quality, Quality!
YaBB God
*****
Posts: 1283


ICQ - 8801024Compuart@hotmail.com WWW
Re:[Done 1.4.1] Speedup your Boardindex by 50% [BETA 1.4.0 & 1.3.x]
« Reply #45 on: August 25, 2002, 06:45:04 PM »
Reply with quote

If boardmod doesn't give errors it should work with any mod. This change much code. Only in boardindex it changes some calls to the database, but that shouldn't affect other mods (although the only way to really know is to test it)
Logged

PioneeR
Llama Hunter
YaBB God
*****
Posts: 767


Re:[Done 1.4.1] Speedup your Boardindex by 50% [BETA 1.4.0 & 1.3.x]
« Reply #46 on: August 25, 2002, 07:01:45 PM »
Reply with quote

The Allowed User mod add a section to boardindex which stops boardmod finding the right string.

This is the first bit of boardindex which the speedup mod wants to replace (there is a chunk of code added by Allowed User Mod).

If I take out the Allowed user mod code. apply yours.. then put the Allowed user code back after while ($row_cat = mysql_fetch_array($result))

You reckon that should work??


   $result = mysql_query("SELECT name,ID_CAT FROM {$db_prefix}categories WHERE ('$settings[7]'='Administrator' || '$settings[7]'='Global Moderator' || FIND_IN_SET('$settings[7]',memberGroups)!=0 || memberGroups='') ORDER BY catOrder");

   while ($row_cat = mysql_fetch_array($result))
   {


      // Added by Allowed User MOD - Begin

      $Show_Cat = 0;
      $Board_result = mysql_query("SELECT ID_BOARD FROM {$db_prefix}boards WHERE ID_CAT = $row_cat[ID_CAT]");
      while ($row_Board = mysql_fetch_array($Board_result)) {
         $Show_Cat++;
         $Show_Board[$row_Board[0]] = true;

         if (($settings[7] != 'Administrator') && ($settings[7] != 'Global Moderator')) {
             $AUO_result = mysql_query("SELECT AU_option FROM {$db_prefix}allowedusersoptions WHERE boardid = $row_Board[0]");
            if ($row_AUO = mysql_fetch_row($AUO_result)) {
               if ($row_AUO[0] == '2') {
                 if ($username == 'Guest') {
                  $Show_Cat--;
                  $Show_Board[$row_Board[0]] = false;
                 }
               } else if ($row_AUO[0] == '4') {
                                      $AU_result = mysql_query("SELECT membername FROM {$db_prefix}allowedusers WHERE membername = '$username' AND boardid = $row_Board[0]");
                  if (mysql_fetch_row($AU_result) == 0) {
                     $Show_Cat--;
                     $Show_Board[$row_Board[0]] = false;
                  }
               }
            }
         }
      }

      if ($Show_Cat != 0) {
      

// Added by Allowed User MOD - End



      print <<<EOT
 <tr>
    <td colspan="5" class="catbg" height="18"><a name="$row_cat[ID_CAT]"><b>$row_cat[name]</b></a></td>
  </tr>
EOT;
      $result2 = mysql_query("SELECT ID_BOARD,name,description,moderators,numPosts,numTopics FROM {$db_prefix}boards WHERE (ID_CAT=$row_cat[ID_CAT]) ORDER BY boardOrder");
      while ($row_board = mysql_fetch_array($result2))
      {
         if ($Show_Board[$row_board[ID_BOARD]]) { // Added by Allowed User MOD
         $result3 = mysql_query("SELECT m.posterName,m.ID_MEMBER,m.posterTime,m.modifiedTime,m.subject,t.ID_TOPIC,t.numReplies FROM {$db_prefix}messages as m, {$db_prefix}topics as t WHERE (m.ID_MSG=t.ID_LAST_MSG && t.ID_BOARD=$row_board[ID_BOARD]) ORDER BY m.posterTime DESC LIMIT 1");
         $latestPostName = $txt[470];
         $latestPostTime = $txt[470];
         $latestPostID = '-1';
         $latestModTime = $subject = $topicID = '';
         $numReplies = 0;
         if (mysql_num_rows($result3) > 0)
            list ($latestPostName,$latestPostID,$latestPostTime,$latestModTime,$subject,$topicID,$numReplies) = mysql_fetch_row($result3);
         $latestEditTime = $latestModTime = $latestPostTime;

         if ($latestPostID != '-1') {
            $result3 = mysql_query("SELECT memberName,realName FROM {$db_prefix}members WHERE ID_MEMBER=$latestPostID");
            $rowmem = mysql_fetch_row($result3);
            $latestPostRealName = isset($rowmem[1])?$rowmem[1]:$rowmem[0];
         }
Logged
Compuart
Quality, Quality, Quality!
YaBB God
*****
Posts: 1283


ICQ - 8801024Compuart@hotmail.com WWW
Re:[Done 1.4.1] Speedup your Boardindex by 50% [BETA 1.4.0 & 1.3.x]
« Reply #47 on: August 25, 2002, 07:12:51 PM »
Reply with quote

hmmm, nope, this won't work I'm affraid  :'(

boardindex 1.3.x splits category queries from board queries. The speedup mod combines them. Therefor the 'Allowed users'-mod would have to be rewritten. Or you'd have to use a version 1.4.1 of YaBB SE and as version 1.4.1 of the 'allowed users'-mod.  They could pr'bly be integrated more easily.
Logged

ljungberg
Noobie
*
Posts: 6


I'm a llama!

Re:[Beta 1.4.1]Faster boardindex
« Reply #48 on: August 26, 2002, 03:06:41 AM »
Reply with quote

Quote from: Nemesis on August 19, 2002, 03:52:10 PM
Quote from: Shadowgate on August 19, 2002, 09:11:48 AMI installed this mod and I don't notice a difference in load times....

I have 40k+ posts but I guess the huge boards may benefit?

Do me a favor open up template.php and remove the <yabb msn> tag and seeif it loads faster. If not put it back in.  ;D

I've just upgraded the board from 1.4.0 to 1.4.1
If I want to speed up the board index,I need to edit template.php in version 1.4.0 ??? (cos there're no template.php in the upgrade)

ps I can't find the <yabb msn> tag in template.php.......
Logged
Gobalopper
Mod Team
YaBB God
*****
Posts: 993


Cookie Monster

WWW
Re:[Done 1.4.1] Speedup your Boardindex by 50% [BETA 1.4.0 & 1.3.x]
« Reply #49 on: August 26, 2002, 04:08:54 AM »
Reply with quote

I can confirm the lastest update fixes the boardindex showing messages as unread if you just posted in 1.4.1, thanks Compuart.
Logged
KillaP
Full Member
***
Posts: 131


I'm fine..... No really I am.

WWW
Re:[Done 1.4.1] Speedup your Boardindex by 50% [BETA 1.4.0 & 1.3.x]
« Reply #50 on: August 26, 2002, 03:00:34 PM »
Reply with quote

I get this error

2: mysql_fetch_array(): supplied argument is not a valid MySQL result resource
/edited for security/htdocs/community/Sources/BoardIndex.php ln 169)

Then when I put back the old boardindex it works like a charm.
« Last Edit: August 26, 2002, 03:02:15 PM by KillaP » Logged
KillaP
Full Member
***
Posts: 131


I'm fine..... No really I am.

WWW
Re:[Done 1.4.1] Speedup your Boardindex by 50% [BETA 1.4.0 & 1.3.x]
« Reply #51 on: August 26, 2002, 03:01:20 PM »
Reply with quote

I am also using 1.4.1.  
Logged
Compuart
Quality, Quality, Quality!
YaBB God
*****
Posts: 1283


ICQ - 8801024Compuart@hotmail.com WWW
Re:[Done 1.4.1] Speedup your Boardindex by 50% [BETA 1.4.0 & 1.3.x]
« Reply #52 on: August 26, 2002, 03:44:24 PM »
Reply with quote

have you executed the php-file first?
Logged

KillaP
Full Member
***
Posts: 131


I'm fine..... No really I am.

WWW
Re:[Done 1.4.1] Speedup your Boardindex by 50% [BETA 1.4.0 & 1.3.x]
« Reply #53 on: August 26, 2002, 03:49:00 PM »
Reply with quote

Quote from: Compuart on August 26, 2002, 03:44:24 PMhave you executed the php-file first?


ahahaah.  *Looks at the ground.*  That is one thing I forgot to do.  I'll give that a try now.  ;D  Sorry.  ;)
Logged
KillaP
Full Member
***
Posts: 131


I'm fine..... No really I am.

WWW
Re:[Done 1.4.1] Speedup your Boardindex by 50% [BETA 1.4.0 & 1.3.x]
« Reply #54 on: August 26, 2002, 04:02:33 PM »
Reply with quote

Worked.  I guess reading directions is a good idea.  :P ;D
Logged
Eloya
Full Member
***
Posts: 127


Magistrat

nschunter@eloya.net WWW
Re:[Done 1.4.1] Speedup your Boardindex by 50% [BETA 1.4.0 & 1.3.x]
« Reply #55 on: August 29, 2002, 09:59:26 AM »
Reply with quote

Hey compuart - your fixes are working perfectly *g*. Now for the beer... ;)
Logged

"Der Unterschied zwischen Magie und Alltag ist die Betrachtungsweise!"
http://www.travar.de
Compuart
Quality, Quality, Quality!
YaBB God
*****
Posts: 1283


ICQ - 8801024Compuart@hotmail.com WWW
Re:[Done 1.4.1] Speedup your Boardindex by 50% [BETA 1.4.0 & 1.3.x]
« Reply #56 on: August 29, 2002, 06:28:38 PM »
Reply with quote

Thanks for the beer Eloya! Was very tasty and fresh  :D

Mediman discovered a new bug. When moving a topic without a redirect topic the latest topic in the boardindex isn't updated. Here's a fix:

replace (MoveThread):
      updateLastMessage($currentboard);
      updateLastMessage($toboard);
   }
   else
   {
      $request = mysql_query ("UPDATE {$db_prefix}boards SET numPosts=(numPosts-$threadposts), numTopics=numTopics-1 WHERE ID_BOARD=$currentboard");
   }

by:
   }
   else
   {
      $request = mysql_query ("UPDATE {$db_prefix}boards SET numPosts=(numPosts-$threadposts), numTopics=numTopics-1 WHERE ID_BOARD=$currentboard");
   }
   updateLastMessage($currentboard);
   updateLastMessage($toboard);

I will release a new version shortly

(first I'm gonna have another beer :P)
Logged

Compuart
Quality, Quality, Quality!
YaBB God
*****
Posts: 1283


ICQ - 8801024Compuart@hotmail.com WWW
Re:[Done 1.4.1] Speedup your Boardindex by 50% [BETA 1.4.0 & 1.3.x]
« Reply #57 on: August 29, 2002, 06:42:12 PM »
Reply with quote

version 1.12 is released. This bug should be history. Thanks Mediman for finding it  ;)
Logged

mediman
Support Team
YaBB God
*****
Posts: 2858


WWW
Re:[Done 1.4.1] Speedup your Boardindex by 50% [BETA 1.4.0 & 1.3.x]
« Reply #58 on: August 29, 2002, 06:46:40 PM »
Reply with quote

[shadow=steelblue,left,300]Compuart you´re the man![/size][/shadow]

thx a lot, and sorry that i didn´t found the solution by myself!

mediman
Logged

mainComm Dev Team
iamdamnsam
Full Member
***
Posts: 225


RamchargerCentral.Com

WWW
Re:[Done 1.4.1] Speedup your Boardindex by 50% [BETA 1.4.0 & 1.3.x]
« Reply #59 on: August 30, 2002, 08:21:47 PM »
Reply with quote

Does the above fix appy for SE 1.31 or just 1.4?  
Logged

Pages: 1 2 3 [4] 5 6 ... 10 Reply Ignore Print 
YaBB SE Community  |  Development  |  Completed mods  |  [Done 1.4.x & 1.3.x] Speedup your Boardindex NEW Version 2! « 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.113 seconds with 20 queries.