| Topic Archived |
View previous topic :: View next topic |
| Author |
Message |
ehoffman73 Platinum Supporter


Offline Joined: Apr 22, 2004 Posts: 211 Location: Stillwater, MN
|
Posted: Sat Mar 26, 2005 4:43 pm Post subject: How to have 2 right block columns |
|
Trying to edit my template's footer.html file to allow two right blocks side by side...
am I close??
| Code:: |
<!-- BEGIN bottomblock -->
<div class="table1">
<div class="option" align="center"><strong>{bottomblock.S_TITLE}</strong></div>
{bottomblock.S_CONTENT}
</div><br />
<!-- END bottomblock -->
{S_BANNER}
<!-- IF S_RIGHTBLOCKS -->
</td><td valign="top" class="mainside" id="pe601" {B_R_VISIBLE} align="right">
<!-- BEGIN rightblock -->
<div class="blockheadr">{rightblock.S_TITLE} <img class="blockimg" alt="[x]" title="Show/hide content" id="pic{rightblock.S_BID}" src="{rightblock.S_IMAGE}" onclick="blockswitch('{rightblock.S_BID}');" /></div>
<div class="blockcontent" id="pe{rightblock.S_BID}" {rightblock.S_VISIBLE}>{rightblock.S_CONTENT}</div><br />
<!-- END rightblock -->
<!-- IF S_RIGHTBLOCKS -->
</td><td valign="top" class="mainside" id="pe601" {B_R_VISIBLE} align="right">
<!-- BEGIN rightblock -->
<div class="blockheadr">{rightblock.S_TITLE} <img class="blockimg" alt="[x]" title="Show/hide content" id="pic{rightblock.S_BID}" src="{rightblock.S_IMAGE}" onclick="blockswitch('{rightblock.S_BID}');" /></div>
<div class="blockcontent" id="pe{rightblock.S_BID}" {rightblock.S_VISIBLE}>{rightblock.S_CONTENT}</div><br />
<!-- END rightblock -->
<div class="mainside"></div>
<!-- ENDIF -->
</td></tr></table>
<br /><div align="center">{S_FOOTER}</div>
<!-- IF S_DEBUG_SQL --><div class="table1">{S_DEBUG_SQL}</div><!-- ENDIF -->
<!-- IF S_DEBUG_PHP --><div class="table1">{S_DEBUG_PHP}</div><!-- ENDIF -->
</div>
</body></html> |
ehoffman73's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) W2003/IIS6/4.x/ /9.0.5
|
|
| Back to top |
|
 |
DJ Maze Developer


Offline Joined: Apr 19, 2004 Posts: 5683 Location: http://tinyurl.com/5z8dmv
|
Posted: Sat Mar 26, 2005 5:31 pm Post subject: Re: 2 right blocks |
|
No you are not.
Can you explain the full usage like:
- keep blocks on the right + add blocks in the footer
- no blocks on the right + add blocks in the footer
Because using <!-- BEGIN rightblock --> 2 times you just duplicate the whole list.
You could call
| PHP: |
themesidebox($title, $content, $custom_id);
|
within your theme.php
I will give a example
| Code:: |
function themefooter() {
global $banners, $cpgtpl;
blocks('right');
$cpgtpl->assign_vars(array(
'B_R_VISIBLE' => hideblock('601') ? 'style="display: none"' : '',
'S_FOOTER' => footmsg(),
'S_BANNER' => ($banners) ? viewbanner() : ''
));
// start custom part
global $themeblockside;
$themeblockside == 'customA';
// a static block
themesidebox('Block 1', 'My content', 5555);
// a dynamic block
$title = 'Block 2';
include('blocks/block-CPG_Stats.php');
themesidebox($title, $content, 5556);
// end custom part
$cpgtpl->set_filenames(array('footer' => 'footer.html'));
$cpgtpl->display('footer');
} |
Then in your footer.html use this only once
| Code:: |
<!-- BEGIN customAblock -->
<div class="blockheadr">{customAblock.S_TITLE} <img class="blockimg" alt="[x]" title="Show/hide content" id="pic{customAblock.S_BID}" src="{customAblock.S_IMAGE}" onclick="blockswitch('{customAblock.S_BID}');" /></div>
<div class="blockcontent" id="pe{customAblock.S_BID}" {customAblock.S_VISIBLE}>{customAblock.S_CONTENT}</div><br />
<!-- END customAblock --> |
You can even do way more advanced things, but lets understand this first
DJ Maze's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Fedora 15 / 2.2.22 / 5.5.20 / 5.3.10 / CVS
|
|
| Back to top |
|
 |
ehoffman73 Platinum Supporter


