View Full Version : Im working on a new hack, take a look.
Slynderdale
11-30-2002, 02:20 AM
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
So far heres my current admin options for it.
Slynderdale
11-30-2002, 02:37 AM
Heres when you post.
Slynderdale
11-30-2002, 02:38 AM
Heres the error screen when one of the attachments gets an error.
Slynderdale
11-30-2002, 03:58 AM
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
$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,attach ment.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
$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
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
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
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
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
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
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
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
Heres a screenshot and the example of attachment descriptions.
Slynderdale
12-07-2002, 02:12 AM
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 (https://vborg.vbsupport.ru/showthread.php?s=&threadid=39134)
:ermm:
Jay
Boofo
12-10-2002, 12:30 PM
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 (https://vborg.vbsupport.ru/showthread.php?s=&threadid=39134)
: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
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:
Kars10
12-26-2002, 10:20 AM
Originally posted by Mist
Yea i hope its not another one of these hacks your gon tease us with then run away :)
- miSt
^bumb^
damn, i need this hack... :(
Slynderdale
01-13-2003, 06:54 PM
Originally posted by Kars10
^bumb^
damn, i need this hack... :(
Sorry about the long wait, im back now, one, my laptop ethernet port busted so i had no internet access and i also moved so i havnt had much time latly, ill be realeasing this and any of my other hacks i made that any one wants, i also found myswlf a new webhost so now i can work more online instead of on localhost.
Kars10
01-14-2003, 07:58 AM
Good to hear!! :)
Slynderdale
01-14-2003, 05:02 PM
Used Total
POP Accounts 4 100
Ftp Accounts 5 100
Sub-Domains 0 100
Parked Domains 0
Addon Domains 0
Mysql Databases 2 100
Mailing Lists 0 100
Email Forwarders 0 999
Auto-Responders 0 999
Email Filters 0 999
Disk Usage 0.00 Mb
Bandwidth Usage this month 4.74 Mb out of Unlimited
Disk Space Available 1000.00 Mb
Thats the stats for my new host.
eckels2
01-14-2003, 10:52 PM
YOU'RE BACK?!!
yay!!!
how about that upload hack 2.0 ;)
Dolby
01-15-2003, 01:30 AM
Great to see you back. I cant wait for the multiple attachment hack!.
I'm very interested in looking at the code upon release just to learn how its done. I'm hacking my own skin gallery and need to be able to attach 2 files (1 picture 1 zip).
Dolby
02-03-2003, 08:38 PM
How are things comeing along Slynderdale? :)
I have a few requests:
in the newthread/newreply templates, how about having just one box for an attachment, but next to it have a link going to another page to add multiple attachments? It would be a lot neater.
Can this be done on a per usergroup basis? Ie. allow certain usergroups to use mult. attachments?
- Limit on # of attachments per usergroup aswell? So admins can have 10, supermods 5, mods 2. etc.
Would it be possible to make an addon for the hack where it will work with the attachment options in editpost hack? [link] (https://vborg.vbsupport.ru/attachment.php?s=&postid=270639)
Thanks :). This truly will be a great hack!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.