Page 1 of 1

Weird PHP problem

Posted: Fri Dec 13, 2013 9:29 am
by DumbDumb
OK guys I'm new around here so would appreciate a small help. When I add my custom php part in templates it doesn't load the page at all. Last night it worked like a charm and everything was as it should be and when I got up, it's no longer loading the page. For example, a small tag cloud:

Code: Select all

<tag_cloud order=alphabet>
      <a href="/tag/<!--TAG_NAME-->/" target="_parent" style="font-size: <?php if (<!--TAG_RANK--> == 3) { echo 16; } elseif (<!--TAG_RANK--> == 2) { echo 14; } elseif (<!--TAG_RANK--> == 1) { echo 12; } elseif (<!--TAG_RANK--> == 0) { echo 10; } ?>px;"><!--TAG_NAME--></a>
</tag_cloud>
I repeat again, I saw it working last night without any problems.
Help? :)

Re: Weird PHP problem

Posted: Fri Dec 13, 2013 12:55 pm
by admin
So you tried that part as a separate template and it doesn't work ?

I mean how do you know that this is a problem part ?

Re: Weird PHP problem

Posted: Fri Dec 13, 2013 2:08 pm
by DumbDumb
I left only that part of the code in whole document, and still that problem persists.
If I use a simple php code without using <!-- TAG_RANK --> or any other element it works just fine everywhere.

And now, for example, it is working like before on one site, and not working on another.... Same code, same structure, everything.

Re: Weird PHP problem

Posted: Fri Dec 13, 2013 2:27 pm
by admin
Blank page = php error in template and display_error = off in php.ini

try to output TAG_RANK w\o php code and see where your code breaks.

I think you should try quote tag at least