Offline Joined: Apr 22, 2004 Posts: 211 Location: Stillwater, MN
|
Posted: Sat Mar 26, 2005 7:15 pm Post subject: Re: 2 right blocks |
|
OKay, my page layout is thus: left blocks...center blocks...right blocks
sandwiched between header and footer code...
example now: www.purplepride.org/vikes
want to resemble columns on actual www.purplepride.org
so I want page layout to be:
header
left blocks...center blocks....right blocks....right blocks...
footer
Reading into what you are saying, is that somehow using the themesidebox may be my avenue?
ehoffman73's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) W2003/IIS6/4.x/ /9.0.5
|
|
| Back to top |
|
 |
ehoffman73 Platinum Supporter


Offline Joined: Apr 22, 2004 Posts: 211 Location: Stillwater, MN
|
Posted: Sat Apr 23, 2005 1:51 am Post subject: Re: 2 right blocks |
|
Thanks DJ, I am getting the hang of this. The right block is good, I just have home-page only blocks to add. So I can add CustomA block before the right block code to get that to fly, right?
So basically at the end of header.html, but then maybe also do the include once code around it like
<!-- IF PAGE_TITLE --><!-- ELSE --><!-- ENDIF --> so it only happens on the home page?
_________________ -----------------------
www.purplepride.org
Home of Vikings Fans Worldwide
www.wildfans.com
Home of Wild Fans Worldwide
ehoffman73's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) W2003/IIS6/4.x/ /9.0.5
|
|
| Back to top |
|
 |
t31os Supporter


Offline Joined: Sep 22, 2004 Posts: 2025 Location: Somewhere in the intertubes... lolz
|
Posted: Sat Apr 23, 2005 2:03 am Post subject: Re: 2 right blocks |
|
Interesting, i like the suggestion DJ made, i can see how that works kinda, might have to play around with that myself, thats if i can do it without breaking my theme
t31os's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) XP / 2.0 / 5.1 / 5.2 / none
|
|
| Back to top |
|
 |
DJ Maze Developer


