Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

SV: SV: [SMARTY] bug in block_function handling?
> -----Oprindelig meddelelse-----
> Fra: messju mohr [mailto:messju@lammfellpuschen.de]

...
 
> convention for 
>
> yes.
>
>
> BTW: do you clear your templates_c and your cache-directory between
> these tests? you should do that when switching around
> plugin-registrations or confusion will never end :)
>
>

Thank you Messju

I admit that I forgot to clear the cache_dir :(
and your answer restrict the field of things to try, so I tested the same
example 3 again,
This time after having removed everything both from the templates_c AND from
cache_dir.

I do get the same error (see below). Furthermore I can tell that when I turn
caching on I succed in getting a page with no error the first time I submit
my form, the error starts from the second time (? might be because of the
compile_check?)

below is the test:

In case 3 (registration needed)
In the application I have:
include_once('Smarty/Smarty_nocache_cmpt/block.nc.php');
$smartyDisplay->register_block('nc', 'php_component_nc', false);

the function is:
function php_component_nc($params, $content, &$this)
{
...
}
and the template has:
{nc}...{/nc}

It runs ok with no caching, when I enable caching as by  point c) above I
get the following error:

Fatal error: Smarty error: [in candidate/it.tpl line 29]: [plugin] could not
load plugin file 'block.nc.php' (core.load_plugins.php, line 118) in
/usr/share/munk_php/Smarty-2.6.6/libs/Smarty.class.php on line 1088


Thanks again
Paolo

Report this thread to moderator Post Follow-up to this message
Old Post
Paolo Nesti Poggi
10-21-04 01:57 PM


Re: SV: SV: [SMARTY] bug in block_function handling?
On Thu, Oct 21, 2004 at 02:20:35PM +0200, Paolo Nesti Poggi wrote: 
>
> ...
> 
>
> Thank you Messju
>
> I admit that I forgot to clear the cache_dir :(
> and your answer restrict the field of things to try, so I tested the same
> example 3 again,
> This time after having removed everything both from the templates_c AND fr
om
> cache_dir.
>
> I do get the same error (see below). Furthermore I can tell that when I tu
rn
> caching on I succed in getting a page with no error the first time I submi
t
> my form, the error starts from the second time (? might be because of the
> compile_check?)
>
> below is the test:
>
> In case 3 (registration needed)
> In the application I have:
> include_once('Smarty/Smarty_nocache_cmpt/block.nc.php');

FWIW you should follow the example from
http://smarty.php.net/manual/en/plugins.writing.php :

require_once $smarty->_get_plugin_filepath('block', 'nc');

> $smartyDisplay->register_block('nc', 'php_component_nc', false);
>
> the function is:
> function php_component_nc($params, $content, &$this)
> {
> ...
> }
> and the template has:
> {nc}...{/nc}
>
> It runs ok with no caching, when I enable caching as by  point c) above I
> get the following error:
>
> Fatal error: Smarty error: [in candidate/it.tpl line 29]: [plugin] could not
> load plugin file 'block.nc.php' (core.load_plugins.php, line 118) in
> /usr/share/munk_php/Smarty-2.6.6/libs/Smarty.class.php on line 1088
>
>
> Thanks again
> Paolo

Report this thread to moderator Post Follow-up to this message
Old Post
Messju Mohr
10-22-04 01:57 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Smarty Templates archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:25 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.