Go Back   PHP Link Directory Forum > PHP Link Directory (phpLD) > Support (Version 2)

Support (Version 2) Here is where we provide limited support for version 2. If you are seeking support for version 3 please post in the phpLD 3.0 Support Forum.

Closed Thread
 
Thread Tools Display Modes
Old 04-05-2006   #1
Fred
 
Join Date: Feb 2006
Posts: 50
Default Add more pages...???

Sorry i now this sounds stuppid but i am trying to add more pages where i am trying to ad the footer and the header
but it all gets mesd up any one now where i can get more info or help

example i have my directory on {url no longer in service}
but i would like to have a page cald {url no longer in service} (for ex)
wich has the same header and footer but i can change the content of it

please help



Last edited by David; 03-26-2008 at 05:36 AM.
Fred is offline  
Old 04-05-2006   #2
Neticus
Supporter
 
Neticus's Avatar
 
Join Date: Dec 2005
Posts: 487
Default

Example: creating an 'About Us' page

1. Create a file called about.tpl place in templates folder where main.tpl is etc

about.tpl to contain:

Code:
{capture name="title"} - {l}About{/l}{/capture} 
{capture assign="in_page_title"}{l}About{/l}{/capture} 
{capture assign="description"}{l}About Us{/l}{/capture} 
{include file="header.tpl"} 
{include file="top_bar.tpl"}
 
 
Your Content Here.
 
 
{include file="footer.tpl"}

2. Create a file called about.php, place in root where index.php is etc.

about.php to contain:

Code:
<?php 
require_once './init.php'; 
 
$path = array (); 
$path[] = array ('ID' => '0', 'TITLE' => _L('SITE_NAME'), 'TITLE_URL' => DOC_ROOT, 'DESCRIPTION' => ''); 
$path[] = array ('ID' => '0', 'TITLE' => _L('About'), 'TITLE_URL' => '', 'DESCRIPTION' => _L('About')); 
$tpl->assign($data); 
$tpl->assign('path', $path); 
echo $tpl->fetch('about.tpl'); 
?>
Notice about.php fetches about.tpl (at the bottom)


3. Call the new page up by placing destination link wherever you want to place it, like this:

Code:
<a href="{$smarty.const.DOC_ROOT}/about.php">About Us</a>


You can use this template process for any other new pages you wish to create.


Net.

Last edited by Neticus; 05-09-2006 at 02:59 PM.
Neticus is offline  
Old 04-05-2006   #3
Fred
 
Join Date: Feb 2006
Posts: 50
Default

So if i want to put this in diffrent folders
for ex i want to put the about page in a folder cald about what do i do then?
Fred is offline  
Old 04-05-2006   #4
Fred
 
Join Date: Feb 2006
Posts: 50
Default

Quote:
Originally Posted by Neticus
Example: creating an 'About Us' page

Create a file called about.tpl place in templates folder where main.tpl is etc

about.tpl to contain:

Code:
{capture name="title"} - {l}About{/l}{/capture} 
{capture assign="in_page_title"}{l}About{/l}{/capture} 
{capture assign="description"}{l}About Us{/l}{/capture} 
{include file="header.tpl"} 
{include file="top_bar.tpl"}


Your Content Here.


{include file="footer.tpl"}

2.
Create a file called about.php, place in root where index.php is etc.

about.php to contain:

Code:
<?php 
require_once './init.php'; 

$path = array (); 
$path[] = array ('ID' => '0', 'TITLE' => _L('Home'), 'TITLE_URL' => DOC_ROOT, 'DESCRIPTION' => ''); 
$path[] = array ('ID' => '0', 'TITLE' => _L('About'), 'TITLE_URL' => '', 'DESCRIPTION' => _L('About')); 
$tpl->assign($data); 
$tpl->assign('path', $path); 
echo $tpl->fetch('about.tpl'); 
?>

Notice about.php fetches about.tpl (at the bottom)


You can use this template process for any other new pages you wish to create.


Net.

i tried but all i got is this...

Warning: Smarty error: unable to read resource: "about.tpl" in /home/busy/public_html/libs/smarty/Smarty.class.php on line 1088

please help :roll: :roll: :roll:
Fred is offline  
Old 04-05-2006   #5
anon
Supporter
 
anon's Avatar
 
Join Date: Feb 2006
Location: As far from you as humanly possible!
Posts: 2,893
Send a message via Yahoo to anon
Default

Quote:
Originally Posted by Fred


i tried but all i got is this...

Warning: Smarty error: unable to read resource: "about.tpl" in /home/busy/public_html/libs/smarty/Smarty.class.php on line 1088

please help :roll: :roll: :roll:
you put the about.tpl into the templates folder?
anon is offline  
Old 04-05-2006   #6
Fred
 
Join Date: Feb 2006
Posts: 50
Default

thanks
my problem is that i am trying to greate about 200 diffrent pages so i would like to have them in a sepprate folder is this possible

???
Fred is offline  
Old 04-06-2006   #7
Fred
 
Join Date: Feb 2006
Posts: 50
Default

Anyone???
Fred is offline  
Old 04-06-2006   #8
css59
Supporter
 
Join Date: Mar 2006
Location: USA
Posts: 352
Default

