![]() |
About the private attachments: Since they don't have a postid, wouldn't "AND postid !=0" work in the query or whatever? If so, that should also fix the problem that some may have with attachment names and all showing but no attachment really there yet (like when somebody is posting a new attachment and have not yet clicked Submit New Thread or Submit Reply)?
|
Quote:
|
Here is a preview of the changes being tested for version 2 of attachment_browser. Comments are welcomed.
|
I know that this hack uses templates of some sort, but is there any possibility of maybe using the regular templates in later versions? It would be much easier to modify and customize to your own taste without worrying about messing up an entire PHP file trying to modify stuff.
Thanks :) |
Quote:
The advantage here, is that for those who have no desire to modify the templates, there is nothing to do but install the single file. For others, it's a simple matter to install overriding templates. |
Yeah, and that is a great idea... it would be so much easier for me to modify everything from the same place though without having to actually modify the file each time I want to change something. Thanks for the "Sure" though :D
|
Quote:
Here is a look at the smallest template in the file: PHP Code:
The functionality I am trying to offer here is to save the effort for those who would choose not to modify the templates, while adding no effort for those who need to modify them. If I provided a file templates.txt, all I would do is copy them out for you. I have fun with such discussions Pitman, so do not think for a second I am trying to preach. Anyway, this is all rather academic given the low level of interest in an attachment lister/browser. The number of sites using attachments for pseudo document management, as we do on our site, is obviously very small. Now my users are asking for search capability within the attached files, for .txt, .doc, and .pdf. It never ends... :) Cheers. ps: In the pending version 2, the templates can be copied out of the file without the need to replace the single-quote occurences of \' with ' per the v1 instructions, so it is now a straight copy as it would be from any text file containing templates. |
Any news about the new release 2.0?
cheers |
Quote:
Given the low-level of interest here, I admit that I let it slip down my list of things to do. I will get around to uploading soon. Cheers, CarCdr Version 2 Changes:
|
It's perfect.
If you want me to test the "beta" 2.0 release on my forum, I'd be very glad. Just give me a PM or an email with attached the php. Thanks a lot! |
mmmm...
I guess you didn't read my PM... |
Quote:
I'll send a followup PM to you. |
is it possible for me to beta test 2.0 ? :)
|
Version 2 uploaded with screenshots.
https://vborg.vbsupport.ru/showthread.php?p=528801 Among other new features, it includes forum support, including searching by forum and permission support. CarCdr |
I uploaded the file but, it doesn't load :( I gave it a good 10 minutes. Any ideas?
I have about 16,000 attachments and use 804 Mb. for attachments. Is this the problem? EDIT It finally loaded after a long, long while. Is that normal? Miguel |
16,000 attachments hey. Hmmm... the browser only makes two queries, one to get the count of attachments you have access to (i.e., MySQL "COUNT(*)) and the other to load a page worth of attachment information.
Also, it does not retrieve the actual content, so the rows retrieved are quite small. We have about 400 attachments and it loads very quickly. I'd like to add a debug parameter that you could use to get feedback on what is taking so long. That way, you could get back to me about where it is eating the time. |
Sure, just let me know what I need to do. It looks like a very useful tool. I f I could speed it up, I'd be a happy man :)
It said I had 772 Pages of attachments. If that matters. Thanks, Miguel |
Quote:
If this is the case, one alternative is to not to the page navigation stuff, thereby obviating the need to do the "count(*)" query. One would only retrieve the target page plus one extra to see if there is a next page. Other ideas folks? |
I have made some optimizations to attachment_browser to improve the speed of the queries.
Query #1: The 'COUNT(*)' query runs anywhere from 20% faster to 5 times faster (MySQL caching must explain this huge range.) This was by far the slower of the two queries. Query #2: The row retrieval query to get the rows for the target page runs about 9% faster, but that is not so important as it was the fast query anyway. PM me an e-mail and I'll send you the new version. Once we agree that things still work properly and you verify the performance increase, I will post the new version here. Cheers |
Hello,
Long time lurker, but decided to register since this modification interests me. My community has over 15,000 attachments with over 5.5Gb of data. I converted to file storage format to save on my server load. So I was wondering if this modification would work since I've done that? Also, is there a way to limit access to the mod itself? Like say, only grant access to a paid subscription member, moderator, or administrator specific? |
It doesn't matter where the attachments are stored.
Yes, you can limit access to the mod to certain user groups. 15,000 attachments... hmmm. Would you be willing to beta test the new release: https://vborg.vbsupport.ru/showpost.php?p=539692 PM me an e-mail address and I will send you the new script. Cheers |
I would be interested to hear from folks who run with a large number of attachments (more than 2,000) to give me some feedback on timing. Please PM me if you are willing to test the new version. Thank you.
Changes queued-up for version 2.1
ps: If the 'COUNT(*)' retrieval is just too slow to support sites with many thousands of attachments, then we will need an option to skip getting the count. Note that the query to get 'COUNT(*)' is not as simple as you might think. As a minimum (not incuding special search values from the Display Options form), it must deal with forum permissions, attachment 'visible', as well as check the post table for 'visible' and post deletions. With such an option enabled, the page would not include the number of accessible/matching attachments and would not have normal page navigation. For the page navigation, since we do not know how many there are, the best we could do is support "Next Page" when we know that there is *at least one* more attachment not on the current page. |
I don't know what's happening with this, but I hope it continues. I just installed and it's very nice.
Question: I want the search box to be 'Open' by default. How can I do that? |
Quote:
Right, by default, the search form is displayed "collapsed" when the page is loaded. This would be a good option to have in the next release. For now, what you can do is make two changes to the template 'attbro_FORM' (I did not test this). Change this line: <img id="collapseimg_attbro_disp_opts" src="$stylevar[imgdir_button]/collapse_thead_collapsed.gif" alt="" border="0" /></a> to this: <img id="collapseimg_attbro_disp_opts" src="$stylevar[imgdir_button]/collapse_thead.gif" alt="" border="0" /></a> (removed the characters highlighted in red) Then, a few lines down from that, change this line: <tbody id="collapseobj_attbro_disp_opts" style="display:none; "> to this: <tbody id="collapseobj_attbro_disp_opts" style=""> |
Thanks - I'll check it out tonight. It's not a REAL big issue, but you know how it goes. Some folks don't look so closely and miss the 'open' link (I renamed the phrase on mine to better point it out).
The biggest problem I have, actually, is checking things people upload for the file name. Many people upload stuff like 'document.doc' so the search feature has a limited function. However, I have gone in and renamed a lot of atttachments - I have to 'edit' the thread - download and rename the attachment, unattach the file in the post, and reupload the renamed file. And I watch to make sure new attachments have an appropriate name. I rename threads a lot as well, but I do that mostly for search engines. I started doing that last December, along with some other SEO 'stuff' and my rankings, and traffic, have significantly improved. |
Quote:
|
Very nice hack, but I am confused how to get the file icons to show. If someone could help It would be apreciated.
Thanks CarCdr! fiber |
OK - I was researching why my board and a clients board would not show the attachment icons on the attachment listing display: and eventually found it.
This modification need only be applied by those who have altered their $stylevar[imgdir_attach] to a absolute path, this modification will need to be made. In attachment_browser.php, Find: Code:
function ICON_FILE_EXISTS($extension) { Code:
function ICON_FILE_EXISTS($extension) { |
Thanks Natch.
So, how do you suggest I conditionalize this so that no patch need be applied (i.e., in a future version of this hack). What does your "$stylevar[imgdir_attach]" look like? |
/forums/images/attach for my main style - but I think you will find that this folder will exist on all installations: the difficulty is determining the location of forumroot from $_SERVER['DOCUMENT_ROOT'] on all installs...
|
Quote:
|
Also very useful when you want to keep an eye on what type of images are being posted when there is just too much posting being done to check them all. Not that I mind nudy images being posted on my sites, just to make sure nothing too extreme is being attached.
|
Could you please tell me what/how I need to input to exclude certain forums from appearing on the report?
Thanks. |
For those that are interested, here is a modified version on this hack to just show rows and columns of jpg thumbnails with basic info.
|
Can we also display the thumbs for images?
|
I will get back to you this week. I need to upload the latest version as it has been tested enough now I think.
I will review thread for outstanding questions and also review the mod from SpankMe for jpg thumbnails to see if it might be included in the standard upload. Cheers |
Quote:
(Hmmm... I'll bet you do not see those three words directed at you very often. :) ) |
Quote:
|
*bump*
Quote:
|
Hmm, very nice, pretty much what I wanted. Big thank you, but wondering about when v2.1 was available? The download is listed at 2.0.
|
All times are GMT. The time now is 11:32 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|