Here's what I'm using on the main page of my site, as well as a couple of different sites that I've done.
This checks to see if there is jpg or png attachment, if so then it displays the thumbnail and links it to the link comments page (library/{LINKID} for me.
I have already used that command, but if you want to post multiple images under a single LINKID you have to use use the file upload which creates a field with ATTACH added to the field name. This field name is then suppose to tell thumbnails where to pick up the file, still can't get it to work.
I noticed that one of the warnings in the above link was at line 123 in prestart.php. To do IE6 cookies
So I thought I may resolve it if I deleted my cookies. Now I cant log in, my username/password is not recognised and even when I have received a new password via E-mail I can't get in. This is using both FireFox and IE6. I have spent weeks putting plans together for this site and now this.
Also checked the path in the admin panel configuration setup and this is correct
Noticed that I had a closing back slash for the path to my ImageMagic, your sample does not so I removed my back slash and this resolved the <img src="thumbnail.php?id={LINKID}"> problem.
but still can't get <img src="thumbnail.php?id={LINKID}&field=linkimage3attach&thumbwidth=200&thumbheight=200&debug=1"> to work either in the dynamic template detail.tpl or the custom template html_details used to create the static pages.
Do the image commands above look correct?
The images have uploaded into the attachment directory OK, so this suggests the paths are correct, well certainly for upload.
How do I pickup the debug=1 info from the above?
I note the thumbnails have to be created and are stored in the attachment folder. These have not been created.
I want members to be able to upload 5 images and display them as thumbnails, when they click on any of the thumbnails they see a larger image.
My attempts with earlier versions failed.
With the new version at http://www.bedsaway.co.uk/s/ I have created 3 new fields for file upload, these are LINKPIC1ATTACH , LINKPIC2ATTACH , LINKPIC3ATTACH
So far when I have inserted {LINKPIC1ATTACH} in the Link Details default template is just see the the following appear bf1145f7f4b8bc503951eb8f35341c74.wsn[,]18th.jpg[,]0[,]384[,] or such like. I just can't get any images even though it is clear that the attachments directory path is correct.
With this new version file are being created in the attachments directory with the ending .wsn, what are these files and where are the actual images stored.
Could you please supply the code to display field {LINKPIC1ATTACH} as a thumbnail and as a full size image?
Or can WSN LINKS not do this with uploaded image attachments?
I also have a licence for WSN Gallery, can I do what I require within that?
But then I will have to integrate the two and I hit problems when I attempted to do that as well, that is why I've kept going along with just using WSN Links.
With 3.22 there's no real sense in using custom link attachments. Why not simply allow people to upload 5 files by setting the usergroup permission for the normal file option?
As for file attachments, go to admin panel -> settings -> files. There you can select if you want to keep the original file extension or -- as it defaults to -- remove those in favor of .wsn.
WSN Gallery does of course have the default code in the templates to show any number of images per submission. But again that's with the normal field, custom fields always involve custom work.
Comments on Using thumbnail.php on static pages.
Member
Usergroup: Customer
Joined: Apr 12, 2005
Total Topics: 3
Total Comments: 15
I have created 5 new fields named LINKIMAGE1ATTACH to LINKIMAGE5ATTACH
The input form is working OK and the images upload OK as I have checked them via FTP.
On the static custom html_details template I have included the following code. I show just code for one image.
<table width="730" border="3" cellspacing="1" cellpadding="1" bordercolor="#66CC99" height="100%" align="center">
<tr>
<td valign="top" bgcolor="#FFFFFF" bordercolor="#009999" align="center">
<img src="thumbnail.php?id={LINKID}&field=linkimage1attach&thumbwidth=200&thumbheight=200">
<br>{LINKIMAGETITLE5}
</td>
</tr>
</table>
The above code was pulled from the WSN Links Manual from chapter 'Custom File Attachment Fields'
The trouble is no image appears.
I have tried the above using CAPITALS for the field, but no luck
On the same template I have
<img src="thumbnail.php?id={LINKID}">
And this works
So the paths to the attachments directory and thumbnail.php must be correct.
I have taken a look at thumbnail.php and have found the bit were
if ($field != '')
{
$parts = explode('[,]', $thelink->$field);
$thelink->filename = $parts[0];
$thelink->xwidth = $parts[3];
$thelink->yheight = $parts[4];
}
I just can't see what is wrong, but I am not a php coder.
Can anyone explain how I get a thumbnail displayed using an ATTACH file upload?
I would like add that despite this problem I am having, WSN Links is excellent no other links package comes anywhere close to it.
Thanks
Alastair
Member
Usergroup: Customer
Joined: Apr 12, 2005
Total Topics: 3
Total Comments: 15
Has anyone implemented uploaded images within templates ie used attach files to display thumbnail images.
Could someone show me the code they used?
I thought the problem was with static pages only, but I'm also having the same problem on dynamic pages.
Any help/ideas would be appreciated as I need to get this resolved.
Is there another way of uploading images and displaying as thumnails
Thanks
Forum Regular
Usergroup: Customer
Joined: Feb 19, 2004
Location: Michigan
Total Topics: 57
Total Comments: 185
Here's what I'm using on the main page of my site, as well as a couple of different sites that I've done.
This checks to see if there is jpg or png attachment, if so then it displays the thumbnail and links it to the link comments page (library/{LINKID} for me.
Member
Usergroup: Customer
Joined: Apr 12, 2005
Total Topics: 3
Total Comments: 15
Thanks for your input on this.
I have already used that command, but if you want to post multiple images under a single LINKID you have to use use the file upload which creates a field with ATTACH added to the field name. This field name is then suppose to tell thumbnails where to pick up the file, still can't get it to work.
I have followed the instructions at scripts.webmastersite.net/w...nks/wsnmanual/articles/161
Anyone else with any ideas?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Go to the url of the dead image and tack &debug=1 onto it to get the debug info.
Member
Usergroup: Customer
Joined: Apr 12, 2005
Total Topics: 3
Total Comments: 15
Hi Paul,
OK done that. I am also in debug mode, if you could take a quick look at
http://www.bedsaway.co.uk/scotland/link12.htm
Hope you can see all the info. I note a few errors in there but am not sure what's caused them.
Not sure what I have done but since this morning the <img src="thumbnail.php?id={LINKID}"> command has stopped working as well.
I attach the html_details.tpl file
Thanks for any advice/help.
Attached Files:
Member
Usergroup: Customer
Joined: Apr 12, 2005
Total Topics: 3
Total Comments: 15
Things are going rapidly down hill for me.
I noticed that one of the warnings in the above link was at line 123 in prestart.php. To do IE6 cookies
So I thought I may resolve it if I deleted my cookies. Now I cant log in, my username/password is not recognised and even when I have received a new password via E-mail I can't get in. This is using both FireFox and IE6. I have spent weeks putting plans together for this site and now this.
Is the password username stored in the database?
What are the cookies used for?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Read the manual, header warnings simply mean you're in debug mode. Also read the manual entry "Can't get into admin panel."
Anyhow, that wasn't the debug of the thumbnail. I'll take a wild guess and suppose it's www.bedsaway.co.uk/scotland...humbnail.php?id=12&debug=1 . That indicates a file path problem, usrlocalbintemplates. Sounds like slashes were removed. Either add them back in in your admin panel settings->system config or add them to config.php: scripts.webmastersite.net/w...articles/Configphp-78.html
Member
Usergroup: Customer
Joined: Apr 12, 2005
Total Topics: 3
Total Comments: 15
Added the required info to the config file ie
$dirurl = 'http://www.bedsaway.co.uk/scotland';
$uploadpath = '/content/DesignerPlus/b/e/www.bedsaway.co.uk/web/scotland/attachments/';
?>
Also checked the path in the admin panel configuration setup and this is correct
Noticed that I had a closing back slash for the path to my ImageMagic, your sample does not so I removed my back slash and this resolved the <img src="thumbnail.php?id={LINKID}"> problem.
but still can't get <img src="thumbnail.php?id={LINKID}&field=linkimage3attach&thumbwidth=200&thumbheight=200&debug=1"> to work either in the dynamic template detail.tpl or the custom template html_details used to create the static pages.
Do the image commands above look correct?
The images have uploaded into the attachment directory OK, so this suggests the paths are correct, well certainly for upload.
How do I pickup the debug=1 info from the above?
I note the thumbnails have to be created and are stored in the attachment folder. These have not been created.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
www.bedsaway.co.uk/scotland...00&thumbheight=200&debug=1
simply says it can't do a thumbnail (probably because it can't find the file) and you don't have a nothumbnail.png file to use in place.
www.bedsaway.co.uk/scotland...bwidth=200&thumbheight=200 on the other hand works.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
I'll add some more useful debug output to it. Use the attached file.
Edit: I see you're using 3.15, best to upgrade to 3.16 as well so that we're using the same files.
Attached Files:
Member
Usergroup: Customer
Joined: Apr 12, 2005
Total Topics: 3
Total Comments: 15
Hi Paul,
Sorry for the long delay getting back, I have been away from the office.
I have upgraded to 3.16 and uploaded your debug copy of thumbnail.php, I have also created a nothumbnail.png file.
If you could take a another look that would be great.
Regards
Al
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
It says there's no content in linkimage3attach for that link.
If there's no reason these images need to be treated as distinct you'd be better of with 3.20 anyway instead of using custom fields.
Member
Usergroup: Customer
Joined: Apr 12, 2005
Total Topics: 3
Total Comments: 15
Hi Paul,
I've done a complete new install of v 3.22
I want members to be able to upload 5 images and display them as thumbnails, when they click on any of the thumbnails they see a larger image.
My attempts with earlier versions failed.
With the new version at http://www.bedsaway.co.uk/s/ I have created 3 new fields for file upload, these are LINKPIC1ATTACH , LINKPIC2ATTACH , LINKPIC3ATTACH
So far when I have inserted {LINKPIC1ATTACH} in the Link Details default template is just see the the following appear bf1145f7f4b8bc503951eb8f35341c74.wsn[,]18th.jpg[,]0[,]384[,] or such like. I just can't get any images even though it is clear that the attachments directory path is correct.
With this new version file are being created in the attachments directory with the ending .wsn, what are these files and where are the actual images stored.
Could you please supply the code to display field {LINKPIC1ATTACH} as a thumbnail and as a full size image?
Or can WSN LINKS not do this with uploaded image attachments?
I also have a licence for WSN Gallery, can I do what I require within that?
But then I will have to integrate the two and I hit problems when I attempted to do that as well, that is why I've kept going along with just using WSN Links.
Thanks for your help.
Alastair
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
With 3.22 there's no real sense in using custom link attachments. Why not simply allow people to upload 5 files by setting the usergroup permission for the normal file option?
As for file attachments, go to admin panel -> settings -> files. There you can select if you want to keep the original file extension or -- as it defaults to -- remove those in favor of .wsn.
WSN Gallery does of course have the default code in the templates to show any number of images per submission. But again that's with the normal field, custom fields always involve custom work.
As for the code to show custom attachments, if you do want to keep using custom fields, please read the manual entry as that's what it's there for: scripts.webmastersite.net/w...nks/wsnmanual/articles/161