- Moderated by:
- Support Team
-
- rank:
-
Softmore
- registered:
- February 2005
- Status:
- offline
- last visit:
- 02.04.05
- Posts:
- 70
In a Pagesetter template, I have the code, shown below, that should display an image as a thumbnail - but dosen't.
Any ideas why this dosen't work?
Code
<img src="<!--[$image]-->&thumbnail=1" alt="<!--[$imagetext]-->" title="<!--[$imagetext]-->" align="left">
The reference to the image is correct, because if I leave out "&thumbnail=1", the image will display (full size of course).
-The Dugster :? -
- rank:
-
Professional
- registered:
- January 2004
- Status:
- offline
- last visit:
- 05.09.08
- Posts:
- 633
You are confusing 2 different syntax
- for a photoshare image included in a Pagesetter document "&thumbnail=1" is a valid syntax
- for an image stored in a Pagesetter field (as your $image variable suggest) it is something like but please verify in the Pagesetter manual because I say that from memory.
Of course this syntax assume that you are using the last version of Pagesetter with document upload handling.
--
Visit my live reef aquarium.
My Amazon wish list. -
- rank:
-
Softmore
- registered:
- February 2005
- Status:
- offline
- last visit:
- 02.04.05
- Posts:
- 70
O.K., I see what you are saying as far as the syntax being different for Photoshare and a Pagesetter field.
In reading the manual though, I am really confused.
From what I can understand, an "image" field is to put the URL to the image you want to display in the publication. An "image upload" field is a means to upload the image to a specified directory. Is this just for convienence so that you don't have to ftp the image file?
Let's say I have an image file called dog.gif that I want to display in my publication.
In the pub-type I create an "image" field to place the URL to the dog.gif file. I also create an "image upload" field to upload it to the specified directory.
When using the "upload image" field, Pagesetter automatically generates thumbnails and download/display links for use in the templates. (so says the manual)
But here's where I am confused - what do I put in the "image" field? Do I refer to the dog.gif file - or to the TxPxRxF.dat files that were created?
I can't refer to the dog.gif file, unless I upload it via ftp - in which case what would be the purpose of the "image upload" field? If I put a reference to the new .dat files as the URL to the image - it dosen't work. Besides, how do I know the name of these .dat files without having to first create them and then go look at them, and then have to come back and edit the file with the propper name?
I'm lost!
-The Dugster -
- rank:
-
Professional
- registered:
- January 2004
- Status:
- offline
- last visit:
- 05.09.08
- Posts:
- 633
Is your field with name image an image field or an image upload field ? I was thinking it was an image upload field.
If you have an image upload field why did you want also an image field ?These 2 fields types serve different purposes :
a) image type field
the image is somewhere on your server (uploaded using ftp) or in a photoshare album. The image field will contain the URL to that image you will use in your template to refer to that URL. You can only use the &thumbnail=1 syntax for a photoshare image not for an ftped one.
b)image upload field type
the creator of any publication whose type contain the image upload field will be able to upload an image given sufficent permissions (even if he has no access to ftp). In this case you dont need another field you will use in your templates to refer to the URL to the thumbnail of the uploaded image and for the image URL.
I think your confusion is caused because you mix both things.
--
Visit my live reef aquarium.
My Amazon wish list. -
- rank:
-
Softmore
- registered:
- February 2005
- Status:
- offline
- last visit:
- 02.04.05
- Posts:
- 70
O.k., now I understand the difference between "image" and "image upload". I also understand that the thumbnail feature, when using "image" field type, - will only work in conjunction with Photoshare and not with images that are uploaded via 'FTP'.
Thanks so much with helping me understand that!
However, I still have a problem (or confusion
).
I created an entirely new pub-type, for testing this, called "Dogs". I used the "image upload" type field for the images. After creating this new pub-type I created the templates for it, via Pagesetter admin, named Dogs-list.html and Dogs-full.html.
Next I added a new publication and selected dog.gif as the "image upload" file. After "commiting" the new entry I looked in the directory created for receiving uploads to make sure the new .dat files were created - and there were two; 9x0x1ximage-tmb.dat and 9x0x1ximage.dat
Next I went to view the new publication in my browser and the image still does not appear.
When looking at the template, dog-full.html the tag for the "image upload" is; . I don't understand why it is not; and/or
I changed the template by adding both of these tags, but the image still does not appear.
Here is what now displays where the image should be;
path../pn/index.php?module=Pagesetter&type=file&func=get&tid=9&pid=0&fid=image
and;
path../pn/index.php?module=Pagesetter&type=file&func=get&tid=9&pid=0&fid=image&tmb=1
Am I still confused and not doing something right - or is there something not working correctly?
I hope you can stick with me on this, it's driving me crazy. :shock:
Thanks,
-The Dugster -
- rank:
-
Softmore
- registered:
- February 2005
- Status:
- offline
- last visit:
- 02.04.05
- Posts:
- 70
Me again...
Could there be a problem as far as where my "upload" directory is? It is located in the PN root directory.
Also, what about my web server, it is Win IIS. Are there special requirements to display .dat type files? I do know that GD 2.0.28 is installed on the server.
I don't know, I'm in over my head here - just grasping at straws!
-The Dugster -
- rank:
-
Professional
- registered:
- January 2004
- Status:
- offline
- last visit:
- 05.09.08
- Posts:
- 633
warning you should not replace with but with
If it is what you have done and if the img tag is enabled with parameters in Administration -> Settings, I don't understand why it doesn't work !!
Looking at the webpage source when the Pagesetter publication is displayed you should see something like :
Code
<img src="your_postnuke_site_url/index.php?module=pagesetter&type=file&func=get&tid=98&pid=0&fid=image">
--
Visit my live reef aquarium.
My Amazon wish list. -
- rank:
-
Softmore
- registered:
- February 2005
- Status:
- offline
- last visit:
- 02.04.05
- Posts:
- 70
YES... THAT WAS IT!!!
Once again you have rescued me.
I hope I can repay the favor sometime.
The question still remains, however...
Why does the templates that are auto-generated by Pagesetter not create the tags correctly?
Well, at least I know how to fix it now!
Mega Thanks,
-The Dugster :wink:
