if (strpos(TRUE_PHP_SELF, '/forum/') !== FALSE) {
echo "Forum: True";
} else {
echo "Forum: False";
}
<?php
if (
$_SERVER['REQUEST_URI'] == "/forum/index.php" |
$_SERVER['REQUEST_URI'] == "/forum/viewforum.php".substr($_SERVER['REQUEST_URI'], 20,100) |
$_SERVER['REQUEST_URI'] == "/forum/viewthread.php".substr($_SERVER['REQUEST_URI'], 21,100) |
$_SERVER['REQUEST_URI'] == "/forum/post.php".substr($_SERVER['REQUEST_URI'], 15,200)
){
$logo_url = " adres do loga dla forum";
} else if ($_SERVER['REQUEST_URI'] == "/jakasstrona.php"){
$logo_url = " adres loga widziany na stronie jakasstrona.php";
} else {
$logo_url = "adres do loga widoczego na pozostałych stronach. ";
}
echo "<a href='".BASEDIR."index.php'><img src='".$logo_url."'/></a>\n";
}
?>
function alternate_banners($forum_logo = "") {
global $settings;
// Check if we are in forum, if an image was set for forum and if the image exists
if ((strpos(TRUE_PHP_SELF, '/forum/') !== FALSE) && $forum_logo != "" && file_exists(BASEDIR.$forum_logo)) {
// Show the logo for forum
return "<a href='".$settings['siteurl']."'><img src='".BASEDIR.$forum_logo."' alt='".$settings['sitename']."' style='border: 0;' /></a>\n";
} else {
// Show the default logo
return showbanners();
}
}
<?php
if (strpos(TRUE_PHP_SELF, '/forum/') !== FALSE) {
echo "<a href='".BASEDIR."'><img src='".BASEDIR."/images/news_cats/php-fusion.gif' style='margin:5px' alt='' align='left' /></a>";
} else {
echo "<a href='".BASEDIR."'><img src='".BASEDIR."/images/php-fusion-logo.png' style='margin:5px' alt='' align='left' /></a>";
}
?>
Quote
Without edit file:
Admin panel - System Admin - Banners - (copy - paste in Banner 1 this code):Code Download source<?php
if (strpos(TRUE_PHP_SELF, '/forum/') !== FALSE) {
echo "<a href='".BASEDIR."'><img src='".BASEDIR."/images/news_cats/php-fusion.gif' style='margin:5px' alt='' align='left' /></a>";
} else {
echo "<a href='".BASEDIR."'><img src='".BASEDIR."/images/php-fusion-logo.png' style='margin:5px' alt='' align='left' /></a>";
}
?>
- by eWe
Category Forum
Modifications and Requests - 8Labels
None yet
Statistics
5 participants
Notifications
You are not receiving notifications from this thread.
Related Questions