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)

Natch 05-10-2004 03:29 AM

Quote:

Originally Posted by DWard
If your images are displayed as thumbnails when you attach them, there is no problem.

I have thumbnails on, and my GD version is 2+

I'm with Boofo - I'm logged in on my site, they display as thumbs in my fora showthreads, and no on the fileslist.php ...

GD2+ also ...

DWard 05-10-2004 05:04 AM

OK, the thumbnail code is in the view_attachment_bits template. its an IF statement, I can take a look at it later n get back to you.

DWard 05-10-2004 07:22 AM

OK, I think I have fixed the problem, replace the code in your attachment_view_bits template with this:

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


SmartGnome 05-10-2004 08:11 AM

Quote:

Originally Posted by DWard
OK, I think I have fixed the problem, replace the code in your attachment_view_bits template with this:

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


Dan still no thums here. I have GD2+ and thumbs on in the settings. The thumbs in the posting are working fine since I started the board.

Later today I have more time and will have also a look in the code.

Tnx

DWard 05-10-2004 08:22 AM

OK, when your a guest it cant show the thumbnail, but when your logged in it works, I will sort that later so it shows the filename when your a guest and the thumb when your logged in.

Works on your site tho:

SmartGnome 05-10-2004 08:34 AM

Quote:

Originally Posted by DWard
OK, when your a guest it cant show the thumbnail, but when your logged in it works, I will sort that later so it shows the filename when your a guest and the thumb when your logged in.

Works on your site tho:


Well I don't understand it anymore :laugh:

You can see thumbs on my board, well me not. Login with Admin, Mod, Reg User and all didn't show thums, while I see the thumbs in the postings. I gave the link now to some users to have a look there.

:o

(edit)
I think that not allowing guests to see it is ok.

DWard 05-10-2004 09:45 AM

OK, this is the latest view_attachment_bits template, it has the guest thing I was talking about.

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] == 2 and $bbuserinfo['userid']">
<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>


DWard 05-10-2004 09:48 AM

SmartGnome, have you pressed Ctrl+F5 to do a clean refresh to see if that works? It works really well when I use it.

Boofo 05-10-2004 10:04 AM

Quote:

Originally Posted by DWard
OK, this is the latest view_attachment_bits template, it has the guest thing I was talking about.

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] == 2 and $bbuserinfo['userid']">
<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>


If I use this one it doesn't work. If I use the one a few posts up it works, but then it also tried to show other attachments as thumbnails (i.e php, zip, etc).

Boofo 05-10-2004 10:19 AM

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>


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

DWard 05-11-2004 09:55 AM

try rebuilding your attachment thumbnails in the admin control panel under the maintenance menu on the left.

gmarik 05-11-2004 11:05 AM

demo and screeens would be nice ... still nice one ...

DWard 05-11-2004 01:19 PM

There is a demo, the link is on the first post.
(http://www.collegepranks.co.uk/forums/fileslist.php)

SmartGnome 05-12-2004 05:37 PM

Hi Dan,

It's crazy but still no thumbs with me and my users.

I will install a clean testboard on a local machine to see what is wrong here. Perhaps a conflict between hacks, I don't know.

Is the following a typo in template "attachment_view"


$attachment_view_bits
</table>
</feldset>
</table


Cu

DWard 05-12-2004 05:39 PM

Looks like it, doesnt make any difference, but I will fix it.

Boofo 05-12-2004 07:06 PM

Any way to exclude private message attachments if we have that hack installed?

DWard 05-12-2004 07:08 PM

I cant see one because it is the same as the normal attachments, there is no way of telling the location of the attachments, therefore no way to block unwanted or sort by forums.

Boofo 05-12-2004 08:18 PM

That's ok, I'll fix it. ;)

DWard 05-13-2004 10:35 AM

OK, not as many problems now I guess because there are barely any questions being posted about the new version.

Natch 05-13-2004 01:28 PM

Quote:

Originally Posted by Boofo
That's ok, I'll fix it. ;)

You'll share your code when you get it worted mate ?

Thanks for the new version DWard :)

Boofo 05-13-2004 01:54 PM

Quote:

Originally Posted by Natch
You'll share your code when you get it worted mate ?

Thanks for the new version DWard :)

I'll PM you on my board with it. I won't be releasing any more code in this thread.

Natch 05-13-2004 02:02 PM

Quote:

Originally Posted by Boofo
I'll PM you on my board with it. I won't be releasing any more code in this thread.

Cheers :)

Smitty 05-14-2004 07:52 PM

Quote:

Originally Posted by Natch
Cheers :)

Is there any way for the user, or to set the default, to list all files on one page (or more files per page) rather than multiple pages?

Excellent hack. I've been doing a monthly list and dumping the html output to a file, doing a bunch of tailoring so people could see what attachments there are:
http://Elsmar.com/level2/Attachments-List.html

So - I really, really appreciate this hack. Great job. The only thing I would really like to see is a link to the post the attachment is in.

Scrub 05-14-2004 11:29 PM

I belive all that requires is a

HTML Code:

<a href="$vboptions[bburl]/showpost.php?p=$attach[postid]">View Post</a>
It should go in the attachment_view_bits template somehwere. :P

Smitty 05-15-2004 02:39 AM

That works to link to the post - Thanks! I appreciate it!

DWard 05-15-2004 06:14 AM

Quote:

Originally Posted by Smitty
Is there any way for the user, or to set the default, to list all files on one page (or more files per page) rather than multiple pages?

Excellent hack. I've been doing a monthly list and dumping the html output to a file, doing a bunch of tailoring so people could see what attachments there are:
http://Elsmar.com/level2/Attachments-List.html

So - I really, really appreciate this hack. Great job. The only thing I would really like to see is a link to the post the attachment is in.

I will put page limits on the next version, which will be out on Wednesday 19th

Smitty 05-15-2004 06:46 AM

Quote:

Originally Posted by DWard
I will put page limits on the next version, which will be out on Wednesday 19th

That would be great! Again, great job. This is really nice!

Erwin 05-15-2004 11:57 AM

This is a very good idea. :) Well done.

DWard 05-17-2004 01:56 PM

I am going to generate a drop list for the amount of files per page, what are you looking for?

Boofo 05-17-2004 08:34 PM

DWard, you might want to see if you can find a way to use permissions in this. I had to take it down because attachments from private forums and PMs were showing up. Just a suggestion. ;)


All times are GMT. The time now is 08:54 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.01911 seconds
  • Memory Usage 1,859KB
  • 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_code_printable
  • (3)bbcode_html_printable
  • (2)bbcode_php_printable
  • (15)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
  • (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