Version: 1.00, by CarCdr
Developer Last Online: Mar 2007
Version: 3.0.1
Rating:
Released: 07-02-2004
Last Update: Never
Installs: 23
No support by the author.
List/Search Attachment Files
List, filter/search, sort, etc. for attachments files. Respects forum permissions. Supports limiting search to a single forum or a list of forums. Also, a separate attachment summary page is available.
Any problems raised in this thread have been fixed. For new features in version 2, see below under Version 2 for "New" entries.
Standard page navigation is supported to go to last page, prev, next, etc.
Sorts, ascending or descending, are supported for:
two levels of sorting, for example, by user name and then by file name.
Sort, either level, on these fields:
date/time
user name
forum
file name
file extension
file size
# of downloads
the default sort is date/time (most recent first)
Searching/filtering
All criteria is entered on a collapsable form at the top of the page.
Search/filter criteria supported are:
user name ('*' wildcards allowed)
file name ('*' wildcards allowed),
file extension ('*' wildcards allowed)
userid or list of userid's
forumid or list of forumid'
attached before N days ago,
attached after N days ago
Single click filtering by user name, forum name or document type.
Changes pending for version 2.1
New Added usergroup access checking.
Two configuration variables can be set to either (a) allow access to a set of usergroup or (b) disallow access for a set of usergroup id's.
New Query performance improved.
Performance for sites with many thousands of attachments is significantly improved. The single most time consuming aspect of such a script is the MySQL query for 'COUNT(*)' to get the number of attachments matching the selection criteria and access permissions. By including only those JOIN's that are required, depending on the columns being accessed, the ORDER BY, and the WHERE clauses, we improve performance of both retrievals. There is still one case where the row retrieval could be slow: when the user requests that the output be sorted by forum title.
New List attachments added since last visit.
New Added a debugging setting to display timing information.
Change Various other performance improvements that will be detailed when released.
Version 2:
New A separate attachment summary page was added.
Page provides overall summary, summary by forum, and summary by extension.
This introduces two new templates: attbro_SUMMARY and attbro_summary_categorybit.
This page is accessed from a new link at the top of the main page.
New Now uses $vbphrase for phrases.
You can AdminCP-install custom phrases to override the defaults.
New We respect forum permissions.
To have an entry listed, the user needs 'CANVIEW' and 'CANGETATTACHMENT'
access and a password if required. Also, $_FORUMOPTIONS[active] and
$_FORUMOPTIONS[cancontainthreads] must be on and the forum must not
be a link redirect.
New List forum name with each entry.
New Now supports sorting by forum name; just like any other
sort, for first- or second-level sort.
New Quick filtering for a single forum, by clicking the
'[Filter]' link next to a forum name to search only that forum, similar to
clicking the link next to the user name in our previous version.
New Allow one or more forumid's to be specified as a filter on the Display Options
form. The "Forum ID" form field may be one or more ID's separated by spaces or commas.
The "[Filter]" link next to forum names uses this as well to add a Forum ID to the
current selection criteria.
New Allow one or more userid's to be specified as a filter on the Display Options
form. The "User ID" form field may be one or more ID's separated by spaces or commas.
New Forums can be explicitly exluded via the URL parameter
"exclude_forums=LIST", where LIST is one or more forumid's separated
by spaces or commas. This will eventually be an AdminCP option.
Bug: Checks deletion log so that deleted posts are not included.
Feature/Change: The filter 'sel_userid=NNN' no longer disallows other
filter criteria. It's treated like any other filter -- combined with other selection
criteria. Only one of 'sel_userid=NNN' or 'sel_username=XXX' can be specified.
Userid takes precedence. This change also applies to 'sel_forumid=XXX'.
Change: We use MySQL "LIMIT X,N" syntax to only retrieve the records
we need to fill the requested page. This should provide some performance gain
when building pages for high page numbers.
Change: Renamed '[Downloads]' link next to user name to '[Filter]'.
Change: Renamed 'Downloads' in listing header to '$vbphrase[views]'.
Change: Renamed URL parameter 'userid=NNN' to 'sel_userid=NNN'.
Change: Since we now need forum information for every page, we
always query using all the JOINS -- user, post, thread, forum, deletionlog.
Change: Exclude attachements whose 'postid' is zero. Thanks to
Pitman for this one, who suggested: "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)?"
Bug: Fix mismatched <td></td> in attbro_FORM template that caused
page to leak past the right margin.
Phrase changes:
New 'stars_allowed' for reminders on form.
New 'Filter' for '[Filter]' links
New 'Count' for summary page.
New 'Attachment_Summary'.
No longer use 'Select_Type'.
v 1.1:
Added .php to all attachment_browser references in template links.
Added forgotten class="tcat" to first table row for headings.
v 1.2:
Feature: Enabled display of file type icons and the ability to click
said icons to recall us to list only files of that type (extension).
We look for icons using "$stylevar[imgdir_attach]/$extension.gif".
Bug: Make "Show attachment ID" on form be remembered across calls.
Bug: Make sure "userid=XXX" is passed in links for page navigation when
listing a single user's downloads.
Feature: If we are showing the attachment ID, then always force it below the
row number with '<br />'.
Performance: Performance of 'COUNT(*)' query greatly imporved for case where
we do not need to reference tables other than 'attachment'. Testing
on our server shows speed improvement around 6x better. This small
optimization controlled via "$sqlCountRequiredJoins".
----------------------------
To search in a single forum: use the single click [Filter] next to any forum name on a page or enter the forumid on the "Display Options" form.
To search only in a selected list of forums: Enter a comma-separated list of forumid's in "Display Options".
You can AdminCP-install custom templates to override our defaults ones.
You can AdminCP-install custom phrases to override the defaults -- all
references in templates are to "$vbphrase[XXX]".
If you do not want to change the default templates or phrases, then there are
no other files to install -- just put this one in the main '/forum' directory.
If you want to modify the default templates, copy them from this file and
install them as usual. We will notice when there are installed templates to
override our defaults. The same applies to phrases.
We only list forums that the user has permissions to view and get attachments,
for attachments that are visible and not from deleted posts.
We do 2 queries: (1) get the total COUNT of accessible attachments matching
the selection criteria and (2) retrieve enough rows to fill the requested page.
If you follow a link on one of our pages to download an attachment, view a
user profile, or view the original post, then the normal access checks will
apply, as these links simply invoke standard vBulletin files.
The templates referenced are: attbro_MAIN, attbro_FORM, attbro_ERROR,
attbro_attachbit, attbro_SUMMARY and attbro_summary_categorybit. The default
templates and phrases are defined in this file. Look for '$MyDefaultTemplates'
and '$MyDefaultPhrases'.
For example, if we had a template named 'attbro_example', it will appear in
this file as:
$MyDefaultTemplates['attbro_example'] = ' LINE 1 OF TEMPLATE
LINE 2 OF TEMPLATE
';
To install a custom version, just copy the LINES
and install it under the template name attbro_example.
----------------------------
This extension is free, and will remain free.
Cheers, CarCdr
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
nothing to edit??? This got to be the easy hack/mod
thnx I tried it looks nice but breaks the width a little and when I click on Download I get a 404 with this URL:
h##p/www.mydomain.com/forums/attachment_browser?do=list&userid=1
this hack have to be in the Beta Releases section, because is not following the vBulletin3 protocol... no lang phrases, no templates, not using the templates at all,... maybe be useful but not in the full released!
Yes but thats just for each user to see what they have uploaded. This is pretty cool in that it looks to offer a quick and easy page to call up for all attachments from everyone rather than going in through the AdminCP. I think a little more tweaking and it will be a good little add-on.
But it doesn't use templates so I won't use it....
I would have to translate it and i don't want to crawl the php-page.
It does use templates, but the default ones are contained in the PHP file. You can override them. Simple copy them out of the PHP file and install them as you would any other template. The program will notice that you have installed a template(s).
The only caveat is that you have to replace \' with ' before saving them in AdminCP.
For example, to replace the bit used for the listing rows, copy the template lines between:
I am not sure what you mean exasko. I have attached a gif of what I get when I run your attachment_browser. It was run under IE 5.5 using your "Exasko's Classic" style.
Note that there was a style problem fixed in the just-uploaded v1.1, whereby I forgot a 'class="tcat"' on the first line of the table heading. That is why you see a slightly odd coloration on that first table header line in the attached GIF. That should be fixed now.
If you could attach a shot of a broken display, that would be very helpful.
nothing to edit??? This got to be the easy hack/mod
thnx I tried it looks nice but breaks the width a little and when I click on Download I get a 404 with this URL:
h##p/www.mydomain.com/forums/attachment_browser?do=list&userid=1
Fixed in the just-uploaded v1.1
The link in question worked on my web server as it defaults extensions (i.e., HTML, PHP). I forgot the '.php' suffix in the link to list a single user's attachments. Ooops...