vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Im working on a new hack, take a look. (https://vborg.vbsupport.ru/showthread.php?t=46227)

Slynderdale 11-30-2002 02:20 AM

Im working on a new hack, take a look.
 
1 Attachment(s)
I'm working on a new hack, if people like it, ill release it when its done, the attachment is self explanatory.

Slynderdale 11-30-2002 02:21 AM

1 Attachment(s)
So far heres my current admin options for it.

Slynderdale 11-30-2002 02:37 AM

1 Attachment(s)
Heres when you post.

Slynderdale 11-30-2002 02:38 AM

1 Attachment(s)
Heres the error screen when one of the attachments gets an error.

Slynderdale 11-30-2002 03:58 AM

1 Attachment(s)
Heres a screen shot of multiple attachments on multiple posts.

Smoothie 11-30-2002 04:15 AM

I'm liking it.... :)

Slynderdale 11-30-2002 04:20 AM

On average it only adds one or two extra queries to the showthread page and the others so it isnt querie extensive.

Smoothie 11-30-2002 05:20 AM

Looks awesome. Would like to see the final query count.

Slynderdale 11-30-2002 05:40 AM

So far from the pictures you saw, i only added one extra query to show thread

PHP Code:

$posts=$DB_site->query("
SELECT
post.*,post.username AS postusername,post.attachmentid AS postattachmentid,post.ipaddress AS ip,user.*,userfield.*,"
.iif($forum[allowicons],'icon.title as icontitle,icon.iconpath,','')."
attachment.attachmentid,attachment.filename,attachment.visible AS attachmentvisible,attachment.counter
"
.iif($avatarenabled,",avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar,customavatar.dateline AS avatardateline","")."
FROM post
"
.iif($forum[allowicons],'LEFT JOIN icon ON icon.iconid=post.iconid','')."
LEFT JOIN user ON user.userid=post.userid
LEFT JOIN userfield ON userfield.userid=user.userid
"
.iif ($avatarenabled,"LEFT JOIN avatar ON avatar.avatarid=user.avatarid
                       LEFT JOIN customavatar ON customavatar.userid=user.userid"
,"")."
LEFT JOIN attachment ON attachment.attachmentid=post.attachmentid
WHERE 
$postids
ORDER BY dateline 
$postorder
"
);
                   
if (!
$getperms['cangetattachment']) {
    
$viewattachedimages=0;
}

$postbits '';
$counter=0;
$postdone = array();
$sigcache = array();
$attachmentid=$DB_site->query("SELECT attachmentid,filename,visible,counter FROM attachment");
 while (
$attachmentbit=$DB_site->fetch_array($attachmentid)) {
   
$attach_id[$attachmentbit['attachmentid']] = $attachmentbit['attachmentid'];
   
$attach_filename[$attachmentbit['attachmentid']] =  $attachmentbit['filename'];
   
$attach_visible[$attachmentbit['attachmentid']] =  $attachmentbit['visible'];
   
$attach_counter[$attachmentbit['attachmentid']] =  $attachmentbit['counter']; 



Slynderdale 11-30-2002 05:42 AM

This query
PHP Code:

$postbits '';
$counter=0;
$postdone = array();
$sigcache = array();
$attachmentid=$DB_site->query("SELECT attachmentid,filename,visible,counter FROM attachment");
 while (
$attachmentbit=$DB_site->fetch_array($attachmentid)) {
   
$attach_id[$attachmentbit['attachmentid']] = $attachmentbit['attachmentid'];
   
$attach_filename[$attachmentbit['attachmentid']] =  $attachmentbit['filename'];
   
$attach_visible[$attachmentbit['attachmentid']] =  $attachmentbit['visible'];
   
$attach_counter[$attachmentbit['attachmentid']] =  $attachmentbit['counter']; 


the rest is php script, i havnt noticed any speed change when the forum loads even when the page has 100 posts.


All times are GMT. The time now is 05:57 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01080 seconds
  • Memory Usage 1,752KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete