WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.

Donate with PayPal buttonSpenden mit dem PayPal-Button

  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Blocks problem
  • Print
Pages: [1]   Go Down

Author Topic: Blocks problem  (Read 7573 times)

Offline Roych

  • Betatester
  • **
  • Posts: 573
  • Gender: Male
Blocks problem
« on: December 08, 2009, 10:53:14 AM »
Hi

I'm having problems with Content blocks in mamboportal template!
I added a new block but I woul like blocks to be shown one on top of another not side by side how do I do that?

My code is:
Quote
             <?php ob_start();     // start output buffer
page_content(2);   // call menu
$foo=ob_get_contents();    // put outputbuffer in $foo
ob_end_clean();             // clear outputbuffer
if ($foo<>"") {  // some code to execute cause there is some block
  echo '<td valign="top" style="background-repeat: repeat -y; "background="'.TEMPLATE_DIR.'/images/rb.gif">';
  echo '<div class="rightrow">';
  echo '<table cellpadding="0" cellspacing="0" class="moduletable">';
  echo '<tr>';
  echo '<th valign="top">';
  echo 'Info</th>';
  echo '</tr>';
  echo '<tr>';
  echo '<td>';
  echo '<table width="100%" cellspacing="5" cellpadding="0" border="0" align="top">';
  echo '<tr>';
  echo '<td>';
  echo $foo; // show the block (as saved in $foo)
  echo '</td>';
  echo '</tr>';
  echo '</table>';
  echo '</td>';                             
  echo '</tr>';
  echo '</table>';
  echo '</div>';
  echo '</td>';
 
    } else { // some code for no info
}
?>    
<br>
             <?php ob_start();     // start output buffer
page_content(8);   // call menu
$foo=ob_get_contents();    // put outputbuffer in $foo
ob_end_clean();             // clear outputbuffer
if ($foo<>"") {  // some code to execute cause there is some block
  echo '<td valign="top" style="background-repeat: repeat -y; "background="'.TEMPLATE_DIR.'/images/rb.gif">';
  echo '<div class="rightrow">';
  echo '<table cellpadding="0" cellspacing="0" class="moduletable">';
  echo '<tr>';
  echo '<th valign="bottom">';
  echo 'zanimivosti</th>';
  echo '</tr>';
  echo '<tr>';
  echo '<td>';
  echo '<table width="100%" cellspacing="5" cellpadding="0" border="0" align="bottom">';
  echo '<tr>';
  echo '<td>';
  echo $foo; // show the block (as saved in $foo)
  echo '</td>';
  echo '</tr>';
  echo '</table>';
  echo '</td>';                             
  echo '</tr>';
  echo '</table>';
  echo '</div>';
  echo '</td>';
 
    } else { // some code for no info
}
?>

Thank you!

R.
Logged

Waldschwein

  • Guest
Re: Blocks problem
« Reply #1 on: December 08, 2009, 10:58:20 AM »
Hello!

Uhm... That code looks _very_ clumsy for me... Why do you have that much echos in there?
That's not necessary for another block.
Just look there: http://help.WebsiteBaker.org/pages/en/advanced-docu/designer-guide/content-blocks.php

You need to define in info.php that there are some blocks, and after that just use <?php page_content(XX); ?> for your block.

Yours Michael

Edit: Ok... That's inside the mamboportal template... HRM... Perhaps somebody could look there.
« Last Edit: December 08, 2009, 11:05:36 AM by Waldschwein »
Logged

Offline Roych

  • Betatester
  • **
  • Posts: 573
  • Gender: Male
Re: Blocks problem
« Reply #2 on: December 08, 2009, 11:05:35 AM »
Thanks for help!

This is the original code, I just duplicated it for another block!
Each blocks should have the name on top.

I'm pasting the image so you couls see what I mean!

[gelöscht durch Administrator]
Logged

Waldschwein

  • Guest
Re: Blocks problem
« Reply #3 on: December 08, 2009, 11:14:16 AM »
Hello!

Ok, I see. The block at very right (the third one) you want to display in the header, or you want to display that block in a new site ("pop-up"), or just display that block above the "integrated" in the menu?

If I know what you mean I can have a look and try to update that template.

Yours Michael


Logged

Offline Roych

  • Betatester
  • **
  • Posts: 573
  • Gender: Male
Re: Blocks problem
« Reply #4 on: December 08, 2009, 11:22:40 AM »
I dont quite understand what you mean so I created another image in photoshop to show you what I want!

I would like to be able to to assign my content to those blocks!

[gelöscht durch Administrator]
Logged

Waldschwein

  • Guest
Re: Blocks problem
« Reply #5 on: December 08, 2009, 11:28:31 AM »
Hello!

Ok, thanks, now I understand it.

The template itself has quite clumsy code (I don't mean the tables, but meeting template guidelines etc.).

I will try to recode it the next hours. Because we have to do it anyway some times.

PS: Anybody has seen it has 7 different color schemes?  :wink:

Yours Michael
Logged

Offline Roych

  • Betatester
  • **
  • Posts: 573
  • Gender: Male
Re: Blocks problem
« Reply #6 on: December 08, 2009, 12:08:40 PM »
Oh, ok it I would be really gratefull!


Thank you!

Roych
Logged

Waldschwein

  • Guest
Re: Blocks problem
« Reply #7 on: December 08, 2009, 01:50:24 PM »
Hello,

first: No, I'm not finished.
There are two ways as far as I have seen to get that what you want to achieve:
1.) The quick & really dirty: Use a <td> Table for the content.
2.) The long & good: Rewrite the template.

In fact, I think 2.) is much better - the yet template is at the first glance not that bad (well, it uses tables, but tables aren't always directly bad), but... On the second view there are so many things, I wonder why nobody yet has seen it.

You can't just use the different colour.css - because many of the colors / images are defined in the index.php in the table, some in css... It just doesn't meet quite anything from the template-guideline. There's code I just don't know where it comes from and what's about it... So I think it's time to recode the template - also when it takes some time (I hope I will get it finished today, if not it should be finished tomorrow).
 
And I want to test my new CSS / XHTML editor software really! It has found about 20 errors in every CSS file...

Yours Michael
Logged

Offline Roych

  • Betatester
  • **
  • Posts: 573
  • Gender: Male
Re: Blocks problem
« Reply #8 on: December 08, 2009, 03:34:03 PM »
Hey

got it!
Pastin a picture of what I needed!

I just created a new table!!! I don't have the time to rewrite the whole template, it's cool as it is now!

Thx anyway!

Roych

[gelöscht durch Administrator]
Logged

Waldschwein

  • Guest
Re: Blocks problem
« Reply #9 on: December 08, 2009, 03:47:15 PM »
Hello!

Ok, that's good.  8-)
If you like it - well, just keep there.

But anyway, I will begin to rework some of the templates (if my time allows), and I think starting with that one is a good idea.

Yours Michael
Logged

Offline Roych

  • Betatester
  • **
  • Posts: 573
  • Gender: Male
Re: Blocks problem
« Reply #10 on: December 08, 2009, 03:54:02 PM »
Great!!

Keep on the good work, and thanx for help!!!  :wink:


Roych
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Blocks problem
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2