• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: [Fixed]$smarty->_current_file
PostPosted: Wed Jul 25, 2012 7:29 pm 
Offline
Power Poster
Power Poster

Joined: Thu Mar 01, 2007 9:44 am
Posts: 253
Location: Belgique
The value content:content_en in the variable $smarty->_current_file is now a string like d540fdf18880c4e881dd92fd9e7dc05ee28f9ea8
However, other values (globalcontent:***, content:pagedata...) still ok.

So, in the pre and post filters, the case "content" never happens.
Code:
function smarty_prefilter_precompilefunc($tpl_output, &$template)
{
  $smarty = $template->smarty;
   $result = explode(':', $smarty->_current_file);
   if (count($result) > 1)
   {
     if( startswith($result[0],'tmp_') ) $result[0] = 'template';

      switch ($result[0])
      {
      case 'stylesheet':
        Events::SendEvent('Core','StylesheetPreCompile',array('stylesheet'=>&$tpl_output));
        break;

         case "content":
            Events::SendEvent('Core', 'ContentPreCompile', array('content' => &$tpl_output));
            break;

      case 'tpl_top':
      case 'tpl_body':
      case 'tpl_head':
      case "template":
        Events::SendEvent('Core', 'TemplatePreCompile', array('template' => &$tpl_output,'type'=>$result[0]));
        break;

         case "globalcontent":
            Events::SendEvent('Core', 'GlobalContentPreCompile', array('global_content' => &$tpl_output));
            break;
         default:
            break;
      }

   }

   Events::SendEvent('Core', 'SmartyPreCompile', array('content' => &$tpl_output));

   return $tpl_output;
}
?>


Last edited by Jean le Chauve on Thu Jul 26, 2012 7:09 pm, edited 4 times in total.

Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: $smarty->_current_file
PostPosted: Wed Jul 25, 2012 9:02 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 8020
Location: Fernie British Columbia, Canada
gach, okay I'll look into it.

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: $smarty->_current_file
PostPosted: Thu Jul 26, 2012 3:14 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 8020
Location: Fernie British Columbia, Canada
Fixed in svn.

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: $smarty->_current_file
PostPosted: Thu Jul 26, 2012 3:15 pm 
Offline
Power Poster
Power Poster

Joined: Thu Mar 01, 2007 9:44 am
Posts: 253
Location: Belgique
Great :)
Thank you

Sorry, if it's fixed for content_en, it still an other problem : evaluated template have the same bug ; it's value is a string like 49827e17aaeb246267be171d8e993eb407af77bf


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [Fixed but]$smarty->_current_file
PostPosted: Thu Jul 26, 2012 6:35 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 8020
Location: Fernie British Columbia, Canada
evaluated templates are evaluated as strings... not much we can do about that.

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [Fixed but]$smarty->_current_file
PostPosted: Thu Jul 26, 2012 7:09 pm 
Offline
Power Poster
Power Poster

Joined: Thu Mar 01, 2007 9:44 am
Posts: 253
Location: Belgique
Ok, Thank you for your answer.
This post is fixed.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting