PHP Smarty Framework - plugin detail

Supports editing of SMARTY templates. On appropriate places works also all common HTML, PHP features.

NetBeans Plugin - PHP Smarty Framework
Plugin owner: marfous
Website: http://wiki.netbeans.org/PhpSmartyFrameworkPlugin
Added: 2011-03-26
License: GNU GPL v2 only or CDDL
Category: Programming Languages
Downloaded: 16,407 times
Rating:
 4.22, by 5 users

Plugin Log Show log

Versions available

Download plugin   Download size: 0.10 MB   Last Update: 2011-08-30

This plugin is also available on the NetBeans Plugin Portal Update Center. Use 'Tools > Plugins' action from the NetBeans IDE main menu for convenient installation of this plugin


What's new in this version

  • Syntax highlighting including coloring background of tags (if required)
  • Custom Smarty delimiters
  • Recognizing .TPL and Smarty projects (marking them with appropriate icon or badge icon)
  • Common HTML features outside the Smarty code and PHP features inside {php}{/php} tags
  • Basic code completion for Smarty functions and its atributes
  • New File wizard offers also creation of Smarty Template


Verifications for NetBeans versions

7.0 verification PASSED See verification details


Introduction

The PHP Smarty Framework module supports the creation and work with SMARTY templates (TPLs). Features include syntax coloring and code completion for SMARTY commands and basic HTML navigator and HTML code folding for .TPL files.

[ You have to be logged in to be able to comment. ]

User Comments

  

Re: Depth of scanned folders

Thanks for pointing me to such kind of troubles. I entered an issue for that to resolve it into the next NB version:
https://netbeans.org/bugzilla/show_bug.cgi?id=236007
Posted by marfous on Sep 16, 2013
  

Depth of scanned folders

I have the problem that my Smarty-Template-Files are located in a special folder that is deeper than level 3 from project-base. Is it possible, to add a specific folder to the scanned folders?
Posted by splattermania on Sep 14, 2013
  

Re: Use of smarty tpl file

Sorry, I don't understand your comment, could you specify it better into mail to marfous[at]netbeans[dot].org please?
Posted by marfous on May 02, 2013
  

Use of smarty tpl file

Hello all, how to include tpl smarty template file in php file in netbeans? can i get a small example?
Posted by arpitj on May 01, 2013
  

Re: UTF8 bug

Thanks for letting know. Actually the most important is to have it working since 7.1 (since part of distribution). So glad to hear that everything works well there.

Actually the encoding code should be also for 7.0 the same so it's question if it's really just Smarty bug there (mostly it works there well as well). So shortly, I would like to everybody recommend use newest release as soon as it will be released. Thanks for your understanding...
Posted by marfous on Dec 18, 2011
  

UTF8 bug

I had the same problem described by Dariofg. Tpl files were always saved in UTF8 even if the project is defined as ISO8859. I just tested the Netbeans 7.1RC2 and it seems to be ok with this version.
Thanks

Posted by adn on Dec 18, 2011
  

Re: Installed but not usable in IDE

There is not bundled Smarty libs for now. The Smarty support is mostly about the editor in .tpl files. I will think more about that that I would bundle the Smarty library for NB7.2 - also depends on the license.
Posted by marfous on Dec 01, 2011
  

Installed but not usable in IDE

The Smarty framework is installed in IDE 7.0.1 but not usable in project why no appear in "PHP Frameworks".
.JAR modules are installed solely for Symfony and for Zend frameworks!
Posted by antoniog on Dec 01, 2011
  

Re: Parsing problems

Thanks for letting me know. Actually, it's already entered issue:
http://netbeans.org/bugzilla/show_bug.cgi?id=201667

And I believe that I will be able to fix that into NB7.1 (where will be smarty part of standard distribution).
Posted by marfous on Oct 18, 2011
  

Parsing problems

An 'Unexpected symbol(s) found:":" ' is fired by this legal code:

<div style="{foreach from=$styles key=key item=item}{$key}:{$item};{/foreach}">


Another problem can be stumbled upon when one has Javascript inside the template:


function msgDbg(msg){ldelim}
{if $user_level eq "10"}
alert(msg);
{/if}
return false;
{rdelim}

