Help with codes for module

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Help with codes for module
Brisk
CZ Newbie
Brisk has been a member for over 18 year's 18 Year Member
Gender: Male
Status: Offline
Joined: Jul 16, 2006
0.00 posts per day
Posts: 6
Points: 0
   
Hi, I'm trying to create a module but I'm having problems with the way it's loading. Instead of making it load on the page like the way the Forums module loads with the left blocks, it loads on a new page without the blocks. What I'm trying to do is load another site's webpage into my page. Here are my codes:

<?php 
if (!stristr($_SERVER['SCRIPT_NAME'], "modules.php")) {
    die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
$pagetitle = "- $module_name";
$index = 0;
include("header.php");
global $user;
if(!is_array($user)) {
   $user_get = base64_decode($user);
   $user_get = explode(":", $user_get);
   $user_name = "$user_get[1]";
} else {
   $user_name = "$user[1]";
}
OpenTable();
echo "<table width="100%" border="0" align="center"><tr><td align="center">";
echo"<body onload = 'window.location="http://www.nolimitcs.net/stats/server.php?ps_sess_id=a88a7edd3e9302c98963e73ebc07b1e9";'>";
echo "</td></tr></table>";
   CloseTable();
include("footer.php");
?>


Can anyone help me?


Back to top Reply with quote
#2   re: Help with codes for module
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 43
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
What version of nuke? Do you want just left or both left/right blocks?



Back to top Reply with quote
#3   re: Help with codes for module
Brisk
CZ Newbie
Brisk has been a member for over 18 year's 18 Year Member
Gender: Male
Status: Offline
Joined: Jul 16, 2006
0.00 posts per day
Posts: 6
Points: 0
   
phpNuke 7.8. I just want the left block.

Thanks.



Back to top Reply with quote
#4   re: Help with codes for module
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 43
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
try removing this
$index = 0



Back to top Reply with quote
#5   re: Help with codes for module
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 43
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
bah give me a minute thats not it.



Back to top Reply with quote
#6   re: Help with codes for module
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 43
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
I think the only way to do what your trying to do is an iframe, I could be wrong. I got it laoded to on my project site and all it does is redirect me to the pyscho stats page.



Back to top Reply with quote
#7   re: Help with codes for module
Brisk
CZ Newbie
Brisk has been a member for over 18 year's 18 Year Member
Gender: Male
Status: Offline
Joined: Jul 16, 2006
0.00 posts per day
Posts: 6
Points: 0
   
I'm not too familiar with html, but will using <frame> or <table> give me the result I want? Like <frame src="http://......">



Back to top Reply with quote
#8   re: Help with codes for module
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 43
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
This is an iframe I coded up real quick. Real simple you will need to adjust the codes fit your needs. Also adjust the width and height inside the <iframe> opening statement.

You can just copy and paste this, into your index.php for that module it should work.
<?php
if (!stristr($_SERVER['SCRIPT_NAME'], "modules.php")) {
    die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
$pagetitle = "- $module_name";
$index = 0;
include("header.php");
global $user;
if(!is_array($user)) {
   $user_get = base64_decode($user);
   $user_get = explode(":", $user_get);
   $user_name = "$user_get[1]";
} else {
   $user_name = "$user[1]";
}
OpenTable();
echo "<table border="0" align="center"><tr><td align="center">";
echo"<P ALIGN=center><IFRAME SRC="http://www.nolimitcs.net/stats/server.php?ps_sess_id=a88a7edd3e9302c98963e73ebc07b1e9" WIDTH="700" HEIGHT="1200"></IFRAME></P>";
echo "</td></tr></table>";
   CloseTable();
include("footer.php");
?>



Back to top Reply with quote
#9   re: Help with codes for module
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 43
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
notice the forums are stripping some slashes from some of the code.



Back to top Reply with quote
#10   re: Help with codes for module
FREAK
CZ Newbie
 Codezwiz Site Donator
FREAK has been a member for over 19 year's 19 Year Member
usa.gif oklahoma.gif
Occupation: Air Force
Age: 44
Gender: Male
Status: Offline
Joined: Jan 11, 2005
0.00 posts per day
Posts: 22
Points: 1,875
   
Try this...it works on my 7.8 site and uses the iframe! It goes a little out but it works! Let me know if that helps.

<?
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
  die ("You can't access this file directly...");
}
if(!IsSet($mainfile)) { include ("mainfile.php"); }
$index=0;
//$theme="DeepBlue";
$go_to_address1="http://www.nolimitcs.net/stats/server.php?ps_sess_id=a88a7edd3e9302c98963e73ebc07b1e9";
$go_to_address=rawurldecode($go_to_address1);
include("header.php");
OpenTable();
echo "<center><h4><a href="index.php">::Click to close::</a></h4></center>";
echo "<iframe SRC="".$go_to_address."" width="100%" height="1200"
framespacing=0 frameborder=no border=0 scrolling=auto></iframe>";
echo "<br><center>NB. Using iframes!</center><br>";
CloseTable();
include("footer.php");
die;
?>



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
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 cannot attach files in this forum
You cannot download files in this forum