Avatar billede kluq Nybegynder
21. marts 2010 - 01:01 Der er 4 kommentarer og
1 løsning

Background

Jeg kan ikke ændre til baggrundsbillede på dette theme :s

nogen som ved hvad dette skyldes?


THEME CODE:

<?php
/* theme (v1.2) - a theme for PHP-Fusion v7. Theme author: Andreas Seierup Rasmussen, http://escond.com
Copyright Escond.com */
if (!defined("IN_FUSION")) { die("Access Denied"); }

define("THEME_BULLET", "<span class='bullet'>&middot;</span>");
define("THEME_WIDTH", "886"); //Bredde på theme

require_once INCLUDES."theme_functions_include.php";
include LOCALE.LOCALESET."comments.php";
include LOCALE.LOCALESET."ratings.php";

function thesublinks($sep="&middot;",$class="") {
    $i = 0; $res = "";
    $sres = dbquery("SELECT * FROM ".DB_PREFIX."site_links WHERE link_position>='2' AND ".groupaccess('link_visibility')." AND link_url!='---' ORDER BY link_order ASC");
    if (dbrows($sres)) {
        while($sdata = dbarray($sres)) {
                    if ($i != 0) { $res .= " ".$sep."\n"; } else { $res .= "\n"; }
                    $link_target = $sdata['link_window'] == "1" ? " target='_blank'" : "";
                    $link_class = $class ? " class='$class'" : "";
                    if (strstr($sdata['link_url'], "http://") || strstr($sdata['link_url'], "https://")) {
                        $res .= "<a href='".$sdata['link_url']."'".$link_target.$link_class.">".$sdata['link_name']."</a>";
                    } else {
                        $res .= "<a href='".BASEDIR.$sdata['link_url']."'".$link_target.$link_class.">".$sdata['link_name']."</a>";
                    }
               
                $i++;
        }
    }
    if ($i != 0) { return $res; } else { return "&nbsp;"; }
}

// THEME CONFIG OPTIONS:
$u_panel = false; // Display a login-panel for Guests when inside the /forum/. Values: true || false


$url = FUSION_REQUEST;
$fplaces = array(    "/forum/" ); //Hides all side-panels when inside the /forum/ folder
$in_fforum = false;

foreach($fplaces as $place){ if(stristr($url, $place))$in_fforum = true; }

