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, 136 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Adding PHP Into Blocks [ ]
 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
Metalp3n
Nuke Soldier
Nuke Soldier


Joined: Dec 08, 2003
Posts: 17


PostPosted: Sat Apr 03, 2004 7:30 am Reply with quoteBack to top

I wish to add the following code into a block:

Code:
<? include "plug.php"; ?>


Can any-one help me with this?
Find all posts by Metalp3nView user's profileSend private messageVisit poster's website
Smitty
Nuke Cadet
Nuke Cadet


Joined: Jun 22, 2003
Posts: 7


PostPosted: Sat Apr 03, 2004 12:09 pm Reply with quoteBack to top

I made a block to include a php file. This is what I did, not usre its the best way to do it.
Code:

<?php
if (eregi("block-Server_Check.php", $_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}
global $user, $cookie, $prefix, $user_prefix, $dbi, $anonymous, $userinfo, $Default_Theme;

$content = "<center><iframe src=\"http://www.mysite.net/ping.php?iddfire&style=http://www.mysite.net/themes/fisubsilversh/style/style.css\" width=150 height=110 frameborder=0 /></iframe></center>";
?>
Find all posts by SmittyView user's profileSend private messageICQ Number
xenon2000
Nuke Cadet
Nuke Cadet


Joined: Apr 02, 2004
Posts: 7


PostPosted: Tue Apr 06, 2004 12:13 pm Reply with quoteBack to top

Is there a way to just HAVE some php code directly in a block?

Like

<?php echo "This is a test"; ?>


I tired this, and it just seems to parse and drop this out entirely and just shows HTML formatted stuff in my blocks.

I don't want to do iFrames, layers, etc.. just want it to process some php within the blocks.

I also want to integrate phpNuke into my custom php apps, but I have that posted in another thread.
Find all posts by xenon2000View user's profileSend private message
Asuka
Nuke Cadet
Nuke Cadet


Joined: Mar 31, 2004
Posts: 9

Location: Denmark

PostPosted: Thu Apr 15, 2004 9:13 pm Reply with quoteBack to top

Well for php to work in a block you first need to open the php coding
Code:
<?php
echo "this is a test
?>

I dont know much of php, hope this helps

_________________
Image
Find all posts by AsukaView user's profileSend private messageVisit poster's websiteMSN Messenger
BooM
Nuke Soldier
Nuke Soldier


Joined: Mar 18, 2004
Posts: 12


PostPosted: Fri Apr 16, 2004 5:00 am Reply with quoteBack to top

the correct format for a blocks is:
Code:
<?php
if (eregi("block-BLOCK_NAME_HERE.php", $_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}

$content = "this is a test";
?>
Find all posts by BooMView user's profileSend private messageSend e-mail
djalecc
Lieutenant
Lieutenant


Joined: Feb 21, 2004
Posts: 180

Location: Gloucestershire

PostPosted: Thu Apr 22, 2004 9:33 am Reply with quoteBack to top

try...

Code:
<?php
if (eregi("block-BLOCK_NAME_HERE.php", $_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}

include("plug.php");
?>


would that not work?

_________________
Free Dating
Courier Service Foook It!
Find all posts by djaleccView user's profileSend private messageVisit poster's website
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 - TUTTISU E-COMMERCE http://www.tuttisu.it
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.588 Seconds - 114 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::