Install SmartyPDT Plugin into Zend Studio
This guide explains how to install Smarty PDT with Zend Studio. Smarty PDT is a Smarty template syntax colouring, a feature that is not available by default with Zend Studio.
Installing Smarty PDT into Zend Studio
- Be sure to check that the .tpl fule are not associated with any content type. Go to Window-> Prefences -> General -> Content Types
- Download the latest SmartyPDT .zip (currently 0.9.0) fromhttp://code.google.com/p/smartypdt/
- Go to Help -> Install New Software
- Click Add then click Archive button and select the .zip downloaded previously
- By default the Group item by category ensure you unselect this
- Click Add then click Archive button and select the .zip downloaded previously
- Click Next, accept the condition and restart Zend Studio
- If you are prompted that this is an unsigned package, just ignore the warning and install it anyway.
- Right click on the PHP project in the PHP Explorer and Select Configure -> Add Smarty Support
Update/Fixes if this does not work by default
- Check you have the Smarty Editor selected as default for *tpl file in File Association inPreferences -> Ceneral -> Editors -> File Associations
- If after restarting Zend Studio you may find that the .tpl file type is locked. The only option I found was to remove the .tpl directly from the plugin PDT.
- Firstly close Zend Studio to edit the core files:
- Go to the plugins folder where Zend Studio is installed (Mine was C:\\Program Files\Zend\Zend Studio - 8.0.0\plugins
- File the file org.eclipse.php.core_2.2.1.vxxxxxxxx-xxxx.jar - the exact version of the plugin may change with updates to the PDT
- You can infact open this file as a normal archieve file just like a .zip file. Right click a select open with is this does not open by default, if this does not work try renaming the file extension.
- Extract all the file and edit the the plugin.xml file
- Search for "tpl", this was line number 53 and remove "tpl" from the list
- Search for "tpl", this was line number 53 and remove "tpl" from the list
本文转自:http://www.web2works.co.uk/blog2works/install-smartypdt-plugin-into-zend-studio/