Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Themes
Author Message
ANTH
Regular
Regular


Joined: May 27, 2005
Posts: 62

PostPosted: Sun Jul 23, 2006 3:22 am Reply with quote

Ok this is the code I have for theme.php

Code:
/************************************************************/

/* Function themeheader()                                   */
/************************************************************/
    function themeheader() {
    global $banners, $user, $cookie, $prefix, $user_prefix, $db, $dbi, $userinfo, $sitekey, $name;
   $ThemeSel = get_theme();
       if ($banners == 1) {
        @include_once("includes/babanners1.php");
    }

   if (file_exists("themes/$ThemeSel/functions.php")){
      require_once("themes/$ThemeSel/functions.php");
   }


Code:
/************************************************************/

/* Function themefooter()                                   */
/************************************************************/

function themefooter() {
    global $banners, $index, $user, $cookie, $prefix, $db, $dbi, $total_time, $start_time, $foot1, $foot2, $foot3, $foot4;
       if ($banners == 1) {
        @include_once("includes/babanners2.php");
    }

    $mtime = microtime();
    $mtime = explode(" ",$mtime);


And now my footer.php code to place the banner in there.

Code:
  echo "              </TABLE></td>\n";

  echo "              <td width=\"100%\"><div align=\"center\">\n";
  echo "                <table width=\"87%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" id=\"Table_01\">\n";
  echo "                  <tr>\n";
  echo "                    <td>\n";
  echo "                      <div align=\"center\">\n";
    if ($banners == 1) {
        include("includes/babanners2.php");
    }
  echo "</div></td>\n";
  echo "                  </tr>\n";
  echo "                </table>\n";
  echo "              </div></td>\n";


Im not sure what im doing wrong basically I just want a banner in my footer but its not showing at all.
 
View user's profile Send private message
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Sun Jul 23, 2006 4:56 am Reply with quote

Whats the babanners1.php?

Id sudjest removing the @ from the line and turning on error reporting. The @ will surpress the error and so will error reporting.

Once you have the error, perhaps youll see the ROOT of the problem, Post the error back and well be happy to help you solve it.

_________________
For those who stand shall NEVER fall and those who fall shall RISE once more!! 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
ANTH
PostPosted: Sun Jul 23, 2006 5:10 am Reply with quote

babanners1.php is from nuke scripts banners mod ive done what you said no errors showed. Dont understand why they arnt showing, my impressions are going up.
 
ANTH
PostPosted: Sun Jul 23, 2006 5:58 am Reply with quote

I also seem to have another problem now I went to try and put up a advertising block to see if that showed and my site went into a loop I had to remove it using msql?? Is this because of googletap?
 
gregexp
PostPosted: Sun Jul 23, 2006 7:27 am Reply with quote

I have no clue now, I'd have to see the actuall module you installed.
 
ANTH
PostPosted: Sun Jul 23, 2006 10:47 am Reply with quote

This one Only registered users can see links on this board! Get registered or login!
 
ANTH
PostPosted: Sun Jul 23, 2006 12:05 pm Reply with quote

Nevermind I scrapped the mod banner module and went back to the orignal one now I have it in my footer and it worsk fine until I log in then it dissapears. Any ideas why?

An error dont know if its connected.
Code:
[Sun Jul 23 17:48:21 2006] [error] PHP Fatal error:  Cannot redeclare viewbanner() (previously declared in /home/deltas00/public_html/index/banners.php:26) in /home/deltas00/public_html/index/banners.php on line 96
 
gregexp
PostPosted: Sun Jul 23, 2006 1:51 pm Reply with quote

post your banners.php and Ill look at the code.
 
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6793
Location: Ha Noi, Viet Nam

PostPosted: Sun Jul 23, 2006 2:33 pm Reply with quote

Banners will not be shown to 'Subscribed' users in versions 7.5+ but if that is what is happening in your particular case and you want to show banners to everyone, I think it is the is_paid() function that needs removing.
 
View user's profile Send private message Send e-mail
ANTH
PostPosted: Mon Jul 24, 2006 3:26 am Reply with quote

yes your right its because of the subscription Very Happy .

the closest code I could see to is_paid()

Code:
/********************************************/

/* Function to display banners in all pages */
/********************************************/

function viewbanner() {
   global $prefix, $db, $admin, $sitename, $adminmail, $nukeurl;
   if (paid()) {
      return;
   }
   $numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_banner WHERE type='0' AND active='1'"));


I tried to remove that but then got an error on line 94 which is this



Code:
      echo"<center><a href=\"banners.php?op=click&amp;bid=$bid\" target=\"_blank\"><img src=\"$imageurl\" border=\"0\" alt='$alttext' title='$alttext'></a></center>";



Here is my banners.php if someone would be so kind to take a look at it and see if they can help
Only registered users can see links on this board! Get registered or login! Very Happy
 
gregexp
PostPosted: Mon Jul 24, 2006 6:48 pm Reply with quote

Change that to :
function viewbanner() {
global $prefix, $db, $admin, $sitename, $adminmail, $nukeurl;
$numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_banner WHERE type='0' AND active='1'"));

This may work and may NOT, its untested and I dont have the code to verify what paid is.
 
ANTH
PostPosted: Thu Jul 27, 2006 5:21 am Reply with quote

nice one m8 that worked fine.

Thank you
 
gregexp
PostPosted: Thu Jul 27, 2006 6:44 am Reply with quote

np glad to hear it.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Themes

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 ©