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.

Smoothie 11-30-2002 05:46 AM

This might slow the showthread page greatly if members are allowed to view attachments within threads. Other wise, a great idea for a hack.

Slynderdale 11-30-2002 06:03 AM

Quote:

Originally posted by Smoothie
This might slow the showthread page greatly if members are allowed to view attachments within threads. Other wise, a great idea for a hack.
Hmm, yea, i could always add other setting where you can enter the ammount of multiple attachments to show like that, for example setting it to 1 would show just one and the rest as links, and setting it to 0 for show all, also the user can go in there options and select not to show attachments as images like they always could.

Smoothie 11-30-2002 06:18 AM

I think the bottom line is there has been more than one occassion when I wanted to upload more than one attachment, and had to post multiple times to do it. This solves that problem.

zajako 11-30-2002 06:21 AM

i think we all will love you for this one:}

Slynderdale 11-30-2002 06:26 AM

If any one has any suggestions or requests, feel free to ask, ill try to intergrate then in the hack.

Slynderdale 11-30-2002 07:41 AM

1 Attachment(s)
I installed the microstats hack and checkd the queries and time it takes for thr page to load, on average it said 2 seconds, and 19 queries, at the expense of another query i was able to get the page speed down to a .2 (tends to be faster) average with 20 queries, before i added the hack, the original query count was 18, i just added two, the screen shot is below.

Kars10 11-30-2002 07:46 AM

This is so cool Slynderdale!!
Hope you will release it soon to beta-testing!!
If you want i can test it on my 2.2.8 ;)

Dean C 11-30-2002 12:00 PM

Yea i hope its not another one of these hacks your gon tease us with then run away :)

- miSt

Slynderdale 11-30-2002 06:13 PM

Quote:

Originally posted by Mist
Yea i hope its not another one of these hacks your gon tease us with then run away :)

- miSt

Im not, im gonna release this and if i can find my old forum files ill also release my picture hack, my webhost went down so i lost them all.

Slynderdale 11-30-2002 06:35 PM

1 Attachment(s)
Heres a screenshot of what attachments look like if you have view attachments as images enabled.

Slynderdale 11-30-2002 07:04 PM

The hack should be ready for beta testing soon.

Larry@IOG 11-30-2002 07:15 PM

You would rock if you can pull it off

Larry

Dean C 11-30-2002 08:24 PM

Awesome Slynderdale!

I can't wait!

- miSt

Boofo 11-30-2002 08:58 PM

Instead of having 3 separate Attachment bars at the bottom of the message, can't you just ask if the user wants to do another attachment after the first one gets done? That way you wouldn't have to limit it to three and you don't bog the site down trying to do a bunch of attachments at one time. Just a thought. :)

Smoothie 12-01-2002 01:00 AM

very nice, can't wait!

corsacrazy 12-01-2002 08:21 AM

^ :p looking forward to this one Slynderdale keep it up ;) ^

Dolby 12-01-2002 05:57 PM

Slynderdale I cant wait for your release. This is somthing I've always wanted.

This will make things much easier for my skin gallery.

Slynderdale 12-06-2002 07:53 PM

Its almost done, the hack is gonna consist of two hacks, the main hack "The Multiple Attachment Hack" and a "Attachment Description" hack, both can be toggled on and off in the Attachment admin options, with the attachment description hack, when you post an attachment you can give a brief description of it that will appear under the attachment (or any wheres in the attachment template you want).

Chris M 12-06-2002 08:50 PM

Will this be able to work with PPN's Attachments as Files hack?

Satan

Slynderdale 12-06-2002 08:59 PM

Quote:

Originally posted by hellsatan
Will this be able to work with PPN's Attachments as Files hack?

Satan

Hmm, not at the moment but thanks for reminding me, ill take a look at his hack and see how it works.

Slynderdale 12-06-2002 09:16 PM

I took a look at the attachments as files hack by ppn, it wont be to intergrate the multiple attachment hack with it, Ill release both versions of the hack when there done, one for normal database attachments and attachments as files.

Smoothie 12-06-2002 11:00 PM

Quote:

Originally posted by Slynderdale
Its almost done, the hack is gonna consist of two hacks, the main hack "The Multiple Attachment Hack" and a "Attachment Description" hack, both can be toggled on and off in the Attachment admin options, with the attachment description hack, when you post an attachment you can give a brief description of it that will appear under the attachment (or any wheres in the attachment template you want).
Will this be on a per forum basis, or globally? Allow multiple attachments that is.

Slynderdale 12-06-2002 11:33 PM

1 Attachment(s)
Quote:

Originally posted by Smoothie
Will this be on a per forum basis, or globally? Allow multiple attachments that is.
Hmmm, thats a good idea, at the moment its global but now that i think about it, it might be better as per forum basis, you can set if the forum allows multiple attachments, how many, the size and the size boolean, like if you want the size restriction for all the files seperetly or all together.


Also attached below is a screenshot of the current attachment templates.

Slynderdale 12-07-2002 02:11 AM

1 Attachment(s)
Heres a screenshot and the example of attachment descriptions.

Slynderdale 12-07-2002 02:12 AM

1 Attachment(s)
Heres another screenshot and the example of attachment descriptions but when the attachments are images.

Slynderdale 12-07-2002 02:25 AM

Files done:
showthread.php
newreply.php
attachment.php
admin/functions.php

Templates: 90% done

Files left:
editpost.php
newthread.php
admin/thread.php

It should be ready for beta testing any day now.

Dolby 12-09-2002 05:47 PM

Looking really good.

Now this hack will work if I have the forum moderated correct?

shaffer 12-10-2002 12:02 PM

Hey Slynderdale, not that this belongs here but I was wondering about the profile hack. Thats the hack I would love to see. Many folks have been waiting 6 months in hopes to get that hack.

Profile Hack

:ermm:

Jay

Boofo 12-10-2002 12:30 PM

Quote:

Originally posted by shaffer
Hey Slynderdale, not that this belongs here but I was wondering about the profile hack. Thats the hack I would love to see. Many folks have been waiting 6 months in hopes to get that hack.

Profile Hack

:ermm:

Jay

And you'll wait another 6 months until you see that it won't get released. :)

okrogius 12-10-2002 03:58 PM

Quote:

Originally posted by Slynderdale
On average it only adds one or two extra queries to the showthread page and the others so it isnt querie extensive.
Implementing a multiple attachment hacks should require no extra queries (just modification to existent ones) if it's coded well. :rolleyes:


All times are GMT. The time now is 04:46 PM.

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.01746 seconds
  • Memory Usage 1,834KB
  • 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
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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