Giter VIP home page Giter VIP logo

kohana_smarty3's People

Contributors

mranchovy avatar nikulinsasa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kohana_smarty3's Issues

I can't update smarty core library

The smarty version you are using on your module is Smarty 3.0.8 and when trying to replace the library to the latest one it does not work and produce errors. Isn't it possible to update the ore library?

Documentation corrections

The README.md file needs a bit of tidying - some backticks missing, and the link to the Wiki is wrong!

The requested view index.tpl could not be found

On my localhost (Windows), I have this module working fine. On my server (Debian), Kohana can't find my template files. (Both server and local have the same file versions, and server has correct permissions on all files.) This applies to all of my controllers which display a view (with the appropriate template file substituted, of course).

Kohana is dying at SYSPATH/classes/Kohana/View.php when Kohana::find_file('views', $file) fails to find the template. A cursory look over find_file suggested to me that it may be trying to look for index.tpl.php instead of index.tpl. I added echo $path.'<br>'; to find_file to confirm my suspicions, and I was correct: on my localhost, one of the lines output is views\index.tpl, while on my server, I see views/index.tpl.php.

However, I discovered another oddity. Here is the full list of paths Kohana is looking for on each of my server and my local machine:

LOCAL:                                             SERVER:
classes\I18n.php                                   classes/I18n.php
classes\Kohana\I18n.php                            classes/Kohana/I18n.php
classes\HTTP.php                                   classes/HTTP.php
classes\Kohana\HTTP.php                            classes/Kohana/HTTP.php
classes\Kohana\Exception.php                       classes/Kohana/Exception.php
classes\Kohana\Kohana\Exception.php                classes/Kohana/Kohana/Exception.php
classes\Log.php                                    classes/Log.php
classes\Kohana\Log.php                             classes/Kohana/Log.php
classes\Config.php                                 classes/Config.php
classes\Kohana\Config.php                          classes/Kohana/Config.php
classes\Log\File.php                               classes/Log/File.php
classes\Kohana\Log\File.php                        classes/Kohana/Log/File.php
classes\Log\Writer.php                             classes/Log/Writer.php
classes\Kohana\Log\Writer.php                      classes/Kohana/Log/Writer.php
classes\Config\File.php                            classes/Config/File.php
classes\Kohana\Config\File.php                     classes/Kohana/Config/File.php
classes\Kohana\Config\File\Reader.php              classes/Kohana/Config/File/Reader.php
classes\Kohana\Config\Reader.php                   classes/Kohana/Config/Reader.php
classes\Kohana\Config\Source.php                   classes/Kohana/Config/Source.php
classes\Route.php                                  classes/Route.php
classes\Kohana\Route.php                           classes/Kohana/Route.php
classes\Cookie.php                                 classes/Cookie.php
classes\Kohana\Cookie.php                          classes/Kohana/Cookie.php
classes\Session.php                                classes/Session.php
classes\Kohana\Session.php                         classes/Kohana/Session.php
classes\Request.php                                classes/Request.php
classes\Kohana\Request.php                         classes/Kohana/Request.php
classes\HTTP\Request.php                           classes/HTTP/Request.php
classes\Kohana\HTTP\Request.php                    classes/Kohana/HTTP/Request.php
classes\HTTP\Message.php                           classes/HTTP/Message.php
classes\Kohana\HTTP\Message.php                    classes/Kohana/HTTP/Message.php
classes\HTTP\Header.php                            classes/HTTP/Header.php
classes\Kohana\HTTP\Header.php                     classes/Kohana/HTTP\Header.php
classes\Request\Client\Internal.php                classes/Request/Client/Internal.php
classes\Kohana\Request\Client\Internal.php         classes/Kohana/Request/Client/Internal.php
classes\Request\Client.php                         classes/Request/Client.php
classes\Kohana\Request\Client.php                  classes/Kohana/Request/Client.php
classes\Arr.php                                    classes/Arr.php
classes\Kohana\Arr.php                             classes/Kohana/Arr.php
classes\Response.php                               classes/Response.php
classes\Kohana\Response.php                        classes/Kohana/Response.php
classes\HTTP\Response.php                          classes/HTTP/Response.php
classes\Kohana\HTTP\Response.php                   classes/Kohana/HTTP/Response.php
classes\Profiler.php                               classes/Profiler.php
classes\Kohana\Profiler.php                        classes/Kohana/Profiler.php
classes\Controller\Home.php                        classes/Controller/Home.php
classes\Controller\HFTemplate.php                  classes/Controller/HFTemplate.php
classes\Controller\Template.php                    classes/Controller/Template.php
classes\Kohana\Controller\Template.php             classes/Kohana/Controller/Template.php
classes\Controller.php                             classes/Controller.php
classes\Kohana\Controller.php                      classes/Kohana/Controller.php
classes\View.php                                   classes/View.php
classes\Kohana\View.php                            classes/Kohana/View.php
classes\Smarty\View.php
config\smarty.php
classes\Config\Group.php
classes\Kohana\Config\Group.php
vendor\smarty/libs/Smarty.class.php
classes\URL.php
classes\Kohana\URL.php
classes\Smarty\Helper.php
classes\Kohana\Smarty\Helper.php
views\index.tpl                                    views/index.tpl.php
classes\Auth.php
classes\Kohana\Auth.php
config\auth.php
classes\Auth\ORM.php
classes\Kohana\Auth\ORM.php
config\session.php
classes\Session\Database.php
classes\Kohana\Session\Database.php
classes\Database.php
classes\Kohana\Database.php
config\database.php
classes\Database\PDO.php
classes\Kohana\Database\PDO.php
classes\DB.php
classes\Kohana\DB.php
classes\Database\Query\Builder\Select.php
classes\Kohana\Database\Query\Builder\Select.php
classes\Database\Query\Builder\Where.php
classes\Kohana\Database\Query\Builder\Where.php
classes\Database\Query\Builder.php
classes\Kohana\Database\Query\Builder.php
classes\Database\Query.php
classes\Kohana\Database\Query.php
classes\Database\Result\Cached.php
classes\Kohana\Database\Result\Cached.php
classes\Database\Result.php
classes\Kohana\Database\Result.php
classes\ORM.php
classes\Kohana\ORM.php
classes\Model.php
classes\Kohana\Model.php
classes\Model\User.php
classes\Model\Auth\User.php
classes\Inflector.php
classes\Kohana\Inflector.php
config\inflector.php
classes\UTF8.php
classes\Kohana\UTF8.php
classes\Model\Role.php
classes\Model\Auth\Role.php
                                                   classes/View/Exception.php
                                                   classes/Kohana/View/Exception.php
                                                   classes/Debug.php
                                                   classes/Kohana/Debug.php
                                                   classes/Date.php
                                                   classes/Kohana/Date.php
                                                   views/kohana/error.php
                                                   classes/Text.php
                                                   classes/Kohana/Text.php
