PHP Classes

Clarification on some helper functions and theming

Recommend this page to a friend!

      PHP Classes blog  >  Working with CodeIgni...  >  All threads  >  Clarification on some helper...  >  (Un) Subscribe thread alerts  
Subject:Clarification on some helper...
Summary:... i'll like you to clarify some points you made which are not
Messages:14
Author:fadojutimi temitayo
Date:2015-05-03 21:58:08
Update:2015-09-15 14:16:00
 
  1 - 10   11 - 14  

  1. Clarification on some helper...   Reply   Report abuse  
Picture of fadojutimi temitayo fadojutimi temitayo - 2015-05-03 22:05:13
Hello, thank you for this wonderful tutorial. I must confess it's been helpful and as a matter of fact, that's what i'm using.

But i'll like you to clarify some points you made which are not clear. I read up about theming with codeigniter and i would love to implement it in my project but i do not understand how to go about it since i now use the Modular Extension with Smarty.

I'll appreciate it if you can give a detailed explanation on this.

Thank you.

  2. Re: Clarification on some helper...   Reply   Report abuse  
Picture of Carlos Sanchez Carlos Sanchez - 2015-05-04 00:52:55 - In reply to message 1 from fadojutimi temitayo
Have you made Codeigniter v3 work with Smarty and HMVC?

im having problems when im trying to put under modules the smarty files

for ex: application/modules/welcome/views

it doesnt recognize it


  3. Re: Clarification on some helper...   Reply   Report abuse  
Picture of fadojutimi temitayo fadojutimi temitayo - 2015-05-04 06:02:44 - In reply to message 2 from Carlos Sanchez
Yes Sanchez, i use it with v3.0 and it's working fine.

The problem should arise from your Smarty config in application/config if i clearly understood you.

There's no much difference implementing it in v3.0. Please read up the tutorial again and do it step by step as explained.

Let me know if you got it.

  4. Re: Clarification on some helper...   Reply   Report abuse  
Picture of Carlos Sanchez Carlos Sanchez - 2015-05-04 19:47:56 - In reply to message 3 from fadojutimi temitayo
I've done it several times and still getting the same errors:

A PHP Error was encountered

Severity: User Notice

Message: Undefined property: Smarty::$template_ext

Filename: Smarty/Smarty.class.php

Line Number: 738

Backtrace:

File: C:\wamp\www\ci3hmvcsmarty\application\third_party\Smarty\Smarty.class.php
Line: 738
Function: trigger_error

File: C:\wamp\www\ci3hmvcsmarty\application\libraries\MY_Parser.php
Line: 168
Function: __get

File: C:\wamp\www\ci3hmvcsmarty\application\modules\welcome\controllers\welcome.php
Line: 28
Function: parse

File: C:\wamp\www\ci3hmvcsmarty\index.php
Line: 292
Function: require_once

An uncaught Exception was encountered

Type: SmartyException

Message: Missing template name

Filename: C:\wamp\www\ci3hmvcsmarty\application\third_party\Smarty\sysplugins\smarty_internal_template.php

Line Number: 679

Backtrace:

File: C:\wamp\www\ci3hmvcsmarty\application\third_party\Smarty\sysplugins\smarty_internal_templatebase.php
Line: 119
Function: __get

File: C:\wamp\www\ci3hmvcsmarty\application\libraries\MY_Parser.php
Line: 186
Function: fetch

File: C:\wamp\www\ci3hmvcsmarty\application\modules\welcome\controllers\welcome.php
Line: 28
Function: parse

File: C:\wamp\www\ci3hmvcsmarty\index.php
Line: 292
Function: require_once

  5. Re: Clarification on some helper...   Reply   Report abuse  
Picture of fadojutimi temitayo fadojutimi temitayo - 2015-05-04 20:29:20 - In reply to message 4 from Carlos Sanchez
In application/config/smarty.php, look for $config['plugins_directory'], change 'myplugins' to 'plugins'. Create a folder in your application directory and name it 'modules'. Create a subfolder and name it 'welcome'. Create another folder inside welcome, and name it controllers. Move the controller file in application/controller to the one in welcome/controllers. Remember, there is an 's' in the controller, model, and view folders under welcome. I followed the same step and it worked. Let me know if you got it.

  6. Re: Clarification on some helper...   Reply   Report abuse  
Picture of fadojutimi temitayo fadojutimi temitayo - 2015-05-04 20:29:40 - In reply to message 4 from Carlos Sanchez
Also, are you sure you downloded the most recent smarty? The latest version is 3.0.*

  7. Re: Clarification on some helper...   Reply   Report abuse  
Picture of Carlos Sanchez Carlos Sanchez - 2015-05-05 00:48:40 - In reply to message 6 from fadojutimi temitayo
yes i downloaded Smarty 3.1.21, and still have the same errors:

A PHP Error was encountered

Severity: User Notice

Message: Undefined property: Smarty::$template_ext

Filename: Smarty/Smarty.class.php

Line Number: 738

Backtrace:

File: C:\wamp\www\ci3hmvcsmarty\application\third_party\Smarty\Smarty.class.php
Line: 738
Function: trigger_error

File: C:\wamp\www\ci3hmvcsmarty\application\libraries\MY_Parser.php
Line: 168
Function: __get

File: C:\wamp\www\ci3hmvcsmarty\application\modules\welcome\controllers\Welcome.php
Line: 28
Function: parse

File: C:\wamp\www\ci3hmvcsmarty\index.php
Line: 292
Function: require_once

An uncaught Exception was encountered

Type: SmartyException

Message: Missing template name

Filename: C:\wamp\www\ci3hmvcsmarty\application\third_party\Smarty\sysplugins\smarty_internal_template.php

Line Number: 679

Backtrace:

File: C:\wamp\www\ci3hmvcsmarty\application\third_party\Smarty\sysplugins\smarty_internal_templatebase.php
Line: 119
Function: __get

File: C:\wamp\www\ci3hmvcsmarty\application\libraries\MY_Parser.php
Line: 186
Function: fetch

File: C:\wamp\www\ci3hmvcsmarty\application\modules\welcome\controllers\Welcome.php
Line: 28
Function: parse

File: C:\wamp\www\ci3hmvcsmarty\index.php
Line: 292
Function: require_once


can you upload a clean install of yours? so i can see if im doing something wrong ?

  8. Re: Clarification on some helper...   Reply   Report abuse  
Picture of fadojutimi temitayo fadojutimi temitayo - 2015-05-05 02:35:10 - In reply to message 7 from Carlos Sanchez
I would have loved to but i've started work on it. Don't worry, i'll upload a clean install for you once i get to office.


  9. Re: Clarification on some helper...   Reply   Report abuse  
Picture of Carlos Sanchez Carlos Sanchez - 2015-05-05 19:33:11 - In reply to message 8 from fadojutimi temitayo
ok thank you, ill wait for it

  10. Re: Clarification on some helper...   Reply   Report abuse  
Picture of fadojutimi temitayo fadojutimi temitayo - 2015-05-09 20:29:06 - In reply to message 9 from Carlos Sanchez
Hey Carlos, i don't know if the reason why you are not getting yours right is a bug or something. I just faced the same problem and i realized that creating an empty 'Smarty.php' file in your 'system/libraries/' folder will do the trick. Let me know if it works for you. I'm working on getting it on my blog soon, will let you know when im done

 
  1 - 10   11 - 14