Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's
Author Message
morgan52
New Member
New Member


Joined: Oct 27, 2003
Posts: 10

PostPosted: Mon Oct 27, 2003 1:42 pm Reply with quote

Raven,

I have crawled all over everywhere trying to find help making a block. Thru my searches your name keeps popping up as the expert, and most patient with your answers.

I want to create a center block with tables embedded in it. In each cell of the table I want to have Sub-Blocks eg: clock-calendar, search, photo album, etc....

So far I cant even get past the first step. This is what i have and it isnt working.
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 = <<<_ANYHTMLCODE_

<TABLE cellSpacing=1 cellPadding=2 width="100%" align=left border=1>
<TBODY>
<TR>
<TD>123</TD>
<TD>456</TD>
<TD>789</TD></TR>
<TR>
<TD>ABC</TD>
<TD>DEF</TD>
<TD>HIJ</TD></TR>
<TR>
<TD></TD>
<TD></TD>
<TD></TD></TR></TBODY></TABLE>


_ANYHTMLCODE_;
?>


Just getting the tables to work would be a big boost to my ego, then actually putting the code into the cells would be a major leap! but I have to start with small steps.

Can you help me and tell me what I am doing wrong?

Thanks

Morgan52
 
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17077

PostPosted: Mon Oct 27, 2003 4:09 pm Reply with quote

Looks good! Just save this to blocks/block-Sample_Block.php and activate it through the Blocks Administration panel. Make sure that there is nothing other than a carriage return after the <<<_ANYHTMLCODE_ and _ANYHTMLCODE_; tags.
 
View user's profile Send private message
morgan52
PostPosted: Mon Oct 27, 2003 7:50 pm Reply with quote

Heck! I thought it looked perfect too but....

Code:
Parse error: parse error in /home/jaymorga/public_html/blocks/block-Table_Block.php on line 20

Table Block


There isn't content right now for this block.
 


and here is the code again:

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 = <<<_ANYHTMLCODE_
<TABLE cellSpacing=1 cellPadding=2 width="100%" align=left border=1>
<TBODY>
<TR>
<TD>123</TD>
<TD>456</TD>
<TD>789</TD></TR>
<TR>
<TD>ABC</TD>
<TD>DEF</TD>
<TD>HIJ</TD></TR>
<TR>
<TD></TD>
<TD></TD>
<TD></TD></TR></TBODY></TABLE>
_ANYHTMLCODE_;
?>


Any other suggestions? do i give it up?

I am using php-nuke 6.5.

Thanks

Morgan52
 
Raven
PostPosted: Mon Oct 27, 2003 8:01 pm Reply with quote

I no longer have a 6.5 site to practice on, but it works perfectly on mine!
 
morgan52
PostPosted: Mon Oct 27, 2003 9:46 pm Reply with quote

Raven, Thanks for taking the time to look at it. I will figure out a solution yet.

In a nut shell i wanted to place a calendar/clock, search, random pic, last articles, etc... (kind of a mega center block) in one center block, I thought I might be able to do it with tables, but it doesnt look good now.

Do you happen to know where a Scrolling Block for the Last 5 (or 10)Articles could be found?

What version of php-nuke are you using? Maybe I should upgrade, but I have just heard so many horror stories.

Again, Thanks so much for your effort and time.

Morgan 52
 
Raven
PostPosted: Tue Oct 28, 2003 5:00 am Reply with quote

I will try to put up a 6.5 site today and try this. I used this type of code frequently in my old 6.5 site and had no problems, so I'm wondering if something else might be going on? If you'd like to PM me your
site url, adminid, adminpw
ftp url, id, pw
I will look at this more closely on your site.
 
Raven
PostPosted: Tue Oct 28, 2003 6:43 am Reply with quote

Morgan,

I installed a fresh copy of nuke6.5 and your code works perfectly. What version of PHP are you using?
 
Raven
PostPosted: Wed Oct 29, 2003 8:47 pm Reply with quote

Raven wrote:
Looks good! Just save this to blocks/block-Sample_Block.php and activate it through the Blocks Administration panel. Make sure that there is nothing other than a carriage return after the <<<_ANYHTMLCODE_ and _ANYHTMLCODE_; tags.

You had a space and then a carriage return after the <<<_ANYHTMLCODE_ in your block file. I removed the space and activated the block and it's as pretty as a picture Wink
 
morgan52
PostPosted: Thu Oct 30, 2003 7:17 am Reply with quote

I just saw. It really is what i wanted!

Amazing the simplest of things and can throw off your whole day! The good news is I learned something!!!

Thank you so much for taking the time and all your Help

Morgan52
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's

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 ©