bestbuildpc: Forums
 

 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Converting themes
 
 
Post new topic   Reply to topic    bestbuildpc Forum Index -> RavenNuke -> Themes
View previous topic :: View next topic  
Author Message
altered
Newbie
Newbie


Joined: Aug 16, 2012
Posts: 7
Location: Maryland

PostPosted: Sat Nov 15, 2014 19:46    Post subject: Converting themes Reply with quote

I would be glad to help here if anyone has any questions or themes.
  
Back to top
View user's profile Send private message Visit poster's website
bestbuildpc
Site Admin
Site Admin


Joined: Jun 30, 2012
Posts: 210
Location: NL

PostPosted: Wed Mar 29, 2023 15:17    Post subject: Reply with quote

OLD

Code:
function themeheader() {

    global  $admin, $user, $banners, $sitename, $slogan, $cookie, $prefix, $db, $nukeurl, $anonymous;
    if ($banners == 1) {   
    $numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_banner WHERE type='0' AND active='1'"));
 

    if ($numrows>1) {
   $numrows = $numrows-1;
   mt_srand((double)microtime()*1000000);
   $bannum = mt_rand(0, $numrows);
    } else {
   $bannum = 0;
    }
    $sql = "SELECT bid, imageurl, clickurl, alttext FROM ".$prefix."_banner WHERE type='0' AND active='1' LIMIT $bannum,1";
    $result = $db->sql_query($sql);
    $row = $db->sql_fetchrow($result);
    $bid = $row[bid];
    $imageurl = $row[imageurl];
    $clickurl = $row[clickurl];
    $alttext = $row[alttext];
   
    if (!is_admin($admin)) {
       $db->sql_query("UPDATE ".$prefix."_banner SET impmade=impmade+1 WHERE bid='$bid'");
    }
    if($numrows>0) {
   $sql2 = "SELECT cid, imptotal, impmade, clicks, date FROM ".$prefix."_banner WHERE bid='$bid'";
   $result2 = $db->sql_query($sql2);
   $row2 = $db->sql_fetchrow($result2);
   $cid = $row2[cid];
   $imptotal = $row2[imptotal];
   $impmade = $row2[impmade];
   $clicks = $row2[clicks];
   $date = $row2[date];

/* Check if this impression is the last one and print the banner */

   if (($imptotal <= $impmade) AND ($imptotal != 0)) {
       $db->sql_query("UPDATE ".$prefix."_banner SET active='0' WHERE bid='$bid'");
       $sql3 = "SELECT name, contact, email FROM ".$prefix."_bannerclient WHERE cid='$cid'";
       $result3 = $db->sql_query($sql3);
       $row3 = $db->sql_fetchrow($result3);
       $c_name = $row3[name];
       $c_contact = $row3[contact];
       $c_email = $row3[email];
       if ($c_email != "") {
      $from = "$sitename <$adminmail>";
      $to = "$c_contact <$c_email>";
      $message = ""._HELLO." $c_contact:\n\n";
      $message .= ""._THISISAUTOMATED."\n\n";
      $message .= ""._THERESULTS."\n\n";
      $message .= ""._TOTALIMPRESSIONS." $imptotal\n";
      $message .= ""._CLICKSRECEIVED." $clicks\n";
      $message .= ""._IMAGEURL." $imageurl\n";
      $message .= ""._CLICKURL." $clickurl\n";
      $message .= ""._ALTERNATETEXT." $alttext\n\n";
      $message .= ""._HOPEYOULIKED."\n\n";
      $message .= ""._THANKSUPPORT."\n\n";
      $message .= "- $sitename "._TEAM."\n";
      $message .= "$nukeurl";
      $subject = "$sitename: "._BANNERSFINNISHED."";
      mail($to, $subject, $message, "From: $from\nX-Mailer: PHP/" . phpversion());
       }
   }
    $showbanners = "<a href=\"banners.php?op=click&bid=$bid\" target=\"_blank\"><img src=\"$imageurl\" border=\"0\" alt='$alttext' title='$alttext'></a>&nbsp;";
    }
}
        cookiedecode($user);
    $username = $cookie[1];
    if ($username == "") {
        $username = "Anonymous";
    }
    echo "<body bgcolor=\"#121a58\" text=\"#EFECD6\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">";
   
    if ($username == "Anonymous") {
   $theuser = "&nbsp;&nbsp;<a href=\"account.html\">"._LOGIN."</a> or <a href=\"account-new_user.html\">"._BREG."</a>";
    } else {
   $theuser = "&nbsp;&nbsp;"._BWEL."&nbsp;back&nbsp; $username!";
    }
   
                       $datetime = "<script type=\"text/javascript\">\n\n"
           ."<!--   // Array ofmonth Names\n"
           ."var monthNames = new Array( \""._JANUARY."\",\""._FEBRUARY."\",\""._MARCH."\",\""._APRIL."\",\""._MAY."\",\""._JUNE."\",\""._JULY."\",\""._AUGUST."\",\""._SEPTEMBER."\",\""._OCTOBER."\",\""._NOVEMBER."\",\""._DECEMBER."\");\n"
           ."var now = new Date();\n"
           ."thisYear = now.getYear();\n"
           ."if(thisYear < 1900) {thisYear += 1900}; // corrections if Y2K display problem\n"
           ."document.write(monthNames[now.getMonth()] + \" \" + now.getDate() + \", \" + thisYear);\n"
           ."// -->\n\n"
           ."</script>";
          
               $public_msg = public_message();
    $tmpl_file = "themes/WS_BlueX/header.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
    blocks(left);
    $tmpl_file = "themes/WS_BlueX/left_center.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}




Replace with

Code:
function themeheader() {

    global  $admin, $user, $banners, $sitename, $slogan, $prefix, $db, $nukeurl, $anonymous, $nukeNAV;
   if ($banners) {
      $adText = '';
      $adText = ads(0);
      if (!empty($adText)) {
         $showbanners = $adText;
      } else {
         $showbanners = '';
      }
   };   
   if ($showbanners != '') {
   echo '<div class="headerbanner">' . $showbanners . '</div>' . PHP_EOL;
    }
   $userinfo = array();
   $username = '';
   if (is_user($user)) {
      $userinfo = getusrinfo($user);
      $username = htmlspecialchars(check_html($userinfo['username'], 'nothtml'), ENT_QUOTES, _CHARSET);
    }   
    if ($username == '') {
        $username = 'Anonymous';
    }

   $datetime = "<script type=\"text/javascript\">\n\n"
   ."<!--   // Array ofmonth Names\n"
   ."var monthNames = new Array( \""._JANUARY."\",\""._FEBRUARY."\",\""._MARCH."\",\""._APRIL."\",\""._MAY."\",\""._JUNE."\",\""._JULY."\",\""._AUGUST."\",\""._SEPTEMBER."\",\""._OCTOBER."\",\""._NOVEMBER."\",\""._DECEMBER."\");\n"
   ."var now = new Date();\n"
   ."thisYear = now.getYear();\n"
   ."if(thisYear < 1900) {thisYear += 1900}; // corrections if Y2K display problem\n"
   ."document.write(monthNames[now.getMonth()] + \" \" + now.getDate() + \", \" + thisYear);\n"
   ."// -->\n\n"
   ."</script>";


    echo '<body bgcolor="#ffffff" text="#000000" leftmargin="10" topmargin="10" marginwidth="10" marginheight="10">' . PHP_EOL;
   if ($username == 'Anonymous') {
      $theuser = '<a href="account.html">' . _LOGIN . '</a> or <a href="account-new_user.html">' . _BREG . '</a>';
    } else {
      $theuser = '&nbsp;&nbsp;' . _BWEL . ' ' . $username . '!';
    }   

   echo '<div class="headerwrap">' . PHP_EOL
      . '   <div class="header">' . PHP_EOL
      . '      <div class="headermid">' . PHP_EOL
      . '         <a href="./"><img src="themes/MacOS/images/home.gif" border="0" alt="Homepage"></a>' . PHP_EOL
      . '         <a href="account.html"><img src="themes/MacOS/images/account.gif" border="0" alt="My Account"></a>' . PHP_EOL
      . '         <a href="downloads.html"><img src="themes/MacOS/images/down.gif" border="0" alt="Downloads"></a>' . PHP_EOL
      . '         <a href="forums.html"><img src="themes/MacOS/images/forum.gif" border="0" alt="Forums"></a></div>' . PHP_EOL
      . '      <div class="headerleft"></div>' . PHP_EOL
      . '      <div class="headerright"></div>' . PHP_EOL
      . '      <div class="menuebar">' . PHP_EOL
      . '         <div class="menueleft"><span>' . $sitename . '</span></div>' . PHP_EOL
      . '         <div class="menuemid">' . $nukeNAV . '</div>' . PHP_EOL
      . '         <div class="menueright"><span>' . $theuser . '</span></div>' . PHP_EOL
      . '      </div>' . PHP_EOL     
      . '   </div>' . PHP_EOL
      . '</div>' . PHP_EOL
      . '<br class="clear-both" />' . PHP_EOL
      . '<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center">' . PHP_EOL
      . '<tr valign="top">' . PHP_EOL
      . '   <td valign="top" width="1">' . PHP_EOL;
           
   $public_msg = public_message();
     blocks('l');
    $tmpl_file = "themes/MacOS/left_center.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}


open: styles/styles.css and add this at the end of file:

Code:
.headerbanner {width:100%; vertical-align:top; text-align:center;}

.headerwrap {width:100%; vertical-align:top;}
.header {background:url('themes/MacOS/images/headbkgn.gif'); position:relative}
.headerleft {width:150px; height:120px; vertical-align:top; background:url('../../../themes/MacOS/images/logo.gif') 0 -2px; float:left;}
.headerright {width:150px; height:120px; vertical-align:top; background:url('../../../themes/MacOS/images/logo.gif') 0 -2px; float:right;}
.headermid {text-align:center; vertical-align:top; position:absolute; width:100%; top:37px;}
.menuebar {clear:both; width:100%; height:24px; background:url('../../../themes/MacOS/images/foot4.gif') repeat-x;}
.menueleft {width:12%; height:24px; background:url('../../../themes/MacOS/images/foot1.gif') left no-repeat; float:left;}
.menueright {width:13%; height:24px; background:url('../../../themes/MacOS/images/foot3.gif') right no-repeat; float:right; text-align:right;}
.menueleft span, .menueright span {display:block; margin-top:4px;}
.menueleft span {margin-left:10px;}
.menueright span {margin-right:10px;}
  
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    bestbuildpc Forum Index -> RavenNuke -> Themes All times are GMT + 2 Hours
 
 Page 1 of 1

 

Jump to:   
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001-2008 phpBB Group
 
Forums ©