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-02-2004 10:00 PM

Attachment Browser (v2.1 beta testing)
 
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
  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.
  2. 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.
  3. New List attachments added since last visit.
  4. New Added a debugging setting to display timing information.
  5. Change Various other performance improvements that will be detailed when released.

Version 2:
  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 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.

  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. Bug: Fix mismatched <td></td> in attbro_FORM template that caused
    page to leak past the right margin.
  19. 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

Osterling 07-03-2004 03:44 AM

it seems to be breakin the width of the broswer.. see

http://www.exasko.info/forum/attachment_browser.php?

Merjawy 07-03-2004 04:59 AM

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

MrNase 07-03-2004 07:08 AM

Looks really nice and simple :)

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.

nexialys 07-03-2004 09:12 AM

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!

colicab-d 07-03-2004 09:30 AM

everyone go to usercp , attachments i thibk you should find an attachment browser there

chrisvonc 07-03-2004 10:39 AM

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

CarCdr 07-03-2004 11:26 AM

Quote:

Originally Posted by MrNase
Looks really nice and simple :)

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:

$MyDefaultTemplates['attbro_attachbit'] = '
TEMPLATE TEXT
TEMPLATE TEXT
';

CarCdr 07-03-2004 11:54 AM

Quote:

Originally Posted by exasko
it seems to be breakin the width of the broswer.. see

http://www.exasko.info/forum/attachment_browser.php?

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.

Cheers, CarCdr.

CarCdr 07-03-2004 11:56 AM

Quote:

Originally Posted by Merjawy
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... :o

CarCdr 07-03-2004 12:00 PM

Quote:

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

That's the idea. We use vB for a company project with a large number of configuration-managed documents of various types, mostly .doc, .xls, and .txt. Users needed a way of doing things like:

* List attachments whose file names begin with 'TASKING_' and sort by date.
* List attachments from user '*Admin' (i.e., ending with 'Admin') in the last month.

CarCdr 07-03-2004 12:07 PM

Quote:

Originally Posted by nexialys
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!

Sure. It doesn't matter to me where it goes.

I see your point, definitely. Still, I would note that the entire mod is phrased (i.e., no english in the templates), although it uses a non-standard method for additionally required phrases. All phrasing is done either through $vbphrase references or references to $attbro_PHRASES. which is defined in the PHP file. It's actually easier to contain and control the mod within a single file like this, rather than having to go through the AdminCP (imho).

It does use templates. It's just that the default versions are contained in the PHP file itself. If you install an updated template, the program will override the version contained in the PHP file. The rule is to first look for an installed template, then if none is found, to use the default.

nexialys 07-03-2004 12:16 PM

that's why i say it have togo to the Beta ... because you have the details, but not the vB3 way/protocol of things... this is a cool tool btw!

CarCdr 07-03-2004 12:23 PM

Quote:

Originally Posted by nexialys
that's why i say it have togo to the Beta ... because you have the details, but not the vB3 way/protocol of things... this is a cool tool btw!

I hear ya nexialys. BTW, I thought I would give a sense of the phrasing that is used. Here is the list of phrases referenced in the templates:


vBulletin Standard
$vbphrase[ascending]
$vbphrase[days]
$vbphrase[descending]
$vbphrase[display_options]
$vbphrase[downloads]
$vbphrase[downloads]]
$vbphrase[extension]
$vbphrase[filename]
$vbphrase[filesize]
$vbphrase[months]
$vbphrase[post]
$vbphrase[username]
$vbphrase[year]
$vbphrase[years]


New Phrases
$attbro_PHRASES[attachment_browser] => Attachment Browser
$attbro_PHRASES[attachments_selected] => attachments selected
$attbro_PHRASES[Attached_date] => Attached date
$attbro_PHRASES[Change] => Change
$attbro_PHRASES[Display] => Display
$attbro_PHRASES[expand_collapse] => Expand to change/Collapse
$attbro_PHRASES[Filtering] => Filtering
$attbro_PHRASES[First_by] => First by
$attbro_PHRASES[ID] => ID
$attbro_PHRASES[List]
=> List
$attbro_PHRASES[no_matches] => No attachments match the selection criteria you have specified.
$attbro_PHRASES[not_enough_pages] => Too few attachments retrieved to list the page you requested.
$attbro_PHRASES[or_newer] => or newer
$attbro_PHRASES[or_older] => or older
$attbro_PHRASES[Profile] => Profile
$attbro_PHRASES[Results_per_page] => Results per page
$attbro_PHRASES[Select_Type] => Select Type
$attbro_PHRASES[Show_attachment_ID] => Show attachment ID
$attbro_PHRASES[Show_All] => Show All
$attbro_PHRASES[Sorting] => Sorting
$attbro_PHRASES[then_by] => then by
$attbro_PHRASES[Version] => Version
$attbro_PHRASES[D_7] => 7 $vbphrase[days]
$attbro_PHRASES[D_30] => 30 $vbphrase[days]
$attbro_PHRASES[M_3] => 3 $vbphrase[months]
$attbro_PHRASES[M_6] => 6 $vbphrase[months]
$attbro_PHRASES[Y_1] => 1 $vbphrase[year]
$attbro_PHRASES[Y_2] => 2 $vbphrase[years]

Some of the new phrases do exist somewhere in vBulletin, but loading an entire phrase group to get at the word 'List' for example, seemed like overkill.

Osterling 07-03-2004 02:48 PM

I use MyIE2 and it seems to break width at the bottom.. anyone else getting this problem

trainer 07-03-2004 05:39 PM

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!

CarCdr 07-03-2004 06:29 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!

The rational thus far was guided by this:
Quote:

Originally Posted by CarCdr In Initial Post
We wanted this to be reasonably fast on large boards, so we stayed away
from dealing with forums. The attachment table is only cross-linked to
the post table and user table. These are the only ones we access. This
means that we do not do proper access checking, as that would required
that we do lookups from the post table to the thread table to the forum
table.

Now, having said that, if someone clicks 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.

Still, it has been a pain for us as well not being able to search by forum. It will be added eventually. I know how to do it, that's not the problem, it's taking the time to figure out how it affects the page layout.

CarCdr 07-03-2004 06:30 PM

Quote:

Originally Posted by exasko
I use MyIE2 and it seems to break width at the bottom.. anyone else getting this problem

Got that screen shot of the width problem exasko? :)

Osterling 07-03-2004 06:33 PM

yes let me grab it

Osterling 07-03-2004 06:36 PM

see the image

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.

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 11:03 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.01774 seconds
  • Memory Usage 1,911KB
  • 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
  • (19)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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