My own solution for the problem of huge amount of queries( it was wrtitten at 5 AM, so dont be very cruel wink )
This will MOST LIKELY not work for you if you're going to use patch util
make all changes by hand

--- dev/viewtopic.php    (revision 177)
+++ dev/viewtopic.php    (revision 178)
@@ -211,8 +211,25 @@
 $post_count = 0;    // Keep track of post numbers
 
 // Retrieve the posts (and their respective poster/online status)
    
+$att_res = $db->query('select af.* from '.$db->prefix.'attach_2_files as af left join '.$db->prefix.'posts as p on af.post_id=p.id where p.topic_id='.$id);
+$att_arr = array();
+$attach_allow_download = false;
+
+while ($att_arr[] = $db->fetch_assoc($att_res)) {}
 
+if($pun_user['g_id']==PUN_ADMIN) $attach_allow_download = true;
+        else{         //fetch the rules of the forum, and check so that the user is allowed to download.
+            $result_attach_two = $db->query('SELECT ar.rules FROM '.$db->prefix.'attach_2_rules AS ar WHERE ar.group_id=\''.$pun_user['group_id'].'\' AND ar.forum_id='.$cur_topic['forum_id'].' LIMIT 1')or error('Unable to fetch rules for the attachments', __FILE__, __LINE__, $db->error());
+            if($db->num_rows($result_attach_two)==1){
+                list($attach_rules)=$db->fetch_row($result_attach_two);
+                $attach_allow_download = attach_rules($attach_rules,ATTACH_DOWNLOAD);
+            }
+        }
+
+        
+        
 while ($cur_post = $db->fetch_assoc($result))
 {
     $post_count++;
@@ -353,30 +370,23 @@
         }
     }
     // Attachment Mod Block Start
-    $attach_allow_download = false;
     $attach_output = '';
     $attach_num = 0;
+    
     // Check if this post has any attachments
