Not signed in ( Sign In)

Categories

Welcome, Guest

Want to take part in these discussions? Sign in if you have an account, or apply for one below

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthorFer
    • CommentTimeAug 14th 2010
     permalink
    So I have this Flatpress installation (like mostly everyone else here =p amazing!), and I was wondering something. Before I used Flatpress, my blog ran on other scripts that gave me a certain level of control regarding the UI elements on the page, and that enabled me to run custom PHP code for certain things.

    One of those things was running code that would basically work as a random line generator — the code would file() a text file with all the needed HTML on it, do a rand(), and pick a line to display in the final HTML rendering of the page. I'd like to be able to do that in my footer, and the best way I can think of (without tinkering directly with the Flatpress code) is through the use of a static page enabled in the Blockparser.

    Thing is, are static pages enabled to run custom PHP code in them? Or does the Flatpress parser automatically sanitizes that stuff?
    •  
      CommentAuthorNoWhereMan
    • CommentTimeAug 15th 2010
     permalink
    flatpress will probably "decorate" some of your html; there is a plugin for inline php, but I'd rather suggest to write a plugin with a widget; I guess there is already one
    •  
      CommentAuthorChrisBlank
    • CommentTimeAug 17th 2010
     permalink
    Posted By: Ferare static pages enabled to run custom PHP code in them?

    You can use the InlinePHP Plugin. You will find it in the Wiki
    •  
      CommentAuthorFer
    • CommentTimeAug 18th 2010
     permalink
    Thanks a lot, Chris. I got the InlinePHP plugin and got it to work, albeit I'll admit I had to force it to execute in PHP4 mode — PHP5 mode was crashing on me. =p In any case, this is exactly what I was looking for — thanks again. =)