Login

Member statsTotal: 186Latest: MiguelGuests online: 6Members online: 0
EmailLogin here

Location
ForumHelp & Support • Problems including with another template

Access: Member
Total posts: 1

Status: Offline
Problems including with another template Quote 

Hi!! I really like this news script!!
I only have one problem.  In one of my pages I want to change the template to one i made myself to show the news in fulltext. But when i make the include i get the standard (default style template instead...

Here is the code im using.

<?php
$template = 'Plain style';
include 'http://www.myhomepage.se/U2/news/index.php'; #example 'news/index.php';
?>      

What is the problem here do I need to do anything else??
12:55pm 17th Jul 08  
Access: Admin
Total posts: 169

Status: Offline
Re: Problems including with another template Quote 

Quote:
Hi!! I really like this news script!!
I only have one problem.  In one of my pages I want to change the template to one i made myself to show the news in fulltext. But when i make the include i get the standard (default style template instead...

Here is the code im using.

<?php
$template = 'Plain style';
include 'http://www.myhomepage.se/U2/news/index.php'; #example 'news/index.php';
?>      

What is the problem here do I need to do anything else??

The problem seems to be the code you are using to include the news

PHP Code:
$template = 'Plain style';
include 'http://www.myhomepage.se/U2/news/index.php'; #example 'news/index.php';


try removing the first line, then whilst logged into the system, goto Options>Templates and select the template you wish to use as default.
06:45am 7th Aug 08
_______________
Chris - Network-13
Access: Member
Total posts: 12

Status: Offline
Re: Problems including with another template Quote 

I found one bug in the templating, but it might not be what is your problem directly.  When you create a duplicate template from the original, the last two fields (News Structure and Comments Structure) in the template editor do not get copied over.

The default has this:

News Structure: {news}
{pagintation}


Comments Structure: {news}
{comments}
{commentspagintation}
{commentsform}


I haven't researched why it isn't copying over or what these two fields really do for the template, but it was something I noticed which fixed my custom template to allow it to work.

Now my resolution doesn't quite answer the original question but it definitely goes hand in hand if creating a new one and it doesn't work properly.  The code he supplied looks ok, other than verifying if things were spelled properly.


Hope this helps someone even if it isn't quite the full solution.
-Sam
Sweet script by the way.
01:03am 21st Aug 08  
Last edited by Slinkysam at 01:10am 21st Aug 08
Access: Admin
Total posts: 169

Status: Offline
Re: Problems including with another template Quote 

Thanks for pointing this out Sam. I've added this to the list of things to do for the next version. :happy:
01:16am 21st Aug 08
_______________
Chris - Network-13
Post a reply!