Just another suggestion...
any simple static page generator? Just to be able to have pages for privacy policy, toc, about us, etc.?


![]() |
| | Thread Tools | Display Modes |
| ||||
|
Just another suggestion... any simple static page generator? Just to be able to have pages for privacy policy, toc, about us, etc.? |
| |||
|
I try it and yes it is posible, you just need to create 3 files copy this 3 files and rename it as you want in my example I rename it to custom root folder/faq.php = custom.php (name of the page that you want) root folder/templates/faq-en.tpl = custom.tpl root folder/templates/faq-en_center.tpl = custom_center.tpl open faq.php in pligg's root folder and edit this on line 22 Code: define('pagename', 'faq-en');
$main_smarty->assign('pagename', pagename);
$main_smarty->assign('tpl_center', $the_template . '/faq-en_center'); Code: define('pagename', 'custom');
$main_smarty->assign('pagename', pagename);
$main_smarty->assign('tpl_center', $the_template . '/custom_center'); http://noticias.tanibol.com/test.php Thank you for you I discover this i was needing to do a few custom pages. |
| ||||
|
I've attached an update version of the code above to work with 9.5/9.6. Upload the custom.php file into your pligg folder and the custom_center.tpl file into your /templates/yget folder. If you want to rename the .php file there should be no problems. If you rename the .tpl file, change line 5 in the .php file. You can use static text in the .tpl file or if you look at it there is an example of how to include some PHP to make it more dynamic. |
| ||||
|
Does anyone have any idea if this script would work with this static custom.php just described? Here are the instructions... http://www.ownaboat.com/news/docu/docu.html It is a simple script in that you add a php statement to the top of the content page, and then another for the output somewhere in the body. I have tried to add the following to the custom.php file... Put your text here. Quote:
Huge ups to all that look at this and give it a moments thought! David |
| ||||
|
You'll want something like this PHP Code: Quote:
|
| ||||
|
When I do that I get: Warning: Invalid argument supplied for foreach() in /home/ownaboat/public_html/news/include/module.class.inc.php on line 234 Fatal error: Cannot redeclare class smarty in /home/ownaboat/public_html/news/include/library/Smarty/libs/Smarty.class.php on line 65 |
| ||||
|
okay, it seems like whenever I get close to a solution here on these forums I hit this wall. I either figure it out myself or move on, this time I am going to move on, for some reason when I insert the php code into that template file it is causing an error. So I am just going to create static pages for all of the articles now I suppose.
|
| ||||
|
Hey Ash, Now that I have scrapped the CMS idea and am just using static pages I have run into one other problem, the character set doesn't seem to be right... I am getting the question mark things for each apostrophe...quick fix? Also CSS formatting, I have inserted an image and placed h space but it is being ignored, the <p> and <h> tags also seem to be ignored. |
| |||
|
AshDigg... I used your zip files on v9.6. Thank you for the same. However the nav links at the top are not actually carried/inherited from teh actual pligg site. They seem to eb really stand alone pages. Though i have actually logged into pligg on this custom page, it is showing the login link instead of logout. How can i get those links also inherited. Also the links to published and upcoming pages are missing. Thanks for any help. My Pligg Sites: startupbug.com |
| ||||
|
Creating the static page with this system was VERY easy! Thank you. Now I have one more question. Okay, I feel silly asking this, but I'm not sure how to do this with all the if... then phrases. I'm wanting to add a link to the static page I just made and put the link in the nav section in gray at the top (FaithTag / Published News) The code for the header that includes that (header.tpl) is as follows (I think): Code: <div id="headbar" style="padding-bottom:2px;">
<ul>
{if $user_authenticated eq true}
{#PLIGG_Visual_Welcome_Back#} {if $UseAvatars neq "0"} <img src="{$Current_User_Avatar_ImgSrc}" alt="Avatar" align="absmiddle"/>{/if} {$user_logged_in}!
{if $isadmin eq 1} <a href="{$URL_admin}">{#PLIGG_Visual_Header_AdminPanel#}</a> {/if}
<a href='{$my_base_url}{$my_pligg_base}'>{#PLIGG_Visual_Home#}</a>
<a href="{$URL_userNoVar}">{#PLIGG_Visual_Profile#}</a>
{checkActionsTpl location="tpl_sidebar_logged_in_just_below_profile"}
<a href='{$URL_topusers}'>{#PLIGG_Visual_Top_Users#}</a>
{if $Enable_Tags eq 'true'}<a href="{$URL_tagcloud}">{#PLIGG_Visual_Tags#}</a> {/if}
<a href="{$URL_logout}">{#PLIGG_Visual_Logout#}</a>
{else}
<a href='{$my_base_url}{$my_pligg_base}'>{#PLIGG_Visual_Home#}</a>
<a href='{$URL_login}'>{#PLIGG_Visual_Login_Title#}</a>
<a href='{$URL_register}'>{#PLIGG_Visual_Register#}</a>
<a href='{$URL_topusers}'>{#PLIGG_Visual_Top_Users#}</a>
{if $Enable_Tags eq 'true'}<a href="{$URL_tagcloud}">{#PLIGG_Visual_Tags#}</a> {/if}
{/if}
<a href="http://www.faithtag.com/module.php?module=ajaxcontact">Contact Us</a>
</ul>
</div> EDIT ----- Okay, I feel really foolish now. I just created a standard link to the page and it worked. I guess the lesson is this: don't overlook the simple things just because other things seem to confuse you. I got lost in the if... then PHP and didn't think about a standard link. The standard link worked. Last edited by jrothra; 07-06-2007 at 04:00 AM. |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Page Variables | Yankidank | Wiki Articles | 3 | 05-19-2011 09:21 AM |
| Static Home Page - newbie question. | koolkatwebdesigns | Questions and Comments | 1 | 06-04-2009 04:40 PM |
| How To Have Static SEO Friendly Page? | mastertrader | Questions and Comments | 1 | 08-06-2008 08:42 PM |
| Creating Static Page | whiteclothed | Questions and Comments | 3 | 02-16-2008 01:55 AM |
| How to make a static page | cooldudeny | Questions and Comments | 3 | 12-07-2007 02:03 PM |