Webmastersite.net
Register Log In

Images with use Custom Attach fields

Comments on Images with use Custom Attach fields

befeleme
Experienced

Usergroup: Customer
Joined: Aug 27, 2005
Location: Czech Republic

Total Topics: 48
Total Comments: 82
Posted Jan 20, 2006 - 7:56 AM:

Hallo Paul,

I want to show 1 image - logo.jpg (not thumbnail) by each link and I want to show 2 others images on details page.

I use for upload logo.jpg default attach field with name "filefield"...... and in displaylinks.tpl I use

<!-- BEGIN LINK ATTACHMENTS -->
<IF {ATTACHISIMAGE}><img src="download.php?id={LINKID}"></IF>
<!-- END LINK ATTACHMENTS -->

All is o.k.

After I add two new attach fields with name test1attach and test2attach and I upload 2 images (image1.jpj and image2.jpg).

Now I need show these images in detail page. I tried many way by manual, forum.. but without success.

When I use new attach fields for category and code for display images is

<img src="download.php?catid={CATID}&field=testcategory1attach">

image is correct displays.


Analogous code for display images by use custom link attach fields

<img src="download.php?linkid={LINKID}&field=test1attach"> is not works.


Thanks for help.
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Jan 20, 2006 - 8:19 AM:

befeleme wrote:
I want to show 1 image - logo.jpg (not thumbnail) by each link and I want to show 2 others images on details page.


I have this - you do not need to add extra attach fields. On the displaylink page you add the number of attachments you want to show to the link attachment comment - so for one image you put

<!-- BEGIN 1 LINK ATTACHMENTS -->

<!-- END LINK ATTACHMENTS -->


but on the details page you put it as usual

<!-- BEGIN LINK ATTACHMENTS -->

<!-- END LINK ATTACHMENTS -->

Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jan 21, 2006 - 2:11 AM:

The problem is when you want a specific file instead of just limiting it to 1. download.php should accept a filename parameter though so you can use download.php?id={LINKID}&filename=logo.jpg

befeleme wrote:
Analogous code for display images by use custom link attach fields

<img src="https://www.webmastersite.net/forums/download.php?linkid={LINKID}&field=test1attach"> is not works.


Nor should it, since "linkid" is meaningless and "id" is always used to pass a link value for a thumbnail, download, link detail, comments page, etc.
befeleme
Experienced

Usergroup: Customer
Joined: Aug 27, 2005
Location: Czech Republic

Total Topics: 48
Total Comments: 82
Posted Jan 21, 2006 - 3:44 AM:

Hallo Paul,

thanks for help. I have still problem with display images with use custom attach link fields upload.

When I add new link attach field with name test1attach and then upload one image testimage.jpg. How display this testimage.jpg on details page with use conditional syntax <IF {LINKTEST1ATTACH}> </IF> ?

When I use this:

<IF {LINKTEST1ATTACH}>
<img src="download.php?id={LINKID}&filename=testimage.jpg"></IF>, that's is not works.

Is possible display upload images with custom attach fields as image in detail page?

Thanks.



peumus
Forum Regular

Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile

Total Topics: 172
Total Comments: 462
peumus
Posted Jan 21, 2006 - 3:39 PM:

Hello befeleme, to show clickable thumbnails you can use:

At Link details:

<IF {LINKFOTO1ATTACHTITLE}>
<a href="download.php?id={LINKID}&field=foto1attach" target="_blank"> <img src="thumbnail.php?id={LINKID}&field=foto1attach&thumbwidth=75&thumbheight=75" border="0">
</a>
</IF>

Best Regards.
befeleme
Experienced

Usergroup: Customer
Joined: Aug 27, 2005
Location: Czech Republic

Total Topics: 48
Total Comments: 82
Posted Jan 22, 2006 - 2:51 PM:

Thank Peumes,

but I need show images directly, without thumbnails and I dont know this. :-(
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jan 22, 2006 - 8:03 PM:

Simply change his a href to img src and remove the target="_blank" and his image tag.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.