Hi all,
This is a double post because I was told this matter belonged here. I only want the admin message to show up on the index page. Right now, every page shows the admin message at the top (reviews, forum, etc). I only want the admin message to show on the index page. I'm using .726 and my theme is Holiday Passion from Designs4Nuke. The xanthia fix doesn't seem to apply.To see what I'm talking about, feel free to go to my website at http://www.euronaps.ch .
Thanks,
flowergrrl
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mesteele101 created topic »Pages 2.5.0 and updating - Page not found« 05:20 AM
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 05:05 AM
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 01:29 AM
- mdee created topic »How to implement returnpage ?« 01:00 AM
- nestormateo responded to »Fillters in Clip« 24. May
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 24. May
- frw responded to »Bug in the SMTP mail transfer protocol - Port 25 - Zikula 1.2.9« 22. 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
Only want admin message to show on index page
-
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 365
I don't know of an easy way to do this with a PHP theme, but as I mentioned before this is very simple with an AutoTheme. Its just a matter of defaulting the Admin block to off everywhere but the frontpage. -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Sep 04, 2004
- Posts: 34
Gosh. I'm confused then. My previous version of Postnuke was like this automatically (admin messages only showed up on the index page). If it was that way before, why is it so hard to set it back? -
- Rank: Developer
- Registered: Dec 31, 1969
- Last visit: Jun 01, 2010
- Posts: 6859
What version are you using? It sounds like you're either using 750 or have installed Xanthia and using one of the Xanthia modules, and how to do this has been covered by Mark already.
--
Home Page | Find on Facebook | Follow on Twitter
-
- Registered: Dec 31, 1969
- Last visit: Oct 21, 2009
- Posts: 786
Flowergrrl, this will be set in the theme.cfg file too. I'll check it out and post a fix back for you.
--
iThinkMedia.com
Follow me on Twitter -
- Registered: Dec 31, 1969
- Last visit: Oct 21, 2009
- Posts: 786
In theory the code below should work but it doesn't seem too. Anyone else have ideas on why?
//Custom themed modules - configure custom templates, colors, image and block display (*optional)
//These override the standard settings above only for the specific module
//Comment out or delete what you don't need
//
//Use the following if statement if you don't want these settings used on your home page
if($index != 1) {
$custom_module['News'] = array (
//Module specific template file names
'main' => "theme.html",
'leftblock' => "leftblock.html",
'centerblock' => "centerblock.html",
'rightblock' => "rightblock.html",
//Module specific Nuclei blocks template file names (*optional)
'area1block' => "area1block.html",
'area2block' => "area2block.html",
'area3block' => "area3block.html",
'area4block' => "area4block.html",
'area5block' => "area5block.html",
'area6block' => "area6block.html",
'area7block' => "area7block.html",
'area8block' => "area8block.html",
'area9block' => "area9block.html",
'topblock' => "topblock.html",
'bottomblock' => "bottomblock.html",
//Block display for this module
'left' => true,
'center' => false,
'right' => false,
//Nuclei blocks (*optional)
'area1' => false,
'area2' => false,
'area3' => false,
'area4' => false,
'area5' => false,
'area6' => false,
'area7' => false,
'area8' => false,
'area9' => false,
'top' => false,
'bottom' => false,
//Style sheet, logo image and colors for this module
'stylesheet' => "",
'logo' => "thenews.gif", // [logo-image]
'bgcolor1' => "#f3f3f3", // [light bkg color]
'bgcolor2' => "#9465AF", // [dark border]
'bgcolor3' => "#EDEAF4", // [color3]
'bgcolor4' => "#EDEAF4", // [color4]
'textcolor1' => "#000000", // [color5]
'textcolor2' => "#660066", // [color6]
);
} //End if($index != 1)
--
iThinkMedia.com
Follow me on Twitter -
- Rank: Expert
- Registered: Dec 02, 2002
- Last visit: Apr 30, 2010
- Posts: 1474
Hi there,
try doing it the other way round:
Code
//Custom themed modules - configure custom templates, colors, image and block display (*optional)
//These override the standard settings above only for the specific module
//Comment out or delete what you don't need
//
//Use the following if statement if you don't want these settings used on your home page
if($index == 1) { //are we dealing with the home page?
$custom_module['News'] = array (
//Module specific template file names
'main' => "theme.html",
'leftblock' => "leftblock.html",
'centerblock' => "centerblock.html",
'rightblock' => "rightblock.html",
//Module specific Nuclei blocks template file names (*optional)
'area1block' => "area1block.html",
'area2block' => "area2block.html",
'area3block' => "area3block.html",
'area4block' => "area4block.html",
'area5block' => "area5block.html",
'area6block' => "area6block.html",
'area7block' => "area7block.html",
'area8block' => "area8block.html",
'area9block' => "area9block.html",
'topblock' => "topblock.html",
'bottomblock' => "bottomblock.html",
//Block display for this module
'left' => true,
'center' => true, //if home page show the center block
'right' => true, //if home page show the right block
//Nuclei blocks (*optional)
'area1' => false,
'area2' => false,
'area3' => false,
'area4' => false,
'area5' => false,
'area6' => false,
'area7' => false,
'area8' => false,
'area9' => false,
'top' => false,
'bottom' => false,
//Style sheet, logo image and colors for this module
'stylesheet' => "",
'logo' => "thenews.gif", // [logo-image]
'bgcolor1' => "#f3f3f3", // [light bkg color]
'bgcolor2' => "#9465AF", // [dark border]
'bgcolor3' => "#EDEAF4", // [color3]
'bgcolor4' => "#EDEAF4", // [color4]
'textcolor1' => "#000000", // [color5]
'textcolor2' => "#660066", // [color6]
);
} //End if($index == 1)
I had lots of troubles with this myself and found that this was the best way to do it.
Also make sure the $index variable is coming up - just put an somewhere in the theme to see if it is coming up.
You would then make it so the default settings did not show center and right blocks.
If this doesn't work, please post a link so I can download the theme and take a closer look.
Kindest regards
Lobos
--
-Lobos
Professional PHP Framework Services: Concept, Development and Deployment -
- Rank: Expert
- Registered: Dec 02, 2002
- Last visit: Apr 30, 2010
- Posts: 1474
Hi again:
you should be able to make the settings with the default template also:
Code
if($index == 1) {
$block_display = array (
//Display blocks on all pages
'left' => true,
'center' => true,
'right' => true,
//Nuclei blocks (*optional)
'area1' => false,
'area2' => true,
'area3' => false,
'area4' => false,
'area5' => false,
'area6' => false,
'area7' => false,
'area8' => false,
'area9' => false,
'top' => false,
'bottom' => true,
);
} else {
$block_display = array (
//Display blocks on all pages
'left' => true,
'center' => false,
'right' => false,
//Nuclei blocks (*optional)
'area1' => false,
'area2' => true,
'area3' => false,
'area4' => false,
'area5' => false,
'area6' => false,
'area7' => false,
'area8' => false,
'area9' => false,
'top' => false,
'bottom' => true,
);
}
In theory this will work if a module other than "news" is set at the front page.
REgards
--
-Lobos
Professional PHP Framework Services: Concept, Development and Deployment -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Sep 04, 2004
- Posts: 34
Hi Lobos,
Hmmmm...I'd like for the news to be on the front page though. I tried the code you listed right before your previous one but it didn't work. I didn't know if you were saying that both codes only worked with sections other than news though.
I'm going to root around in the theme.cfg file again. Maybe I'll hit on something. -
- Rank: Expert
- Registered: Dec 02, 2002
- Last visit: Apr 30, 2010
- Posts: 1474
Hi there,
Use the block dispaly settings that I showed you in the second post this should work - have you got a download link for the theme?
REgards
--
-Lobos
Professional PHP Framework Services: Concept, Development and Deployment -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Sep 04, 2004
- Posts: 34
Hi Lobos,
Here are the links:
http://www.designs4n…tit&lid=48]sit form
http://www.designs4n…tit&lid=49]zip form -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Sep 04, 2004
- Posts: 34
Hi Lobos,
Thanks. I switched the center block setting to "false" and it worked. It was so simple that I feel really dumb right now. At least I know that the power with this theme is in the theme.cfg file.
- Moderated by:
- Support
