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)
-   -   Files List v3.01 (https://vborg.vbsupport.ru/showthread.php?t=64734)

Boofo 05-10-2004 10:32 AM

I've also fixed the problem with unregistered users being able to view the files listing. On my board I have it set up the same way as the member's list. If they can view the member's list (which unregistered users can't) then they can view the files listing.

In fileslist.php

Find:


PHP Code:

// EDITABLE ///////////////////////////////////////////////////////////////
// Change the the number below to the amount of files you wish to display per page
//
$perpage '30';
//
// End of files per page script
// EDITABLE /////////////////////////////////////////////////////////////// 

BELOW it add:


PHP Code:

// permissions check
 
if (!($permissions['forumpermissions'] & CANVIEW) OR !($permissions['genericpermissions'] & CANVIEWMEMBERS))
 {
      
print_no_permission();
 } 


DWard 05-10-2004 10:46 AM

Yer dont make much difference for me, Boofo. The permission thing is quite good, even though guests are not allowed to view thumbs anway.

Need some feedback from current users.

DWard 05-10-2004 10:54 AM

Unless anybody is having trouble, please do not use the template changes posted as they change so often and newer ones may have functions missing.

Please wait for a day when v2.02 is realeased.

Boofo 05-10-2004 11:47 AM

The code I posted above doesn't allow them to view the file listing at all unless they are registered. That is way better than not being able to view just the thumbnails.

And if you don't add the $mode == image to the second part of that line, you get it trying to make thumbnails out of php and zip files in the allfiles area.

I hope in the next version you get the queries finally straightened around. They are a mess.

SmartGnome 05-10-2004 11:59 AM

Still no thumbs at my site :tired:

@Boofo, also your mod give me no thumbs

@Dan, Yes I tried ctrl+F5. What I don't understand is that you can see them and I not <gggrrrr>

Boofo 05-10-2004 12:03 PM

Quote:

Originally Posted by SmartGnome
Still no thumbs at my site :tired:

@Boofo, also your mod give me no thumbs

@Dan, Yes I tried ctrl+F5. What I don't understand is that you can see them and I not <gggrrrr>

You would only see them when you pick the Image listing with my mod. Do you have thumbnails everywhere else on your board?

Also, if you use a Firewall, try disabling that and see if you can see them then.

DWard 05-10-2004 12:49 PM

Let me just add: Im confused!

SmartGnome 05-10-2004 06:07 PM

@Boofo

Quote:

You would only see them when you pick the Image listing with my mod. Do you have thumbnails everywhere else on your board?
Yes, thumbnails in the postings is working ok.

Quote:

Also, if you use a Firewall, try disabling that and see if you can see them then.
Switch on or off make no difference.

@Dan
Quote:

Let me just add: Im confused!
Don't hurry, I'm confused too :laugh The users can see at least the filenames and the usernames and if they click the filename they will see the attachment :tu

Natch 05-10-2004 10:50 PM

Quote:

Originally Posted by Boofo
Ok I fixed it for you again. The third line is what had to be changed.

HTML Code:

<tr>
<td class="alt1" width="100%" align="center">
<div class="smallfont" style="text-align: left;">$attach[username]  <if condition="$mode == images and $vboptions[attachthumbs] == 1 or $mode == images and $vboptions[attachthumbs] == 2">
<a href="attachment.php?$session[sessionurl]attachmentid=$attach[attachmentid]" target="_blank"><img class="thumbnail" src="attachment.php?$session[sessionurl]attachmentid=$attach[attachmentid]&amp;stc=1&amp;thumb=1" border="0" alt="Click image for larger version
Name: $attach[filename]
Views: $attach[counter]
Size: $attach[filesize]"
/>
</a>
  <else />
<img class="inlineimg" src="$stylevar[imgdir_attach]/$attach[attachmentextension].gif" alt="<phrase 1="$attachment[attachmentextension]">$vbphrase[file_type_x]</phrase>" width="16" height="16" border="0" style="vertical-align:baseline" />
<a href="attachment.php?attachmentid=$attach[attachmentid]" target="_blank">$attach[filename]</a> ($attach[filesize], $attach[counter] views)</div>
  </if>
</td>
</tr>


Works for me mate :) only on the "Images" mode as said in the spec - but good work :)

Thanks as well DWard - looking forward to v2.01 :)

Question: how difficult would it be to have the list of attachments in rows as well as columns ... like a gallery ...

Currently (for any resolutions higher than 800X600, there is a whole lotta wasted screen real-estate ...

M.C. 05-11-2004 02:19 AM

perfect!

Just ONE addon will be nice to see:

- add link to thred or post where is that file attached ;)


question for tumbs addon:

why some pictures are not shown? but they OK when i click on them... the size is not so big actually....


All times are GMT. The time now is 08:06 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.03065 seconds
  • Memory Usage 1,759KB
  • 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_html_printable
  • (2)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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