Go Back   Pligg CMS Forum > Pligg Help > Customization Assistance

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-18-2007, 06:31 AM
Casual Pligger
 
Join Date: Sep 2007
Posts: 47
Thanks: 3
Thanked 0 Times in 0 Posts
how to: include php files in header

Normaly this goes with include command but where do i put include code and how do i use include.
I try several options in pligg.tpl and in header.tpl all i got is crash and eror.

Well please help me and tell me how i use command include with pligg and where should i put that code.
I need to include file between <head> </head>
Reply With Quote
  #2 (permalink)  
Old 10-18-2007, 08:22 AM
dollars5's Avatar
Pligg is my love :)
 
Join Date: Dec 2006
Location: India
Posts: 2,153
Thanks: 290
Thanked 266 Times in 177 Posts
in tpl to use/write php code you will need to wrap that code with {php} {/php} tags
Reply With Quote
The Following User Says Thank You to dollars5 For This Useful Post:
  #3 (permalink)  
Old 10-18-2007, 03:50 PM
Casual Pligger
 
Join Date: Sep 2007
Posts: 47
Thanks: 3
Thanked 0 Times in 0 Posts
ok but can you tell me in which file i need to include this and how do i use include command, there are many ways, whats best way with pligg, i know many of you included something, its most common command, so please help me.
Reply With Quote
  #4 (permalink)  
Old 10-18-2007, 05:03 PM
crakez's Avatar
Designer
Pligg Version: 9.8.2
Pligg Template: Fresh Template
 
Join Date: Jul 2007
Location: Australia
Posts: 141
Thanks: 14
Thanked 8 Times in 6 Posts
Send a message via MSN to crakez Send a message via Skype™ to crakez
{php}include('yourfilename.php');{/php} in yourfilename.tpl file and then you can call the tpl file by adding {include file=$tpl_yourfilename.".tpl"} in header.

-John
Reply With Quote
  #5 (permalink)  
Old 10-25-2007, 12:09 PM
New Pligger
Pligg Version: 9.7
Pligg Template: yget
 
Join Date: Oct 2007
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Glad you asked this, helped me, too. Thanks for all that responded.
__________________
Wordpress Themes and other stuff -
That's Profound
Reply With Quote
  #6 (permalink)  
Old 10-26-2007, 12:22 PM
New Pligger
Pligg Version: 9.8beta
Pligg Template: -
 
Join Date: Oct 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks! This helps me too
Reply With Quote
  #7 (permalink)  
Old 10-26-2007, 08:04 PM
New Pligger
 
Join Date: Dec 2006
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Trying this but I the error below. Where do the files belong?
Do I need to edit the class.template.php in some way?

Fatal error: TPL: [in line 0]: syntax error: file '.tpl' does not exist in C:\wamp\www\plg\class.template.php on line 923
Reply With Quote
  #8 (permalink)  
Old 12-11-2007, 08:34 AM
Casual Pligger
 
Join Date: Sep 2007
Posts: 47
Thanks: 3
Thanked 0 Times in 0 Posts
had same eror, then i use this:
{include file="yourfilename.tpl"}
but then i had some other error with file that i want to include, some database error thats maybe not corespondent to including files


so try this and say.
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 Off
[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
Include a php file inside a custom .tpl? animas General Help 1 01-12-2008 11:58 PM
Pligg Errors tcritic General Help 1 08-15-2007 01:28 PM
cann't vote in pligg (buliding 802) haxhax Bug Report 27 03-10-2007 06:53 AM
dreamhost and validation image problem Xanatos Installation and Upgrade Help 17 01-17-2007 01:14 PM
/var/log/httpd/error_log messages gr8rcake Bug Report 3 01-28-2006 09:28 PM


Search Engine Friendly URLs by vBSEO 3.2.0