TinyPortal

Development => Support => Topic started by: WorpeX on July 24, 2011, 07:58:22 PM

Title: Do PHP blocks work?
Post by: WorpeX on July 24, 2011, 07:58:22 PM
Perhaps I'm doing something wrong, but I can't get any kind of PHP to show up in PHP blocks. Regardless of whether that is custom coding, or one of the snippets that you can plug in. Nothing works. It doesn't display an error message either, it just... doesn't output anything. It's as if the block were empty, but it isn't.

Link to my site: ffamasters.com/league
SMF version: Newest one, SMF 2
TP version: Newest one also, just installed yesterday
Default Forum Language: english
Theme name and version: Simply Blue, newest version
Browser Name and Version: Firefox 5
Mods installed: Just TinyPortal
Related Error messages: No error message, just doesn't output anything.
Title: Re: Do PHP blocks work?
Post by: WillyP on July 24, 2011, 08:33:08 PM
Have you tried saving the block as php block, then adding your code, then save again?
Title: Re: Do PHP blocks work?
Post by: WorpeX on July 25, 2011, 12:13:23 AM
Yes I have. The 'Standings' block on the homepage is a php block. As you said, I saved it as a php block, then I entered in one of the php code snippets and saved it again. Still, it doesn't do anything. Even with code provided by tinyportal.
Title: Re: Do PHP blocks work?
Post by: WorpeX on July 25, 2011, 04:21:46 AM
huh, I switched the block from the left to the right and it works now... interesting.  ???
Title: Re: Do PHP blocks work?
Post by: WillyP on July 25, 2011, 04:24:23 AM
That is odd, maybe a previous block did something to the php. Any errors in the server logs?
Title: Re: Do PHP blocks work?
Post by: ZarPrime on July 25, 2011, 07:14:39 AM
WorpeX,

You have some kind of an error, either in that block or in another one on your FrontPage.  I can tell this because neither your SMF copyright nor your TinyPortal copyright are showing up at the bottom like it is on your Forum BoardIndex.

Leave that block in the right panel for now but go in to the edit screen for it and turn it off and save.  Then go back to the FrontPage and see if the copyrights show up.  If they show up, then the error is in the code for that block.  In that case, post the code here so that one of our coders can look at it to see if they can figure out what is wrong with it.

ZarPrime
Title: Re: Do PHP blocks work?
Post by: ZarPrime on July 28, 2011, 06:09:11 PM
WorpeX,

You haven't responded back and I just looked at your site and it seems that the Standings block is working fine in your right panel.  I will assume that you have fixed the problem so I will now mark this topic solved.  If that is not the case, please feel free to post back.

ZarPrime