Author |
Message |
ANTH
Regular


Joined: May 27, 2005
Posts: 62
|
Posted:
Sun Jul 23, 2006 3:22 am |
|
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. |
|
|
|
 |
gregexp
The Mouse Is Extension Of Arm

Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol
|
Posted:
Sun Jul 23, 2006 4:56 am |
|
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!! |
|
 |
 |
ANTH

|
Posted:
Sun Jul 23, 2006 5:10 am |
|
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

|
Posted:
Sun Jul 23, 2006 5:58 am |
|
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

|
Posted:
Sun Jul 23, 2006 7:27 am |
|
I have no clue now, I'd have to see the actuall module you installed. |
|
|
|
 |
ANTH

|
Posted:
Sun Jul 23, 2006 10:47 am |
|
|
|
 |
ANTH

|
Posted:
Sun Jul 23, 2006 12:05 pm |
|
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

|
Posted:
Sun Jul 23, 2006 1:51 pm |
|
post your banners.php and Ill look at the code. |
|
|
|
 |
Guardian2003
Site Admin

Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Sun Jul 23, 2006 2:33 pm |
|
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. |
|
|
|
 |
ANTH

|
Posted:
Mon Jul 24, 2006 3:26 am |
|
yes your right its because of the subscription .
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&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!  |
|
|
|
 |
gregexp

|
Posted:
Mon Jul 24, 2006 6:48 pm |
|
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

|
Posted:
Thu Jul 27, 2006 5:21 am |
|
nice one m8 that worked fine.
Thank you |
|
|
|
 |
gregexp

|
Posted:
Thu Jul 27, 2006 6:44 am |
|
|
|
 |
|