You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 43 guest(s) and 2 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Block code [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
Goodgraves
Nuke Cadet
Nuke Cadet


Joined: Sep 25, 2006
Posts: 8


PostPosted: Mon Sep 25, 2006 2:08 pm Reply with quoteBack to top

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" /
Find all posts by GoodgravesView user's profileSend private message
spottedhog
Captain
Captain


Joined: Apr 30, 2004
Posts: 566


PostPosted: Mon Sep 25, 2006 2:35 pm Reply with quoteBack to top

Smile 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.
Find all posts by spottedhogView user's profileSend private messageSend e-mailVisit poster's website
Goodgraves
Nuke Cadet
Nuke Cadet


Joined: Sep 25, 2006
Posts: 8


PostPosted: Mon Sep 25, 2006 2:51 pm Reply with quoteBack to top

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>";
?>
Find all posts by GoodgravesView user's profileSend private message
spottedhog
Captain
Captain


Joined: Apr 30, 2004
Posts: 566


PostPosted: Mon Sep 25, 2006 3:21 pm Reply with quoteBack to top

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.
Find all posts by spottedhogView user's profileSend private messageSend e-mailVisit poster's website
Goodgraves
Nuke Cadet
Nuke Cadet


Joined: Sep 25, 2006
Posts: 8


PostPosted: Mon Sep 25, 2006 5:00 pm Reply with quoteBack to top

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>";

?>
Find all posts by GoodgravesView user's profileSend private message
spottedhog
Captain
Captain


Joined: Apr 30, 2004
Posts: 566


PostPosted: Tue Sep 26, 2006 3:34 am Reply with quoteBack to top

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.
Find all posts by spottedhogView user's profileSend private messageSend e-mailVisit poster's website
Goodgraves
Nuke Cadet
Nuke Cadet


Joined: Sep 25, 2006
Posts: 8


PostPosted: Tue Sep 26, 2006 7:47 am Reply with quoteBack to top

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.
Find all posts by GoodgravesView user's profileSend private message
Stormm
Nuke Cadet
Nuke Cadet


Joined: Sep 25, 2006
Posts: 7


PostPosted: Tue Sep 26, 2006 7:51 am Reply with quoteBack to top

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
Find all posts by StormmView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next 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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.284 Seconds - 270 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::