-    $result_attach = $db->query('SELECT af.id, af.filename, af.size, af.downloads FROM '.$db->prefix.'attach_2_files AS af WHERE af.post_id='.$cur_post['id']) or error('Unable to fetch if there were any attachments to the post', __FILE__, __LINE__, $db->error());
-    $attach_num = $db->num_rows($result_attach);
-    if($attach_num > 0){
-        if($pun_user['g_id']==PUN_ADMIN)$attach_allow_download=true;
-        else{         //fetch the rules of the forum, and check so that the user is allowed to download.
-            $result_attach_two = $db->query('SELECT ar.rules FROM '.$db->prefix.'attach_2_rules AS ar WHERE ar.group_id=\''.$pun_user['group_id'].'\' AND ar.forum_id='.$cur_topic['forum_id'].' LIMIT 1')or error('Unable to fetch rules for the attachments', __FILE__, __LINE__, $db->error());
-            if($db->num_rows($result_attach_two)==1){
-                list($attach_rules)=$db->fetch_row($result_attach_two);
-                $attach_allow_download = attach_rules($attach_rules,ATTACH_DOWNLOAD);
-            }
-        }
+//    $result_attach = $db->query('SELECT af.id, af.filename, af.size, af.downloads FROM '.$db->prefix.'attach_2_files AS af WHERE af.post_id='.$cur_post['id']) or error('Unable to fetch if there were any attachments to the post', __FILE__, __LINE__, $db->error());
+//    $attach_num = $db->num_rows($result_attach);
+for ($i=0; $i < sizeof($att_arr)-1;$i++){
+    
+    if($att_arr[$i]['post_id'] == $cur_post['id']){
+        $attach_num++;
         if($attach_allow_download){//check if the user is allowed to download it.
             $attach_output .= $lang_attach['Attachments:'].' ';
-            while(list($attachment_id, $attachment_filename, $attachment_size, $attachment_downloads)=$db->fetch_row($result_attach)){
-                $attachment_extension=attach_get_extension($attachment_filename);
-                $attach_output .= '<br />'."\n\t\t\t\t\t\t".attach_icon($attachment_extension).' <a href="./attachment.php?item='.$attachment_id.'">'.$attachment_filename.'</a>, '.$lang_attach['Size:'].' '.number_format($attachment_size).' '.$lang_attach['bytes'].', '.$lang_attach['Downloads:'].' '.number_format($attachment_downloads);
-            }
+                $attachment_extension = attach_get_extension($att_arr[$i]['filename']);
+                $attach_output .= '<br />'."\n\t\t\t\t\t\t".attach_icon($att_arr[$i]['extension']).' <a href="./attachment.php?item='.$att_arr[$i]['id'].'">'.$att_arr[$i]['filename'].'</a>, '.$lang_attach['Size:'].' '.number_format($att_arr[$i]['size']).' '.$lang_attach['bytes'].', '.$lang_attach['Downloads:'].' '.number_format($att_arr[$i]['downloads']);
         }
     }
-    // Attachment Mod Block End
+}    // Attachment Mod Block End
 
 ?>
 <div id="p<?php echo $cur_post['id'] ?>" class="blockpost<?php echo $vtbg ?><?php if (($post_count + $start_from) == 1) echo ' firstpost'; ?>">
@@ -396,7 +406,7 @@
                 <div class="postmsg">
                     <?php echo $cur_post['message']."\n" ?>
 <?php if ($cur_post['edited'] != '') echo "\t\t\t\t\t".'<p class="postedit"><em>'.$lang_topic['Last edit'].' '.pun_htmlspecialchars($cur_post['edited_by']).' ('.format_time($cur_post['edited']).')</em></p>'."\n"; ?>
-<?php if ($attach_allow_download) echo "\t\t\t\t\t".'<div class="postsignature"><hr />'.$attach_output.'</div>'."\n"; ## Attachment Mod row ?>
+<?php if ($attach_allow_download && $attach_output != '') echo "\t\t\t\t\t".'<div class="postsignature"><hr />'.$attach_output.'</div>'."\n"; ## Attachment Mod row ?>
 <?php if ($signature != '') echo "\t\t\t\t".'<div class="postsignature"><hr />'.$signature.'</div>'."\n"; ?>
                 </div>
             </div>

27

(88 replies, posted in Archive)

2 ìåðòâûéòèï:
ìäà.... Â Ðîññèè ñòàíäàðò koi8-r è óæ íèêàê íå UTF-8
à â *nix íóæíî åùå è ïîòðàõàòüñÿ, ÷òîáû ó òåáÿ â ñèñòåìå íîðìàëüíî UTF-8 ðàáîòàë, òàê åùå è 90% ïðîã åãî íå ïîääåðæèâàþò. òàê ÷òî íàõ..íàõ...
ÇÛ è ðàç óæ òû íà ðóññêîì ôîðóìå - ïèøè ïî-ðóññêè, íàõ íèêîìó íå íóæíû òâîè âûåæîíû ñ àíãë. ÿçûêîì

2 Frank:
yes, thank you for a nice mod smile but you see.. i just point out some troubles ( i'm a QA engineer wink )
BTW after installing this mod the performance hit is much more than 13*0.00076 sec ( for this particular topic )
it is about 0.1 sec for the topic with 13 replies...
Edit:
BTW why have you turned off query cache ?

just installed this mod, and i've noticed a performance hit...
after installing this mod i see an extra query for every post in a topic
like this:

0.00168      SELECT af.id, af.filename, af.size, af.downloads FROM pun_attach_2_files AS af WHERE af.post_id=563
0.00076     SELECT af.id, af.filename, af.size, af.downloads FROM pun_attach_2_files AS af WHERE af.post_id=567
0.00074     SELECT af.id, af.filename, af.size, af.downloads FROM pun_attach_2_files AS af WHERE af.post_id=568
0.00084     SELECT af.id, af.filename, af.size, af.downloads FROM pun_attach_2_files AS af WHERE af.post_id=593
0.00076     SELECT af.id, af.filename, af.size, af.downloads FROM pun_attach_2_files AS af WHERE af.post_id=594
0.00074     SELECT af.id, af.filename, af.size, af.downloads FROM pun_attach_2_files AS af WHERE af.post_id=595
0.00081     SELECT af.id, af.filename, af.size, af.downloads FROM pun_attach_2_files AS af WHERE af.post_id=597
0.00075     SELECT af.id, af.filename, af.size, af.downloads FROM pun_attach_2_files AS af WHERE af.post_id=600
0.00079     SELECT af.id, af.filename, af.size, af.downloads FROM pun_attach_2_files AS af WHERE af.post_id=651
0.00074     SELECT af.id, af.filename, af.size, af.downloads FROM pun_attach_2_files AS af WHERE af.post_id=653
0.00075     SELECT af.id, af.filename, af.size, af.downloads FROM pun_attach_2_files AS af WHERE af.post_id=654
0.00074     SELECT af.id, af.filename, af.size, af.downloads FROM pun_attach_2_files AS af WHERE af.post_id=655
0.00074     SELECT af.id, af.filename, af.size, af.downloads FROM pun_attach_2_files AS af WHERE af.post_id=668

i recommend you to use http://punbb.org/forums/viewtopic.php?id=7051 instead of this mod
its more complete, but has no archive, going to add archive functionality to miniportal mod

whiteh0rs3 wrote:

You haven't finish this mod, aren't you? it doesn't work on me

i haven't. post your problems here, plz

it works with any 1.2.x install

From the mod description:

This is a small hack of Rickard's News Generator. It makes News automatically.

that?s all
With this mod, your news are posted instantly, without need to go to Admin pages and pressing "generate" button
If you want some docs - see Rickard's mod ( i've deleted all his comments sad )

demo here

here
http://www.punres.org/viewtopic.php?id=310
it's avery RAW version, so post suggestions etc. here or there smile

36

(92 replies, posted in General discussion)

shinko_metsuo wrote:
XuMiX wrote:

http://xumix.fanstvo.com/img/desktop/
theese are mine smile

I have to change my Fire Fox theme it seems like its the deafult because everyone uses it

loool smile
i use different themes smile noia, saferfox, cute etc... just to fit best to my desktop theme smile

37

(92 replies, posted in General discussion)

http://xumix.fanstvo.com/img/desktop/
theese are mine smile

ok, i'll try to break it soon smile

yes, but not to store user's data

lol, phpbb, ipb use them at least

btw: http://www.punres.org/viewtopic.php?id=308

Notice: Undefined index: antileech.php in /full/path/to/online.php on line 56

just add

'antileech.php'               =>        'Smth you can define',

to your lang file ( i just don't like @function use cases)
2 gizmo: thx a lot, I'm not a html guru, so it would take a long time to adapt this mod to punbb 1.2.x
edit:

Do I have to add a line to the lang file for each of my website pages (I have over 200)?

huh... than if its so bad, your decision is the right one

guys! we a re talking about moving authorization metod from cookie to sessions! its MUCH more secure to store data at server than at client, any malicious hacker can get punbb authorization data from cookie with javascript(of course if the browser allows it and most of them do, by default)

44

(3 replies, posted in Archive)

????? ??? ?????? ??? ? ??????? ?????, ????? ????? ??????? ???????

http://hostel.nstu.ru/~xumuk/punonline.zip

fixed already

47

(19 replies, posted in Feature requests)

hm. what about classes ?

48

(19 replies, posted in Feature requests)

so, a little question:
now all posted images are scaled, how s it possible to view not scaled image ?(i mean without any copy|pasting urls etc.)
is it possible to make an image clickable, and make it full size(in a scroll box, like it was in 1.2) after click?

49

(4 replies, posted in PunBB 1.2 bug reports)

hehe, that?s why lame use mysql tongue
BTW if i want some mysql functions - i just get plPHP and write some, so what would you do with mysql ? smile

50

(4 replies, posted in PunBB 1.2 bug reports)

yes, seems so, but i use PostgreSQL smile
mysql is TOO polite with some mistakes... pgsql teaches to be more strict and accurate