(page content)                                     (exception page content)
classes\Database\Query\Builder\Update.php
classes\Kohana\Database\Query\Builder\Update.php

Notice the large gap where Kohana should be looking for Smarty module classes. Any ideas?

debugging mode for smarty

Hi! I have a problem trying to switch on debugging mode in smarty using your module.
I'm putting 'debugging' => true, in config file, but nothing happens. Can you help me? :)

Kohana Route engine available.

This module seems not available access to kohana route engine.
What i mean?
in-template access to make route paths

bootstrap.php

Route::set('default', '(<controller>(/<action>(/<id>)))')
    ->defaults(array(
        'controller' => 'main',
        'action'     => 'index',
    ));

somewhere in .tpl
{route name='default' controller='somecontroller' action='notindex'}

can you add this? it will be very usefull.

Need to be able to use different file extensions

I'm trying to integrate Smarty into Dreamweaver (CC 2014) but the .tpl extension is already being used by DW so I need to be able to use a different extension for smarty templates.

If I use a different extension for my smarty templates, the smarty module is unable to find the file.

It would be great if a configuration option could be added to allow different extensions to be used.

Issues in magic methods __isset and __get

Hello!
I found issues in classes\Smarty\View.php file:

  1. In magic method __get() should be:
if ( $var instanceof Smarty_Undefined_Variable ) {

instead of

if ( $var instanceof Undefined_Smarty_Variable ) {
  1. In magic method __isset() should be:
return $this->_smarty->getVariable($key)->value!==NULL;

instead of

return $this->_smarty->getVariable($key)->value===NULL;

Don't auto-register the helper object

There is no reason to do this, it should be possible to do this as a global variable in the controller's before method - this might need some other way of invoking Smarty without a template for which the legacy 'smarty:' syntax will be ideal.

Doesn't work with Kohana 3.2.2

It looks like 'View' has not been overwritten.

Trying load a view $view = View::factory('template_name.tpl'); I'm getting an error 'The requested view template_name.tpl could not be found'. I found out that system is trying to find 'template_name.tpl.php' file.

how to use path & demo doesn't seems to be working

the demo doesn't seems to be working at /smarty/smartydemo

127 throw new SmartyException("Unable to load template {$_template->source->type} '{$_template->source->name}'{$parent_resource}");

also how can I include css/images/js ?
below is my structure and I want to include my assets (css or js or images) on index.tpl or core.tpl
I also want to know how can I attach images in my style.css

| default
    | assets
        | js
            script.js
        | css
            - style.css
        | images
            - logo.png
    | elements
    | layouts
        - core.tl
    - index.tpl

I tried with different combinations but it doesn't seems to be working at all.

Class 'Smarty' not found when using View::bind_global

With this simple code:

public function before ()
{
    parent::before();
    $v = 'test';
    View::bind_global('V', $v);
}

I got the following error in Kohana 3.2:

2011-08-10 07:54:45 --- ERROR: ErrorException [ 1 ]: Class 'Smarty' not found ~ MODPATH/smarty/classes/view.php [ 45 ]
2011-08-10 07:54:45 --- STRACE: ErrorException [ 1 ]: Class 'Smarty' not found ~ MODPATH/smarty/classes/view.php [ 45 ]
--
#0 [internal function]: Kohana_Core::shutdown_handler()
#1 {main

With the following output:

MODPATH/smarty/classes/view.php [ 45 ]

40  * @param   mixed   referenced variable
41  * @return  void
42  */
43 public static function bind_global($key, & $value) {
44   View::$_global_data[$key] = &$value;
45   Smarty::$global_tpl_vars[$key] = new Smarty_variable($value, $nocache);
46   Smarty::$global_tpl_vars[$key]->value = &$value;
47   return $this;
48 }
49 
50 /**

Using View::set_global seems to work well. I notice that View::bing_global want to use a Smarty_variable object; maybe this class is not loaded ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.