How to add formatting to link descriptions in phpld

Discussion in 'Directories' started by casperl, Apr 12, 2007.

  1. #1
    As far as i remember, when i tried to add <p> tags around text in link descriptions while adding a link, that tag is removed automatically and the link description is added without a format.

    It was ok for my initial directory. But for my next project, i will need to add formatting to my link descriptions. At least, i need to have more than one paragraph for my link descriptions.

    Am i missing something? Doesn't phpld allows you to add tags around link description text?
     
    casperl, Apr 12, 2007 IP
  2. SasaVtec

    SasaVtec Notable Member

    Messages:
    1,588
    Likes Received:
    150
    Best Answers:
    0
    Trophy Points:
    275
    #2
    yes it does, best thing to do I think is hire someone good with coding phpld templates.
     
    SasaVtec, Apr 12, 2007 IP
    casperl likes this.
  3. casperl

    casperl Peon

    Messages:
    1,560
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    0
    #3
    How to solve it with template coding?
     
    casperl, Apr 12, 2007 IP
  4. SasaVtec

    SasaVtec Notable Member

    Messages:
    1,588
    Likes Received:
    150
    Best Answers:
    0
    Trophy Points:
    275
    #4
    Assuming someone who codes them would know how to format descriptions and stuff.
     
    SasaVtec, Apr 12, 2007 IP
  5. LeopardAt1

    LeopardAt1 Well-Known Member

    Messages:
    880
    Likes Received:
    126
    Best Answers:
    0
    Trophy Points:
    135
    #5
    One way is to wrap div tags around it.

    So edit your links.tpl file....scroll down and look for the area where it prints out the link description and add div tags to it.

    So maybe something like this?



    
    <div style="padding:8px; color: blue; border: 1px solid green;">
    
     <p>
          {$link.DESCRIPTION|escape|trim} -&nbsp;[<a href="{if !$smarty.const.ENABLE_REWRITE}
                                                    {$smarty.const.DOC_ROOT}/detail.php?id={$link.ID}
                                                 {else}
                                                    {$smarty.const.DOC_ROOT}/detail/link-{$link.ID}.html{/if}" title="{l}Read more about{/l}: {$link.TITLE|escape|trim}">{l}Read&nbsp;more{/l}</a>
    
                                     {if $smarty.const.REQUIRE_REGISTERED_USER == 1 and !empty ($regular_user_details) and ($regular_user_details.ID == $link.OWNER_ID)}
                                        ,&nbsp;<a href="{$smarty.const.DOC_ROOT}/submit.php?linkid={$link.ID}" title="{l}Edit or Remove your link{/l}">{l}Review{/l}</a>
                                     {/if}
                                     ]
       </p>
    </div>
    
    Code (markup):
    Cheers
     
    LeopardAt1, Apr 12, 2007 IP
    casperl likes this.
  6. casperl

    casperl Peon

    Messages:
    1,560
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks, i will try that.

    So as far as i understood it is a formatting issue instead of programming issue. So phpld does not remove those tags but does not allow formatting.
     
    casperl, Apr 12, 2007 IP