function render_page($license=false) {

    global $settings, $locale, $aidlink, $userdata, $p_data, $in_fforum, $u_panel;
//HEADER SETTINGS
    echo "<table cellpadding='0' cellspacing='0' align='center' id='header'>\n<tr>\n<td>\n";
    echo "<table cellpadding='0' cellspacing='0' id='main-header' style='width:100%; height:30px;'>\n<tr>\n";
    echo"<td id='salt' valign='middle'><img src='http://www.teamsports.dk/images/facebook.png' width='16' /> <a target='_blank' href='http://www.facebook.com/group.php?gid=319109881744&ref=ts'>".$locale['global_2110']."</a></td>\n";
    echo "<td class='meniu-cont' style='font-size:9px; text-align: right;' align='right'>
          \n";
            if(iMEMBER){
                        $msg_count = dbcount("(message_id)", DB_MESSAGES, "message_to='".$userdata['user_id']."' AND message_read='0'AND message_folder='0'");
    echo "<a href='".BASEDIR."edit_profile.php' title='".$locale['global_120']."'><img src='".THEME."images/title/login.png' alt='".$locale['global_120']."' /></a>\n";
                              if ($msg_count){echo" <a href='".BASEDIR."messages.php' title='[$msg_count] ".$locale['global_127']."'><img src='".THEME."images/title/mail_get.png' alt='[$msg_count] ".$locale['global_127']."' />";} else {echo "<a href='".BASEDIR."messages.php' title='".$locale['global_121']."'><img src='".THEME."images/title/pm.png' alt='".$locale['global_121']."' /> ";} echo"</a>\n
                              ".(iADMIN ? "<a href='".ADMIN."index.php".$aidlink."' title='".$locale['global_123']."'><img src='".THEME."images/title/misc.png' alt='".$locale['global_123']."' /></a>\n" : "")."
                              <a href='".BASEDIR."setuser.php?logout=yes' title='".$locale['global_124']."'><img src='".THEME."images/title/exit.png' alt='".$locale['global_124']."' /></a>\n";
                    }else{
                        echo "<a href='".BASEDIR."login.php' title='".$locale['global_104']."'><img src='".THEME."images/title/login.png' alt='".$locale['global_104']."' /></a>\n
                        ".($settings['enable_registration'] ? "" : "");
                  } echo "
         
        </td>\n";
       
echo "</tr></table>\n";
//SITE BANNER
echo "<table cellpadding='0' cellspacing='0' width='".THEME_WIDTH."' align='center'><tr>\n";     

echo "";   
    if ($settings['sitebanner']) {
        echo "<a href='".$settings['siteurl']."' title='".$settings['sitename']."'><img src='".BASEDIR.$settings['sitebanner']."' alt='".$settings['sitename']."' /></a>\n";
    } else {
        echo "\n";
}

// META TAG PANEL DESCRIPTION:   
if (file_exists(INFUSIONS."meta_tag_panel/infusion_db.php")) {   
include INFUSIONS."meta_tag_panel/infusion_db.php";

$results = dbquery("SELECT * FROM ".DB_META_SET."");
while ($me = dbarray($results)) {
$display = $me['panel_on'];
    if($display == '0') { $display = ""; }
    if($display == '1') { $display = ""; }
   
echo "<div style='display:".$display.";'>\n";


$size=array(10,12,16,18,24,28); //font size pixels
$sizefinal=count($size)-1;

include INFUSIONS."meta_tag_panel/isset.php";


    $result = dbquery("SELECT * FROM ".DB_META." WHERE m_type='".$type."' AND m_itemid='".$id."'") or die(mysql_error());    if(dbrows($result) != 0){
    while ($data = dbarray($result)) {
        $tags = $data['m_description'];
        $tags = str_replace(", ", ",",$tags);
//        $tags = str_replace(" ", "-",$tags);
        $tags = explode(",", $tags);
           
            set_meta("description",$data['m_description']);

       
        foreach ($tags as $tag) {
   
            $link = $me['link'];
            if($link == '0') { $link = "".$data['m_description'].""; }
            if($link == '1') { $link = "".$data['m_description'].""; }
            if($link == '2') { $link = "".$data['m_description'].""; }           
    echo "<h1>".$link."</h1> ";
   
        }
    }
    }
           
           
           
           
    else {
   
            $gen = $settings['description'];
            $gen = str_replace(", ", ",",$gen);
            $gen = explode(",", $gen);
            foreach ($gen as $general) {
    echo "<h1> ".$general." </h1>";
      }
    }
echo "</div>";
}   
} else { echo "<h1>".$settings['description']."</h1>";    }
// META TAG PANEL DESCRIPTION - END   
    echo " </td><td align='right' valign='bottom'>";

   
    echo " </td>";
echo "</tr></table>\n";
echo "</td></tr></table>\n";
 
//CONTENT SETTINGS
echo "<table width='".THEME_WIDTH."' cellpadding='0' cellspacing='0' align='center' id='main-bg'>\n<tr>\n";


     
      if(defined("ADMIN_PANEL") && (iADMIN)){
  echo "<td style='height:0px' colspan='2' class='side-border-left'></td></tr>\n<tr>\n";
  echo "<td valign='top' class='side-border-left'>\n<table cellspacing='0' cellpadding='0' width='180' style='padding:5px' class='side-border-left'><tr>\n<td class='side-border-left'>\n".LEFT."\n</td>\n</tr>\n</table>\n</td>\n";
}
elseif (LEFT) { echo "<td class='side-border-left' valign='top' rowspan='3'>".LEFT."</td>";}
echo "<td valign='top' width='100%'>";

  echo "<table cellspacing='0' cellpadding='0' width='100%' class='tb-bg'>";
  echo "<tr>\n<td class='left-tc'></td><td class='bord-top'></td><td align='right' class='right-tc'></td>\n";
  echo "</tr>\n</table>\n";
 
  echo "<table cellspacing='0' cellpadding='0' width='100%' style='background-color:#FFF;border-left:1px solid #D6D3D5;border-right:1px solid #D6D3D5;'>\n<tr>\n";               

      if(defined("ADMIN_PANEL") && (iADMIN) && ($settings['sitebanner1'])){echo "<td class='main' align='center'>";} 
    elseif (($settings['sitebanner1']) && (RIGHT)) {
      echo "<td colspan='2' class='main' align='center'>";
        eval("?>".stripslashes($settings['sitebanner1'])."\n<br /><br /><?php ");
    } elseif ($settings['sitebanner1']) {
      echo "<td class='main' align='center'>";
        eval("?>".stripslashes($settings['sitebanner1'])."\n<br /><br /><?php ");   
    } else {
        echo "<td class='main' colspan='2' align='center'>\n";
    }       
    echo "</td></tr><tr>";       
      echo "<td id='main' valign='top' width='100%'>";
           
          if (iGUEST && $in_fforum && $u_panel) {
          @include THEME."includes/forum_panel_include.php";
          }
     
    echo U_CENTER.CONTENT.L_CENTER."\n"; 
      if(defined("ADMIN_PANEL") && (iADMIN)){
  echo "</td>\n";
}
elseif ($settings['sitebanner2']) {
      echo "";
        eval("?><br /><br /><center>".stripslashes($settings['sitebanner2'])."\n</center></td><?php ");   
    } else {
        echo "<br /></td>\n";
    }
    if ((LEFT || RIGHT) && (!$in_fforum) && (!defined("ADMIN_PANEL"))) {
    echo "<td valign='top' align='right' style='border-left:0px solid #D6D3D5;'>\n";
          echo "<table cellspacing='0' cellpadding='0'><tr><td align='right'>\n";

      if ((RIGHT) && (FUSION_SELF == 'news.php')) {
  echo " <form name='searchform' method='get' action='".BASEDIR."search.php'>\n";
  echo " <input type='text' name='stext' class='searchbox' maxlength='30' />\n";
  echo " </form></td></tr><tr>";         

      echo "<td id='side-border-right' valign='top' align='right'><img src='".THEME."images/s-border.gif' alt='' />".RIGHT."\n";}     
  elseif (RIGHT) {
      echo "</td></tr><tr><td id='side-border-right' valign='top' align='right'><img src='".THEME."images/s-border.gif' alt='' />".RIGHT."\n";} 
        echo "</td></tr></table>"; 

      echo "</td>\n";
    }
    echo "</tr>\n</table>\n";
  echo "<table cellspacing='0' cellpadding='0' width='100%' class='tb-bg'>";
  echo "<tr>\n<td class='left-bc'></td><td class='bord-bottom'></td><td align='right' class='right-bc'></td>\n";
  echo "</tr>\n</table>\n";
 
//FOOTER SETTINGS
      if(defined("ADMIN_PANEL") && (iADMIN)){echo"";}
      else {
    echo "<table cellspacing='0' cellpadding='0' align='center' class='footer-sus' style='width: 100%; background-color:#eee;'>";
    echo "<tr><td class='center' style='background-color:#eee;padding:10px;'>";
  echo "<div class='footernav' style='text-align: center; clear:both;'>".("")."</div>\n<br />\n";
  echo "<div style='text-align: center;'>".stripslashes($settings['footer'])."</div>\n";
  echo "</td>\n</tr>\n";

  echo "</table>\n";
  }
  echo "</td>\n";

  echo "</tr>\n</table>\n";
closefooter(); 
}

