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)

Pitman 07-06-2004 05:21 AM

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)?

CarCdr 07-06-2004 09:00 AM

Quote:

Originally Posted by Pitman
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)?

Good idea. Change will be in the next upload. Thank you.

CarCdr 07-06-2004 10:43 AM

Here is a preview of the changes being tested for version 2 of attachment_browser. Comments are welcomed.
  1. Bug: We handle forum permissions, except for forum passwords. To have an entry listed, the user needs 'CANVIEW' and 'CANGETATTACHMENT' on a forum. Also, the forum must be '$_FORUMOPTIONS[cancontainthreads]'. This introduces another query to get the list of forums.

  2. Feature: List forum name with each entry.

  3. Feature: Now supports sorting by forum name; just like any other sort, for first- or second-level sort.

  4. Feature: Allow one or more forumid's to be specified as a filter on the form. The "Forum ID" form field may be one or more ID's separated by spaces or commas.

  5. Feature: Allow one or more userid's to be specified as a filter on the form. The "User ID" form field may be one or more ID's separated by spaces or commas.

  6. Feature: 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.

  7. Bug: Checks deletion log so that deleted posts are not included.

  8. Feature: Filter 'sel_userid=NNN' no longer disallows other filter criteria. It's treated like any other filter -- it is simply combined with other selection criteria. This also applies to 'sel_forumid=XXX'. For user filtering, only one of 'sel_userid=NNN' or 'sel_username=XXX' can be specified. Userid takes precedence.

  9. Change: Renamed '[Downloads]' link next to user name to '[Filter]'.

  10. Change: Renamed 'Downloads' in listing header to '$vbphrase[views]'.

  11. Change: Renamed URL parameter 'userid=NNN' to 'sel_userid=NNN'.

  12. Change: Since we now need forum information for every page, we always query
    using all the JOINS -- user, post, thread, forum, deletionlog.

  13. 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)?"

Pitman 07-07-2004 01:48 AM

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 :)

CarCdr 07-07-2004 02:03 AM

Quote:

Originally Posted by Pitman
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 :)

Sure. But you will not mess up a PHP file. Copy them from the PHP file, leaving the file unchanged, then install them as you would any template. The program will notice that you have installed templates to override the default. See the comments in the first post for more details.

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.

Pitman 07-07-2004 02:20 AM

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

CarCdr 07-07-2004 10:43 AM

Quote:

Originally Posted by Pitman
without having to actually modify the file each time

:) BUT... you do not have to modify the file. You copy out the templates. What is the difference between copying the templates from a text file named foo.php and a text file named templates.txt?

Here is a look at the smallest template in the file:

PHP Code:

$MyDefaultTemplates['attbro_ERROR'] = '
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
    <title>$vboptions[bbtitle] - $attbro_PHRASES[attachment_browser]</title>
$headinclude
</head>
<body>
$header
$navbar

<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:3px">
$attbro_error
</table>

<br /><br /><br /><br />
$footer
</body>
</html>
'


Copy the lines of the template (not including the enclosing single quotes of course), modify it as you wish, then install the template attbro_ERROR.

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.

highlander_RD 07-13-2004 07:04 AM

Any news about the new release 2.0?
cheers

CarCdr 07-13-2004 10:34 AM

Quote:

Originally Posted by highlander_RD
Any news about the new release 2.0?
cheers

I have been testing it, slowly but surely... Also added some other features not mentioned. The forum selection stuff works well.

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:
  1. 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.

  2. New Now uses $vbphrase for phrases.
    You can AdminCP-install custom phrases to override the defaults.

  3. New We handle forum permissions.
    To have an entry listed, the user needs 'CANVIEW' and 'CANGETATTACHMENT'
    access. Also, $_FORUMOPTIONS[active] and $_FORUMOPTIONS[cancontainthreads]
    must be on and the forum must not be a link redirect.

  4. New List forum name with each entry.

  5. New Now supports sorting by forum name; just like any other
    sort, for first- or second-level sort.

  6. 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.

  7. 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.

  8. 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.

  9. 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.

  10. Bug: Checks deletion log so that deleted posts are not included.

  11. 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'.

  12. 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.

  13. Change: Renamed '[Downloads]' link next to user name to '[Filter]'.

  14. Change: Renamed 'Downloads' in listing header to '$vbphrase[views]'.

  15. Change: Renamed URL parameter 'userid=NNN' to 'sel_userid=NNN'.

  16. Change: Since we now need forum information for every page, we
    always query using all the JOINS -- user, post, thread, forum, deletionlog.

  17. 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)?
    "

  18. 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'.

highlander_RD 07-13-2004 11:59 AM

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!


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.01207 seconds
  • Memory Usage 1,792KB
  • 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
  • (1)bbcode_php_printable
  • (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