Author |
Message |
morgan52
New Member
![New Member New Member](modules/Forums/images/ranks/1star.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Oct 27, 2003
Posts: 10
|
Posted:
Mon Oct 27, 2003 1:42 pm |
|
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 |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
Site Admin/Owner
![](modules/Forums/images/avatars/45030c033f18773153cd2.gif)
Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Mon Oct 27, 2003 4:09 pm |
|
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
morgan52
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Oct 27, 2003 7:50 pm |
|
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 |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Oct 27, 2003 8:01 pm |
|
I no longer have a 6.5 site to practice on, but it works perfectly on mine! |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
morgan52
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Oct 27, 2003 9:46 pm |
|
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 |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Oct 28, 2003 5:00 am |
|
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Oct 28, 2003 6:43 am |
|
Morgan,
I installed a fresh copy of nuke6.5 and your code works perfectly. What version of PHP are you using? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Oct 29, 2003 8:47 pm |
|
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](modules/Forums/images/smiles/icon_wink.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
morgan52
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Oct 30, 2003 7:17 am |
|
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 |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|