Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
adaykin
Regular
Regular


Joined: Sep 26, 2007
Posts: 60

PostPosted: Sat Feb 23, 2008 3:25 pm Reply with quote

Hello, I was looking at the tutorial at Only registered users can see links on this board! Get registered or login! and I was wondering if those same principles would work in Raven Nuke. Here is some of my code that I have:

Code:


// Standard Block info
if (eregi("block-Contact Me.php",$PHP_SELF)) {
Header("Location: index.php"); 
die();
}
Global $user, $admin;

// Form Cookie
$formCookie = $_COOKIE['formAccesses'];
setcookie('formAccesses', '', time()+3600);

$title = "Contact Me";
// Start the content section to be displayed
$content = "
A BUNCH OF HTML
";


I escaped all of the quotes in my HTML, but when I preview the block it just outputs the source code.
 
View user's profile Send private message Visit poster's website
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6793
Location: Ha Noi, Viet Nam

PostPosted: Sat Feb 23, 2008 3:49 pm Reply with quote

From the sample block included with the distribution;
Code:


if ( !defined('BLOCK_FILE') ) {
    Header('Location: ../index.php');
    die();
}

$content = 'Here goes the content you want in your new block';

?>

The code you used is a little out of date and also incorrect as the block filename cannot have any spaces in it.
 
View user's profile Send private message Send e-mail
adaykin
PostPosted: Sat Feb 23, 2008 4:55 pm Reply with quote

Ok thanks, I got it working kind of now, part of my problem was that I didn't put it as source in the fck editor lol.

One other question. Is there a way I can get my block to show up in the middle of the page instead of on the side?
 
Guardian2003
PostPosted: Sat Feb 23, 2008 5:13 pm Reply with quote

Yes, if you go back to the block administration select 'center' instead of 'left' or 'right'.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

View next topic
View previous 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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©