Topic: Check if index | viewtopic
Hello! I'm creating a new theme and I made some changes to the template which require including some files. Therefore I need to check if it is index.php. I figured it somehow
$adress = $_SERVER["REQUEST_URI"]; //checking current adress
$part= explode("?", $adress ); //exploding string into 2 parts, divided by a '?' sign -
if ($part[0] == '/index.php' || $part[0] == '/') {
echo('
<div id="brd-visit" class="gen-content">
<!-- forum_visit -->
</div>
');
and the same thing with viewtopic.php
<?
$adres = $_SERVER["REQUEST_URI"];
$czesc = explode("?", $adres);
if ($czesc[0] == '/viewtopic.php') {
echo('<div class="main-head"><h2 class="hn"><span class="item-info">'.$lang_topic['Quick post'].'</span></div>');
}
?>
however it would only work with default URL scheme :<. And since my server doesn't support redirecting I cannot check names of this files in other schemes. Perhaps You could help me or tell some better method to check it. Please.
Currently working on rPlus - responsive theme for developers to create their own themes basing on this one.