Offline Joined: Apr 19, 2004 Posts: 5683 Location: http://tinyurl.com/5z8dmv
|
Posted: Sat Apr 23, 2005 2:37 am Post subject: Re: 2 right blocks |
|
$home is a variable that tells you it's the home and not a module they see.
| Code:: |
function themefooter() {
global $banners, $cpgtpl, $home;
blocks('right');
$cpgtpl->assign_vars(array(
'IS_HOME' => $home;
'B_R_VISIBLE' => hideblock('601') ? 'style="display: none"' : '',
'S_FOOTER' => footmsg(),
'S_BANNER' => ($banners) ? viewbanner() : ''
)); |
then in your footer.html
| Code:: |
<!-- IF IS_HOME --><!-- ENDIF --> |
DJ Maze's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Fedora 15 / 2.2.22 / 5.5.20 / 5.3.10 / CVS
|
|
| Back to top |
|
 |
t31os Supporter


Offline Joined: Sep 22, 2004 Posts: 2025 Location: Somewhere in the intertubes... lolz
|
Posted: Sat Apr 23, 2005 3:31 am Post subject: Re: 2 right blocks |
|
Cool, so if i did something like this in my footer....
| Code:: |
<!-- IF IS_HOME -->
Hello my name is mud
<!-- ENDIF --> |
Then that would only show up whenever the user is actually at index.php right?
or
| Code:: |
<!-- IF IS_HOME -->
Hello my name is mud
<!-- ELSE -->
Hello my name is rhubarb
<!-- ENDIF --> |
Then if any page other then index.php i'm rhubarb right?
Or is it not that simple
t31os's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) XP / 2.0 / 5.1 / 5.2 / none
|
|
| Back to top |
|
 |
DJ Maze Developer


Offline Joined: Apr 19, 2004 Posts: 5683 Location: http://tinyurl.com/5z8dmv
|
Posted: Sat Apr 23, 2005 4:08 am Post subject: Re: 2 right blocks |
|
note that i used
| Code:: |
'IS_HOME' => $home; |
DJ Maze's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Fedora 15 / 2.2.22 / 5.5.20 / 5.3.10 / CVS
|
|
| Back to top |
|
 |
t31os Supporter


Offline Joined: Sep 22, 2004 Posts: 2025 Location: Somewhere in the intertubes... lolz
|
Posted: Sat Apr 23, 2005 3:53 pm Post subject: Re: 2 right blocks |
|
Yes i was aware thanx DJ dude
This raises a question to, regarding the link of the Credits page etc, would you able to use something like above to only show it on the main page then hide it from the rest, would that be suitable to requirement?
I'm guessing someone will ask eventually so figured i might aswell tackle the question now.
t31os's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) XP / 2.0 / 5.1 / 5.2 / none
|
|
| Back to top |
|
 |
t31os Supporter


Offline Joined: Sep 22, 2004 Posts: 2025 Location: Somewhere in the intertubes... lolz
|
Posted: Wed Apr 27, 2005 6:23 pm Post subject: Re: 2 right blocks |
|
Also note that you need to add $home into the global area like in your example....
Thought i'd point that out since i've just used a modification of the above to only display banners on the main page of the site since i have them right at the top of the center column and don't want them sitting above every single module, its kinda like a nag screen for users to see it there on every page.
The above example provided me with enough info to work the idea into the theme.
t31os's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) XP / 2.0 / 5.1 / 5.2 / none
|
|
| Back to top |
|
 |
tyler_durden Newbie


Offline Joined: May 12, 2005 Posts: 33 Location: Mpls, MN
|
Posted: Fri Jun 03, 2005 10:51 pm Post subject: Re: 2 right blocks |
|
I have nothing important to add, other than I love the purplepride.org/vikes website ehoffman73 . I'm a diehard Vikes fan as well, living in Mpls, MN. Sorry if it's a little off subject!
tyler_durden's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Apache ?/MySQL 4.1.19-standard/PHP 4.4.2/9.0.6.1
|
|
| Back to top |
|
 |
ehoffman73 Platinum Supporter


Offline Joined: Apr 22, 2004 Posts: 211 Location: Stillwater, MN
|
Posted: Sat Aug 06, 2005 3:28 pm Post subject: Re: 2 right blocks |
|
| tyler_durden wrote: |
| I have nothing important to add, other than I love the purplepride.org/vikes website ehoffman73 . I'm a diehard Vikes fan as well, living in Mpls, MN. Sorry if it's a little off subject! |
Thanks, hope to see you there. I will try this today and see how it all works!
_________________ -----------------------
www.purplepride.org
Home of Vikings Fans Worldwide
www.wildfans.com
Home of Wild Fans Worldwide
ehoffman73's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) W2003/IIS6/4.x/ /9.0.5
|
|
| Back to top |
|
 |
ehoffman73 Platinum Supporter


Offline Joined: Apr 22, 2004 Posts: 211 Location: Stillwater, MN
|
Posted: Sat Aug 06, 2005 5:45 pm Post subject: Re: How to have 2 right block columns |
|
quick check on what I'm doing wrong: on theme.php
| Code:: |
function themefooter() {
global $showblocks, $banners, $home, $cpgtpl, $foot1, $foot2, $foot3, $copyright, $start_time, $db;
blocks('right');
$cpgtpl->assign_vars(array(
'IS_HOME' => $home,
'B_R_VISIBLE' => hideblock('601') ? 'style="display: none"' : '',
'B_R_HIDDEN' => hideblock('601') ? '' : 'style="display: none"',
'S_FOOTER' => footmsg()
)
);
// start custom part
global $themeblockside;
$themeblockside == 'customA';
// a static block
themesidebox('Gameday', 'My content', 5555);
// a dynamic block
//$title = 'Block 2';
//include('blocks/block-CPG_Stats.php');
//themesidebox($title, $content, 5556);
// end custom part
$cpgtpl->set_filenames(array('footer' => 'footer.html'));
$cpgtpl->display('footer'); |
and on the footer.html:
| Code:: |
<!-- BEGIN bottomblock -->
<div class="table1">
<div class="option" align="center">{bottomblock.S_TITLE}</div>
{bottomblock.S_CONTENT}
</div><br />
<!-- END bottomblock -->
<!-- IF IS_HOME -->
</td><td class="mainright" id="pe609" {B_R_VISIBLE}>
<!-- BEGIN customAblock -->
<div class="blockheadR">
<img align="right" alt="Toggle Content" title="Toggle content" id="pic{customAblock.S_BID}" src="{customAblock.S_IMAGE}" onclick="blockswitch('{customAblock.S_BID}');" style="cursor:pointer"/> {customAblock.S_TITLE}</div>
<div class="blockcontent" id="pe{customAblock.S_BID}" {customAblock.S_VISIBLE}>{customAblock.S_CONTENT}</div>
<!-- END customAblock -->
<!-- ENDIF -->
<!-- IF S_RIGHTBLOCKS -->
</td><td class="mainright" id="pe601" {B_R_VISIBLE}>
<!-- BEGIN rightblock --> |
It shows the block under the main content but before the bottom blocks...and on every page. But only on the home page it does leave a whole column for custom blocks on the home page only!
Quick help?
_________________ -----------------------
www.purplepride.org
Home of Vikings Fans Worldwide
www.wildfans.com
Home of Wild Fans Worldwide
ehoffman73's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) W2003/IIS6/4.x/ /9.0.5
|
|
| Back to top |
|
 |
t31os Supporter


Offline Joined: Sep 22, 2004 Posts: 2025 Location: Somewhere in the intertubes... lolz
|
|
| Back to top |
|
 |
ale1981 Nice poster


Offline Joined: Mar 15, 2005 Posts: 66 Location: Kent, UK
|
Posted: Wed Apr 05, 2006 9:23 am Post subject: Re: How to have 2 right block columns |
|
Thanks for the info
I also used this to just display my phpAdsNew banners on the homepage.
ale1981's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux / 1.3.36 / 4.1.19 / 4.4.2 / CVS
|
|
| Back to top |
|
 |
|
|