Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
jib_intelli
Hangin' Around


Joined: Aug 17, 2004
Posts: 43

PostPosted: Sun Jun 05, 2005 1:22 pm Reply with quote

Hi, There is an error in the Random supporters block, the images of the random supporters are shown outside the block and not in it. Has anyone fixed this?
 
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17086

PostPosted: Sun Jun 05, 2005 2:02 pm Reply with quote

That is usually an indication that an echo statement was used instead of assigning the image to the $content variable. If you are unable to figure it out, then post the code using the bbcode.
 
View user's profile Send private message
jib_intelli
PostPosted: Sun Jun 05, 2005 2:11 pm Reply with quote

Here is the code Raven:

Code:
<?php


/********************************************************/
/* NSN Supporters                                       */
/* By: NukeScripts Network (webmaster@nukescripts.net)  */
/* http://www.nukescripts.net                           */
/* Copyright © 2000-2005 by NukeScripts Network         */
/********************************************************/

if(!defined('NUKE_FILE') AND !defined('BLOCK_FILE')) {
  Header("Location: ../index.php");
  die();
}
include_once("includes/nsnsp_func.php");
$sp_config = spget_configs();
get_lang("Supporters");
global $prefix, $db, $user, $admin, $admin_file;
if(!isset($admin_file)) { $admin_file = "admin"; }
$content = "<center>"._SP_SUPPORTEDBY."<br><br>";
$j = 1;
while($j <= 5) {
  $sresult = $db->sql_query("SELECT `site_id` FROM `".$prefix."_nsnsp_sites` WHERE `site_status`='1'");
  $numrows = $db->sql_numrows($sresult);
  if($numrows==1) {
    list ($siteid) = $db->sql_fetchrow($sresult);
  } else if($numrows > 1) {
    $i = 1;
    while(list ($stid) = $db->sql_fetchrow($sresult)) {
      $abid[$i] = $stid;
      $i++;
    }
    $siteid = $abid[rand(1, $numrows)];
  } else {
    $siteid = 0;
  }
  if($j == 1) {
    $sitelist = "WHERE `site_id`='$siteid'";
  } else {
    $sitelist = $sitelist." OR `site_id`='$siteid'";
  }
  $j++;
}
$result = $db->sql_query("SELECT `site_id`, `site_name`, `site_image` FROM `".$prefix."_nsnsp_sites` $sitelist");
while(list($site_id, $site_name, $site_image) = $db->sql_fetchrow($result)) {
  list($width, $height, $type, $attr) = getimagesize($site_image);
  if($width > $sp_config['max_width']) { $width = $sp_config['max_width']; }
  if($height > $sp_config['max_height']) { $height = $sp_config['max_height']; }
  echo "<a href='modules.php?name=Supporters&op=SPGo&site_id=$site_id' target='_blank'><img src='$site_image' height='$height' width='$width' title='$site_name' alt='$site_name' border='0'></a><br><br>\n";
}
$content .="</center>\n";
if($sp_config['require_user'] == 0 || is_user($user)) { $content .= "[ <a href='modules.php?name=Supporters&amp;op=SPSubmit'>"._SP_BESUPPORTER."</a> ]<br>\n"; }
if(is_admin($admin)) { $content .= "[ <a href='".$admin_file.".php?op=SPMain'>"._SP_GOTOADMIN."</a> ]<br>\n"; }
$content .= "[ <a href='modules.php?name=Supporters'>"._SP_SUPPORTERS."</a> ]</center>\n";

?>
 
Raven
PostPosted: Sun Jun 05, 2005 2:44 pm Reply with quote

As I said, you have an echo statement in the block. Convert that to a $content statement and all should be well.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

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 ©