Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Smarty plugin for NetBeans [closed]

I am looking plugin for work with Smarty in NetBeans.

I need coloring of my code and normal syntax analysys.

I could find only this plugin: Smarty Editor, but I could not make it work.

Can you tell me about another plugin for Smarty or teach me how to install SmartyEditor?

Edit: I use Windows XP SP3

like image 996
AndreyAkinshin Avatar asked Oct 11 '09 20:10

AndreyAkinshin


4 Answers

Hi you can intall the PHP Smarty Framework Plugin just by using the Netbeans plugin manager:

Tools -> Plugins -> Available Plugins -> Serach for "Smarty" -> Insall

This runs directly without restarting your IDE.

(I'm using NB 6.9.1)

like image 127
ownking Avatar answered Nov 06 '22 11:11

ownking


It worked for me, out of the box. I use NetBeans 6.7.1 and this is what I did

  1. Downloaded the plugin .nbm file from the location you mentioned
  2. Install plugin as explained here
  3. In an existing project with web stuff, File-->New File-->Other-->Empty Smarty file

This generated at .tpl file with just

{*

    Author:
    Smarty template
*}

in it. As explained on the plugin download page, outside the Smarty tags you get only basic functionality in as well php as html segments of the file, but as far as I can see the syntax coloring of php and html is OK. Code completion works fine inside Smarty tags.

Regarding syntax analysis: I created a number of errors is html and php in the tpl file and it seems to pick them up correctly.

So, while it's annoying that you loose code completion in html and php it looks quite usable and useful to me.

Let me know if these instructions solved your problem.

like image 2
fvu Avatar answered Nov 06 '22 13:11

fvu


Just found this post from Google and saw that the information is now outdated.

In the most recent builds of NetBeans, there is now official support for Smarty: http://blogs.oracle.com/netbeansphp/entry/initial_support_for_smarty_available

Just download the development versions of NetBeans. Then go to tools > plugins and search for the "PHP Smarty Framework" plugin and install it.

like image 2
rlorenzo Avatar answered Nov 06 '22 13:11

rlorenzo


Hello What you have todo is to first install the smarty editor plugin then edit this file on vista : C:\Users\yourusername.netbeans\6.7\config\Services\MIMEResolver\user-defined-mime-resolver.xml

Delete everything and add the following code to the file :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MIME-resolver PUBLIC "-//NetBeans//DTD MIME Resolver 1.1//EN" "http://www.netbeans.org/dtds/mime-resolver-1_1.dtd">
<MIME-resolver>
    <file>
        <ext name="tpl"/>
        <resolver mime="text/x-tpl"/>
    </file>
</MIME-resolver>
like image 1
streetparade Avatar answered Nov 06 '22 12:11

streetparade