Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
4 - 1 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     

Re: Possible to write custom code in news post?
by Mazarin on 2008/12/13 11:54:18

Both of them worked fine!

So it seems that for writing php in the html file, all that was needed was a different tag to specify the php code, i.e. <{php}>php code here<{/php}>. With this method, there was no need to create a .htaccess file.

Once again, thanks a lot for your help.
Re: Possible to write custom code in news post?
by ghia on 2008/12/13 2:02:36

Can you try this (using php) or this (including php)?
Re: Possible to write custom code in news post?
by Mazarin on 2008/12/12 21:24:00

It turned out it wasn't as simple as that. No matter how I try, I can't get the server to parse the embeded php in the html page news_item.html.

I've tried enabling it by putting a .htaccess file with "addtype application/x-httpd-php .html" in each and every directory from the one containing the file to the root web directory, without it having any effect on the news module. However, it works perfectly fine on custom html page in the root, i.e. it shouldn't be the server config file preventing the execution of the .htaccess.

Is there anything in the XOOPS folder/files that prevents the local .htaccess files override?

I've tried putting garbage in both the .htaccess files and the php code, so it seems something is preventing the override. Also, I have module cache turned off in the system settings.

Any ideas as to what could be the problem?
Re: Possible to write custom code in news post?
by Mazarin on 2008/12/11 12:47:32

Oh, it's as simple as that. Thanks a lot for your help :)
Re: Possible to write custom code in news post?
by ghia on 2008/12/11 10:18:51

You can add PHP code in the template news_item.html. You could call there a PHP file with as parameter $story.id that makes the table layout.

Who's Online

289 user(s) are online (147 user(s) are browsing Support Forums)


Members: 0


Guests: 289


more...

Donat-O-Meter

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

Latest GitHub Commits