This launches a "missing { before body"

Whoo, it was difficult to edit the code readable. The technology of this forum has passed its 'best before' date a long time ago.
Posted by mkn on Oct 18, 2011
  

Re: Still UTF-8 bug with 1.50.3.2

Ok, I believe you. So please just enter a new issue:
http://netbeans.org/bugzilla/enter_bug.cgi?product=php&component=Smarty

And could you attach some steps for reproducing and messages log. Or just enter the issue, the rest we can communicate there. Thanks a lot!
Posted by marfous on Oct 03, 2011
  

Re: Still UTF-8 bug with 1.50.3.2

Thanks for the reply! The file is a partial template (middle of an HTML page), so it has no headers. And my project is already marked as ISO-5589-1. :(
Posted by dariofg on Oct 03, 2011
  

Re: Still UTF-8 bug with 1.50.3.2

Actually you have correct encoding in the file (common HTML charset meta information) or you have to select correct encoding for the PHP project - rightclick on the project -> properties and encoding will be on the first page of properties.

BTW, we are close to NetBeans 7.1 beta where will be Smarty support part of standard distribution.
Posted by marfous on Sep 21, 2011
  

Still UTF-8 bug with 1.50.3.2

I have the plugin version 1.50.3.2 and I'm still getting the UTF-8 bug. My .tpl file is latin-1 and, when I save and reload it, accentuated characters are encoded in UTF-8.
Posted by dariofg on Sep 21, 2011
  

Fixed troubles for NB 7.0.1

New version 1.50.3.2 has fixed troubles with writing ENTERs in editor after updating to NetBeans 7.0.1. It's already for download here and will be available as an update in the IDE in several days.
Posted by marfous on Aug 25, 2011
  

Re: PHP Smarty Framework with dev build 201108120601 confirmed working

Thanks a lot, good to know. :)
Posted by marfous on Aug 15, 2011
  

PHP Smarty Framework with dev build 201108120601 confirmed working

thanks marfous!
no encoding issues with this combo.

thanks a lot for this great plugin! :)
Posted by aledmb on Aug 12, 2011
  

Re: Encoding problem 1.50.2

Sorry it seams that it would require much more work than I expected. So please could you use dev build: http://bits.netbeans.org/download/trunk/nightly/latest/

It will be fixed for next version - NetBeans 7.1.
Posted by marfous on Aug 12, 2011
  

Re: Encoding problem 1.50.2

Ok, since I have to update the plugin again (because of release 7.0.1) I should be able to transplant also patch for fixing encoding troubles, I believe that next week will be available new update where it should be fixed.
Posted by marfous on Aug 12, 2011
  

Encoding problem 1.50.2

Works fine till todays update. Updated to 1.50.2 and got encoding problem.

Project in Windows-1251. Tpl files saved in UTF-8.

