Simple Static Page Support...

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 12-06-2006, 03:02 PM
sixlaneve's Avatar
Casual Pligger
 
Join Date: Dec 2006
Location: Rome
Posts: 69
Send a message via ICQ to sixlaneve Send a message via AIM to sixlaneve
Just another suggestion...

any simple static page generator? Just to be able to have pages for privacy policy, toc, about us, etc.?
Reply With Quote
  #2 (permalink)  
Old 12-06-2006, 07:19 PM
Constant Pligger
 
Join Date: Nov 2006
Location: La Romana, Dominican Rep..
Posts: 123
Send a message via MSN to disier
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');
you will change it to this
Code:
define('pagename', 'custom'); 
$main_smarty->assign('pagename', pagename);

$main_smarty->assign('tpl_center', $the_template . '/custom_center');
now just go to the template folder and duplicate the files faq-en.tpl and faq-en_center.tpl and save it with the name that you want check my test page on

http://noticias.tanibol.com/test.php

Thank you for you I discover this i was needing to do a few custom pages.
Reply With Quote
  #3 (permalink)  
Old 06-02-2007, 02:05 PM
AshDigg's Avatar
Mayor of PliggVille/Coder
 
Join Date: Dec 2005
Posts: 1,515
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.
Attached Files
File Type: zip custom.zip (1.1 KB, 405 views)
Reply With Quote
  #4 (permalink)  
Old 06-03-2007, 12:55 AM
SoapTaco's Avatar
Casual Pligger
Pligg Version: 9.9.0
Pligg Template: All
 
Join Date: Nov 2006
Location: Detroit, MI
Posts: 78
Send a message via Skype™ to SoapTaco
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:
{*

If you want to use PHP you'll use...
<?php include './include.php';
echo $n2s_output; ?>

*}
Otherwise I followed all the instructions, is it possible to use this sort of article acript with Pligg? I can't see why not, and if it is then this open source script might be a solution that others could benefit from as well.

Huge ups to all that look at this and give it a moments thought!

David
Reply With Quote
  #5 (permalink)  
Old 06-03-2007, 12:59 AM
AshDigg's Avatar
Mayor of PliggVille/Coder
 
Join Date: Dec 2005
Posts: 1,515
You'll want something like this

PHP Code:
{php}
include 
'./include.php';
echo 
$n2s_output;
{/
php

Quote:
Originally Posted by SoapTaco View Post
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.


Otherwise I followed all the instructions, is it possible to use this sort of article acript with Pligg? I can't see why not, and if it is then this open source script might be a solution that others could benefit from as well.

Huge ups to all that look at this and give it a moments thought!

David
Reply With Quote
  #6 (permalink)  
Old 06-03-2007, 02:45 PM
SoapTaco's Avatar
Casual Pligger
Pligg Version: 9.9.0
Pligg Template: All
 
Join Date: Nov 2006
Location: Detroit, MI
Posts: 78
Send a message via Skype™ to SoapTaco
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
Reply With Quote
  #7 (permalink)  
Old 06-04-2007, 02:51 PM
SoapTaco's Avatar
Casual Pligger
Pligg Version: 9.9.0
Pligg Template: All
 
Join Date: Nov 2006
Location: Detroit, MI
Posts: 78
Send a message via Skype™ to SoapTaco
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.
Reply With Quote
  #8 (permalink)  
Old 06-04-2007, 03:01 PM
SoapTaco's Avatar
Casual Pligger
Pligg Version: 9.9.0
Pligg Template: All
 
Join Date: Nov 2006
Location: Detroit, MI
Posts: 78
Send a message via Skype™ to SoapTaco
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.
Reply With Quote
  #9 (permalink)  
Old 06-21-2007, 12:27 PM
Constant Pligger
Pligg Version: 1.1.3
 
Join Date: Oct 2006
Posts: 191
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
Reply With Quote
  #10 (permalink)  
Old 07-06-2007, 03:43 AM
jrothra's Avatar
Constant Pligger
Pligg Version: 9.9.5
Pligg Template: Silverbullet
 
Join Date: Apr 2007
Location: Fort Worth, TX
Posts: 179
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}!&nbsp;&nbsp;
			{if $isadmin eq 1} <a href="{$URL_admin}">{#PLIGG_Visual_Header_AdminPanel#}</a> &nbsp;&nbsp; {/if}		
			<a href='{$my_base_url}{$my_pligg_base}'>{#PLIGG_Visual_Home#}</a> &nbsp;&nbsp;
			<a href="{$URL_userNoVar}">{#PLIGG_Visual_Profile#}</a> &nbsp;&nbsp;
			{checkActionsTpl location="tpl_sidebar_logged_in_just_below_profile"}
			<a href='{$URL_topusers}'>{#PLIGG_Visual_Top_Users#}</a> &nbsp;&nbsp;
			{if $Enable_Tags eq 'true'}<a href="{$URL_tagcloud}">{#PLIGG_Visual_Tags#}</a> &nbsp;&nbsp; {/if}
			<a href="{$URL_logout}">{#PLIGG_Visual_Logout#}</a> &nbsp;&nbsp;
		{else}
			<a href='{$my_base_url}{$my_pligg_base}'>{#PLIGG_Visual_Home#}</a> &nbsp;&nbsp;
			<a href='{$URL_login}'>{#PLIGG_Visual_Login_Title#}</a> &nbsp;&nbsp;
			<a href='{$URL_register}'>{#PLIGG_Visual_Register#}</a> &nbsp;&nbsp;
			<a href='{$URL_topusers}'>{#PLIGG_Visual_Top_Users#}</a> &nbsp;&nbsp;
			{if $Enable_Tags eq 'true'}<a href="{$URL_tagcloud}">{#PLIGG_Visual_Tags#}</a> &nbsp;&nbsp; {/if}
		{/if}
		 <a href="http://www.faithtag.com/module.php?module=ajaxcontact">Contact Us</a> &nbsp;&nbsp;

	</ul>
</div>
Now, what do I enter to create the link to my static page?

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.
Reply With Quote
Reply

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


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development