1

I'd like to have the flag banner in our Expressionengine Discussion Forum appear only on the forum homepage.

I'm taking a college php class but we haven't gotten far enough for me to know how to write the code. Any help is greatly appreciated.

1
  • I don't have forum, so I'm writing this as a comment rather than an actual answer. But you'd want a PHP if statement, that would read something like <?php $base_url = "http://www.medicare-cms.com/forums" if($base_url == "{appropriate PHP SERVER URI}") include('header-main.php'); else include('header.php'); ?> My PHP is crap, so there's probably a missing semi-colon somewhere, but that's kind of the basic idea. – nonprofit_tech Jan 6 '13 at 21:37
1

Something like this should do the trick:

<?php
     $url = $_SERVER['REQUEST_URI'];
     $segment = explode("/", $url);

     if ($segment[2] == ""){
       echo "<img src='/path/to/image/'>";
     }
?>

This says if segment #2 is equal to blank display the banner. So the banner will only show when the URL is /forum/.

0

You can edit the /themes/forum_themes/developer/forum_index/forum_homepage.html file. I put a banner, for example, between these code snippets:

{include:top_bar}
<img src="/uploads/forum-banner.png" alt="" />
<div class="fm-header-wrapper">

Only the home page gets this banner. All forum themes, as near as I can tell, have this file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.