I don't see why not. Just make a folder and do the steps posted above. I think it will work
css59 is offline  
Old 04-06-2006   #9
Fred
 
Join Date: Feb 2006
Posts: 50
Default

Quote:
Originally Posted by css59
I don't see why not. Just make a folder and do the steps posted above. I think it will work
Yes but then i need to put the about.tpl in the template folder
i would like to put the about.tpl and the about.php in the about folder
and then have a folder for exampel2 with exampel2.tpl and exampel2.php
is this possible?
Cheers...


Fred
Fred is offline  
Old 04-20-2006   #10
Optimit
Supporter
 
Join Date: Dec 2005
Posts: 1,247
Default

I have not tried this, but I would imagine it should work.

Just put your folders in the templates folder. Then in the code for the php file in the root, change the fetch to look like I have it.

Code:
<?php
require_once './init.php';

$path = array ();
$path[] = array ('ID' => '0', 'TITLE' => _L('Home'), 'TITLE_URL' => DOC_ROOT, 'DESCRIPTION' => '');
$path[] = array ('ID' => '0', 'TITLE' => _L('About'), 'TITLE_URL' => '', 'DESCRIPTION' => _L('About'));
$tpl->assign($data);
$tpl->assign('path', $path);
echo $tpl->fetch('foldername/about.tpl');
?>
Optimit is offline  
Old 05-10-2006   #11
Steven Myers
Supporter
 
Steven Myers's Avatar
 
Join Date: May 2006
Posts: 1,178
Default

This worked like a charm, I just added a page and loaded it up and works flawlessly

Thanks guys
__________________
Hosting Feedback - General Web Directory
Steven Myers is offline  
Old 05-14-2006   #12
ewwharhar
 
ewwharhar's Avatar
 
Join Date: Apr 2006
Posts: 139
Default

EDIT:// nvm, fixed

Last edited by ewwharhar; 05-14-2006 at 09:17 PM.
ewwharhar is offline  
Old 07-21-2006   #13
devilishqueen
 
devilishqueen's Avatar
 
Join Date: Jul 2006
Location: down under!!!!!!!!!
Posts: 14
Send a message via Skype™ to devilishqueen
Default

HELP!!!!!!!!!!
Fatal error: Smarty error: unable to write to $compile_dir '/home/httpd/vhosts/808.com/httpdocs/ld/temp/templates'. Be sure $compile_dir is writable by the web server user. in /home/httpd/vhosts/808.com/httpdocs/ld/libs/smarty/Smarty.class.php on line 1088
devilishqueen is offline  
Old 07-21-2006   #14
devilishqueen
 
devilishqueen's Avatar
 
Join Date: Jul 2006
Location: down under!!!!!!!!!
Posts: 14
Send a message via Skype™ to devilishqueen
Default

Why Did I Get That? I Changed The Codes Like What's Instructed
devilishqueen is offline  
Old 07-21-2006   #15
Neticus
Supporter
 
Neticus's Avatar
 
Join Date: Dec 2005
Posts: 487
Default

@devilishqueen

Try deleting the template files from the /temp/templates folder. It's ok you can do this.
Neticus is offline  
Old 07-21-2006   #16
devilishqueen
 
devilishqueen's Avatar
 
Join Date: Jul 2006
Location: down under!!!!!!!!!
Posts: 14
Send a message via Skype™ to devilishqueen
Default

{url no longer in service}

can anyone help me how to get back to my directory wityhout that error message.. i tried to undo the changes and upload the files back.. but still the samne error..

Last edited by David; 03-26-2008 at 05:36 AM.
devilishqueen is offline  
Old 07-21-2006   #17
devilishqueen
 
devilishqueen's Avatar
 
Join Date: Jul 2006
Location: down under!!!!!!!!!
Posts: 14
Send a message via Skype™ to devilishqueen
Default

@neticus

are u sure? sorry..im just worried now.. :(
devilishqueen is offline  
Old 07-21-2006   #18
Neticus
Supporter
 
Neticus's Avatar
 
Join Date: Dec 2005
Posts: 487
Default

Have you done this in the INSTALL.txt:

Upload the files in the archive to your host.
Change permissions on the following file and four folders to 777
include/config.php
temp/
temp/adodb
temp/cache
temp/templates
If the folders do not exist please create them.
Neticus is offline  
Old 07-21-2006   #19
devilishqueen
 
devilishqueen's Avatar
 
Join Date: Jul 2006
Location: down under!!!!!!!!!
Posts: 14
Send a message via Skype™ to devilishqueen
Default

Fatal error: Smarty error: unable to write to $compile_dir '/home/httpd/vhosts/808.com/httpdocs/ld/temp/templates'. Be sure $compile_dir is writable by the web server user. in /home/httpd/vhosts/808.com/httpdocs/ld/libs/smarty/Smarty.class.php on line 1088

i still got the same error message
devilishqueen is offline  
Old 07-21-2006   #20
devilishqueen
 
devilishqueen's Avatar
 
Join Date: Jul 2006
Location: down under!!!!!!!!!
Posts: 14
Send a message via Skype™ to devilishqueen
Default

ok.. i just changed the permission on the four folders.. so what should i do next?

i just need to get the dir back.. without the error messages... :(
devilishqueen is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:58 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.