View Single Post
  #4 (permalink)  
Old 02-16-2008, 12:55 AM
redwine's Avatar
redwine redwine is offline
Pligg Donor
 
Join Date: Jul 2007
Location: Canada
Posts: 216
Thanks: 20
Thanked 102 Times in 65 Posts
Title

Quote:
Originally Posted by kidblogger View Post
Here's what I've came up with:

PHP Code:
<?php
// The source code packaged with this file is Free Software, Copyright (C) 2005 by
// Ricardo Galli <gallir at uib dot es>.
// It's licensed under the AFFERO GENERAL PUBLIC LICENSE unless stated otherwise.
// You can get copies of the licenses here:
//         http://www.affero.org/oagpl.html
// AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING".
 
include_once('Smarty.class.php');
$main_smarty = new Smarty;
 
include(
'config.php');
include(
mnminclude.'html1.php');
include(
mnminclude.'link.php');
include(
mnminclude.'smartyvariables.php');
 
// sidebar
$main_smarty do_sidebar($main_smarty);
 
// breadcrumbs and page title
$navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Breadcrumb_About');
$navwhere['link1'] = getmyurl('about'$dblang);
$main_smarty->assign('navbar_where'$navwhere);
 
// pagename
define('pagename''faq-en'); 
$main_smarty->assign('pagename'pagename);
 
// show the template
$main_smarty->assign('tpl_center''contact');
$main_smarty->display($the_template '/pligg.tpl');
?>
That works perfectly for my "contact us" page. I can now go to mysite.com/contact.php
Anybody know how can I change the page title?
The title of the page is loaded in the pligg.tpl file in your templates folder with this statement:

Code:
<title>{if isset($pretitle)}{$pretitle}{/if}{#PLIGG_Visual_Name#}{if isset($posttitle)}{$posttitle}{/if}</title>
So we are looking for the $posttitle variable.

To assign a title to a page, you have to assign the variable in the block // breadcrumbs and page title.

Example:

You created a "Agreement" page.

The block section // breadcrumbs and page title normally includes the following:
Code:
// breadcrumbs and page titles
$navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_User_Agreement');
$navwhere['link1'] = getmyurl('agreement', '');
$main_smarty->assign('navbar_where', $navwhere);
$main_smarty->assign('posttitle', " / " . $main_smarty->get_config_vars('PLIGG_Visual_User_Agreement')); 

Make sure you add this to the /libs/lang.conf (if version is not 9.9.0) or /languages/lang_english.conf (for v9.9.0)
Code:
//<SECTION>BREADCRUMBS</SECTION><ADDED>0.73</ADDED>
PLIGG_Visual_User_Agreement = "Agreement" 
Reply With Quote