Fork me on GitHub

Only want admin message to show on index page  Bottom

  • 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
  • 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.
  • 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?
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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.
  • 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
  • Hmmm. The URL links didn't work. Sorry about that.
  • 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. icon_smile

This list is based on users active over the last 60 minutes.