Part of the EllisLab Network
   
2 of 2
2
Smarty HMVC Environment Variables 1.0.5
Posted: 07 May 2008 09:18 PM   [ Ignore ]   [ # 11 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  203
Joined  09-07-2007

Sorry for taking so long to get back to you. the error you are getting on lines 74 and 76 is due to the fact that an array is not being loaded to merge with $data to be passed to the module and in turn the template. Make sure that you are properly loading your template layout from the database to be merged into the data array inside your default_controller and your modules. This makes those variables available within your templates to be loaded at run time.

 Signature 

Restrict who can interact with your PHP application
Get Developer Access

Profile
 
 
Posted: 01 September 2008 04:15 AM   [ Ignore ]   [ # 12 ]  
Summer Student
Total Posts:  2
Joined  09-01-2008

A PHP Error was encountered
Severity: Notice

Message: Undefined index: template_layout

Filename: controllers/default_controller.php

Line Number: 74

A PHP Error was encountered
Severity: Warning

Message: array_merge() [function.array-merge]: Argument #2 is not an array

Filename: controllers/default_controller.php

Line Number: 74

A PHP Error was encountered
Severity: Warning

Message: array_merge() [function.array-merge]: Argument #1 is not an array

Filename: controllers/default_controller.php

Line Number: 76

A PHP Error was encountered
Severity: Warning

Message: array_merge() [function.array-merge]: Argument #2 is not an array

Filename: controllers/home.php

Line Number: 49

have the same problem as well
but i cant seem to find out where is the problem…
can u help me ?

Profile
 
 
Posted: 04 September 2008 01:50 PM   [ Ignore ]   [ # 13 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  203
Joined  09-07-2007

I apologize for not replying sooner. The fix for your problem is this:

you need to cread static links from the templates located inside default_templates to the ones in your current template…do this for all you templates to have default template parts.
cd to your current template and do ln -sf ../../default_template/page pages
# this makes your pages to be the same accoss templates and so on

root@apex:/var/www/env# ln -sf application/views/smarty/templates/ templates
root@apex:/var/www/env/application/views/smarty/templates/EAI# ln -sf ../../default_template/sections/ sections
root@apex:/var/www/env/application/views/smarty/templates/EAI# ln -sf ../../default_template/controls/ controls
root@apex:/var/www/env/application/views/smarty/templates/EAI# ln -sf ../../default_template/pages/ pages
root@apex:/var/www/env/application/views/smarty/templates/EAI# ln -sf ../../default_template/admin_pages/ admin_pages
root@apex:/var/www/env/application/views/smarty/templates/EAI# ln -sf ../../default_template/admin_layout/ admin_layout 

The thing with the template directory structure is that you have to have links going back to your default template in order for things to work properly across multiple templates with the same content on them. Let me know if that worked for you. I’m working on updating this cms for the public domain. Hopefully you will see it here soon.

 Signature 

Restrict who can interact with your PHP application
Get Developer Access

Profile
 
 
Posted: 04 September 2008 04:02 PM   [ Ignore ]   [ # 14 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  203
Joined  09-07-2007

Make sure that your application/ directory structure is as follows:

application/
    
config/
        
autoload.php
        config
.php
        
...
        
environ.php
        
...
        
routes.php
        smarty_parser
.php
        
...
    
controllers/
        
default_controller.php
    errors
/
        ...
    
helpers/
        ...
        
modules_helper.php
        
...
    
hooks/
        ...
    
language/
        ...
    
libraries/

        
smarty/  #smarty lib
        
...
        
environ.php
        
...
        
modular_extensions.php # works with ME 4.0.22 and close cousin variants
        
...
        
smarty_parser.php
        
...
    
models/
        ...
        
environ_model.php
        
...
        
template_model.php
        
...
    
modules/
        
admin/
            
controllers/
                
admin.php
            methods
/
                
account.php
                controls
.php
                login
.php
                logout
.php
                pages
.php
                sections
.php
                templates
.php
                
...
        
home/
            
controllers/
                
home.php
                
...
            
methods/
                ...
    
views/
        
smarty/
            
default_template/
                
admin_controls/
                    
tpl_add_new_page.php
                    tpl_edit_page
.php
                    tpl_pages_control
.php
                    
...
                
admin_layout/
                    
tpl_admin_banner.php
                    tpl_admin_content
.php
                    tpl_admin_foot
.php
                    tpl_admin_head
.php
                    tpl_admin_left
.php
                    tpl_admin_login
.php
                    tpl_admin_right
.php
                    
...
                
admin_pages/
                    
tpl_admin_account.php
                    tpl_admin_manage_page
.php
                    tpl_admin_pages_edit
.php
                    tpl_admin_pages
.php
                    tpl_admin_sections
.php
                    tpl_admin_templates
.php
                    tpl_admin_users
.php
                    
...
                
controls# use with jquery to load controls....beyond scope here
                    
...
                
pages/
                    
tpl_about.php
                    tpl_contact
.php
                    
...
                    
tpl_main_page.php
                    tpl_message_sent
.php
                    tpl_page
.php
                    tpl_services
.php
                    
...
                
sections/
                    ...
                    
tpl_sections_contact_form.php
                    
...
            
templates/
                
dark/
                    
admin_layout#ln -sf ../../default_template/admin_layout/ admin_layout
                    
admin_pages/  #ln -sf ../../default_template/admin_pages/ admin_pages
                    
assets/
                        
css/
                            ...
                            
style.css
                            
...
                        
images/
                            ...
                        
js/
                            ...
                            
jquery.js
                            
...
                        
pdf/
                            ...
                        
swf/
                            ...
                            
ads.swf
                            
...
                    
config/
                        
theme.php
                    controls
#ln -sf ../../default_template/controls/ controls
                    
json_controls/
                        ...
                    
layout/
                        ...
                        
tpl_banner.php
                        tpl_content
.php
                        tpl_foot
.php
                        tpl_head
.php
                        tpl_left
.php
                        tpl_mod_categories
.php
                        tpl_right
.php
                        tpl_sections
.php
                        
...
                    
pages#ln -sf ../../default_template/pages/ pages
                    
sections#ln -sf ../../default_template/sections/ sections
                    
xml_controls/
                        ...
                    
tpl_admin.php
                    tpl_control
.php
                    tpl_controls_error
.php
                    tpl_index
.php
                light
/
                    *
RECURSION*
templates#ln -sf application/views/smarty/templates/ templates 

This thing is so powerful. Makes it kinda difficult to maintain the links, redirects and templates between template changes. unless you link your template located inside application.views/smarty/templates/template to template.

I’m using this cms for the base of multiple system right now and it’s wonderful. The only thing I don’t like is that it currently loads all template pages defined for a template even though not being displayed. But this I will attempt to fix in the next upcoming version.

 Signature 

Restrict who can interact with your PHP application
Get Developer Access

Profile
 
 
Posted: 06 March 2009 10:04 AM   [ Ignore ]   [ # 15 ]  
Summer Student
Total Posts:  1
Joined  03-06-2009

Hello


I have a problem !!

A PHP Error was encountered
Severity
Notice

Message
Undefined indextemplate_layout

Filename
controllers/default_controller.php

Line Number
38

A PHP Error was encountered
Severity
Warning

Message
array_merge() [function.array-merge]Argument #2 is not an array

Filenamecontrollers/default_controller.php

Line Number
38

A PHP Error was encountered
Severity
Warning

Message
array_merge() [function.array-merge]Argument #1 is not an array

Filenamecontrollers/default_controller.php

Line Number
39

A PHP Error was encountered
Severity
Warning

Message
array_merge() [function.array-merge]Argument #2 is not an array

Filenamecontrollers/home.php

Line Number
25 

Site: http://www.gfxhost.info/en/

Profile
 
 
   
2 of 2
2