Page 1 of 2 12 LastLast
Results 1 to 15 of 19

Thread: Error after trying to add image or thumnail to desription

  1. #1
    Join Date
    Oct 2007
    Location
    Sydney
    Posts
    652

    Default Error after trying to add image or thumnail to desription

    Hi,

    I am getting the following error message after I added the image or thumbnail to description. using the Tips PDF file on the forum.

    http://links.weddinghost.com.au/deta...os-sydney.html

    Any idea what is happening, as far as I know it is trying to load the images from the cache direcretoy and it changed the image name to a long name.

    Many thankd in advance
    Mitchell

  2. #2
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    It would help if you pasted the code that you used.

  3. #3
    Join Date
    Oct 2007
    Location
    Sydney
    Posts
    652

    Default

    Thanks Bruce,

    This is the Detail.link.html file;
    Regards
    Mitchell
    ___________________________________________


    <div class="block_large_title"><%$title%></div>

    <div class="block_form">
    <label>Link ID</label>
    <span class="text"><%$link_id%></span>

    <label>Title</label>
    <span class="text"><%$title%></span>

    <label>Url</label>
    <span class="text"><a href="<%$url%>" name="link_<%$link_id%>"><%$url%></a></span>

    <label>Description</label>
    <span class="text"><%$description%></span>

    <%if $photo !="$site_url/themes/weddings/images/transparent.gif" %>
    <%thumb file="$photo" width="82" height="60" crop="true" window="true"
    link="false" html='class="img float" border="0" alt="image" align="left"
    hspace="5"'%>
    <%/if%>
    <a href="<%$site_url%>/<%$detail_page_url%>"
    name="link_<%$link_id%>"> <b><%$title%></b></a>
    <%$description|truncate:500%>

    <label>Category</label>
    <span class="text"><%$category_path_with_link%></span>

    <label>Date</label>
    <span class="text"><%$date|date_format%></span>

    <label>Contact Name</label>
    <span class="text"><%$contact_name%></span>

    <label>Email</label>
    <span class="text"><%if IsEmailAddress($email)%>
    <a href="<%$site_url%>/sendmail.php?lid=<%$link_id%>">send email to <%$contact_name%></a>
    <%/if%></span>

    </div>
    <br />

    <img src="<%$tpl_base%>/images/write-review.gif" align="top" border="0" alt="" />
    <a href="<%$site_url%>/review.php?id=<%$link_id%>">Write a Review</a>
    &nbsp;

    <img src="<%$tpl_base%>/images/favorites.gif" align="top" border="0" alt="" />
    <a href="<%$site_url%>/cp/favorite_add.php?id=<%$link_id%>">Add to My Favorite</a>
    &nbsp;


    <%if $photo !="$site_url/themes/weddings/images/transparent.gif" %>
    <A href="<%$photo%>" rel="lightbox"> <%thumb file="$photo" width="231"
    height="158" crop="true" window="true" link="false" html='class="img float"
    border="0"'%> </a>
    <%/if%>
    &nbsp;

    <img src="<%$tpl_base%>/images/email3.gif" align="top" border="0" alt="" />
    <a href="<%$site_url%>/tell_friend.php?id=<%$link_id%>">Refer it to Friend</a>
    &nbsp;

    <img src="<%$tpl_base%>/images/broken_link.gif" align="top" border="0" alt="" />
    <a href="<%$site_url%>/bad_link.php?id=<%$link_id%>">Report Broken Link</a>
    &nbsp;

    <br />
    <br />


    <div class="block_average">
    <form action="rating.php" method="post">
    <input type="hidden" name="id" value="<%$link_id%>" />
    <center>
    <b>Average Visitor Rating: </b> <%$rating_img%>
    <b><%$rating%></b> (out of 5)<br />
    Number of ratings: <%$votes%> Votes<br /><br />

    <b>Visitor Rating</b>
    <select name="rating">
    <option value="">Select Your Rating</option>
    <option value="5">Excellent!</option>
    <option value="4">Very Good</option>
    <option value="3">Good</option>
    <option value="2">Fair</option>
    <option value="1">Poor</option>
    </select>
    <input type="submit" value="Rate It!" class="button" />
    <br /><br />
    </center>
    </form>
    </div>
    <br />

  4. #4
    Join Date
    Oct 2007
    Location
    Sydney
    Posts
    652

    Default

    This is the instructions that I got form the TIPS file;


    __________________________________________

    Images – Anyway you want them
    if people are uploading images to your site this little trick enables you to change the
    size of them automatically – great to include a small image view on the rows.html
    page, and avoid someoen uploading something that will break your beautiful display.
    This little trick requires a superb smarty plugin which you can get from here :
    http://www.cerdmann.com/thumb/
    Here is a step by step on how to install and use this plugin. Please check the server
    requirements before you start.
    1) Download the file called function.thumb.php from the site above.
    2) Ftp to your site, and navigate to lib/smarty/plugins/ and upload here.
    3) You probably want an image in your detail page, so load up
    yourtheme/detail_link.html and place this code where you want the image to
    appear :
    <%thumb file="$photo" width="231" height="158" crop="true"
    window="true" link="false" html='class="img float" border="0"'%>
    this assumes your custom field is called photo, and you want the picture on
    your detail page to display at the size 231x158, it also assumes that if the ratio
    of the picture is different from the one you are asking for the image will be
    cropped.
    4) You can have a look at the website for a few more options that come with this
    plugin, but basically the best settings are above.
    5) Now, i want a really tiny image on the front page random block – no problem!
    Just use this code :
    <%if $photo !="$site_url/themes/yourtheme/images/transparent.gif" %>
    <%thumb file="$photo" width="82" height="60" crop="true" window="true"
    link="false" html='class="img float" border="0" alt="image" align="left"
    hspace="5"'%>
    <%/if%>
    <a href="<%$site_url%>/<%$detail_page_url%>"
    name="link_<%$link_id%>"> <b><%$title%></b></a>
    <%$description|truncate:500%>
    A few different things are happening with this code, although it is very similar
    to the code before other than the size, We are doing a check to make sure the
    image exists. If no image exists indexU loads a transparent gif, so we have to
    sue this more imaginative code that says “if your not loading a transparent
    image, then make a thumbnail instead” I have also included “hspace=5” this
    enables the description to wrap around the picture better.

  5. #5
    Join Date
    Oct 2007
    Location
    Sydney
    Posts
    652

    Default

    .... and this is the other TIPS that I added;

    ______________________________________
    Fancy Pop Up Images?
    Okay, so mabe you want to have the images enlarge when people click them, for
    example, on my site here:
    http://www.bigfreeguide.com/camping/...an-andtouring-
    park/99.html
    Luckily this is an easy to achieve effect using 3rd party scripts, firstly, you need to get
    them!
    http://script.aculo.us/downloads
    Once you have the file, extract it and upload the contents to a folder called “js”
    placed in your main indexU folder.
    Now load up header.html and place this code : (black code for context)
    <link href="<%$tpl_base%>/styles.css" rel="stylesheet" type="text/css" />
    <link href="<%$tpl_base%>/calendar-system.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="<%$site_url%>/js/prototype.js"></script>
    <script type="text/javascript"
    src="<%$site_url%>/js/scriptaculous.js?load=effects"></script>
    <script type="text/javascript" src="<%$site_url%>/js/lightbox.js"></script>
    Okay, now we have everything ready, we just need to tell indexU when to use the
    effect, luckily we can combine the thumbnail plugin with this plugin, load up
    detail_link.html and use this code :
    <%if $photo !="$site_url/themes/yourtheme/images/transparent.gif" %>
    <A href="<%$photo%>" rel="lightbox"> <%thumb file="$photo" width="231"
    height="158" crop="true" window="true" link="false" html='class="img float"
    border="0"'%> </a>
    <%/if%>
    Again, we are doing a check to see if the file exists, then we add one more little piece
    of code, a link, <A href="<%$photo%>" rel="lightbox"> this is a straight forward
    link to the photo url, with the exception of the rel=lightbox, this is where the magic
    works – it calls the JavaScript you put in the header and makes a cool effect to
    enlarge the picture.

  6. #6
    Join Date
    Sep 2006
    Posts
    167

    Default

    'images/cache/
    Verify that the folder exist and your permission must be 777

    And i didn't use gif but jpg
    Last edited by Antony; 11-18-2007 at 09:32 PM.
    Hotel Discount Web Search
    www.hotel-discount.com

  7. #7
    Join Date
    Oct 2007
    Location
    Sydney
    Posts
    652

    Default

    and this is my hearder.html

    ________________________________________
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title><%$title%></title>
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
    <meta name="keywords" content="<%$meta_keywords%>" />
    <meta name="description" content="<%$meta_description%>" />
    <link href="<%$tpl_base%>/styles.css" rel="stylesheet" type="text/css" />
    <link href="<%$tpl_base%>/calendar-system.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="<%$site_url%>/js/prototype.js"></script>
    <script type="text/javascript"
    src="<%$site_url%>/js/scriptaculous.js?load=effects"></script>
    <script type="text/javascript" src="<%$site_url%>/js/lightbox.js"></script>
    <base href="<%$site_url%>/" />
    </head>
    <body>

    <div class="box">
    <!-- header start -->
    <div class="topnav">
    <a href="<%$site_url%>/new.php" class="menu_top">NEW LISTINGS</a>&nbsp;<img src="<%$tpl_base%>/images/weddings_only.gif" width="1" height="12" alt="Weddings Only Australia" />
    <a href="<%$site_url%>/hot.php" class="menu_top">HOT LISTINGS</a>&nbsp;<img src="<%$tpl_base%>/images/weddings_only.gif" width="1" height="12" alt="Wedding Directory" />
    <a href="<%$site_url%>/top_rated.php" class="menu_top">TOP RATED</a>&nbsp;<img src="<%$tpl_base%>/images/weddings_only.gif" width="1" height="12" alt="Wedding websites" />
    <a href="<%$site_url%>/pick.php" class="menu_top">EDITOR PICK</a>&nbsp;<img src="<%$tpl_base%>/images/weddings_only.gif" width="1" height="12" alt="Wedding Portal" />
    <%if $cat%><a href="<%$site_url%>/add.php?cat=<%$cat%>" class="menu_top"><%else%><a href="<%$site_url%>/add.php" class="menu_top"><%/if%>ADD A LISTING</a>&nbsp;<img src="<%$tpl_base%>/images/weddings_only.gif" width="1" height="12" alt="Wedding Suppliers" />
    <a href="<%$site_url%>/modify.php"class="menu_top">UPDATE A LISTING</a>&nbsp;<img src="<%$tpl_base%>/images/weddings_only.gif" width="1" height="12" alt="Weddings" />
    <a href="<%$site_url%>/get_rated.php" class="menu_top">GET RATED</a>&nbsp;<img src="<%$tpl_base%>/images/weddings_only.gif" width="1" height="12" alt="Wedding" />
    <a href="<%$site_url%>/upgrade.php" class="menu_top">UPGRADE A LISTING</a>
    </div>
    <div style="background:#A3BDD4"><img src="<%$tpl_base%>/images/spacer.gif" width="1" height="10" alt="Wedding Venues" /></div>
    <img src="<%$tpl_base%>/images/spacer.gif" width="1" height="1" alt="Reception Venues" /><br />
    <div style="background:#ABACB0"><img src="<%$tpl_base%>/images/spacer.gif" width="1" height="2" alt="Wedding Photographers" /></div>
    <img src="<%$tpl_base%>/images/spacer.gif" width="1" height="2" alt="" /><br />

    <div class="header_left">
    <img src="<%$tpl_base%>/images/logo.gif" alt="" /><br /><br />
    <a href="<%$site_url%>/" class="menu">HOME</a><br />
    <a href="<%$site_url%>/cp/" class="menu">MY ACCOUNT</a><br />
    <a href="<%$site_url%>/power_search.php" class="menu">POWER SEARCH</a><br />
    <a href="<%$site_url%>/register.php" class="menu">REGISTER</a><br />
    <a href="<%$site_url%>/user_search.php?pflag=search" class="menu">MEMBER LIST</a><br />
    <a href="<%$site_url%>/suggest_category.php" class="menu">SUGGEST CATEGORY</a>
    </div>
    <div class="header_right"><img src="<%$tpl_base%>/images/banner.jpg" alt="" /></div>
    <div class="clear_both"></div>
    <img src="<%$tpl_base%>/images/spacer.gif" width="1" height="5" alt="" /><br />

    <div class="block_left">
    <div class="block_search">
    <div class="search_field">
    <form method="get" action="search.php" style="margin:0px">
    SEARCH
    <%if $category_path_search_opt%>
    <input type="hidden" name="cat" value="<%$cat%>" />
    <%/if%>
    <input type="text" name="keyword" size="20"

    <%if $keyword%>
    value="<%$keyword%>"
    <%else%>
    value='search...'
    onblur="if(this.value=='') this.value='search...';"
    onfocus="if(this.value=='search...') this.value='';"
    <%/if%>
    />

    <select name="opt">
    <option value="0">the entire directory</option>
    <%if $category_path_search_opt%>
    <option value="1">Only in <%$category_path_search_opt%></option>
    <%/if%>
    <%if $opt eq "2"%>
    <option value="2" selected="selected">on the web</option>
    <%else%>
    <option value="2">on the web</option>
    <%/if%>
    </select>
    <input type="submit" name="Submit3" value="Search" class="button" />
    </form>
    </div>
    </div>

    <!-- header end -->

  8. #8
    Join Date
    Oct 2007
    Location
    Sydney
    Posts
    652

    Default

    Hi Bruce,

    Did you have a chance to look at my code?

    Regards
    Mitchell
    Last edited by Mitchell; 11-20-2007 at 02:38 PM.

  9. #9
    Join Date
    Oct 2007
    Posts
    19

    Default

    Have you solved this one already?

  10. #10
    Join Date
    Oct 2007
    Location
    Sydney
    Posts
    652

    Default

    No, not yet, do you know ho I can fix it please?
    Cheers
    Mitchell

  11. #11
    Join Date
    Oct 2007
    Location
    Sydney
    Posts
    652

    Default

    Does any one ever gets any proper and constructive help or support here?

    Any one can help me please with this?

    Many thanks in advance
    Mitchell

  12. #12
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    Of course they do. However your asking for help with a mod which is essentially custom code, and that help should come from the person who wrote it IF they offer support. If they don't then you're either left on your own, left waiting for someone else to help you or looking for someone to do it for you and pay them.

    I've already pointed out to you where an error exists, and so did Antony by asking a question. Whatever code you added is pointing to images/cache/

    Is that correct? Is that where the images are supposed to be? If not, fix it, or put all the images there and see if it works.

  13. #13
    Join Date
    Nov 2004
    Posts
    1,822

    Default

    whats the problem, i see no error message on your site.
    Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )

  14. #14
    Join Date
    Oct 2007
    Posts
    19

  15. #15
    Join Date
    Oct 2007
    Location
    Sydney
    Posts
    652

    Default

    Hi all,
    Thank you for the responds, any how I created an image/cache directory in the root directory of my site, there was one in the Theme folder but apparently it reads the images from the root directory. So the answer is very simple just create a folder called image in the main folder and a subfolder in the image folder called cache.

    By the way it works now but it is a very plain image now, I need to some how make it more intersting, like the site below;
    http://www.bigfreeguide.com/camping/...g-park/99.html

    I will let you know how I did it if I work it out.

    Best regards
    Mitchell

Similar Threads

  1. Error 500-Internal server error
    By samourai in forum v5.x
    Replies: 2
    Last Post: 10-12-2007, 06:52 AM
  2. Image
    By marko in forum v5.x
    Replies: 15
    Last Post: 08-16-2002, 06:06 PM
  3. 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
  •