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)

highlander_RD 07-05-2004 03:24 PM

Quote:

Originally Posted by CarCdr
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.

I agree, but the kind of thumbnail I'm wondering of is such as 50x50px, not so heavy not so high, but enough to better get at a glance the subject of the pic.
In my forum I have tons of pics attached, with nonsense names. So the only way to make fun should be to have a sort of preview even if very small.
Sorry for my insisting, and all my best for this great work!
;-)

CarCdr 07-05-2004 04:08 PM

Quote:

Originally Posted by highlander_RD
I agree, but the kind of thumbnail I'm wondering of is such as 50x50px, not so heavy not so high, but enough to better get at a glance the subject of the pic.
In my forum I have tons of pics attached, with nonsense names. So the only way to make fun should be to have a sort of preview even if very small.
Sorry for my insisting, and all my best for this great work!
;-)

How about this? For graphic files, a small icon is displayed that you can pass your cursor over to get the thumbnail to display, either through image swapping or some crafty DHTML. This would be the same thumbnail displayed for any attachment (i.e., size-wise), since the source of the pic would come from the standard 'attachment.php' thumbnail code.

Easier still I think, from an implementation standpoint, would be a popup window.

Let's see if anyone else is interested.

Cheers

highlander_RD 07-05-2004 06:33 PM

Quote:

Originally Posted by CarCdr
How about this? For graphic files, a small icon is displayed that you can pass your cursor over to get the thumbnail to display, either through image swapping or some crafty DHTML. This would be the same thumbnail displayed for any attachment (i.e., size-wise), since the source of the pic would come from the standard 'attachment.php' thumbnail code.

Easier still I think, from an implementation standpoint, would be a popup window.

Let's see if anyone else is interested.

Cheers

It's for sure a good compromise, thanks :D

Re: permissions
I checked now that attachments in supermoderators area (hidden) are listed as well as post titles to guest and registered users... It's true they can't get into because of permissions, but they're allowed to read the listed titles and attachments names.
Any idea to allow only supermods and admins to view the listed attachments and tied infos placed in hidden forums?

Wouldn't be easier to use the "Exclude Forums" as indicated in User profile Options?

CarCdr 07-05-2004 06:45 PM

Re: permissions

As part of the code being tested now to allow selection on a single forum, I have also added persmission checking, so that only attachments from permitted forums are listed. The permissions checked are:

CANVIEW AND CANGETATTACHMENT

Both must be true.

Perhaps someone can chime in here and let us know if these user-forum permissions would be set for moderators, super-moderaters, and administrators, or does one need to call 'can_moderate(forumid)'?

highlander_RD 07-05-2004 06:53 PM

I uploaded now the attachment_browser.php, renamed as ab1.php
here you can view the listed attachments with the secret attachment set in supermod area, actually as ID nr. 7 "reputation_balance.gif"

http://forum.egcommunity.it/ab1.php

CarCdr 07-05-2004 08:37 PM

Yes, permissions will be coming this week, along with the ability to list for a selected forum.

(BTW, and you probably know, if you rename the source file, you break the links on the page, as they are coded in the template to call 'attachment_browser.php'.)

highlander_RD 07-05-2004 10:39 PM

Quote:

Originally Posted by CarCdr
Yes, permissions will be coming this week, along with the ability to list for a selected forum.

(BTW, and you probably know, if you rename the source file, you break the links on the page, as they are coded in the template to call 'attachment_browser.php'.)

Great news! ThankS :D
Yep, I just changed the name for this checking purposes. Later on, when permissions are fixed, I'll replace the correct name. ;)

Natch 07-06-2004 12:53 AM

Quote:

Originally Posted by CarCdr
Yes, permissions will be coming this week, along with the ability to list for a selected forum.

(BTW, and you probably know, if you rename the source file, you break the links on the page, as they are coded in the template to call 'attachment_browser.php'.)

Sugges insted of hard coding the filename, try using a
Code:

define(THIS_SCRIPT,'attachment_browser');
statement at the top, this way it's easy enuff then to make one filename change, and one file edit for renaming purposes ...

CarCdr 07-06-2004 02:00 AM

Quote:

Originally Posted by Natch
Sugges insted of hard coding the filename, try using a
Code:

define(THIS_SCRIPT,'attachment_browser');
statement at the top, this way it's easy enuff then to make one filename change, and one file edit for renaming purposes ...

Yes, I already use a constant for the name of the file, for things such as the 'navbar'. However, in vBulletin, the templates, and that is what is in play here, are hard-coded to call XXX.php. As an example, search the default template file, vbulletin-style.xml, for 'memberlist.php'.

Still, I suppose there is no reason one could not set $this_script to be referenced by templates. For that matter, one could set it by referencing the PHP global 'SCRIPT_FILENAME''.

Erwin 07-06-2004 02:37 AM

This is indeed a great hack and a good idea. :) Well done.


All times are GMT. The time now is 03:53 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.01200 seconds
  • Memory Usage 1,750KB
  • 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_code_printable
  • (6)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