:(
Posted by insanio on Aug 09, 2011
  

Re: How I can download this module with solved encoding problem?

Actually, it's available for dev builds only. So you have to download dev IDE: http://bits.netbeans.org/download/trunk/nightly/latest/

Anyway, I think that if you will setup correct encoding for your PHP project, the .tpl files could be saved correctly in version 1.50.2 as well.
Posted by marfous on Jul 28, 2011
  

How I can download this module with solved encoding problem?

How I can download this module with solved encoding problem?
I try to download this update in menu "service-modules", but IDE allow to download only version 1.50.2.
Help please.....
Posted by hash on Jul 28, 2011
  

Solved: Encoding problems

Ok, the encoding problems will be finally solved (in version 1.56 - dev UC):
see http://netbeans.org/bugzilla/show_bug.cgi?id=197609#c9

You have to have charset written in the header of .tpl file (as html meta information) or correctly chosen encoding of PHP project in project properties.
Posted by marfous on Jul 16, 2011
  

Re: Encoding problems

Yes, that's the plan. I gather up some needed information about encoding during this week, so I would like to take a look on that next week.

I would like to provide at least some basic encoding support (like project encoding will be used also for all templates in it). In most cases it should be sufficient.
Posted by marfous on Jul 14, 2011
  

Encoding problems

Thanks for fixing the loading problem, any news on the encoding front? All my sites are in iso-8859-1 and it is a critical issue...
Posted by no_frets on Jul 14, 2011
  

Re: custome modifier and custome function

Thanks unisbadri for this good idea. I entered an enhancement for that: http://netbeans.org/bugzilla/show_bug.cgi?id=200097
Posted by marfous on Jul 13, 2011
  

custome modifier and custome function

hi, this plugins is a great job, but i am waiting for a great feature as well, that is registering custome modifier and custome function in the smarty autocompletion, that would be a great feature if this plugin can look to custome function or custome modifier the web developer has created.., in any register procedure, thanks.
Posted by unisbadri on Jul 13, 2011
  

Re: Thx

Good to hear. Really appreciate your help in bugzilla guys. BTW, since today, the plugin version 1.50.2 should be available over Update Center.
Posted by marfous on Jul 11, 2011
  

Thx

Worked like a charm. Thanks.
Posted by cedricb on Jul 11, 2011
  

Thanks

Great job, thanks.
Posted by planetadeleste on Jul 08, 2011
  

Problems solved

Ok, for everybody. The problems were solved with the new version 1.50.2. This version is available here for downloading (not signed for now) and will be on UC during several days.

1.50.2 fixes also troubles by pressing enter.
Posted by marfous on Jul 08, 2011
  

Re: Enter key not working

Enter issue was fixed for Dev builds, see:
http://netbeans.org/bugzilla/show_bug.cgi?id=199862

If you would like to has it fixed for nb70, please comment into that issue.
Posted by marfous on Jul 07, 2011
  

RE: smarty update crash netbeans startup

Thanks guys for the information. I'm afraid that this problem doesn't happen to anybody now so I'm not able to reproduce that. :/

I know that this is really unpleasant issue and I want to fix it, but I would need to help to reproduce that or get more information from you. Please could you take a look onto issue:
http://netbeans.org/bugzilla/show_bug.cgi?id=199538

If it would be possible write me steps for reproducing your troubles, attach messages.log, thread dump if possible. Thanks a lot.
Posted by marfous on Jul 07, 2011
  

RE: smarty update crash netbeans startup

Still crash too. But only when projects are open on loading.
When no project is open, it loads correctly. if it can help
Posted by cedricb on Jul 05, 2011
  

RE: smarty update crash netbeans startup

"It should be resolved since last week, but you have to delete Smarty plugin and reinstall it again from UC (with the same version 1.50.1). Sorry guys. "

Still nothing. The same bug.
Posted by alabme on Jul 05, 2011
  

Re: Enter key not working

Hi,
do you have problems for all files or all places? I'm not able to reproduce your troubles.

Please enter an issue here:
http://netbeans.org/bugzilla/enter_bug.cgi - contrib/smarty

Thanks a lot.
Posted by marfous on Jul 04, 2011
  

Re: How to disable "Scanning for Smarty file extensions in project." on NetBeans startup

Hi,
this was needed to remove some IDE freezing. You can speed up the scanning by setting Options->PHP->Smarty->Subdir level to 0. This will mean that will be scanned just root of your projects which is really quick.
Posted by marfous on Jul 04, 2011
  

RE: smarty update crash netbeans startup

I'm really sorry about that, it was my fault, because the dependencies of the module weren't correct and there was really big chance that the module breaks the IDE.

It should be resolved since last week, but you have to delete Smarty plugin and reinstall it again from UC (with the same version 1.50.1). Sorry guys.
Posted by marfous on Jul 04, 2011
  

How to disable "Scanning for Smarty file extensions in project." on NetBeans startup

Hello, how to disable "Scanning for Smarty file extensions in project." on every NetBeans startup but still keep .tpl syntax highlight/coloring?

It started to check after new version download aprox. week ago, it was not doing this before.
Posted by kpc on Jul 03, 2011
  

smarty update crash netbeans startup

The problem is when open NB with opened files. If close all files before closing NB it open without problem.
But, this is a bug, and is not good practice close files in use before closing NB.

+1 to fix this problem...

Sorry my english.
Posted by planetadeleste on Jul 01, 2011
  

smarty update crash netbeans startup

+ 1 same here ("Done loading module")
Posted by alabme on Jul 01, 2011
  

smarty update crash netbeans startup

+1 Netbeans stay locked at "Done loading module".
Posted by roman204 on Jun 28, 2011
  

smarty update crash netbeans startup

i've not found how to create a bug ticket for this so i report it here.
After an auto update of the plugin in netbeans 7 (version 1.50.1 i think),
on startup Netbeans stay locked at "Done loading module".
The only way to restart netbeans is to delete the plugin from {$user_dir}/7.0/module directory.

Posted by TiBeN on Jun 28, 2011
  

Not started Netbeans

I have last version of Netbeans and Smarty Plugin. I have many php projects with smarty (tpl) files. If close Netbeans with opened php files, and later start Netbeans, its not work. I view logo with message "Done loading module" and its fine.
Please, where is problem? If close Netbeans and all php files is closed, Netbeans start is correct. Thanks.
Posted by RaRo on Jun 27, 2011
  

Enter key not working

I am unable to press enter and if i press enter no new line is added .p lease fix it fastly
Posted by santoshpotu on Jun 25, 2011
  

Re: Please fix. Or don't. I don't use smarty anymore. Thank !$god for that.

I know there was problem with older version of 1.50.1. It should be fixed since Tuesday 21/06. Please could you try it again with actual version available on plugin portal?

BTW, related issue which should be fixed:
http://netbeans.org/bugzilla/show_bug.cgi?id=199538
Posted by marfous on Jun 23, 2011
  

The latest update stops NB 7 from loading completely. Removed from ~/.netbeans solves this

Please fix. Or don't. I don't use smarty anymore. Thank !$god for that.
Posted by lucian303 on Jun 23, 2011
  

Unexpected Symbols errors in 7.0

Since 7.0 I am having a lot of Expected Symbol(s) errors. Always complainsing about having found ';' and an enter for no reason. Always starts when a variable is used in a style parameter in an element (e.g. <td style="background-color: {$variable}">). Causing red underlines through most of the html code, unable to disable it.

Worked great in 6.9 but not 7.0. Aside from the errors it is working pretty good.
Posted by Azania on May 13, 2011
  

Re:Re: another file extension


Thanks for answer.
I enter an enhancement here: http://netbeans.org/bugzilla/show_bug.cgi?id=198526
Posted by aoglib on May 11, 2011
  

Re: another file extension

At least for now, you should be able to do that in Tools -> Options -> Miscellaneous-> Files. But you will have to setup it for all .html files.

Your idea looks quite useful, but not sure if it's possible. Please could you enter an enhancement here?
http://netbeans.org/bugzilla/enter_bug.cgi - contrib/smarty

I will take a look on that by time, thanks...
Posted by marfous on May 05, 2011
  

another file extension

I have some old projects with smarty tpl names like filename.tpl.html. So NetBeans and PHP Smarty Framework plugin can't recognizing them as smarty templates. So I have some problems. It would be nice to add the ability to add/modify/delete file extension for templates
Posted by aoglib on May 05, 2011
  

Re:Re:Re: Problem with encoding

Thanks for entering that. It will need implement whole encoding support but I will try take a look soon.

BTW for another users, BZ issue:
http://netbeans.org/bugzilla/show_bug.cgi?id=197609
Posted by marfous on Apr 11, 2011
  

Re:Re: Problem with encoding

Thanks for answer.

I don't have any warnings. I commited it in bugzilla.

Greetings
Kamil
Posted by kamilchojnacki on Apr 11, 2011
  

Re: Problem with encoding

It's really issue in the plugin since it doesn't support various encoding for now. At least you got warning, that you file wasn't UTF8, I would expect.

Anyway, please could you raise an issue for that on http://netbeans.org/bugzilla/enter_bug.cgi - contrib/smarty?
Thanks...
Posted by marfous on Apr 11, 2011
  

Problem with encoding

Hi,

i have problem with encoding in smarty templates in Netbeans 7 RC 2. I have project in ISO-8859-2, but Netbeans save files in UTF-8.

It is a bug or problem with configuration?

Greetings
Kamil
Posted by kamilchojnacki on Apr 11, 2011
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo