Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.0
Author Message
dbK
New Member
New Member



Joined: Nov 17, 2004
Posts: 3

PostPosted: Sun Jan 02, 2005 12:46 pm Reply with quote

I want to display banner ads on my site, so I activated the ads.. however, they show up above all my content. There's a portion in my skin where I'd like to show the banners, but I don't know how. My site is [ Only registered users can see links on this board! Get registered or login! ] and I'd like to put the banners to the right of the profile and log in/out buttons.

Thanks.
 
View user's profile Send private message
hitwalker
Sells PC To Pay For Divorce



Joined:
Posts: 5661

PostPosted: Sun Jan 02, 2005 4:44 pm Reply with quote

hi,

yes your right and its a little bit weird but you cannot put up the banner in a proper way cause it will get into conflict with the buttons from the header.
the only way to use it anyway is with the use of small banners.
other option (is better) is to change the header,take out the button design and your done...
 
View user's profile Send private message
dbK







PostPosted: Mon Jan 03, 2005 10:30 am Reply with quote

So how would I go about doing that?
 
hitwalker







PostPosted: Mon Jan 03, 2005 1:38 pm Reply with quote

well thats usualy easier said then done.
Personaly i think you made the wrong choice for a theme.
It takes a lot of work fixing it.
And the only fast option is to delete the top part...
So i gave it a try...

The below is the theme.php but stripped...


Code:


<?php
function OpenTable() {
    global $bgcolor1, $bgcolor2;
    echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">
  <tr>
    <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">
        <tr>
          <td bgcolor=\"#CCCCCC\"><table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\" bgcolor=\"#303032\">
              <tr>
                <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">
                    <tr>
                      <td background=\"themes/Charcoal2/forums/images/bk-z.jpg\" bgcolor=\"#C0C0C0\"><table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\">
                          <tr>
                            <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">
                                <tr>
                                  <td background=\"themes/Charcoal2/forums/images/bk-z.jpg\" bgcolor=\"#8A8C91\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">
                                      <tr>
                                        <td>";
}

function CloseTable() {
    echo "</td>
                                      </tr>
                                    </table></td>
                                </tr>
                              </table></td>
                          </tr>
                         
                        </table></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>";
}

function OpenTable2() {
    global $bgcolor1, $bgcolor2;
    echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"$bgcolor2\" align=\"center\"><tr><td>\n";
    echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"8\" bgcolor=\"$bgcolor1\"><tr><td>\n";
}

function CloseTable2() {
    echo "</td></tr></table></td></tr></table>\n";
}

/************************************************************/
/* Function themeheader()                                   */
/*                                                          */
/* Control the header for your site. You need to define the */
/* BODY tag and in some part of the code call the blocks    */
/* function for left side with: blocks(left);               */
/************************************************************/

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'"));
   /* Get a random banner if exist any. */
   /* More efficient random stuff, thanks to Cristian Arroyo from http://www.planetalinux.com.ar */

    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><br><br>";
    }
}
        cookiedecode($user);
    $username = $cookie[1];
    if ($username == "") {
        $username = "Anonymous";
    }
    echo "<scr   ipt type=\"text/javascript\" language=\"Java    Script1.2\" src=\"themes/Charcoal2/jscript/imageswap.js\"></sc      ript><center>\n\n\n";
    echo "<body bgcolor=\"#8A8C91\" text=\"#DCDCDC\" leftmargin=\"10\" topmargin=\"10\" marginwidth=\"10\" marginheight=\"10\">\n";
   
    if ($username == "Anonymous") {
   $theuser = "&nbsp;&nbsp;<a href=\"account.html\">"._LOGIN."</a> or <a href=\"account-new_user.html\">"._BREG."</a>\n";
    } else {
   $theuser = "&nbsp;&nbsp;"._BWEL." $username!";
    }
   $public_msg = public_message();
   
echo"$showbanners<table class=\"bodyline\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\"> "
  . "   <tr> "
  . "      <td align=\"center\" valign=\"top\">\n"
  . "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"
  . "<tr>\n"
  . "<td width=\"349\"><img src=\"themes/Charcoal2/forums/images/logo.jpg\" alt=\"\" height=\"58\" width=\"349\" border=\"0\"></td>\n"
  . "<td align=\"right\" width=\"296\"></td>\n"
  . "<td>&nbsp;</td>\n"
  . "</tr>\n"
  . "<tr>\n"
  . "<td width=\"349\"><img src=\"themes/Charcoal2/forums/images/slogan.jpg\" alt=\"\" height=\"30\" width=\"349\" border=\"0\"></td>\n"
  . "<td>&nbsp;</td>\n"
  . "</tr>\n"
  . "</table>\n"
  . "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"
  . "<tr>\n";
if ($username == "Anonymous") {
echo "<td width=\"201\"><a href=\"account.html\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('login','','themes/Charcoal2/forums/images/login_on.jpg')\"><img src=\"themes/Charcoal2/forums/images/login.jpg\" alt=\"\" name=\"login\" height=\"37\" width=\"201\" border=\"0\"></a></td>\n";
  } else {
echo "<td width=\"201\"><a href=\"account-logout.html\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('login','','themes/Charcoal2/forums/images/login_on.jpg')\"><img src=\"themes/Charcoal2/forums/images/login.jpg\" alt=\"\" name=\"login\" height=\"37\" width=\"201\" border=\"0\"></a></td>\n";
}
echo "<td>&nbsp;</td>\n"
  . "</tr>\n"
  . "</table>\n"
  . "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\">\n"
  . "      <tr valign=\"top\">\n"
  . "        <td>$public_msg<img src=\"themes/Charcoal2/images/pixel.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\"></td>\n"
  . "</tr></table>\n"
  . "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\">\n"
  . "<tr valign=\"top\">\n"
  . "  <td valign=\"top\" width=\"1\" background=\"themes/Charcoal2/images/7px.gif\">\n"
  . "";
    blocks(left);
echo "</td><td valign=\"top\" width=\"100%\">\n";
}

/************************************************************/
/* Function themefooter()                                   */
/*                                                          */
/* Control the footer for your site. You don't need to      */
/* close BODY and HTML tags at the end. In some part call   */
/* the function for right blocks with: blocks(right);       */
/* Also, $index variable need to be global and is used to   */
/* determine if the page your're viewing is the Homepage or */
/* and internal one.                                        */
/************************************************************/

function themefooter() {
    global $index, $foot1, $foot2, $foot3, $foot4, $copyright, $totaltime, $footer_message;
    if ($index == 1) {
echo "</td><td valign=\"top\" width=\"165\">\n";
   blocks(right);
    }   
echo"</td>\n"
  . "</table>\n"
  . "<body>\n"
  . "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">\n"
  . "  <tr>\n"
  . "    <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">\n"
  . "        <tr>\n"
  . "          <td><div align=\"center\"><font class=\"small\">$footer_message</font></div></td>\n"
  . "        </tr>\n"
  . "        <tr>\n"
  . "          <td><div align=\"center\"></div></td>\n"
  . "        </tr>\n"
  . "      </table></td>\n"
  . "  </tr>\n"
  . "</table>\n"
 ."";
                echo "<center>\n";
        $footer_message = footmsg();
// DO NOT TOUCH THE NEXT LINE(s). DOING SO VIOLATES THE COPYRIGHTS OF THIS THEME
// YOU CAN ONLY ADD TO IT IF YOU MODIFY THIS THEME :-)
            echo "</center>\n";
        echo "<center><br><font class=\"small\">:: Charcoal2 phpbb2 style by <a href=\"http://www.zarron.com/\">zarron designs</a> &copy; :: PHP-Nuke theme by <a href=\"http://www.nukemods.com\">www.nukemods.com</a> &copy; ::</font></center>\n"; 
   echo "<br>\n";
}

/************************************************************/
/* Function themeindex()                                    */
/*                                                          */
/* This function format the stories on the Homepage         */
/************************************************************/

function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
    global $anonymous, $tipath;
    if ($notes != "") {
   $notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
    } else {
   $notes = "";
    }
    if ("$aid" == "$informant") {
   $content = "$thetext$notes\n";
    } else {
   if($informant != "") {
       $content = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant\">$informant</a> ";
   } else {
       $content = "$anonymous ";
   }
   $content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
    }
    $posted = ""._POSTEDBY." ";
    $posted .= get_author($aid);
    $posted .= " "._ON." $time $timezone ($counter "._READS.")";
echo"<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">\n"
  . "  <tr>\n"
  . "    <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n"
  . "        <tr>\n"
  . "          <td bgcolor=\"#CCCCCC\"><table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\" bgcolor=\"#303032\">\n"
  . "              <tr>\n"
  . "                <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">\n"
  . "                    <tr>\n"
  . "                      <td background=\"themes/Charcoal2/forums/images/bk-z.jpg\" bgcolor=\"#C0C0C0\"><table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\">\n"
  . "                          <tr>\n"
  . "                            <td height=\"28\" background=\"themes/Charcoal2/forums/images/sidebox_background2.gif\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\">\n"
  . "                                <tr>\n"
  . "                                  <td><font class=\"block-title\"><strong>$title</strong></font></td>\n"
  . "                                </tr>\n"
  . "                              </table></td>\n"
  . "                          </tr>\n"
  . "                          <tr>\n"
  . "                            <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n"
  . "                                <tr>\n"
  . "                                  <td background=\"themes/Charcoal2/forums/images/bk-z.jpg\" bgcolor=\"#8A8C91\"><a href=\"modules.php?name=News&amp;new_topic=$topic\"><img src=\"$tipath$topicimage\" border=\"0\" alt=\"$topictext\" title=\"$topictext\" align=\"right\" hspace=\"10\" vspace=\"10\"></a><font class=\"storycontent\">$content</font></td>\n"
  . "                                </tr>\n"
  . "                              </table></td>\n"
  . "                          </tr>\n"
  . "                          <tr>\n"
  . "                            <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n"
  . "                                <tr>\n"
  . "                                  <td background=\"themes/Charcoal2/forums/images/bk-w.jpg\" bgcolor=\"#8A8C91\"><div align=\"center\"><font class=\"content\">$posted</font><br><font class=\"content\">$morelink</font></div></td>\n"
  . "                                </tr>\n"
  . "                              </table></td>\n"
  . "                          </tr>\n"
  . "                        </table></td>\n"
  . "                    </tr>\n"
  . "                  </table></td>\n"
  . "              </tr>\n"
  . "            </table></td>\n"
  . "        </tr>\n"
  . "      </table></td>\n"
  . "  </tr>\n"
  . "</table>\n"
 ."";
}

/************************************************************/
/* Function themearticle()                                  */
/*                                                          */
/* This function format the stories on the story page, when */
/* you click on that "Read More..." link in the home        */
/************************************************************/

function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
    global $admin, $sid, $tipath;
    $posted = ""._POSTEDON." $datetime "._BY." ";
    $posted .= get_author($aid);
    if ($notes != "") {
   $notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
    } else {
   $notes = "";
    }
    if ("$aid" == "$informant") {
   $content = "$thetext$notes\n";
    } else {
   if($informant != "") {
       $content = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant\">$informant</a> ";
   } else {
       $content = "$anonymous ";
   }
   $content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
    }
echo"<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">\n"
  . "  <tr>\n"
  . "    <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n"
  . "        <tr>\n"
  . "          <td bgcolor=\"#CCCCCC\"><table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\" bgcolor=\"#303032\">\n"
  . "              <tr>\n"
  . "                <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">\n"
  . "                    <tr>\n"
  . "                      <td background=\"themes/Charcoal2/forums/images/bk-z.jpg\" bgcolor=\"#C0C0C0\"><table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\">\n"
  . "                          <tr>\n"
  . "                            <td height=\"28\" background=\"themes/Charcoal2/forums/images/sidebox_background2.gif\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\">\n"
  . "                                <tr>\n"
  . "                                  <td><font class=\"block-title\"><strong>$title</strong></font></td>\n"
  . "                                </tr>\n"
  . "                              </table></td>\n"
  . "                          </tr>\n"
  . "                          <tr>\n"
  . "                            <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n"
  . "                                <tr>\n"
  . "                                  <td background=\"themes/Charcoal2/forums/images/bk-z.jpg\" bgcolor=\"#8A8C91\"><a href=\"modules.php?name=News&amp;new_topic=$topic\"><img src=\"$tipath$topicimage\" border=\"0\" alt=\"$topictext\" title=\"$topictext\" align=\"right\" hspace=\"10\" vspace=\"10\"></a><font class=\"storycontent\">$content</font></td>\n"
  . "                                </tr>\n"
  . "                              </table></td>\n"
  . "                          </tr>\n"
  . "                          <tr>\n"
  . "                            <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n"
  . "                                <tr>\n"
  . "                                  <td background=\"themes/Charcoal2/forums/images/bk-w.jpg\" bgcolor=\"#8A8C91\"><div align=\"center\"><font class=\"content\">$posted</font><br><font class=\"content\"></font></div></td>\n"
  . "                                </tr>\n"
  . "                              </table></td>\n"
  . "                          </tr>\n"
  . "                        </table></td>\n"
  . "                    </tr>\n"
  . "                  </table></td>\n"
  . "              </tr>\n"
  . "            </table></td>\n"
  . "        </tr>\n"
  . "      </table></td>\n"
  . "  </tr>\n"
  . "</table>\n"
 ."";
}

/************************************************************/
/* Function themesidebox()                                  */
/*                                                          */
/* Control look of your blocks. Just simple.                */
/************************************************************/

function themesidebox($title, $content) {
echo"<table width=\"165\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">\n"
  . "  <tr>\n"
  . "    <td><table width=\"165\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">\n"
  . "        <tr>\n"
  . "          <td bgcolor=\"#696969\"><table width=\"100%\" border=\"0\" cellpadding=\"1\" cellspacing=\"0\">\n"
  . "              <tr>\n"
  . "                <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"
  . "                    <tr>\n"
  . "                      <td bgcolor=\"#C0C0C0\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"
  . "                          <tr>\n"
  . "                            <td height=\"28\" background=\"themes/Charcoal2/forums/images/sidebox_background.gif\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\">\n"
  . "                                <tr>\n"
  . "                                  <td><font class=\"block-title\"><strong>$title</strong></font></td>\n"
  . "                                </tr>\n"
  . "                              </table></td>\n"
  . "                          </tr>\n"
  . "                          <tr>\n"
  . "                            <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n"
  . "                                <tr>\n"
  . "                                  <td background=\"themes/Charcoal2/forums/images/dkback.gif\" bgcolor=\"#8A8C91\"><font class=\"content\">$content</font></td>\n"
  . "                                </tr>\n"
  . "                              </table></td>\n"
  . "                          </tr>\n"
  . "                          <tr>\n"
  . "                            <td height=\"15\" background=\"themes/Charcoal2/forums/images/slogan_blank.jpg\">&nbsp;</td>\n"
  . "                          </tr>\n"
  . "                        </table></td>\n"
  . "                    </tr>\n"
  . "                  </table></td>\n"
  . "              </tr>\n"
  . "            </table></td>\n"
  . "        </tr>\n"
  . "      </table></td>\n"
  . "  </tr>\n"
  . "</table>\n"
 ."";
}

?>
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.0

View next topic
View previous topic
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 can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©