Results 1 to 4 of 4

Thread: Quick Tips :)

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

    Default Quick Tips :)

    Heres some stuff that smarty can help with to make your site a bit more polished.


    On new and updated block replace <%$new_links[i].description%> with :
    Code:
    <%$new_links[i].description|truncate:300%><a href="<%$new_links[i].detail_page_url%>" id="link_<%$new_links[i].link_id%>"> [more] </a>
    this stops huge descriptions, and lets you limit how much space is taken up on your main page. It trims to 300 characters, then places a [more] link underneath

    Dont just use <%$title%> use :
    Code:
      <%$title|lower|capitalize%>
    Stops people DOING ALL CAPS or all lower case. Correctly Capitalize Your Title

    for some reason you get the <br> tags in descriptions come out as "<br>" instead of actual line breaks on the front page. Solve it with :

    <%$variable|strip_tags%>

    anyone got any other neat smarty tips?
    Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )

  2. #2
    Join Date
    Feb 2003
    Location
    Saudi Arabia - Jeddah
    Posts
    141

    Default

    very nice you realy inspire me!

    keep going...... we need your smart tips !

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

    Default

    I was looking for truncate but i can't get it until you mention it here. Thanks.

    I have another tips how to count words. I use this for my article directory at heavyarms.net:
    <%$number%>. <a href="<%$detail_page_url%>" id="link_<%$link_id%>"><%$title%></b></a>
    by <%$contact_name%> (<%$content|count_words%> words)

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

    Default

    thats a neat one
    Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )

Similar Threads

  1. Is a quick hack possible ?
    By lewisw in forum Blocks and Modification
    Replies: 18
    Last Post: 05-12-2006, 08:17 AM
  2. Replies: 0
    Last Post: 01-10-2005, 08:11 PM
  3. Static Page for Indexu Tips
    By aladdin1 in forum v3.2
    Replies: 3
    Last Post: 04-22-2004, 08:45 PM

Posting Permissions

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