function render_news($subject, $news, $info) {

global $locale, $aidlink;

    echo "<h1 class='ncapmain'>".$subject."</h1>\n";
    echo $news."\n";
                if (!isset($_GET['readmore']) && $info['news_ext'] == "y") { echo " <a href='news.php?readmore=".$info['news_id']."'><img src='".THEME."images/readmore.png' alt='' style='vertical-align:middle;border:0px;' /><strong>".$locale['global_072']."...</strong></a><br />";}
      echo "<p class='nfoot'>";
      echo "<img src='".THEME."images/author.gif' alt='' style='vertical-align:middle;border:0px;' /> <a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a> ".$locale['global_071'].showdate("longdate", $info['news_date']);
        if ($info['news_allow_comments']) { echo " | <img src='".THEME."images/comments.gif' alt='' style='vertical-align:middle;border:0px;' /> <a href='news.php?readmore=".$info['news_id']."'>".$info['news_comments'].($info['news_comments'] == 1 ? $locale['global_073b'] : $locale['global_073'])."</a> |";}
        echo " <a href='print.php?type=N&amp;item_id=".$info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['global_075']."' title='".$locale['global_075']."' style='vertical-align:middle;border:0px;' /></a>";
        if (iADMIN && checkrights("N")) { echo " <a href='".ADMIN."news.php".$aidlink."&amp;action=edit&amp;news_id=".$info['news_id']."'><img src='".IMAGES."edit.gif' alt='".$locale['global_076']."' title='".$locale['global_076']."' style='vertical-align:middle;border:0px;' /></a>\n"; }
      echo "</p>";

}

function render_article($subject, $article, $info) {
   
    echo "<h1 class='ncapmain'>".$subject."</h1>\n";
    echo "".($info['article_breaks'] == "y" ? nl2br($article) : $article)."<br />\n";
    echo "<p class='nfoot'>".articleposter($info," &middot;").articleopts($info,"&middot;").itemoptions("A",$info['article_id'])."</p>";

}

function opentable($title) {

  global $p_data, $locale;
 
    if (file_exists(THEME."images/title/".$p_data['panel_filename'].".png")) {
    $title = "<img class='p-img' src='".THEME."images/title/".$p_data['panel_filename'].".png' alt='' />$title";
    } if  ($title == $locale['c100'] ) {
    $title = "<img class='p-img' src='".THEME."images/title/latest_comments_panel.png' alt='' />".$locale['c100']."";
    } if  ($title == $locale['c102'] ) {
    $title = "<img class='p-img' src='".THEME."images/title/post_comment.png' alt='' />".$locale['c102']."";
    } if  ($title == $locale['r100'] ) {
    $title = "<img class='p-img' src='".THEME."images/title/ratings.png' alt='' />".$locale['r100']."";   
    } else {
    $title = "$title";
    }

    echo "<h2 class='panel'>".$title."</h2>\n";
}

