Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-30-2002, 02:20 AM
Slynderdale Slynderdale is offline
 
Join Date: Mar 2002
Location: New York State
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Im working on a new hack, take a look.

I'm working on a new hack, if people like it, ill release it when its done, the attachment is self explanatory.
Attached Images
File Type: jpg multiple attachment 1.jpg (36.9 KB, 0 views)
Reply With Quote
  #2  
Old 11-30-2002, 02:21 AM
Slynderdale Slynderdale is offline
 
Join Date: Mar 2002
Location: New York State
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So far heres my current admin options for it.
Attached Images
File Type: jpg multiple attachment 2.jpg (95.5 KB, 0 views)
Reply With Quote
  #3  
Old 11-30-2002, 02:37 AM
Slynderdale Slynderdale is offline
 
Join Date: Mar 2002
Location: New York State
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Heres when you post.
Attached Images
File Type: jpg multiple attachment 3.jpg (52.2 KB, 0 views)
Reply With Quote
  #4  
Old 11-30-2002, 02:38 AM
Slynderdale Slynderdale is offline
 
Join Date: Mar 2002
Location: New York State
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Heres the error screen when one of the attachments gets an error.
Attached Images
File Type: jpg multiple attachment 4.jpg (36.6 KB, 0 views)
Reply With Quote
  #5  
Old 11-30-2002, 03:58 AM
Slynderdale Slynderdale is offline
 
Join Date: Mar 2002
Location: New York State
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Heres a screen shot of multiple attachments on multiple posts.
Attached Images
File Type: jpg multiple attachment 5.jpg (64.8 KB, 0 views)
Reply With Quote
  #6  
Old 11-30-2002, 04:15 AM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm liking it....
Reply With Quote
  #7  
Old 11-30-2002, 04:20 AM
Slynderdale Slynderdale is offline
 
Join Date: Mar 2002
Location: New York State
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

On average it only adds one or two extra queries to the showthread page and the others so it isnt querie extensive.
Reply With Quote
  #8  
Old 11-30-2002, 05:20 AM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looks awesome. Would like to see the final query count.
Reply With Quote
  #9  
Old 11-30-2002, 05:40 AM
Slynderdale Slynderdale is offline
 
Join Date: Mar 2002
Location: New York State
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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']; 

Reply With Quote
  #10  
Old 11-30-2002, 05:42 AM
Slynderdale Slynderdale is offline
 
Join Date: Mar 2002
Location: New York State
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:11 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08640 seconds
  • Memory Usage 2,296KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (5)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete