Part of the EllisLab Network
   
3 of 3
3
Modulated Templated CMS system
Posted: 17 March 2008 05:53 AM   [ Ignore ]   [ # 21 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  209
Joined  09-07-2007

@xwero - you are very correct about this. I will do this when I have time and stuff is more organized and commented. Thank you.

 Signature 

smarty-hmvc-enviroment-variables

Profile
 
 
Posted: 17 March 2008 11:38 AM   [ Ignore ]   [ # 22 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  209
Joined  09-07-2007

each template has a config file inside app/views/smarty/templates/CLIENT_1/config/theme.php

<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');
/*

THEME CONFIGURATION FILE

*/

//ARRAY : load these theme styles
$config['theme_css']=array(
'assets/css/cssEA.css',
'assets/css/lightbox.css'
);
//ARRAY : load these theme javascript files
$config['theme_js']=array(
'assets/js/prototype.js',
'assets/js/scriptaculous.js?load=effects.js',
'assets/js/lightbox.js'
);
//STRING : show this many results per page
$config['page_size']="20";
//ARRAY : load these templates to for smarty
$config['template_layout']=array(
'head',
'foot',
'banner',
'left',
'content',
'right',
'sections',
'admin_head',
'admin_foot',
'admin_banner',
'admin_left',
'admin_content',
'admin_right',
'admin_login'
);

$config['template_pages']=array(
'front_page'=>'page',//front_page key creates this page as the index_tpl key compared inside tepmlate w/ current_action
'about',
'color_trends_2008',
'contact',
'portfolio',
'renovations',
'services',
'message_sent'
);


$config['template_admin']=array(
'admin/manage_page',
'admin/pages',
'admin/sections',
'admin/templates',
'admin/account'
);

$config['template_images_dir']='assets/images/';
$config['template_swf_dir']='assets/swf/';
$config['template_pdf_dir']='assets/pdf/';

ENJOY! smile

 Signature 

smarty-hmvc-enviroment-variables

Profile
 
 
Posted: 17 March 2008 11:45 AM   [ Ignore ]   [ # 23 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  372
Joined  02-04-2008

Dude why are you pasting all your code here. This is very hard to follow. Why not just attach the files, and then briefly explain whats going on.

Profile
 
 
Posted: 17 March 2008 11:52 AM   [ Ignore ]   [ # 24 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  209
Joined  09-07-2007
louis w - 17 March 2008 11:45 AM

Dude why are you pasting all your code here. This is very hard to follow. Why not just attach the files, and then briefly explain whats going on.

okay, your right. sorry. I guess I was trying to get it started. I’ll make a lib on the wiki.

 Signature 

smarty-hmvc-enviroment-variables

Profile
 
 
Posted: 17 March 2008 08:01 PM   [ Ignore ]   [ # 25 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  209
Joined  09-07-2007

there’s a lib available at teh wiki:

http://codeigniter.com/wiki/Smarty_HMVC_Environment_Variables_Lib/

I have two things to say right quick, This lib is far from finished and it’s all in the technique, I’ve included some POC code in this lib let’s see if anyone can find it.

 Signature 

smarty-hmvc-enviroment-variables

Profile
 
 
Posted: 11 May 2008 01:06 PM   [ Ignore ]   [ # 26 ]  
Summer Student
Total Posts:  3
Joined  04-21-2008

Hi, I have some trouble getting this working, also have some random thoughts.

1. examples here are little out of sync with these code on googlecode. I think it is worth to mention about this in the first post.

2. well ok, actually it works - but only partially - I can see your picture in the sample theme and nothing more (no css loaded, no header, footer, body - nothing). Also themes are named different (there is no blue/light theme....so you need to change that manually - I guesss you forgot to update the config/environ.php file)

3. most of the source code is somewhat hard to read (too many line spaces:). It s not really a problem, because we can use some php code beautifier.

4. I can’t access sample admin module (via siteaddress.com/index.php/admin) - I’am getting blank page without errors

5. After all - maybe this is fault of my dev environment (windows xp) - I’ve created correct symlink (aka junction point - target is:  d:\dev\ci\system\app\views\smarty\templates) you mentioned in INSTALL file, but with or without it everything behaves the same.

Besides that, after reading almost whole forum, I found your code could be the best way to start developing some scalable cms form the beginning (using ci).

please - can you review your examples on googlecode again?

thanks.

Profile
 
 
Posted: 12 June 2008 09:41 PM   [ Ignore ]   [ # 27 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  209
Joined  09-07-2007

I’m aware that it’s out of sync. I’ve placed this project on a back burner due to it’s complexity. I don’t have time these days. Sorry. Smarty and Modular Extensions combined with environ makes this a beautiful work of art, with some bugs smile When you see blank page try to debug it step by step with print_r() you will see a dump of all vars and see mismatched variable references from code.

 Signature 

smarty-hmvc-enviroment-variables

Profile
 
 
   
3 of 3
3
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 719, on June 06, 2008 10:16 AM
Total Registered Members: 61049 Total Logged-in Users: 17
Total Topics: 73853 Total Anonymous Users: 0
Total Replies: 398362 Total Guests: 318
Total Posts: 472215    
Members ( View Memberlist )