Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 7 8 [9]

Author Topic: [MOD] Different templates wherever you want (version independent)  (Read 42129 times)

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: [MOD] Different templates wherever you want (version independent)
« Reply #120 on: November 30, 2008, 05:04:31 pm »

Have you tried including the file... that's included in the file included in the page... in the snews.php file somewhere after the startup and title functions... instead of within the file that it is included in now? This should make its script(s) available when snews.php - already included at the top of index.php (template file) loads up.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Slickwilly789

  • Newbie
  • *
  • Karma: 0
  • Posts: 19
Re: [MOD] Different templates wherever you want (version independent)
« Reply #121 on: November 30, 2008, 05:55:51 pm »

Hey Keys,

Yea I was going to try that last night... let me try it now and see if it works.

Edit: Tried what you said keys, doesn't work. Also tried just placing the entire included file within the contact page, and then updating the file paths it included... still nothing. I have the contact form set up in its own folder, outside of snews, and it is working on localhost.
« Last Edit: November 30, 2008, 07:01:36 pm by Slickwilly789 »
Logged

jean

  • Newbie
  • *
  • Karma: 0
  • Posts: 21
Re: [MOD] Different templates wherever you want (version independent)
« Reply #122 on: December 12, 2009, 02:16:25 am »

Sorry for English. my English is not good

I use this mode

<? php session_start () include ( 'snews.php');

template function () (
$ uri = $ _SERVER [ 'REQUEST_URI'];
switch (true):
 
 //------------- templates for pages should be listed beneath this comment .----------

 # If index.php is in a subdirectory, insert that name as well, like: case ($ uri == '/ subdirectory /'):
case ($ uri =='/'):
include ( 'frontpage.php') break;

 # If index.php is in a subdirectory, insert that name as well, like: case ($ uri == '/ subdirectory / category / a-special-page /'):
case ($ uri == '/ category / a-special-page /'):
include ( 'that-particular-page.php') break;

//------------- TEMPLATES FOR CLASSES MUST BE LISTED BENEATH THIS HOW .----------

case (ereg ( '/ a-specific-category /', $ uri)):
include ( 'show-off.php') break;

        case (ereg ( '/ another-category /', $ uri)):
include ( 'cool-template.php') break;

/ / Default template for everything else (always last):
default:
include ( 'everythingelse.php');
endcase;
)
templates ();
?>

Everything works but I can not comment on the articles. Why??
 My index is in the directory called lacongolaise my case ($ uri == '/lacongolaie/'):

Logged

Joost

  • Guest
Re: [MOD] Different templates wherever you want (version independent)
« Reply #123 on: December 12, 2009, 04:13:17 am »


Everything works but I can not comment on the articles. Why??
 

Do you have any reason to believe this is caused by this mod?
Logged
Pages: 1 ... 7 8 [9]