WebmasterSite.net: PHP scripts to enable your creativity
WSN Links PHP Directory Software
PHP Scripts Webmaster Links Support Forums

Register | Forgot Password

Attachment Image Thumbnail
How to modify the inline image display row column

Version: 4.1.21
printPrint


Attachment Image Thumbnail
Rob Dalzell
Member

Usergroup: Customer
Joined: Sep 22, 2004
Location: The Sunny Okanagan
Total Topics: 5
Total Posts: 13
Posted 12/20/07 - 02:22 AM:
quote post
#1
Hello,.

I've done a searh in the forums looked through the switches and admin area for the option to adjust the display of thumbnails with uploaded image attachments. Currently the link will display one thumb on top of another, and I need a way to have those thumbs display next to one another, otherwise my pages will become very long.

I think I have found the correct template code for modification, I'm curious if someone here can help me modify this so that the images will come out (as an example) 10 Columns per row, and create a new row once the 10th spot has been filled, so that a link with 20 pics will neatly create 2 rows with 10 columns etc.

<IF {LINKFILEFIELD}><br />Attached Files:<br />
<!-- BEGIN LINK ATTACHMENTS -->
<a href="http://www.webmastersite.net/forums/{ATTACHDOWNLOADURL}">{ATTACHFILETITLE}</a> ({ATTACHKB} KB, {ATTACHDOWNLOADS} downloads)<br />
<IF {ATTACHISIMAGE}><a href="http://www.webmastersite.net/forums/{ATTACHDOWNLOADURL}"><img src="http://www.webmastersite.net/forums/{ATTACHTHUMBURL}" alt="" /></a><br /></IF>
<!-- END LINK ATTACHMENTS -->
</IF>

Thanks for any help.
Rob Dalzell
Member

Usergroup: Customer
Joined: Sep 22, 2004
Location: The Sunny Okanagan
Total Topics: 5
Total Posts: 13
Posted 12/20/07 - 05:11 AM:
quote post
#2
As an update, I have been trying to find a solution, and I have found the settings in
GENERAL>Number of columns per row:>Attachments.

However, this is not working correctly. I have uploaded 5 pictures, I modified this setting to be 5 columns per row, saved correctly etc, and it makes no change. I change the setting to 2 columns per row,. and there is a change unfortunetly nothing good. In this case 3 pictures are stacked one on top the the other ABOVE the link it's self, while the other two pictures appear just below the link,. still stacked, but in the correct place.

I am trying to have it appear
LINKURL - DESC
OTHER INFO ETC
PIC1 PIC2 PIC3 PIC4 PIC5

This is a complete new install as of 3 hours ago, I'm still using the default install directory to test things out. Seems like this is more then just my config problems?

Another issue I am having is related to my attachments directory being mounted below the web root directory. I have a dedicated harddrive mounted off of root /STORAGE/attachments/ the uploads are correctly saved into, thumbs are made and stored as well, this is using a file tree option in switches. The first time the thumbs are made they appear fine in the links page called through "http://site.com/thumbnail.php?attachid="
after a log out and refresh, the thumbs appear broke being called by "http://site.com/attachments/categoryname/thumb_.jpg" of course now the thumb cannot be served correctly because it has been saved below web root. Is there a solution to this?

My final question, is it proper for selecting "Recip Only" in switches, that the admin will also have to provide recip urls to links that he adds himself through the admin control center?? this seems odd to me. I would like to make it recipe for all users, but regular for myself unless I otherwise chose recip. As of this install, selecting recips only makes it so that I cannot add a link myself without a recip URL. sad

Thanks for your time/help

Edited by Rob Dalzell on 12/20/07 - 05:42 AM
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 57
Total Posts: 6175
Posted 12/20/07 - 02:01 PM:
quote post
#3
You want to use this for your attachments area of your link bit template:
<IF {LINKFILEFIELD}><br />{LANG_SHOWLINKS_ATTACHED}:<br />
<table>
<tr>
<!-- BEGIN LINK ATTACHMENTS -->
<td>
<a href="http://www.webmastersite.net/forums/{ATTACHDOWNLOADURL}">{ATTACHFILETITLE}</a> ({ATTACHKB} {LANG_GENERAL_KB}, {ATTACHDOWNLOADS} {LANG_DETAILS_DOWNLOADS})<br />
<IF {ATTACHISIMAGE}><a href="http://www.webmastersite.net/forums/{ATTACHDOWNLOADURL}"><img src="http://www.webmastersite.net/forums/{ATTACHTHUMBURL}" alt="" /></a><br /></IF>
</td>
<!-- END LINK ATTACHMENTS -->
</tr>
</table>
</IF>

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 57
Total Posts: 6175
Posted 12/20/07 - 03:32 PM:
quote post
#4
Rob Dalzell wrote:
Another issue I am having is related to my attachments directory being mounted below the web root directory. I have a dedicated harddrive mounted off of root /STORAGE/attachments/ the uploads are correctly saved into, thumbs are made and stored as well, this is using a file tree option in switches. The first time the thumbs are made they appear fine in the links page called through "http://site.com/thumbnail.php?attachid="
after a log out and refresh, the thumbs appear broke being called by "http://site.com/attachments/categoryname/thumb_.jpg" of course now the thumb cannot be served correctly because it has been saved below web root. Is there a solution to this?


Attachments cannot be below the web root, that's simply not where they're supposed to be. They absolutely must be placed in a web-accessible location, which should be a subdirectory of where WSN is installed... using the existing one named 'attachments' is obviously simplest and best.

Using a dedicated hard drive is fine (though unnecessary for 99.9999% of people), but it needs to be either mounted or symlinked in the proper location.

My final question, is it proper for selecting "Recip Only" in switches, that the admin will also have to provide recip urls to links that he adds himself through the admin control center??

You can allow the admin to bypass requirements at Admin -> Members -> Settings -> Let admins bypass requirements such as required fields?

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
Rob Dalzell
Member

Usergroup: Customer
Joined: Sep 22, 2004
Location: The Sunny Okanagan
Total Topics: 5
Total Posts: 13
Posted 12/21/07 - 06:14 AM:
quote post
#5
Thanks Paul,. that fixed it.
Search thread for
Download thread as


You don't have permission to post.

Please login or register.

   
 
© 2008 Paul Knierim. All rights reserved.