Results 1 to 5 of 5

Thread: How Do I Get An Image to Appear

  1. #1
    Join Date
    Jan 2002
    Posts
    279

    Default How Do I Get An Image to Appear

    I'm not sure if this is possible but....

    I want to create a custom field called "download". Then on the detail page I want a Download button to appear only if this field was filled out during submission.

    But if the field was left empty during submission I don't want the download image to appear on the detail page.

    This is on V3.04 if that makes a difference.

    Thanks,

    Craven

  2. #2
    Join Date
    Jan 2002
    Posts
    279

    Default

    I know how to do this using perl with an if statement but not sure what to do with it here.

  3. #3
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    php is the same way, you just have to find the place to add the code. unless we get smarty templates...

    I really haven't looked at it closely but find the following int the Display function of link.class.php
    Code:
          if($hot) $line = str_replace("<%hot%>",$this->icon_hot,$line);
          else $hot = "";
    you would need to add a line something like that for your custom field
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  4. #4
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,732

    Default

    The only way is using string replace as esm said.

  5. #5
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    well, it is not the only way.

    I think you could pass it as a variable to the DisplayTemplate function.
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

Similar Threads

  1. Images for links ?
    By Rix in forum Pre-Sales Questions
    Replies: 6
    Last Post: 05-24-2004, 09:15 AM
  2. image not showing up after upload.
    By persut in forum v5.x
    Replies: 1
    Last Post: 03-03-2004, 07:11 PM
  3. Getting full control of image uploader
    By dody in forum Tutorials, Hints & Tips
    Replies: 2
    Last Post: 08-20-2003, 05:14 PM
  4. Image upload problem
    By tariqali in forum v5.x
    Replies: 7
    Last Post: 07-13-2002, 09:14 AM
  5. Different Image ??
    By ideavirus in forum v3.2
    Replies: 0
    Last Post: 07-12-2002, 11:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •