1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

phpld: adding an "about us" page

Discussion in 'Directories' started by Pixelrage, Apr 11, 2007.

  1. #1
    Can someone please help me out with adding an 'about us' to my phpld directory? I've asked this question on their paid support forum and never got an answer. On top of that, I've found a thread on this topic on their forum, which was from 2 years ago, and the code no longer works with the current version.

    Thanks
     
    Pixelrage, Apr 11, 2007 IP
  2. butterfingers

    butterfingers Well-Known Member

    Messages:
    1,142
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    128
    #2
    Me too. I tried to follow the FAQ / sticky in the forum But can't make it.
     
    butterfingers, Apr 11, 2007 IP
  3. aspidov

    aspidov Well-Known Member

    Messages:
    2,875
    Likes Received:
    272
    Best Answers:
    0
    Trophy Points:
    175
    #3
    Let's start with the version of phpld you guys are working with.
     
    aspidov, Apr 11, 2007 IP
  4. enQuira

    enQuira Peon

    Messages:
    1,584
    Likes Received:
    250
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I don't know if there is the functionality of addnind pages from the control panel in the latest versions, but what you can do is copy the source code of a page of your directory, remove all what you don't need and add the about us text. of course you will have to add a link to that page in the menu.
     
    enQuira, Apr 11, 2007 IP
  5. Pixelrage

    Pixelrage Peon

    Messages:
    5,083
    Likes Received:
    128
    Best Answers:
    0
    Trophy Points:
    0
    #5
    aspidov: I have 3.1.0 running

    mhamdi: there is no function, but I'm completely baffled as to why they couldn't add such a simple thing. Believe me, I've fought with attempting to add a page, and it never works, these TPL files are so frustrating.
     
    Pixelrage, Apr 11, 2007 IP
  6. vegabond

    vegabond Shabu Anower

    Messages:
    1,656
    Likes Received:
    289
    Best Answers:
    0
    Trophy Points:
    240
    #6
    Make a file name about.php with this code:
    
    <?php
    require_once 'init.php';
    echo $tpl->fetch('about.tpl');
    ?>
    
    PHP:
    and

    Make a file name about.tpl with this code:
    
    {capture name="title"} - {l}About Us{/l}{/capture}
    {capture assign="in_page_title"}{l}About our directory{/l}{/capture}
    {capture assign="description"}{l}Information About our directory{/l}{/capture} 
    {include file="header.tpl"}
    {include file="top_bar.tpl"}
    {strip}
    
    
    <p>
    Your Info here
    </p>
    
    
    {include file="footer.tpl"}
    {/strip}
    
    Code (markup):

    Place this tpl file under your templates folder and place php file into main root.

    Not it's easy? :D
     
    vegabond, Apr 11, 2007 IP
  7. aspidov

    aspidov Well-Known Member

    Messages:
    2,875
    Likes Received:
    272
    Best Answers:
    0
    Trophy Points:
    175
    #7
    vegabond was faster :)
     
    aspidov, Apr 11, 2007 IP
  8. vegabond

    vegabond Shabu Anower

    Messages:
    1,656
    Likes Received:
    289
    Best Answers:
    0
    Trophy Points:
    240
    #8
    he he he :D
     
    vegabond, Apr 11, 2007 IP
    butterfingers likes this.
  9. LeopardAt1

    LeopardAt1 Well-Known Member

    Messages:
    880
    Likes Received:
    126
    Best Answers:
    0
    Trophy Points:
    135
    #9
    gj vegabond ! :) i gave u a green rep for that.
     
    LeopardAt1, Apr 11, 2007 IP
    vegabond likes this.
  10. butterfingers

    butterfingers Well-Known Member

    Messages:
    1,142
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    128
    #10
    green rep for him too...
    I'm gonna try your code..
     
    butterfingers, Apr 11, 2007 IP
    vegabond likes this.
  11. Pixelrage

    Pixelrage Peon

    Messages:
    5,083
    Likes Received:
    128
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Hi vegabond, I tried that out, but I'm getting this when I visit "about.php"

    :(
     
    Pixelrage, Apr 11, 2007 IP
  12. LeopardAt1

    LeopardAt1 Well-Known Member

    Messages:
    880
    Likes Received:
    126
    Best Answers:
    0
    Trophy Points:
    135
    #12
    markn, may be something in your title....copy and paste line 2 of about.php
     
    LeopardAt1, Apr 11, 2007 IP
  13. vegabond

    vegabond Shabu Anower

    Messages:
    1,656
    Likes Received:
    289
    Best Answers:
    0
    Trophy Points:
    240
    #13
    Same thing is working fine at http://allthelink.com/about.php

    No idea what's up with you.
     
    vegabond, Apr 11, 2007 IP
  14. Pixelrage

    Pixelrage Peon

    Messages:
    5,083
    Likes Received:
    128
    Best Answers:
    0
    Trophy Points:
    0
    #14
    whoa.. that's really weird. Here's my line 2 of about.php:

     
    Pixelrage, Apr 11, 2007 IP
  15. LeopardAt1

    LeopardAt1 Well-Known Member

    Messages:
    880
    Likes Received:
    126
    Best Answers:
    0
    Trophy Points:
    135
    #15
    k from what i can see, not sure why your getting that error either :confused:
     
    LeopardAt1, Apr 11, 2007 IP
  16. aspidov

    aspidov Well-Known Member

    Messages:
    2,875
    Likes Received:
    272
    Best Answers:
    0
    Trophy Points:
    175
    #16
    try this in your php file perharps

    
    <?php
    require_once 'init.php';
    
    $path   = array ();
    $path[] = array ('ID' => '0', 'TITLE' => _L(SITE_NAME)     , 'TITLE_URL' => DOC_ROOT, 'DESCRIPTION' => SITE_DESC);
    $path[] = array ('ID' => '0', 'TITLE' => _L('About Us'), 'TITLE_URL' => ''      , 'DESCRIPTION' => _L('About Us'));
    $tpl->assign('path', $path);
    
    //Clean whitespace
    $tpl->load_filter('output', 'trimwhitespace');
    
    //Compress output for faster loading
    if (COMPRESS_OUTPUT == 1)
       $tpl->load_filter('output', 'CompressOutput');
    
    //Make output
    echo $tpl->fetch('about.tpl');
    ?>
    
    Code (markup):
    i dont think this code will make any difference with your problem though. you could at least try
     
    aspidov, Apr 11, 2007 IP
  17. Pixelrage

    Pixelrage Peon

    Messages:
    5,083
    Likes Received:
    128
    Best Answers:
    0
    Trophy Points:
    0
    #17
    I'm getting the same error...what the hell?!
     
    Pixelrage, Apr 11, 2007 IP
  18. paidhosting

    paidhosting Peon

    Messages:
    4,822
    Likes Received:
    483
    Best Answers:
    0
    Trophy Points:
    0
    #18
    Download any of my templates you see at :
    http://www.freephpldtemplates.sbclansite.com/ , those that come with the contact.php page, you can just modify it and edit the codes and use {include} function to include the pages. I never use the init.php to code any of the pages. Sorry but i cannot access my site right now cause server banned me for too many connections so cannot post the code, so download few packages and read the readme i think i placed some info there.

    Cheers
     
    paidhosting, Apr 11, 2007 IP
  19. Pixelrage

    Pixelrage Peon

    Messages:
    5,083
    Likes Received:
    128
    Best Answers:
    0
    Trophy Points:
    0
    #19
    thanks! I'll take a look at the code in that template. Hopefully that will do it.

    Does it require a .TPL file for contact.php?
     
    Pixelrage, Apr 11, 2007 IP
  20. paidhosting

    paidhosting Peon

    Messages:
    4,822
    Likes Received:
    483
    Best Answers:
    0
    Trophy Points:
    0
    #20
    All you do to .tpl file is place a link on main , and other tpl files to that contact.php page, contact.php page is nothing more than your html or other coding, it just does not use our smarty template anymore. Its like coding ur html page with same theme as ur phpld template, well atleast thats how i do coding to make it easy for me, instead of just coding header and footer tpl files.
     
    paidhosting, Apr 11, 2007 IP