1
spidersilk
Module that will allow PHP in articles?
  • 2006/4/18 5:34

  • spidersilk

  • Just popping in

  • Posts: 28

  • Since: 2005/11/10


Is there any sort of article/content module that will allow bits of PHP code to be executed within articles?

The reason I ask is that a client who I built a XOOPS site for has a PHP script for managing contests that they used with a previous Movable Type site - it's not a MT plugin, it's a self-contained script that lets you set up contests of various sorts and define parameters for them, and then gives you a snippet of code (basically a PHP include statement) that you insert into any page where you want the entry form to appear. And they want to use this on their new sites.

Problem is, AMS and Content, the two main modules the site uses, both remove PHP from submitted articles, presumably for security reasons. Content won't even allow it in an external URL using PageWrap.

I can make a page with an entry form just as a freestanding PHP page, and wrap it in a XOOPS framework using a couple of include statements, but that doesn't leave the client, who is not all that technical, any easy way to edit it, and they need to be able to add and remove contests regularly.

I checked the Modules Repository to see if there was any sort of contest module already available for Xoops, but there doesn't appear to be.

So... is there any module available that will allow a PHP snippet such as the contest script generates to be embedded in an article? Or any other way anyone can think of to do this?

They're on XOOPS 2.0 now, but likely to be upgrading to 2.2 in the future so as to be able to use the FCK editor (since they're currently using Koivi and it's really buggy).


Thanks,

Lynna

2
Bassman
Re: Module that will allow PHP in articles?
  • 2006/4/18 5:38

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


What about a custom block, using php as the type?

3
spidersilk
Re: Module that will allow PHP in articles?
  • 2006/4/18 5:49

  • spidersilk

  • Just popping in

  • Posts: 28

  • Since: 2005/11/10


I thought about that, but I'm not sure it fits with how they'd like it to work. They want to be able to have each contest on a separate page, with an intro describing it, the prizes (usually a ticket giveaway of some sort - it's a local entertainment site), etc. and maybe some pictures, and then the entry form at the bottom.

With a block (if I'm understanding this correctly, which I may not be), I could have an entry form in a little box by itself, but I don't know that I could have it appear within an article the way they want it.

The contest articles don't necessarily have to be in the same module as all the rest of the articles, but they'd probably find it easiest to manage if they were. So I'm hoping for some kind of news/articles module that accepts PHP, but I don't know if it exists...


Lynna

Login

Who's Online

479 user(s) are online (389 user(s) are browsing Support Forums)


Members: 0


Guests: 479


more...

Donat-O-Meter

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

Latest GitHub Commits