FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Include a PHP and Template file (Wrestling!)
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Include a PHP and Template file [message #163569] Tue, 09 November 2010 20:53 Go to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
Today I have tried inserting a new inc file, but it keeps failing and I have no idea why (cant access error log atm).

Basically I have created a file.inc.t and a complementary file.tmpl

The file show up in the templating system.

When I try to insert the template into another template, it tells me the template does not exist.

I remembered that you have to include it in other templates to get it to work with the help of {REF: file.tmpl}

However, no matter how I try, as soon as I insert the REF the forum turns into a blank page.

I even went so far that i removed all the code in both my inc.t and my tmpl file and i STILL got a white page.


Any idea what I am doing wrong? - I have done this before on multiple occations, but today it just doesn't seem to work?


Re: Include a PHP and Template file [message #163570 is a reply to message #163569] Tue, 09 November 2010 22:47 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
This should help: Create a new page.

Best regards.

Frank
Re: Include a PHP and Template file [message #163571 is a reply to message #163570] Tue, 09 November 2010 22:54 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
That is only valid if you create a page - IE a file.php.t - I do not wish to create a page, but rather an included template, just like usercp, header or footer.

Re: Include a PHP and Template file [message #163572 is a reply to message #163571] Tue, 09 November 2010 23:04 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
I must have had some anomaly in my file or something, I created a new test.tmpl and test.inc.t and that works, oh well, 8 hours down the drain!

Re: Include a PHP and Template file [message #163573 is a reply to message #163571] Tue, 09 November 2010 23:05 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Have you checked for PHP errors in your web server's error_log file?
Also see "FUDforum shows a blank screen. What now?" at FAQ.
Re: Include a PHP and Template file [message #163574 is a reply to message #163572] Tue, 09 November 2010 23:19 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
I must have named my main_section the same as the file or anything, the exact same code is now happily working, but it gave me hours of headache earlier. Raging like a madman here =)

Re: Include a PHP and Template file [message #163580 is a reply to message #163574] Wed, 10 November 2010 06:05 Go to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
I didn't know that either.
We will just have to keep on documenting it until it starts to make sense.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Moderating just flagged users
Next Topic: Show own threads?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 20:21:36 GMT 2024

Total time taken to generate the page: 0.02852 seconds