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 :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
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 15:53 Go to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
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 17:47 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3632
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
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 17:54 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
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 18:04 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
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 18:05 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3632
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
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 18:19 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
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 01:05 Go to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3632
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
I didn't know that either.
We will just have to keep on documenting it until it starts to make sense.
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: Moderating just flagged users
Next Topic: Show own threads?
Goto Forum:
  

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

Current Time: Sun Dec 17 16:27:17 EST 2017

Total time taken to generate the page: 0.00608 seconds