ZenphotoCMS Forum
zpArdoise: code block - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: Themes (https://forum.zenphoto.org/forum-5.html)
+--- Thread: zpArdoise: code block (/thread-10951.html)



zpArdoise: code block - paolomig - 2013-03-26

Hi,
I'm new in this forum. I installed zpArdoise theme on my site and i can't add some code in code block pages. All the code that i write in the block is not executed.
Can you help me?
Thanks




zpArdoise: code block - sbillard - 2013-03-26

Two things are needed.

First your theme must support the particular codeblock by issuing a printCodeblock(x) function call where x is the number of the codeblock.

Second, if you mean PHP code, you have to inclose it in php tags.




zpArdoise: code block - paolomig - 2013-03-26

Thanks for the quikly reply. I'm using zpArdoise theme and i don't know if it support the codeblock or if necessary enable it.
I'm trying to add this PHP code in the homepage but it doesn't execute:




zpArdoise: code block - sbillard - 2013-03-26

You should always include the theme in the topic when using third party themes so its author can comment. I do not know this theme, so you would have to search to see if it uses printCodeblock() and if so what code blocks it supports.




zpArdoise: code block - acrylian - 2013-03-26

Since it may be that you cannot edit the post afterwards, I changed the title.




zpArdoise: code block - fretzl - 2013-03-26

zpArdoise does not use printCodeblock() on the homepage.

So, in gallery.php place printCodeblock(#) anywhere you want the code from your codeblock to appear. (# is the number of the codeblock used)




zpArdoise: code block - vincent3569 - 2013-03-26

hi
with zpArdoise, the home page is a unpublished page created with zenpage plugin, and pages support printCodeblock(1).