vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Attachment Browser (v2.1 beta testing) (https://vborg.vbsupport.ru/showthread.php?t=66800)

CarCdr 07-04-2004 03:26 PM

Version 1.2 uploaded:
  • 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: Speed of 'COUNT(*)' query greatly improved for case where
    we do not need to reference tables other than 'attachment'. Testing on our
    server shows speed improvement around 6x better.

Screenshot:
https://vborg.vbsupport.ru/attachmen...chmentid=19525

Boofo 07-04-2004 06:50 PM

Does this hack support permissions and does it show private attachments if you have the PM attachment hack installed?

CarCdr 07-04-2004 08:30 PM

Does this hack support permissions

Boofoo, permissions for accessing attachments and posts is handled. Perrmission handling for generating the listing will likely be in version 2. vBulletin does not offer any modularized way of handling permissions, so it's rather a pain in the a**.

As you no doubt are aware, this would require checking each attachment against the associated forum table, via the thread table, then for each listing entry, a call has to be made to "fetch_permissions".

Permissions in play are CANVIEW, CANGETATTACHMENT, and possibly can_moderate. If CANVIEW is off, then we would not list the post title.

Finally, there would be processing for forum passwords. I do not know how that would work nicely, as you could be interrogated multiple times for a single page.

The only tables we touch currently are attachment, user, and post. I discussed this in the initial post as I anticipated it would be a concern.

Now, if one tries to download an attachment or look at a post, or view a user's profile (in other words, follow any of the links on a listing, then the normal vBulletin permissions apply since these are standard vBulletin URLs.

does it show private attachments if you have the PM attachment hack installed?

No. I am not familiar with this hack. Is it used widely?

Boofo 07-04-2004 08:51 PM

Quote:

Originally Posted by CarCdr
Does this hack support permissions

Boofoo, permissions for accessing attachments and posts is handled. Perrmission handling for generating the listing will likely be in version 2. vBulletin does not offer any modularized way of handling permissions, so it's rather a pain in the a**.

As you no doubt are aware, this would require checking each attachment against the associated forum table, via the thread table, then for each listing entry, a call has to be made to "fetch_permissions".

Permissions in play are CANVIEW, CANGETATTACHMENT, and possibly can_moderate. If CANVIEW is off, then we would not list the post title.

Finally, there would be processing for forum passwords. I do not know how that would work nicely, as you could be interrogated multiple times for a single page.

The only tables we touch currently are attachment, user, and post. I discussed this in the initial post as I anticipated it would be a concern.

Now, if one tries to download an attachment or look at a post, or view a user's profile (in other words, follow any of the links on a listing, then the normal vBulletin permissions apply since these are standard vBulletin URLs.

does it show private attachments if you have the PM attachment hack installed?

No. I am not familiar with this hack. Is it used widely?

The pm attachments hack for vB3 is very widely used and an excellent hack. Kentaurus coded it.

CarCdr 07-04-2004 09:47 PM

Quote:

Originally Posted by Boofo
The pm attachments hack for vB3 is very widely used and an excellent hack. Kentaurus coded it.

re: Private attachments

Boofo, the question is "How should it work?" Attachment_browser is meant to be a user utility, not an admin utility. I suppose it could display the private attachments for the logged-in user, but I *believe* the private attachment hack does that now via profile.php.

For listing other user's private attachments, I note that the private attachment hack does not have admin support, via admincp\attachment.php. Perhaps that's what you are after.

Cheers

Natch 07-04-2004 10:05 PM

The problem is that the Private attachments are not private in the dbase - they are stored as regular attachments, and are linked not to a thread, but to a PM - this is what needs to be added to determine who can view what ...

There is (btw) already a hack that displays a listing of all attahcments - take a look for the "Files List" hack ...

Nevertheless, good work! :)

CarCdr 07-04-2004 11:39 PM

Quote:

Originally Posted by Natch
The problem is that the Private attachments are not private in the dbase - they are stored as regular attachments, and are linked not to a thread, but to a PM - this is what needs to be added to determine who can view what ...

There is (btw) already a hack that displays a listing of all attahcments - take a look for the "Files List" hack ...

Nevertheless, good work! :)

Yes, I read through the private attachment code. Like i said, I suppose all one could add is the ability to view one's own attachments, not others. This is a user utility. To see other's private attachments, the private attachment hack should have admincp\attachment.php support.

Yes, I saw that FilesList was posted, but I thought I would post ours nevertheless as it has significantly more features.

highlander_RD 07-05-2004 12:51 PM

This is a very nice and easy hack. *install*
May I ask the possibility to show a thumbnail when the attachment is an image?

Thanks! ;-)

CarCdr 07-05-2004 01:57 PM

Quote:

Originally Posted by trainer
would it be possible to search in a certain forum only. we have a couple of specific forum and viewing the attachments from that forum only would be great!

trainer,

Today I tested the mod's to search only in a specific form. I'll post it later this week.

Implementation
I took the easy way here. Each list entry now contains the form name. Next to the forum name is a [Filter] link. Clicking such a link will add the corresponding forum ID to the current selection criteria.

CarCdr 07-05-2004 01:59 PM

re: thumbnails

highlander_RD ,

It's not that hard, but it would sure mess up the page display, making some entries occupy a lot of vertical space. I'm betting you don't care about that. :) Personally, I always want as much information on a page as possible -- i.e., lots of entries.


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

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