How do you include TLA code in PHPLD 3.0.5

Discussion in 'HTML & Website Design' started by articledirectory, Dec 29, 2007.

  1. #1
    I have my PR4 Gaming Directory added to TLA but when i try to put the code in the template footer file it does not work, does any one know how i can do it? is there a work around or somewhere else i can put the code?

    I tried doing it with an incude file and put the code
    <?php include("test.php"); ?> in the footer and then the tla code in the test.php file but that doesn't work.

    can anyone help?

    I'm running phpld 3.0.5
     
    articledirectory, Dec 29, 2007 IP
  2. articledirectory

    articledirectory Peon

    Messages:
    1,704
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #2
    After a bit more searching i found the solution myself, if any one else need to know, here is the solution

    Change <?php to {php} and ?> {/php}

    so the code looks like this

    {php}
    TLA's code
    {/php}
     
    articledirectory, Dec 29, 2007 IP
  3. MeetHere

    MeetHere Prominent Member

    Messages:
    15,399
    Likes Received:
    994
    Best Answers:
    0
    Trophy Points:
    330
    #3
    you added it in footer.tpl ?
     
    MeetHere, Dec 29, 2007 IP
  4. articledirectory

    articledirectory Peon

    Messages:
    1,704
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #4
    yes, so its sitewide, i did want it on homepage only but i dont think there is a specific file for just the homepage.
     
    articledirectory, Dec 29, 2007 IP
  5. MeetHere

    MeetHere Prominent Member

    Messages:
    15,399
    Likes Received:
    994
    Best Answers:
    0
    Trophy Points:
    330
    #5
    It can be done by a php calling function cat id=0
     
    MeetHere, Dec 29, 2007 IP
  6. articledirectory

    articledirectory Peon

    Messages:
    1,704
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Can you explain that in more detail please?
     
    articledirectory, Dec 29, 2007 IP
  7. MeetHere

    MeetHere Prominent Member

    Messages:
    15,399
    Likes Received:
    994
    Best Answers:
    0
    Trophy Points:
    330
    #7
    {if $category.ID eq 0}

    html code or any blah blah blah
    {/if}

    whatever you want to show only on homepage, put under bla bla blah :D
     
    MeetHere, Dec 29, 2007 IP
    articledirectory likes this.
  8. articledirectory

    articledirectory Peon

    Messages:
    1,704
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Thank you sooooo much, it worked a treat, lots of ++ rep for you kind sir :)
     
    articledirectory, Dec 29, 2007 IP
  9. YIAM

    YIAM Notable Member

    Messages:
    2,480
    Likes Received:
    240
    Best Answers:
    0
    Trophy Points:
    280
    #9
    The above code will work, but the TLA links will be still showing at few other pages like latest links, top hits, search result page etc.
    try this:
    {if $category.ID eq 0 and not $list and not $search}
    html code or any blah blah blah
    {/if}

    and to stop showing it on submit page, detail page, include the code in main.tpl in place of footer.tpl
     
    YIAM, Dec 29, 2007 IP
  10. articledirectory

    articledirectory Peon

    Messages:
    1,704
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Cheers, I didnt notice that, i modified the if statement, and for the details and submit page i changed footer.php to footer2.php and created a duplicate footer file without the tla code.

    Thanks alots guys :)
     
    articledirectory, Dec 29, 2007 IP
  11. MeetHere

    MeetHere Prominent Member

    Messages:
    15,399
    Likes Received:
    994
    Best Answers:
    0
    Trophy Points:
    330
    #11
    my code will not show links only in category pages.

    But on all details pages, top hits, submit page etc.

    How to prevent the homepage link showing on all the link details pages ?
     
    MeetHere, Dec 29, 2007 IP
  12. articledirectory

    articledirectory Peon

    Messages:
    1,704
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #12
    i changed footer.tpl to footer2.tpl in the details.tpl file and created a duplicate footer file without the tla code called footer2.tpl and that worked a treat :) it now only showing on homepage and no other pages.
     
    articledirectory, Dec 29, 2007 IP
  13. MeetHere

    MeetHere Prominent Member

    Messages:
    15,399
    Likes Received:
    994
    Best Answers:
    0
    Trophy Points:
    330
    #13
    LOL thats a trick.. but i am sure there would be some code to cancel details page call.
     
    MeetHere, Dec 29, 2007 IP