Using text field to run code.

Phoca Download - download manager
stannellc
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 21 Sep 2013, 03:09

Using text field to run code.

Post by stannellc »

First thanks for all your work on this project. I saw a message saying you could use the text field to run code between downloads. I plan on using this to show ads. I can't find the post again, but the answer wasn't quite clear to me. When I post code in the editor ( I am using the back end not pasting in the GUI) the code does not run it shows up as text. I can't use <iframe> because the tags are just stripped off.

I made sure I installed the plugin, but I do not think that is the problem because it is not content in an article. Can you tell me if there is something I am missing that keeps this from running? I know the code is written correctly because it works outside of phocadownload.

Thanks for any help you can give me with this.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48580
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Using text field to run code.

Post by Jan »

Hi, see:
administrator\components\com_phocadownload\models\forms\phocadownloadfile.xml

Code: Select all

<field name="description" type="editor" buttons="true" hide="pagebreak,readmore" class="inputbox" label="COM_PHOCADOWNLOAD_FIELD_DESCRIPTION_LABEL" filter="safehtml" description="COM_PHOCADOWNLOAD_FIELD_DESCRIPTION_DESC" />
Remove the filter attribute (but before doing this, you should be sure, nobody other is able to edit your descriptions as this can be then security problem)

Jan
If you find Phoca extensions useful, please support the project
stannellc
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 21 Sep 2013, 03:09

Re: Using text field to run code.

Post by stannellc »

Thanks Jan. Please advise if I am doing something wrong. I tried filter="" and removing it completely, but it's not working for me. If I use <iframe></iframe> or <a href=> </a> the block of code disappears when I click save. If I use http://...... it shows up as text. Thanks.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48580
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Using text field to run code.

Post by Jan »

Hi, then try to check the editor settings if it does not cut anything (check if the features like iframe, etc. are enabled in editor settings)

Jan
If you find Phoca extensions useful, please support the project
Post Reply