Jump to content

PHP or Hook possible with the CMS?


Recommended Posts

I'm trying to include the SimplePie RSS Reader on the homepage of our website. The problem is SimplePie requires PHP, which I dont think is possibly within Homepage CMS. I thought about creating a custom Block, but am not sure how to include a block via CMS.

Any help would be appreciated....

Link to comment
Share on other sites

Here's how to enable iframes in PrestaShop's CMS.

Since it's using TinyMCE, you have to 'hack' that.

You have to edit the following file: [prestashop_dir]/js/tinymce/jscripts/tiny_mce/tiny_mce.js

The javascript file's compressed, so the only way you'll find it is by searching the doc for: onclick|

The 'onclick|' bit is within 'valid_elements'. This keeps certain elements from being filtered out by TinyMCE.

At the end of the list of elements, there's: tt,var,big,

After the 'big,' bit paste in the following:

script[type|src],iframe[src|style|width|height|scrolling|marginwidth|marginheight|frameborder],



Make sure you leave the ',' right after 'big' and before 'script'. Make sure too that there's the final ',' right before the closing quote.

Save the js file and you should be able to use iframes in the HTML source section of the CMS.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Do you have to create the new page with the cms? Is it for a client or is it your own site? If its your own site, why not just create a new page from scratch. I have simple pie working on my homepage at the moment displaying a news feed, without needing to use an iframe.

Link to comment
Share on other sites

  • 1 month later...
Here's how to enable iframes in PrestaShop's CMS.

Since it's using TinyMCE, you have to 'hack' that.

You have to edit the following file: [prestashop_dir]/js/tinymce/jscripts/tiny_mce/tiny_mce.js

The javascript file's compressed, so the only way you'll find it is by searching the doc for: onclick|

The 'onclick|' bit is within 'valid_elements'. This keeps certain elements from being filtered out by TinyMCE.

At the end of the list of elements, there's: tt,var,big,

After the 'big,' bit paste in the following:

script[type|src],iframe[src|style|width|height|scrolling|marginwidth|marginheight|frameborder],



Make sure you leave the ',' right after 'big' and before 'script'. Make sure too that there's the final ',' right before the closing quote.

Save the js file and you should be able to use iframes in the HTML source section of the CMS.



Hi esdev,

I’ve tried your hack, but it doesn't work yet. I have a problem trying to make an iframe works on Prestashop, but unfortunately I couldn’t get it completely. The only thing I get is an iframe of about 150 pixels height (see attachment, it was taken before I read your hack), width is ok (I can change the size without problems) For example, I need an iframe of 830×650px.

In my tiny_mce.js file I have this:
...tt,var,big,script[type|src],iframe[src|style|width|height|scrolling|marginwidth|marginheight|frameborder],", hidden...

I also tried:
...tt,var,big,script[type|src],iframe[src|style|width|height|scrolling|marginwidth|marginheight|frameborder]", hidden...
but doesn't work either.

Can you tell me what’s wrong, please? I’m using PS 1.5.
Thanks.

17239_hPQzfo1Vhcv6CxEDq4cZ_t

Link to comment
Share on other sites

I'm confused why people are using frames. You could create a new module and just insert it into hookHome. Wouldn't that be easier?


Sorry, Actually I am contused by what you are saying. What do you mean by create a new module and insert it into home? I want to inset "gallery 3." http://gallery.menalto.com/ into the center of a page, can you tell me how to do it without an iframe? Thank you.
Link to comment
Share on other sites

Familyman, I'm going to download gallery 2.3.1 now to see if I can get it to work, then I'll let you know. I don't think gallery 3.0 is a stable release yet, so I'd recommend version 2.3.1.

Edit: Can I ask, what specifically do you want it for? Are you going to use it to replace the 'featured products' module?

Link to comment
Share on other sites

Familyman, I'm going to download gallery 2.3.1 now to see if I can get it to work, then I'll let you know. I don't think gallery 3.0 is a stable release yet, so I'd recommend version 2.3.1.

Edit: Can I ask, what specifically do you want it for? Are you going to use it to replace the 'featured products' module?


No. My site is for church shop. Our church members can buy church music, books... from the shop, and I want to include a gallery in the center of the page so that I can show the photos of church activities, and church members can send out e-cards..... I am thinking about Coppermine http://coppermine-gallery.net/ or Gallery. Either one works will be fine for me. Thanks for helping
Link to comment
Share on other sites

  • 5 months later...
  • 1 month later...

HERE IS THE SOLUTION !!

HOW ADD A NEW CMS PAGE

To create new CMS page.
admin->Tools -> CMS -> create new
follow instructions.


TO ALLOW <iframe> FUNCTION

open admin/tabs/adminCMS.php add under convert_urls : false, on line 141 add this:

extended_valid_elements : "iframe[src|width|height|name|align]",


Edit your new CMS page usig html and add:

Add by example:
<iframe src="http://www.google.com" width="750" height="600" align="left"></iframe>


THAT'S ALL.

Tested in Pretashop ver. 1.3.1

I know this answer is too late for poster, but can help others.

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...
  • 1 month later...
  • 2 months later...

Howdy,
I've tried the various suggestions to enable iframe in tinyMCE but without success. I'm no expert so I'm probably doing something wrong.
Although I just came accross this embed plugin for tinyMCE. I have tried to follow the inststructions but I get stuck already on point 3... :-)

Installation
============
* Make sure the media plugin is added to the plug-ins configuration.
* Extract the zip to the TinyMCE plug-ins folder.
* Add embed to the plug-ins configuration.
* Add embed to the theme_advanced_buttons_n configuration.

Could someone with more expert knowledge please see if you can get this plugin to work and then hopefully in simple words explain for us 'no good's'...

This plugin could be very usefull if it can be applied also to tinyMCE in Prestashop.

https://github.com/thomasandersen/tinymce-embed-plugin/

Thank you in advance to Mr Andersen who is kind enough to share his plugin.

Link to comment
Share on other sites


I’ve tried your hack, but it doesn't work yet. I have a problem trying to make an iframe works on Prestashop, but unfortunately I couldn’t get it completely. The only thing I get is an iframe of about 150 pixels height (see attachment, it was taken before I read your hack), width is ok (I can change the size without problems) For example, I need an iframe of 830×650px.

In my tiny_mce.js file I have this:
...tt,var,big,script[type|src],iframe[src|style|width|height|scrolling|marginwidth|marginheight|frameborder],", hidden...

I also tried:
...tt,var,big,script[type|src],iframe[src|style|width|height|scrolling|marginwidth|marginheight|frameborder]", hidden...
but doesn't work either.

Can you tell me what’s wrong, please? I’m using PS 1.5.
Thanks.


Check my syntax (surrounded by before and after code), this works:
..............tt,var,big,script[type|src],iframe[src|style|width|height|scrolling|marginwidth|marginheight|frameborder],',hidden_input:1,..............
Link to comment
Share on other sites

  • 1 month later...

search file
js \ tinymce \ jscripts \ tiny_mce \ tiny_mce.js

look for this line
tt, var, big, "hidden_input: 1

Put this line

…………..tt,var,big,script[type|src],iframe[src|style|width|height|scrolling|marginwidth|marginheight|frameborder],",hidden_input:1,…………..

---------------
detail "
frameborder], " ,hidden
-------------

tt end 1

copy and paste, save and put the folder on the server or the localhost of your machine

Ready now you can enter <iframe in CMS

I did this for the reason he wanted to enter the command MSN online service

Link to comment
Share on other sites

×
×
  • Create New...