I can't remember the last time I used collapsible blocks but now that I have a need for them, of course they don't seem to work..
Enabled them in Blcoks >> Settings
Enabled them in individual blocks
Nothing appears in the block though...
Custom theme of course...is there anything I need to do to enable this?
Thanks in advance!
--
Burnham Racing
Illinois Cycling Association
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- michiel responded to »password problem« 10:01 AM
- mazdev responded to »Hide "Register new account" and change template to 3 col« 07:50 AM
- mesteele101 created topic »Zikula 1.3.3 - Site Search 1.5.2 - Unable to turn off plug-ins« 07:48 AM
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
- mdee created topic »How to implement returnpage ?« 25. 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
Collapsible blocks not working... :(
-
- Rank: Softmore
- Registered: May 22, 2004
- Last visit: Apr 03, 2010
- Posts: 451
-
- Rank: Developer
- Registered: Jun 16, 2003
- Last visit: May 29, 2010
- Posts: 1966
the theme logic probably doesn't support the setting. you probably will need to add the logic -
- Rank: Softmore
- Registered: May 22, 2004
- Last visit: Apr 03, 2010
- Posts: 451
Huh?
I thought this was supposed to work out of the box...just enable it and go!
I know I can hardcode it into the block template but 1.) the little plus/minus image won't change depending on the block's state and 2.) hardcoding is a no-no...
I'm not sure what logic I'm supposed to add to the theme?
Thanks in advance craigh!
edited by: remmingtonshowdown, May 20, 2009 - 12:01 PM
--
Burnham Racing
Illinois Cycling Association -
- Rank: Developer
- Registered: Jun 16, 2003
- Last visit: May 29, 2010
- Posts: 1966
well - I don't hav a solid answer for you, but I *assume* that the template logic has to include the possibility of having the block minimized. Check one of the default themes and see if that works. -
- Rank: Softmore
- Registered: May 22, 2004
- Last visit: Apr 03, 2010
- Posts: 451
That's what I thought too... and then I checked the block templates on some default themes and either there are no templates or the templates contain no mention of the collapsable feature.
Further inspection reveals that the link to collapse a block is created in includes/pnBlocks.php.
If I set the block template to "Default" in my theme then it works but there is no "Default.html" template that I can find...
Sigh...
--
Burnham Racing
Illinois Cycling Association -
- Rank: Developer
- Registered: Jun 16, 2003
- Last visit: May 29, 2010
- Posts: 1966
OK - check the pnBlockThemeBlock() function in includes/pnBlocks.php and you can see the logic there. It looks like it shouldn't be theme-dependent. But it is dependent on loggedin status. -
- Rank: Softmore
- Registered: May 22, 2004
- Last visit: Apr 03, 2010
- Posts: 451
Yeah I poured through that and I see what's happening but I'm not sure where $row['minbox'] is delivered and how the theme engine prints it out...
I have everything set correctly and I just don't get why it's fighting me... It must be something to do with my block templates or Pagesetter block-list templates...?
This is the block template I'm using...
Code
<div class="block-<!--[$bkey]--> block-<!--[$bid]-->">
<div id="blockHeader">
<div ><span class="mediumTitle">Approved Officiating Requests</span></div>
<div ></div>
</div>
<div id="pending">
<!--[$content]-->
<br />
</div>
</div>
--
Burnham Racing
Illinois Cycling Association -
- Rank: Softmore
- Registered: May 22, 2004
- Last visit: Apr 03, 2010
- Posts: 451
Seriously, WTF... Dizkus loves stripping out part of my code... I have to s p a c e out any inline styles... Way to go Dizkus- you suck
Anyhow, the block:
Code
<div class="block-<!--[$bkey]--> block-<!--[$bid]-->">
<div id="blockHeader">
<div s t y l e="float:left"><span class="mediumTitle">Approved Officiating Requests</span></div>
<div s t y l e="float:right;padding-top:3px"></div>
</div>
<div id="pending">
<!--[$content]-->
<br />
</div>
</div>
--
Burnham Racing
Illinois Cycling Association -
- Rank: Developer
- Registered: Dec 31, 1969
- Last visit: May 31, 2010
- Posts: 303
I read this and it kinda made me nuts - I found in site/includes/pnBlock.php
Code
/**
* Display a block based on the current theme
*
*/
function pnBlockThemeBlock($row)
That function at line #160 or so has a definition of the minbox display.
--
Paul
____________________________________________________
"...Humor, ITs just a state of mind"
TakeIT2.CoM :: Open Destination
...my site is a perfect example of why doctors do not operate on them self :) -
- Rank: Developer
- Registered: Dec 31, 1969
- Last visit: May 31, 2010
- Posts: 303
at line #178 it would be nice if this portion:
Code
// check for collapsable menus being enabled, and setup the collapsable menu image.
if (!isset($upb)) {
if (file_exists('themes/'.$themedir.'/images/upb.gif')) {
$upb = '<img src="themes/'.$themedir.'/images/upb.gif" alt="" />';
} else {
$upb = '<img src="images/global/upb.gif" alt="" />';
}
}
if (!isset($downb)) {
if (file_exists('themes/'.$themedir.'/images/downb.gif')) {
$downb = '<img src="themes/'.$themedir.'/images/downb.gif" alt="" />';
} else {
$downb = '<img src="images/global/downb.gif" alt="" />';
}
}
If that portion could define the link to the image differently as well so that it was easily themeable. (which means not replacing core images or this hard coded gif file in the pnBlocks.php)
As a matter of fact it would be nice if this could be made a theme plugin addressing the collapsible state of a block, so that the method of collapse doesn't require the reloading of the whole page. On a theme level you can bypass this collapsible state issue with your own theme level controls, but for the novice a built in system/function is nice too.
--
Paul
____________________________________________________
"...Humor, ITs just a state of mind"
TakeIT2.CoM :: Open Destination
...my site is a perfect example of why doctors do not operate on them self :) -
- Rank: Developer
- Registered: Dec 31, 1969
- Last visit: May 31, 2010
- Posts: 303
You have to include < !-- [$minbox] -- >
my basic collapsible block looks like:
Code
<div class="block block-<!--[$bkey]--> block-<!--[$bid]-->">
<!--[if $title neq '']--><span class="block_title"> <!--[$title]--></span><span class="minbox"><!--[$minbox]--></span>
<!--[/if]-->
<!--[$content]-->
</div>
[code=css]
.block {
clear : left;
margin-bottom : 0px;
margin-left: 0px;
margin-top : 0px;
padding-bottom : 0px;
padding-left : 0px;
padding-right : 0px;
padding-top : 0px;
width : 100%;
}
.minbox {
clear : none;
float : right;
margin-bottom : 0px;
margin-top : 0px;
padding-right : 3px;
padding-top : -5px;
padding-bottom : 0px;
}
.block_title {
color : #d4ba71;
font-style : normal;
font-variant : normal;
font-weight : 600;
font-size : 1.4em;
line-height : 1em;
margin-bottom : 0px;
margin-top : 0px;
padding-bottom : 5px;
padding-left : 0px;
padding-right : 0px;
padding-top : 0px;
text-align : left;
}
[/code]
By leaving the block content a generic call, I can theme the module block template on it's own terms. I have found the more divs you add the less fine control of the block. moving the module/block template to yourtheme/templates/modules/module-name/block-name.htm gives you the best in absolute control inside your theme's generic block container. (fwiw)(if you know all this, eh, then you know.)
--
Paul
____________________________________________________
"...Humor, ITs just a state of mind"
TakeIT2.CoM :: Open Destination
...my site is a perfect example of why doctors do not operate on them self :) -
- Rank: Softmore
- Registered: May 22, 2004
- Last visit: Apr 03, 2010
- Posts: 451
TakeIT2
You have to include < !-- [$minbox] -- >
And where in the world was this written... ?
Thanks Paul- much appreciated! I was starting to whip up a prototype solution...ugh...
EDIT- alas it seems to not work for me... oh well.. I'll find a solution somehow...
edited by: remmingtonshowdown, May 20, 2009 - 05:07 PM
--
Burnham Racing
Illinois Cycling Association -
- Rank: Developer
- Registered: Dec 31, 1969
- Last visit: May 31, 2010
- Posts: 303
remmingtonshowdown
TakeIT2
You have to include < !-- [$minbox] -- >
And where in the world was this written... ?
EDIT- alas it seems to not work for me... oh well.. I'll find a solution somehow...edited by: remmingtonshowdown, May 20, 2009 - 05:07 PM
It has not been included in recent templates! I think the use of collapsible blocks is thought to be "depreciated." It was in the default "Postnuke" theme from the .7 series. The include file referenced above still bares the PN signature in pnBlocks.php - I can't imagine it being around much longer, really.
Why it is not working for you I can't answer really, unless you have a modified or broken versions of those files. What Zikula version are you on? I have found some things don't transfer/ftp, or copy well and you just have to refresh with a clean copy. (I recently had fun with wikula because of that- grrr - my own fault) When things don't work and all else fails I reinstall. That block function is in the 1.1.1 version, It should work out of the box! (once you dust off the undocumented control) Just so you know I am not using legacy support at all either, that would make no difference here.
--
Paul
____________________________________________________
"...Humor, ITs just a state of mind"
TakeIT2.CoM :: Open Destination
...my site is a perfect example of why doctors do not operate on them self :) -
- Rank: Softmore
- Registered: May 22, 2004
- Last visit: Apr 03, 2010
- Posts: 451
It's funny- in the dozens of sites I'v built never once have I used collapsible blocks... and now that I need it everything goes awry...
Frankly- I too feel that the method of collapsing blocks is antiquated what with prototype built in to zikula and scriptalicious/protolicious/jQuery so easily implemented... maybe I'll just whip something up...
--
Burnham Racing
Illinois Cycling Association -
- Rank: Developer
- Registered: Dec 31, 1969
- Last visit: May 31, 2010
- Posts: 303
I was kinda looking into that too. the trick to solve it seems is making the script recognize the the blockID to populate the usual pairs of controls and content divs. It would be my first venture into the guts those JS scripts. (so-to-speak)
--
Paul
____________________________________________________
"...Humor, ITs just a state of mind"
TakeIT2.CoM :: Open Destination
...my site is a perfect example of why doctors do not operate on them self :)
- Moderated by:
- Support
Users on-line
- 0 users
This list is based on users active over the last 60 minutes.
