I have downloaded, and am using, Nucleus-XL. Things seemed to be progress very well until I noticed that the added blocks appear just fine on the initial home page but the right side, bottom and center blocks are gone on any page but the HOME page.
What do I have to do to make the blocks show up on all pages?
Thank you for your help.
Joe Dunn
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- Guite responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 05:53 PM
- 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
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
Show Right Block & Center Block - Every Page
-
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 459
hereis your answer -
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 354
"
--------------------------------------------------------------------------------
Hey, I got it!!!!
It's easy for every Module to display right blocks.
simply edit the theme.php in the theme-folder.
At the function themefooter, simply change the Line:
Code:
if( $index == 1 ) {
into
Code:
if( $index == 1 || pnModGetName() == "htmlpages" ) {
That ist working with every Modul, also more in one line. For e.g. like this:
Code:
if ($index == 1 || pnModGetName() == "htmlpages" ||
pnModGetName() == "PostCalendar") {
"
So doi I have to list ever module by name or does the line:
if( $index == 1 || pnModGetName() == "htmlpages" ) {
Take care of every module current and future?
Also I noticed a question about banners being truncated. Is there an answer to this?
I did not understand the second part of the answer:
"That ist working with every Modul, also more in one line. For e.g. like this:
Code:
if ($index == 1 || pnModGetName() == "htmlpages" ||
pnModGetName() == "PostCalendar") {"
What is the writer trying to say here?
Thanky you for your help!
Joe Dunn -
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 354
If I replace:
if( $index == 1 ) {
to
if ($index == 1 || pnModGetName() == "htmlpages" ||
pnModGetName() == "PostCalendar") {
It will then work for every module? Sorry for being so dense but I am trying to understand.
Joe Dunn -
- Rank: Legend
- Registered: Dec 11, 2002
- Last visit: Oct 21, 2009
- Posts: 11674
it will work for the modules you name (correctly that is)
so in the example above center and right blocks will be shown for PostCalendar and htmlpages
--
itbegins.co.uk - Zikula Consulting
birtwistle.me.uk - Personal Blog
Please read the Support Guide -
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 354
So there is no way to use a wildcard such as *.*, going back to the DOS days.
I would need to list each of the 20, 30 or 40 modules that might be deployed on my site and each time I add a new module I would have to update this list?
Joe -
- Rank: Expert
- Registered: Aug 20, 2002
- Last visit: Jan 12, 2010
- Posts: 1219
Just remove the if( $index == 1 ) or if (whatever)... and the blocks will be displayed for every page.
-Shawn
--
Get the Revolutionary AutoTheme HTML Theme System! Currently for Zikula, PHP-Nuke, CRE Loaded, osCommerce and Wordpress! -
- Rank: Expert
- Registered: Aug 20, 2002
- Last visit: Jan 12, 2010
- Posts: 1219
Code
//Example 1 (shows right blocks EXCEPT in Downloads or Web_Links):
$mod = pnModGetName();
if ($mod != "Downloads" && $mod != "Web_Links") {
blocks("right");
}
//Example 2 (shows right blocks ONLY in Downloads or Web_Links):
$mod = pnModGetName();
if ($mod == "Downloads" || $mod == "Web_Links") {
blocks("right");
}
So just pick which is easier. Either you list which modules DO display certain blocks, or you list which modules DO NOT display certain blocks.
There are other ways to do it, like:
Code
//somewhere at top of theme.php
$GLOBALS['CurrentMod'] = pnModGetName();
$GLOBALS['ModList'] = array(
"Downloads",
"Web_Links"
);
//use in themeheader() where center blocks are
if (in_array($GLOBALS['CurrentMod'], $GLOBALS['ModList'])) {
blocks("center");
}
//use in themefooter() where right blocks are
if (in_array($GLOBALS['CurrentMod'], $GLOBALS['ModList'])) {
blocks("right");
}
HTH
-Shawn
--
Get the Revolutionary AutoTheme HTML Theme System! Currently for Zikula, PHP-Nuke, CRE Loaded, osCommerce and Wordpress!
- Moderated by:
- Support
