This topic is locked

iPhone - Dynamically changing HTML header info

7/21/2010 2:37:29 PM
PHPRunner General questions
F
FunkDaddy author

How can I generate the HTML header section of my pages dynamically?
I want to add some <Meta> tag information that is specific to a user group on their web pages they view... I have added some iPhone tags so when mobile safari loads the page it'll know to treat it as a web app... all this works fine by simply editing the page using Visual Editor in PHP Runner, however, I need to be able to generate the "Add to Home screen" icons dynamically (based on user group)... the tag I need to generate/add to the html page is:
<link rel="apple-touch-icon" href="./apple-touch-icon.png" />
I want to issue a different home screen icon to each user group... thus the href portion needs to point to different files.
Anyone know how to do this in PHPRunner? Simply add HTML code to a page before it is loaded... based on user $_SESSION info?
Thanks,
Marcelo Ramagem

A
ann 7/22/2010

Marcelo,
you need to check the logged on user in the Before Display event on the Events tab.

Then according to the value add corresponding html code to the page.

Here is just a sample:

$meta="<p align='center'><img src='include/logo.jpg' border='0'></p>";

if ($_SESSION["UserID"]=='admin'){

echo $meta;

}