function closetable() {

}

function openside($title, $collapse = false, $state = "on") {

    global $p_data, $panel_collapse; $panel_collapse = $collapse;
   
    if(($p_data['panel_filename'] == "navigation_panel") || ($p_data['panel_filename'] == "css_navigation_panel") || ($p_data['panel_filename'] == "shoutbox_panel")) {
  echo "<div><img src='".THEME."images/nav-user-top.png' alt='' /></div><div class='navigare'>\n";

  }
  else if ($p_data['panel_filename'] == "member_poll_panel") {
  echo "<div class='special-b'>\n";
    }
  else if ($p_data['panel_filename'] == "user_info_panel") {
  echo "<div class='special-c'>\n";
    } 
  else { echo "<div class='normal'>\n";}
   
  if($p_data['panel_filename'] !== "css_navigation_panel"){
    echo "<h3>".$title."</h3>\n";
    }
     
    if ($collapse == true) {
        $boxname = str_replace(" ", "", $title);
        echo "<div class='p-state'>".panelbutton($state, $boxname)."</div>\n";
    }   
    if ($collapse == true) { echo panelstate($state, $boxname); }

}

function closeside() {
   
    global $panel_collapse, $p_data;
        if(($p_data['panel_filename'] == "navigation_panel") || ($p_data['panel_filename'] == "css_navigation_panel") || ($p_data['panel_filename'] == "shoutbox_panel")) {
    echo "</div><img src='".THEME."images/nav-user-bottom.png' alt='' /><br />";    }
    else {
  echo "</div>";
    }
  if ($panel_collapse == true) { echo "</div>\n"; }   
}

function openfooter() {

  global $p_data, $locale;
 
    if($p_data['panel_filename'] == "online_users_panel") {
  echo "<div class='panou-footer'>\n";
    } else {
    echo "";
    }
}

function closefooter() {
  global $p_data, $locale;
    if($p_data['panel_filename'] == "online_users_panel") {
  echo "<div class='panou-footer'>\n";
    } else {
    echo "";
    }
}

?>

CSS CODE:

body {
    font: 11px Verdana, Arial, Helvetica, sans-serif;
    color: #000;
    background-image: images/themebg.png;
    background-color: #EEEEEE;
    margin: 0;
}
21. marts 2010 - 06:43 #1
Du definerer baggrundsbilledet i CSS coden "background-image: images/themebg.png;"

Kunne du fortaelle hvor i din kode det er du forsoeger at aendre baggryndsbilledet?  Det er nemmere end hvis jeg skal lede efter det.
Avatar billede kluq Nybegynder
21. marts 2010 - 10:11 #2
Det er selve baggrunde :)
Ikke i en af 'content' siderne men den bagerste baggrund :)
21. marts 2010 - 15:25 #3
Du siger at du ikke kan aendre baggrunden.  Det lyder for mig som om du har en baggrund og saa goer du noget for at faa en anden baggrund, men det virker ikke.  Spoergsmaal 1: Er det korrekt forstaaet?  Spoergsmaal 2: Hvilken baggrund har du til at begynde med?  images/themebg.png?  Spoergsmaal 3:  Hvad goer du for at forsoege at aendre baggrunden?  Er det en del af ovenstaaende kode?  Det maa jeg vide for at have en chance for at hjaelpe.  Jeg er saa daarlig til at gaette.
Avatar billede kluq Nybegynder
21. marts 2010 - 15:50 #4
1. det er korrekt
2. jeg har en #EEEEEE baggrund..
3. jeg skal have ændret min baggrund til themebg.png :)
21. marts 2010 - 16:45 #5
I din CSS fil opgiver du to baggrund-elementer, background-color = #EEEEEE og background-image = images/themebg.png. 

Du siger at du faar din baggrund_color #EEEEEE, saa aabenbart virker din CSS fil. 

Men du faar aldrig dit opgivne baggrund-image.  (Det er saaledes ikke et spoergsmaal om at AENDRE baggrund-image men at faa det til at begynde med.)  Jeg gaar ud fra at du har checket din path images/themebg.png og er sikker paa at den er korrekt.  Det maa saaledes vaere CSS koden den er galt med.

Det er nogen tid siden jeg selv har bakset med baggrund-images, saa jeg googlede lidt rundt.  Paa alle de links jeg fandt foelger koden for background-image dette moenster:

body { background-image: url(bestandsnaam.gif) }

Saa proev at andre din CSS til dette og se om det virker bedre:

body {
    font: 11px Verdana, Arial, Helvetica, sans-serif;
    color: #000;
    background-image: url(images/themebg.png);
    background-color: #EEEEEE;
    margin: 0;
}
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester