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

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - How to include a php script into message block [ ]
 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
AaronL
Nuke Cadet
Nuke Cadet


Joined: Dec 13, 2007
Posts: 1


PostPosted: Thu Dec 13, 2007 1:21 pm Reply with quoteBack to top

On the front page for messages block above the news I am trying to include a 3rd party script I made locally hosted on the same server, every attempt even pressing html and posting the code does not work. I even fixed the string $AllowableHTML in config.php to allow html and still its not working. The code that I am trying to get into the message block is:

Code:
<?php include("custom/fpss.php"); ?>


Thanks to anyone that can help

P.s. I am hardcore programmer but since I haven’t used php-nuke in ages I cant remember how the backend core is programmed and I wish not to waist hours upon hours researching...
Find all posts by AaronLView user's profileSend private message
Evaders99
Site Admin
Site Admin


Joined: Aug 17, 2003
Posts: 12482


PostPosted: Thu Dec 13, 2007 6:04 pm Reply with quoteBack to top

That is PHP code. You cannot add that as an HTML block.

See: http://www.nukecops.com/PHP-Nuke_blocks.html

_________________
Helping those that help themselves
Read FIRST or DIE!

"Fighting is terrible, but not as terrible as losing the will to fight."
Star Wars Rebellion Network - Need Help? Evaders Squadron Coding
Find all posts by Evaders99View user's profileSend private messageVisit poster's websiteAIM Address
jammyme
Nuke Soldier
Nuke Soldier


Joined: Jan 29, 2007
Posts: 22

Location: South Yorkshire, UK

PostPosted: Fri Dec 21, 2007 1:52 am Reply with quoteBack to top

Simplest solution is to duplicate a simple block (like block_login.php or whatever), rem-out / delete the code you don't want and simply add your php code straight in. (Just save this as block_[yourtitle].php and upload into your blocks folder)

As Evaders99 already said, you cannot use PHP within a HTML block, it must be put within a block file in the blocks folder.

Hope this helps Very Happy
Find all posts by jammymeView user's profileSend private messageVisit poster's website
jammyme
Nuke Soldier
Nuke Soldier


Joined: Jan 29, 2007
Posts: 22

Location: South Yorkshire, UK

PostPosted: Fri Dec 21, 2007 1:59 am Reply with quoteBack to top

Just another quick note - what you wish to display must be added to the $content string. The code you want from your include will probably need to be placed within the block file, depending on what your script does.

Using the template below may help? (works on RavenNuke 7.6, but think this should work for other versions?)

Code:

<?php
/************************************************************/
/* Sample Block (for PHP-Nuke)                              */
/************************************************************/
/*                                       www.wap2go.co.uk   */
/************************************************************/
if (eregi("block-sample.php", $_SERVER['PHP_SELF'])) {
   Header("Location: ../index.php");
   die();
   }

global $nukeurl, $sitename, $prefix, $db;

$content = "<center>"
          ."<table width=\"100%\">"
          ."  <tr>"
          ."    <td>"
          ."        Sample Text"
          ."    </td>"
          ."  </tr>"
          ."</table>"
          ."</center>";
?>
Find all posts by jammymeView 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.043 Seconds - 495 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::