Rapid PHP 2011- Smarty Support

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
Post Reply
koshin
Posts: 5
Joined: Wed Jul 13, 2011 8:42 am

Rapid PHP 2011- Smarty Support

Post by koshin »

Some issue with smarty support

First problem:
When i open a file TPL (smarty template) highlight for smarty is enabled - that's fine, but....
i can not use an 'insert menu' - can't insert doctype, links (via mouse of curse, i can type anything, but can't use menu 'insert' option) - its very anoiyng

Second problem:
how to change smarty delimiter?
Very often i don't use default smarty delimiter { } - for example i change it to {{ }}
Gatis
Blumentals Software Developer
Posts: 545
Joined: Sun Mar 05, 2006 12:30 am
Location: Latvia

Re: Rapid PHP 2011- Smarty Support

Post by Gatis »

Hi,
When i open a file TPL (smarty template) highlight for smarty is enabled - that's fine, but....
i can not use an 'insert menu' - can't insert doctype, links (via mouse of curse, i can type anything, but can't use menu 'insert' option) - its very anoiyng
Thank you for reporting this. With next update this problem should be resolved.
how to change smarty delimiter?
Very often i don't use default smarty delimiter { } - for example i change it to {{ }}
Sorry, this can't be done. I wonder why this is needed? How do you achieve this in other tools?

Kind regards,
Gatis
Kind regards,
Gatis Avots
koshin
Posts: 5
Joined: Wed Jul 13, 2011 8:42 am

Re: Rapid PHP 2011- Smarty Support

Post by koshin »

Hello,
Gatis wrote:
how to change smarty delimiter?
Very often i don't use default smarty delimiter { } - for example i change it to {{ }}
Sorry, this can't be done. I wonder why this is needed? How do you achieve this in other tools?
i don't use other tools, so i don't know IF or HOW to do it there. But, You ask me, why this is nedded?
In tpl file (smarty templates) default delimiter is { and }
And in javascript there is also { and } used - so smarty gives errors (or i have to use {literal} {/literal} tag where i use javascript.
But smarty allows to change default delimiters, so i choose to use {{ and }} and i can use javascript in my templates files wherever i want with { and }

Best regards
Koshin
Gatis
Blumentals Software Developer
Posts: 545
Joined: Sun Mar 05, 2006 12:30 am
Location: Latvia

Re: Rapid PHP 2011- Smarty Support

Post by Gatis »

If you only need to change the delimiter for syntax highlighting, then you can do this yourself in following file:
G:\Programming\Delphi\2011\ver_web\data\parsers\smartyparser.dat
and then change the rules accordingly (you need to look for rules containing word "sSmarty" and similar places, where the delimiters are refereed to).
Kind regards,
Gatis Avots
Post Reply