coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: mahdi1234 on August 19, 2008, 06:17:43 PM

Title: General annoucement for logged users only
Post by: mahdi1234 on August 19, 2008, 06:17:43 PM
Hello,

I'd like have simple announcement somewhere below buttons section to be displayed only for logged user (on all the pages). I'd like this to be content of external html file if possible (just couple of lines with very basic html elements) not to have to edit theme.php everytime when changed required.

Could you suggest how to achieve this?

PS - I'd like to avoid using MiniCMS for this and afaik it doesn't support display on all pages anyway.

thx,
mahdi
Title: Re: General annoucement for logged users only
Post by: Nibbler on August 19, 2008, 06:25:09 PM
Set a custom header in config that points to a php containing this code:


<?php

if (USER_ID) {
    echo 
file_get_contents('yourfile.html');
}

?>



Then move the {CUSTOM_HEADER} tag in your theme's template.html to where you need the information displayed.
Title: Re: General annoucement for logged users only
Post by: mahdi1234 on August 20, 2008, 01:00:28 PM
Thanks Nibbler.