Hiya, I'm kinda new to this whole PN/PHP thing, and I'm trying to put (basically) this layout (http://www.discoalli…ce.com/v2/templates) onto PN.
I've actually gotten kind of far: this is the theme as it is: http://www.discoalliance.com/test/html/index.php
(Worth noting - all these different dirs are so no one stumbles on the site...we get quite a few visits and I don't want anyone finding this early)
So my MAIN problem is that it will not create the news article boxes. Also, the black line on the bottom is supposed to be running across the entire thing.
I can post the snippets of code if I need to to get help with this. I'm desperate here, and I'll love you all forever for helping me with this.
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- frw responded to »Bug in the SMTP mail transfer protocol - Port 25 - Zikula 1.2.9« 22. May
- mdee responded to »Short URL questions« 22. May
- mesteele101 responded to »Problem in Database Connection« 21. May
- Herr.Vorragend responded to »Clip Documentation and Doubt« 19. May
- mazdev responded to »zikula 1.3.3. and IE9« 19. May
- mesteele101 responded to »How to install Zikula for MSSQL ??? - Part II« 19. May
- mesteele101 created topic »File packaging« 16. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Need Help - News boxes will not appear!
-
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 26
Quote
Also, the black line on the bottom is supposed to be running across the entire thing.
Sounds like the code to draw it is inside the interior table. Try moving it to further on in your theme.php.
Either that or you haven't got a % width in there somewhere have you? :) -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Jul 25, 2003
- Posts: 4
arefsum
What theme are you using or planning to use ?
I'm writing it myself...haha, that's probably part of the problem.
Anyway, here is the major code in my theme.php:
Code
function OpenTable()
{
echo "<table width=\"435\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"$GLOBALS[bgcolor2]\"><tr><td>\n";
echo "<table width=\"435\" border=\"0\" cellspacing=\"1\" cellpadding=\"8\" bgcolor=\"$GLOBALS[bgcolor2]\"><tr><td>\n";
}
function CloseTable()
{
echo "</td></tr></table></td></tr></table>\n";
}
function OpenTable2()
{
echo "<table width=\"434\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"$GLOBALS[bgcolor2]\" align=\"center\"><tr><td>\n";
echo "<table width=\"434\" border=\"0\" cellspacing=\"1\" cellpadding=\"8\" bgcolor=\"$GLOBALS[bgcolor2]\"><tr><td>\n";
}
function CloseTable2()
{
echo "</td></tr></table></td></tr></table><br>\n";
}
function themeheader()
{
$slogan = pnConfigGetVar('slogan');
$sitename = pnConfigGetVar('sitename');
$banners = pnConfigGetVar('banners');
$type = pnVarCleanFromInput('type');
echo "</head>\n";
echo "<body bgcolor=\"#FFFFFF\" text=\"#000000\">\n\n\n";
//top of page file
include("themes/$GLOBALS[thename]/toppage.htm");
echo "<div align=\"center\">\n";
echo "<table width=\"600px\">\n" .
"<tr valign=\"top\">\n";
echo "<td width=\"158px\" align=\"left\" valign=\"top\">\n";
blocks('left');
echo "</td>\n" .
"<td width=\"435px\" valign=\"top\" background=\"themes/$GLOBALS[thename]/pxl5.gif\">\n" .
"<img src=\"themes/$GLOBALS[thename]/spacer.gif\" width=\"434\" height=\"1\">\n" ;
if ($GLOBALS['index'] == 1) {
blocks('centre');
}
}
function themefooter()
{
echo "</td>\n" .
"</tr>\n" .
// endofpage
"<tr>\n" .
"<td>\n" .
include("themes/$GLOBALS[thename]/bottompage.htm");
echo "</td>\n" .
"</tr>\n" .
"</table>\n";
footmsg();
}
function themeindex ($_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $info, $links, $preformat)
{
$anonymous = pnConfigGetVar('anonymous');
$tipath = pnConfigGetVar('tipath');
// begin news
include("themes/$GLOBALS[thename]/storybox.html");
}
function themearticle ($_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $info, $links, $preformat)
{
// article
include("themes/$GLOBALS[thename]/articlebox.html");
}
function themesidebox($block)
{
if (empty($block['position'])) {
$block['position'] = "a";
}
// begin left
if ($block['position'] == 'l') {
include("themes/$GLOBALS[thename]/leftblock.html");
}
// begin centre
if ($block['position'] == 'c') {
echo "$block[content]<br>";
}
} -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Jul 25, 2003
- Posts: 4
I browsed around looking for a theme similar to what I'm trying to achieve, I never found one. If you want to see how it is supposed to look, an html representation can be found here. -
**unknown user**
- Rank: Helper
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 902
Just out of curiosity, did you have a look at AutoTheme Lite, as it is supposed to be very easy to convert from an HTML layout?
Anyway, the code looks somewhat familiar, as I recognize elements in it, but not everything. What I was looking for was the theme which you had looked at before you started coding, as that could have told me about the structure and so on. I am not a theme coder, so I need some kind of guide-line to follow.
Alf -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Jul 25, 2003
- Posts: 4
Ahh.
In that case, I was looking at the PostNukeBlue one, but I'm not basing it off that structure, I just kind of used it to feel my way through it, if that makes sense... -
**unknown user**
- Rank: Helper
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 902
Yup, but it gives me an idea of what you are playing with. It is kind of late here - 3 in the morning, so I will have a look at it when I get up and my head is a somewhat better connected ;), unless someone else gives you an answer before that. Seriously though, as far as I know you would be well of trying out the AutoTheme lite, since you do have an HTML version / sample page of your new site. -
**unknown user**
- Rank: Helper
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 902
I have a few comments:
- [*:f76f72ff7e]The red line with the the red blob in the middle should probably go into the toppage.htm file, as it logically belongs there, and that it is easier to format it there as well.
- [*:f76f72ff7e]Your left side blocks appear to be OK, allthough I am wondering about the "1" you have at the bottom
- [*:f76f72ff7e]I have not checked that your table widths, cellspacing and cellpadding fit together. I assume they do.
- [*:f76f72ff7e]The black should go into the bottompage.htm file, as it logically belongs there (it might be there already)
- [*:f76f72ff7e]You have a errors in your tables, ie missing
tags and so on. A good tool to sort out those is something called pretty print that aligns everything nice and tidy. You can find it here : http://www.selfpromotion.com/prettyprint.t
Alf -
- Rank: Legend
- Registered: Dec 11, 2002
- Last visit: Oct 21, 2009
- Posts: 11674
best not to learn themeing off the core themes, apparently they are not best for learners ;)
--
itbegins.co.uk - Zikula Consulting
birtwistle.me.uk - Personal Blog
Please read the Support Guide -
**unknown user**
- Rank: Helper
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 676
Code snippet looks OK, seems to be a problem with the included files. There's also an errant "1" in the footer.
The black bar seems to be from the included "storybox.html". So at least it's including something. But the only output is:
Probably it's the black bar you want under the heading, not from the footer. You may have to list the relevant included files not outputting properly.Code
<table width="435">
<tr>
<td bgcolor="#000000">
</td>
</tr>
</table>
As I like using Dreamweaver, this is the code I checked, in case you're wondering:
Code
<?php
function themeheader() {
$slogan = pnConfigGetVar('slogan');
$sitename = pnConfigGetVar('sitename');
$banners = pnConfigGetVar('banners');
$type = pnVarCleanFromInput('type');
echo "</head>\n"; ?>
<BODY bgcolor="#FFFFFF" text="#000000">
<?php //top of page file
include("themes/$GLOBALS[thename]/toppage.htm"); ?>
<DIV align="center">
<TABLE width="600px">
<TR valign="top">
<TD width="158" align="left" valign="top">
<?php blocks('left'); ?>
</TD>
<TD width="435px" valign="top" background="themes/<?PHP echo $GLOBALS['thename'] ?>/pxl5.gif">
<IMG src="themes/<?PHP echo $GLOBALS['thename'] ?>/spacer.gif" width="434" height="1">
<?php if ($GLOBALS['index'] == 1) {
blocks('centre');
}
}
function themefooter() { ?>
</TD>
</TR>
<TR>
<TD>
<?php include("themes/$GLOBALS[thename]/bottompage.htm"); ?>
</TD>
</TR>
</TABLE>
<?php footmsg();
}
function themeindex ($_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated,
$info, $links, $preformat)
{
$anonymous = pnConfigGetVar('anonymous');
$tipath = pnConfigGetVar('tipath');
// begin news
include("themes/$GLOBALS[thename]/storybox.html");
}
function themearticle ($_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated,
$info, $links, $preformat)
{
// article
include("themes/$GLOBALS[thename]/articlebox.html");
}
function themesidebox($block)
{
// begin left
if ($block['position'] == 'l') {
include("themes/$GLOBALS[thename]/leftblock.html");
}
// begin centre
if ($block['position'] == 'c') {
echo $block['content']."<br>";
}
}
function OpenTable() { ?>
<TABLE width="435" border="0" cellspacing="1" cellpadding="8" bgcolor="<?PHP echo $GLOBALS['bgcolor2'] ?>">
<TR>
<TD>
<?php
}
function CloseTable() { ?>
</TD>
</TR>
</TABLE><BR>
<?php
}
function OpenTable2() { ?>
<TABLE width="434" border="0" cellspacing="1" cellpadding="8" bgcolor="<?PHP echo $GLOBALS['bgcolor2'] ?>">
<TR>
<TD>
<?php
}
function CloseTable2() { ?>
</TD>
</TR>
</TABLE><BR>
<?php
}
?>
Martin :D
- Moderated by:
- Support
Users on-line
- 0 users
This list is based on users active over the last 60 minutes.
