1
flymirco
Insert php code into Mastop Publish pages
  • 2008/1/29 23:03

  • flymirco

  • Just popping in

  • Posts: 42

  • Since: 2006/9/20


Hi to all,

I have a question on how to add php script in mastop publish pages.
To explain better I have an old site that I want to convert in Xoops. I choose Mastop Publish for static content pages and I want insert some php code, made by myself, into Mastop pages creation context.

Is it possible? If yes how? I try with uploading php file but I get some error messages on MIME type not allowed.

Thank you in advance.

flymirco

2
flymirco
Re: Insert php code into Mastop Publish pages
  • 2008/2/5 1:46

  • flymirco

  • Just popping in

  • Posts: 42

  • Since: 2006/9/20


This is the solution to my question:

You can insert a php script into Mastop Publish page through "Manage HTML files" link in the Admin area. Just send a PHP script like a normal HTML page.

If you cant do that and receive a error like "MIME type not allowed: application/{some_crap}", follow this steps:
1 - In the module preferences, check if the "php" is selected in the "Allowed extensions in the content file manager." option.
2 - If you still cant send php files to content manager, even with "php" option selected in the module preferences, its because your XOOPS version is > 2.0.16.

After XOOPS 2.0.16 the "Xoops Uploader" have now a $deniedMimeTypes var (with array("application/x-httpd-php") as default value) and you cant send PHP files to Mastop Publish because of this.
You can fix this opening the modules/mastop_publish/admin/paginas.php file and looking for a line like this:
$uploader->setPrefix("page_");

After this line, you create a new line with this:
$uploader->deniedMimeTypes null;


Now you can send PHP files to Mastop Publish...
This problem will be corrected in the next version of Mastop Publish.

Thanks a lot to Fernando Santos for the explanation provided by email.

flymirco

Login

Who's Online

137 user(s) are online (78 user(s) are browsing Support Forums)


Members: 0


Guests: 137


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits