Go Back   Pligg CMS Forum > Pligg Development > Modification Tutorials

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-17-2008, 04:31 AM
New Pligger
Pligg Version: 9.9.9
Pligg Template: Default
 
Join Date: Jan 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Creating Static Page

Hi... I would like to create a static page and put a navigational button linking to that page. It is easily done in other CMS like Joomla. But I cannot do it in Pligg.

So far I have been loggin in from front-end as administrator... should I login through any specific page to get more access to the site configuration?

(I think I did that once after the installation, but I lost the url. silly me)
Reply With Quote
  #2 (permalink)  
Old 01-17-2008, 06:16 AM
Banned
Pligg Version: 9.8.
Pligg Template: Custom
 
Join Date: Feb 2007
Location: Canada
Posts: 849
Thanks: 74
Thanked 49 Times in 45 Posts
Try this:

http://forums.pligg.com/30857-post3.html


Geoserv
Reply With Quote
  #3 (permalink)  
Old 02-15-2008, 11:46 PM
New Pligger
 
Join Date: May 2007
Posts: 27
Thanks: 3
Thanked 1 Time in 1 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?
Reply With Quote
  #4 (permalink)  
Old 02-16-2008, 12:55 AM
redwine's Avatar
Pligg Donor
Pligg Version: 9.8
Pligg Template: custom templat
 
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
Reply

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
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Page Variables Yankidank Wiki Articles 1 08-13-2008 03:59 AM
How to make a static page cooldudeny General Help 3 12-07-2007 01:03 PM
Creating Static Pages... SoapTaco General Help 2 06-02-2007 04:11 PM
9.1 :: Errors keep pouring in after succesfully Creating Tables The Edifier Installation and Upgrade Help 1 05-01-2007 01:15 PM
creating static pages? stevelucky General Help 0 06-29-2006 02:06 PM


Search Engine Friendly URLs by vBSEO 3.2.0