PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Author Message
tommyb
Hangin' Around


Joined: May 31, 2006
Posts: 49

PostPosted: Tue Jul 04, 2006 2:01 am Reply with quote Back to top

Hi,

Was there any major reason why the ads function was removed from mainfile.php? Or had I deleted myself somehow for some bizarre reason??It's just that I needed it for an advertising module and I wondered if it was removed for an obvious security reason?

Many Thanks

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


Joined:
Posts: 5661

PostPosted: Tue Jul 04, 2006 6:35 am Reply with quote Back to top

Ads function ?
Huh...explain....
View user's profile Send private message
tommyb
Hangin' Around


Joined: May 31, 2006
Posts: 49

PostPosted: Tue Jul 04, 2006 6:50 am Reply with quote Back to top

Well in a 7.8 nuke site in the mainfile.php there is the following function
Code:
function ads($position) {

   global $prefix, $db, $admin, $sitename, $adminmail, $nukeurl;

   $position = intval($position);

   if (paid()) {

      return;

   }

   $numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_banner WHERE position='$position' AND active='1'"));

   /* Get a random banner if exist any. */

   if ($numrows > 1) {

      $numrows = $numrows-1;

      mt_srand((double)microtime()*1000000);

      $bannum = mt_rand(0, $numrows);

   } else {

      $bannum = 0;

   }

   $sql = "SELECT bid, impmade, imageurl, clickurl, alttext FROM ".$prefix."_banner WHERE position='$position' 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];

   $db->sql_query("UPDATE ".$prefix."_banner SET impmade=impmade+1 WHERE bid='$bid'");

   if($numrows > 0) {

      $sql2 = "SELECT cid, imptotal, impmade, clicks, date, ad_class, ad_code, ad_width, ad_height FROM ".$prefix."_banner WHERE bid='$bid'";

      $result2 = $db->sql_query($sql2);

      $row2 = $db->sql_fetchrow($result2);

      $cid = $row2[cid];

      $imptotal = $row2[imptotal];

      $imptotal = intval($imptotal);

      $impmade = $row2[impmade];

      $impmade = intval($impmade);

      $clicks = $row2[clicks];

      $clicks = intval($clicks);

      $date = $row2[date];

      $ad_class = $row2[ad_class];

      $ad_code = $row2[ad_code];

      $ad_width = $row['ad_width'];

      $ad_height = $row['ad_height'];

      /* 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."_banner_clients 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());

         }

      }

      if ($ad_class == "code") {

         $ad_code = stripslashes(FixQuotes($ad_code));

         $ads = "<center>$ad_code</center>";

      } elseif ($ad_class == "flash") {

         $ads = "<center>

            <OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"

            codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0\"

            WIDTH=\"$ad_width\" HEIGHT=\"$ad_height\" id=\"$bid\">

            <PARAM NAME=movie VALUE=\"$imageurl\">

            <PARAM NAME=quality VALUE=high>

            <EMBED src=\"$imageurl\" quality=high WIDTH=\"$ad_width\" HEIGHT=\"$ad_height\"

            NAME=\"$bid\" ALIGN=\"\" TYPE=\"application/x-shockwave-flash\"

            PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\">

            </EMBED>

            </OBJECT>

            </center>";

      } else {

         $ads = "<center><a href=\"index.php?op=ad_click&amp;bid=$bid\" target=\"_blank\"><img src=\"$imageurl\" border=\"0\" alt='$alttext' title='$alttext'></a></center>";

      }

   } else {

      $ads = "";   

   }

   return($ads);

}

Yet this was not present in the mainfile of a raven install. Maybe i'm just going crazy and forgot I added something.

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


Joined:
Posts: 5661

PostPosted: Tue Jul 04, 2006 7:52 am Reply with quote Back to top

and why do you need it?
Im not sure but my guess is that FB changed some code of the banner placement....
FB loves the use of new shitty function so he can manipulate people into newer versions.
im just guessing here cause i never looked at anything else above the 7.6
View user's profile Send private message
tommyb
Hangin' Around


Joined: May 31, 2006
Posts: 49

PostPosted: Tue Jul 04, 2006 7:53 am Reply with quote Back to top

I just needed it for an advertising module. I was having problems with it and it was because this was removed but I wanted to check it hadn't been removed from Ravennuke due to some gaping security problem
View user's profile Send private message
hitwalker
Sells PC To Pay For Divorce


Joined:
Posts: 5661

PostPosted: Tue Jul 04, 2006 8:01 am Reply with quote Back to top

maybe but advertising module doesnt say much.. Sad
ravennuke uses the standard banner code as its allways been...
if you used a different system or whatever (is a bit unclear) then you have to alter it where needed.
View user's profile Send private message
tommyb
Hangin' Around


Joined: May 31, 2006
Posts: 49

PostPosted: Tue Jul 04, 2006 8:11 am Reply with quote Back to top

It was from pcnuke as I wanted to allow flash banners and the ability to have them positioned in various positions. I've altered the code to get it all working but i just thought I'd post here to see if the function was removed for security reasons Smile no worries!
View user's profile Send private message
hitwalker
Sells PC To Pay For Divorce


Joined:
Posts: 5661

PostPosted: Tue Jul 04, 2006 8:18 am Reply with quote Back to top

well these lines/codes aren't standard but there are some fixes to show flasbanners,but then you have to search for that....
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9136
Location: Arizona

PostPosted: Thu Jul 06, 2006 10:39 pm Reply with quote Back to top

Quote:

Well in a 7.8 nuke site in the mainfile.php there is the following function


RavenNuke is PHP-Nuke 76 at the core. The ad/banner system was changed in a higher level of nuke, but don't know which one. BUT, we know for certain that at least 7.8 had it differently... Wink
View user's profile Send private message Visit poster's website
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.

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum