Go Back   Pligg CMS Forum > Other > Suggestions

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-06-2006, 02:02 PM
sixlaneve's Avatar
Casual Pligger
 
Join Date: Dec 2006
Location: Rome
Posts: 81
Thanks: 7
Thanked 6 Times in 5 Posts
Send a message via ICQ to sixlaneve Send a message via AIM to sixlaneve
Simple Static Page Support...

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, 06:19 PM
Constant Pligger
 
Join Date: Nov 2006
Posts: 150
Thanks: 30
Thanked 15 Times in 11 Posts
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, 01:05 PM
AshDigg's Avatar
Coder
 
Join Date: Dec 2005
Posts: 1,574
Thanks: 235
Thanked 345 Times in 206 Posts
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, 278 views)
__________________
- Ash
Reply With Quote
  #4 (permalink)  
Old 06-02-2007, 11:55 PM
SoapTaco's Avatar
Casual Pligger
Pligg Version: 9.9.0
Pligg Template: All
 
Join Date: Nov 2006
Location: Detroit, MI
Posts: 79
Thanks: 11
Thanked 2 Times in 2 Posts
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-02-2007, 11:59 PM
AshDigg's Avatar
Coder
 
Join Date: Dec 2005
Posts: 1,574
Thanks: 235
Thanked 345 Times in 206 Posts
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
__________________
- Ash
Reply With Quote
  #6 (permalink)  
Old 06-03-2007, 01:45 PM
SoapTaco's Avatar
Casual Pligger
Pligg Version: 9.9.0
Pligg Template: All
 
Join Date: Nov 2006
Location: Detroit, MI
Posts: 79
Thanks: 11
Thanked 2 Times in 2 Posts
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, 01:51 PM
SoapTaco's Avatar
Casual Pligger
Pligg Version: 9.9.0
Pligg Template: All
 
Join Date: Nov 2006
Location: Detroit, MI
Posts: 79
Thanks: 11
Thanked 2 Times in 2 Posts
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, 02:01 PM
SoapTaco's Avatar
Casual Pligger
Pligg Version: 9.9.0
Pligg Template: All
 
Join Date: Nov 2006
Location: Detroit, MI
Posts: 79
Thanks: 11
Thanked 2 Times in 2 Posts
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, 11:27 AM
Constant Pligger
 
Join Date: Oct 2006
Posts: 136
Thanks: 5
Thanked 0 Times in 0 Posts
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.
__________________
www.StartupBug.com : User submitted content for Entrepreneurs
www.tutoriALLs.com : ALL the user submitted tutoriALls in one place
Reply With Quote
  #10 (permalink)  
Old 07-06-2007, 02:43 AM
Constant Pligger
Pligg Version: 9.7 - updating is a MAJOR task
Pligg Template: Custom - complete redesign needed to update
 
Join Date: Apr 2007
Posts: 155
Thanks: 19
Thanked 2 Times in 2 Posts
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 03:00 AM..
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
Static page not working KPR General Help 1 04-10-2008 11:11 AM
Creating Static Page whiteclothed Modification Tutorials 3 02-16-2008 12:55 AM
How to make a static page cooldudeny General Help 3 12-07-2007 01:03 PM


Search Engine Friendly URLs by vBSEO 3.2.0