| Author |
Message |
Goodgraves
Nuke Cadet


Joined: Sep 25, 2006
Posts: 8
|
Posted:
Mon Sep 25, 2006 2:08 pm |
  |
I use this code. to render a web page in a block, but it is all messup. On one php website I have which is 7.6 it works but on my website with 7.8 its all messed up.
Would someone help me with the PHP block code. I am learning php and your help is greatly apprecated. Thank you for your help in advance.
Here is what I have been using.
| Code: |
| <img alt="WoW Server Status" src="wowserverstatus.php" / |
|
|
|
   |
 |
spottedhog
Captain


Joined: Apr 30, 2004
Posts: 566
|
Posted:
Mon Sep 25, 2006 2:35 pm |
  |
OK
Let's start by using the block-Sample_Block.php file that comes with Nuke. Here is the code:
| Code: |
<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if (eregi("block-Sample_Block.php",$_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}
$content = "";
$content .= "Here goes the content you want in your new block";
?> |
Now as to what you are trying to put in the block, well.... <img is an image html tag, and you are calling a php file. You may need to recheck what the 7.6 has that is working..... |
_________________ SMF-Nuke admin
SMF and PHP Nuke integration is ready! Take a look at it by clicking on the link above. |
|
     |
 |
Goodgraves
Nuke Cadet


Joined: Sep 25, 2006
Posts: 8
|
Posted:
Mon Sep 25, 2006 2:51 pm |
  |
How does this look. Can you check my work. Will this render the web page in my block.
| Code: |
<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if (eregi("block-wowserver.php",$_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}
$content = "<img alt="WoW Server Status" src="wowserverstatus.php>";
?> |
|
|
|
   |
 |
spottedhog
Captain


Joined: Apr 30, 2004
Posts: 566
|
Posted:
Mon Sep 25, 2006 3:21 pm |
  |
src = location of the file.....
the block file is in the blocks folder..... Where is that php file located?
try this:
http://www.YOUR-URL.com/PATH-TO-PHP-FILE
in your src =\"
Another thing....... you did not comment out the double quotes... like this: \" |
_________________ SMF-Nuke admin
SMF and PHP Nuke integration is ready! Take a look at it by clicking on the link above. |
|
     |
 |
Goodgraves
Nuke Cadet


Joined: Sep 25, 2006
Posts: 8
|
Posted:
Mon Sep 25, 2006 5:00 pm |
  |
Ok, thank you for your guidance. Here is what I got now. Tell me what you think.
| Code: |
<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if (eregi("block-wowserver.php",$_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}
$content = "";
$content .="<div align=\"center\">";
$content = "<img alt=\"WoW Server Status\"src=\"http://www.cdcclan.com/wowserverstatus1.php\">";
$content .="</div>";
?> |
|
|
|
   |
 |
spottedhog
Captain


Joined: Apr 30, 2004
Posts: 566
|
Posted:
Tue Sep 26, 2006 3:34 am |
  |
from a coding view, it should work.... try it and see.... |
_________________ SMF-Nuke admin
SMF and PHP Nuke integration is ready! Take a look at it by clicking on the link above. |
|
     |
 |
Goodgraves
Nuke Cadet


Joined: Sep 25, 2006
Posts: 8
|
Posted:
Tue Sep 26, 2006 7:47 am |
  |
It works.
One problem, the image isn't centered in the block it is hugging the left side. An ideas?
BTW, I wanted to say think you for your help. THANK YOU. I am learning a lot. |
|
|
   |
 |
Stormm
Nuke Cadet


Joined: Sep 25, 2006
Posts: 7
|
Posted:
Tue Sep 26, 2006 7:51 am |
  |
well with my page i did: $content .= "<p align=\"center\"><font size=\"3\"><b>Ascendancy Leaders</b></font></p>";
and that centered it, maybe its the same with an img |
|
|
   |
 |
|
|