» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 84
1 members and 83 guests
Elkingkong
Most users ever online was 611, 03-21-2008 at 10:10 PM.
» .::.
Web Hosting - web hosting, dedicated servers and web design services
Online Degree - search for 1000+ online degrees, online colleges & online universities.
Tattoo - we are a group of tattoo enthusiasts
Gexa Energy - your absolute best choice in electric service
Texas electricity - save on electric rates
Football Betting - best nfl betting promotions at sportsbook.com.
Oral Chelation - initial cleansing of your veins & arteries

Register Now! Contact Us

About this Page
This is a discussion on Javascript Banners with Helius within the Theme packs forums, part of the nukemods releases category; I have a modified banners addon that allows Java banners, like Commission Junction. This works well on all themes apart ...



Go Back   Nukemods Forum » nukemods releases » Theme packs

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-14-2003, 02:36 PM
Junior Member
 
Join Date: Dec 2002
Posts: 8
Javascript Banners with Helius
I have a modified banners addon that allows Java banners, like Commission Junction.

This works well on all themes apart from Helius, anyone know why? I just get the normal red X as if the picture cannot be found.
The banner can be viewed when you click Edit in the banners admin section though.

Cheers
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-14-2003, 02:43 PM
Junior Member
 
Join Date: Nov 2002
Location: Chicago, IL.
Posts: 50
I had the same problem with a different theme not the Helius HOWEVER it was due to a banner being used that was not of the same size required in the theme!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-14-2003, 02:44 PM
Senior Member
 
Join Date: Sep 2002
Posts: 2,905
Because the banner display was changed in the Nuke6.5 theme packs in order to move them to the right of the logo.
The banner code is moved to the theme.php, so if you had to edit any code in the banner.php, you may need to look in the theme.php as well to see if you need to make any changes to the code that was moved there.

mikem
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 05-14-2003, 02:55 PM
Junior Member
 
Join Date: Feb 2003
Posts: 3
Download banner upgrades 1.1 from palmloyal.com and install it (works perfect with phpnuke 6.5 see it on my site www.dutchies.be) than you can use scripts as normal, side or center banner

open the theme.php of any nukemods.com theme and find following code

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'"));
   /* 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>"; 
    }
}
and replace the code with this code

Code:
function themeheader() {
    global  $admin, $user, $banners, $sitename, $slogan, $cookie, $prefix, $db, $nukeurl, $anonymous, $name, $dbi;
    $bresult = sql_query("select * from ".$prefix."_banner WHERE type='0' AND active='1'", $dbi);
    $numrows = sql_num_rows($bresult, $dbi);

/* 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;
    }
    $bresult2 = sql_query("select bid, imageurl, clickurl, alttext, script, type, cid, imptotal, impmade, clicks, date from ".$prefix."_banner WHERE type='0' AND active='1' limit $bannum,1", $dbi);
    list($bid, $imageurl, $clickurl, $alttext, $script, $type, $cid, $imptotal, $impmade, $clicks, $date) = sql_fetch_row($bresult2, $dbi);

    if (!is_admin($admin)) {
	sql_query("update ".$prefix."_banner set impmade=impmade+1 where bid='$bid'", $dbi);
    }
    if($numrows>0) {
	$aborrar = sql_query("select cid, imptotal, impmade, clicks, date from ".$prefix."_banner where bid='$bid'", $dbi);
	list($cid, $imptotal, $impmade, $clicks, $date) = sql_fetch_row($aborrar, $dbi);

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

	if (($imptotal <= $impmade) AND ($imptotal != 0)) {
	    sql_query("update ".$prefix."_banner set active='0' WHERE bid='$bid'", $dbi);
	    $result = sql_query("select name, contact, email from ".$prefix."_bannerclient where cid='$cid'", $dbi);
	    list($c_name, $c_contact, $c_email) = sql_fetch_row($result, $dbi);
	    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());
	    }
	}
    if ($script=="") {$showbanners = "<a href=\"banners.php?op=click&bid=$bid\" target=\"_blank\"><img src=\"$imageurl\" border=\"0\" alt='$alttext' title='$alttext'></a>";} else {$showbanners = "$script";}
}
Now you can use java flash gif or whatever banner you like as site, center or normal banner

greetings

from a dutch nuker
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 05-15-2003, 05:28 AM
Junior Member
 
Join Date: Dec 2002
Posts: 8
nice, worked perfectly.

Cheers
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 07-14-2006, 08:41 PM
Junior Member
 
Join Date: Apr 2006
Posts: 1
Same question only for PHPNuke 7.8
How can I get script banners to display in Helius Theme?

Many thanks in advance!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Helius Blocks - fitting in two 88x31 banners GreenKnight37 Theme packs 0 08-07-2003 01:55 AM
Javascript Popup kevbocat Site design 0 06-08-2003 02:16 PM
JavaScript in nuke iphoenix Site design 15 05-31-2003 12:29 PM
Javascript help.. bosanac Site design 0 04-30-2003 04:06 PM
Adding Javascript Dman Purged Topics 4 03-14-2003 11:03 AM


All times are GMT -5. The time now is 10:27 PM.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.

LinkBacks Enabled by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31