Adding php content
  • 2011/1/8 20:20

  • bstr72

  • Just popping in

  • Posts: 3

  • Since: 2010/12/4

This is a really basic question and I feel stupid for asking but here goes.
I've been using the XT_Conteudo module to add html formatted pages of my own. Now I want to add content pages using php so my content is dynamic. I don't think xt-conteudo has options for parsing my content with php.
I can successfully make blocks with php content but this is not what I want. I want the dynamic content to be a full page. I want to reference the php content like I do the xt-conteudo pages:

http://<my web site>/modules/xt_conteudo/index.php?id=3

This way I can reference the pages from my main menu.

Can I make php content pages (not blocks) without adding another new module? If not, what module do I need?


Re: Adding php content
  • 2011/1/8 20:53

  • hipoonios

  • Friend of XOOPS

  • Posts: 298

  • Since: 2005/9/24

I don't know about xt-conteudo. But with the TinyD module it works to add pages with php code without problems. Just make sure the page have the .php extension.
I love Xoops!

Re: Adding php content
  • 2011/1/8 22:06

  • oswaldo

  • Quite a regular

  • Posts: 212

  • Since: 2008/8/22

You can use this code

include_once 'mainfile.php'

if (
file_exists('language/'.$GLOBALS['xoopsConfig']['language'].'/modinfo.php')) { 


//Here your content 


Re: Adding php content
  • 2011/1/9 6:30

  • bstr72

  • Just popping in

  • Posts: 3

  • Since: 2010/12/4

Thanks all. I was able to get things working the way I wanted following oswaldo's advice. Simply put, you can create any php page you want and by including mainfile and header before your content and footer after your content, you get a nicely formatted page with your theme and all blocks. Sweet!


Who's Online

55 user(s) are online (41 user(s) are browsing Support Forums)

Members: 0

Guests: 55



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

Latest GitHub Commits