Fork me on GitHub

AT Lite .6  Bottom

  • Hi guys been trying to get the AT .6 version to work with 750, the non-module version this being a great way for users to upload theme and simply click and go or "Plug 'n' Play"

    But it appears the right and ceneterblocks are not working, anyone have any suggestions?? or Fix for this

    Below is code

    Code

    <?php

    $strip_head = false;
    $alternate_summary = false;

    $template = array (
    //Main theme template file names
           'main' => "theme.html",
           'summary' => "summary.html",
           //Alternating Summary article templates
           //'summary1' => "summary1.html",
           //'summary2' => "summary2.html",
           //
           'article' => "article.html",
           'leftblock' => "leftblock.html",
           'centerblock' => "centerblock.html",
           'rightblock' => "rightblock.html",
           //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 = array (
    //Display blocks on all pages
           '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,
    );

    $miscellaneous = array (
    //Style sheet, logo image and colors used by modules by default
           'stylesheet' => "",
           'logo' => "",               // [logo-image]
           'bgcolor1' => "#2C2C39",    // [color1]
           'bgcolor2' => "#656572",    // [color2]
           'bgcolor3' => "#454550",    // [color3]
           'bgcolor4' => "#656572",    // [color4]
           'textcolor1' => "#000000",  // [color5]
           'textcolor2' => "#000000",  // [color6]
    );

    $custom_block = array (
    //Custom themed blocks - configure custom templates (*optional)
    //These override the standard settings above only for the specific block
    //Comment out or delete what you don't need
           //'Main Menu' => "mainmenu.html",
           //'Poll' => "poll.html",
           //'Related links' => "relatedlinks.html",
    );


    //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' => true,
           'right' => true,
           //Nuclei blocks (*optional)
           'area1' => true,
           'area2' => true,
           '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' => "",    // [logo-image]
           'bgcolor1' => "#2C2C39",    // [color1]
           'bgcolor2' => "#656572",    // [color2]
           'bgcolor3' => "#454550",    // [color3]
           'bgcolor4' => "#656572",    // [color4]
           'textcolor1' => "#000000",  // [color5]
           'textcolor2' => "#000000",  // [color6]
    );
    } //End if($index== 1)

    if($index != 1) {
    //
    $custom_module['Downloads'] = 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' => "",    // [logo-image]
           'bgcolor1' => "#2C2C39",    // [color1]
           'bgcolor2' => "#656572",    // [color2]
           'bgcolor3' => "#454550",    // [color3]
           'bgcolor4' => "#656572",    // [color4]
           'textcolor1' => "#000000",  // [color5]
           'textcolor2' => "#000000",  // [color6]
    );
    } //End if($index != 1)

    if($index != 1) {
    //
    $custom_module['PNphpBB2'] = 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' => "",    // [logo-image]
           'bgcolor1' => "#2C2C39",    // [color1]
           'bgcolor2' => "#3D3D49",    // [color2]
           'bgcolor3' => "#363642",    // [color3]
           'bgcolor4' => "#3D3D49",    // [color4]
           'textcolor1' => "#000000",  // [color5]
           'textcolor2' => "#000000",  // [color6]
    );
    } //End if($index != 1)

    if($index != 1) {
    //
    $custom_module['Members_List'] = 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' => "",    // [logo-image]
           'bgcolor1' => "#2C2C39",    // [color1]
           'bgcolor2' => "#656572",    // [color2]
           'bgcolor3' => "#363642",    // [color3]
           'bgcolor4' => "#737373",    // [color4]
           'textcolor1' => "#000000",  // [color5]
           'textcolor2' => "#000000",  // [color6]
    );
    } //End if($index != 1)

    $custom_module['Web_Links'] = array (
           'right' => false,
    );

    ?>


    Any help on this would be great, again the center and right blocks just wont appear for some reason.
    :shock:
  • .750 removes a lot of global variables and the code at the top of pnAPI.php that extracts all post, get and cookie vars to globals - this is a major step in securing the enviroment and it's modules.

    This is the likely cause of the problems your seeing since the theme logic is based on the assumption that $index exists - no where is it specicially referenced as a global variable - as in standard legacy PN themes. Try changing every occurance of $index to $GLOBALS['index'].

    -Mark

    --
    Visit My homepage and Zikula themes.
  • Yes, and also in the commands.inc.php there will be $index used in the if statements to display the blocks as well.

    -Shawn

    --
    Get the Revolutionary AutoTheme HTML Theme System! Currently for Zikula, PHP-Nuke, CRE Loaded, osCommerce and Wordpress!
  • ..alternatively:

    Code

    if($index){


    ...try:

    Code

    if(pnConfigGetVar('startpage') == pnModGetName()){



    ..or:

    Code

    if(!index){

    ..would be:

    Code

    if(pnConfigGetVar('startpage') != pnModGetName()){


    ..or as Mark said $GLOBALS['index'].. but if that doesn't do it, give the code above a go.. ;)
  • InvalidResponse

    ..alternatively:
    ...try:

    Code

    if(pnConfigGetVar('startpage') == pnModGetName()){


    Code

    if(pnConfigGetVar('startpage') != pnModGetName()){

    Hmmm... Suppose your startpage is 'News' and you visit this URL: modules.php?op=modload&name=News&file=article&sid=1&mode=thread&order=0&thold=0

    Then pnConfigGetVar('startpage') = 'News' and pnModGetName() = 'News' but you're NOT on the startpage. So what ever News page you're on: full article view, topics list, category list, etc... you'll get the same result. Not the same functionality. I would continue using $index until there is a better way. Even though it's not the best, it's the most accurate now.

    -Shawn

    --
    Get the Revolutionary AutoTheme HTML Theme System! Currently for Zikula, PHP-Nuke, CRE Loaded, osCommerce and Wordpress!
  • ..true, true.. ;)

    ..best to keep it simple anyhow.

    -IR
  • Ok I realize this is all basic code to you guys and I can relate but not exactly understand it yet, I got to stop designing and start to code hahaha

    So commenting it out... wokrs all mod pages work but what would be the best way as far as all links working etc and a larger piece of code may help me here

    Also on my 750 test site, regardless which theme I use, the modules.php?op=modload&name=News&file=article&sid=1&mode=thread&order=0&thold=0 link goes into a state of shock hahaha

    Just never goes there progress bar literally stops at 2 bars, any ideas ??
  • In the theme.cfg, commands.inc.php and in autotheme.inc.php, just find $index and replace with $GLOBALS['index']

    -Shawn

    --
    Get the Revolutionary AutoTheme HTML Theme System! Currently for Zikula, PHP-Nuke, CRE Loaded, osCommerce and Wordpress!
  • Geesh

    Im so consumed by designing and getting very complacent with these theme sys that im not looking into the actual code, time for me to start :)

    By the way Shawn, have you been getting any of my email ???

    Must also mention that Ill give this a try see what happens hahaha

    Thanks again ;)
  • Can't seem to find any $index in commands.inc.php or autotheme.inc.php

    this is 0.6

    I tried the replacing $index with $GLOBALS['index'] but back to old way where no right or center blocks show
  • Dunno dude. I haven't looked at .6 since I released .7, and .8 is out this week. It's already finished and in MD-Pro CVS for testing and release.

    -Shawn

    --
    Get the Revolutionary AutoTheme HTML Theme System! Currently for Zikula, PHP-Nuke, CRE Loaded, osCommerce and Wordpress!
  • Code

    //Block commands
    $command['[block-title]'] = 'echo $block["title"];';
    $command['[block-content]'] = 'echo $block["content"];';
    $command['[left-blocks]'] = 'if ($block_display["left"]) { blocks("left"); }';
    $command['[center-blocks]'] = 'if ($block_display["center"]) { blocks("center"); }';
    $command['[right-blocks]'] = 'if ($block_display["right"]) { blocks("right"); }';
    $command['[area1-blocks]'] = 'if ($block_display["area1"]) { blocks("1"); }';
    $command['[area2-blocks]'] = 'if ($block_display["area2"]) { blocks("2"); }';
    $command['[area3-blocks]'] = 'if ($block_display["area3"]) { blocks("3"); }';
    $command['[area4-blocks]'] = 'if ($block_display["area4"]) { blocks("4"); }';
    $command['[area5-blocks]'] = 'if ($block_display["area5"]) { blocks("5"); }';
    $command['[area6-blocks]'] = 'if ($block_display["area6"]) { blocks("6"); }';
    $command['[area7-blocks]'] = 'if ($block_display["area7"]) { blocks("7"); }';
    $command['[area8-blocks]'] = 'if ($block_display["area8"]) { blocks("8"); }';
    $command['[area9-blocks]'] = 'if ($block_display["area9"]) { blocks("9"); }';
    $command['[top-blocks]'] = 'if ($block_display["top"]) { blocks("top"); }';
    $command['[bottom-blocks]'] = 'if ($block_display["bottom"]) { blocks("bottom"); }';



    that would be the blocks in commands.inc.php file
  • Ya the problem im having is that alot of emails are coming at me asking if my themes can act just as plugins and no theme system required.

    I understand what theey mean in most cases, due to the timeline they have or the lack of eagerness to try the theme systams so Im kinda aiming for a plugin solution, just upload and away we go :)

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