Fork me on GitHub

Porting Autotheme to Xanthia  Bottom

  • I'm porting an AutoTheme to Xanthia using Mark West's At Porting Kit and I must be missing a step somewhere.

    Everything works ok, images, left, right and center blocks work ok. However, I can't get my other blocks to show up. I put the tags into the theme like:

    Code

    <!--[$ZAREA1]-->


    But when I go to block control and turn them on nothing shows up.

    My xaninit.php looks like this:

    Code

    function xanthia_skins_install($args)
    {
    /////////////////////////////////////// Do Not Edit /////////////////////////////////////////

        // Check if the user has permission to perform this action
        if (!pnSecAuthAction(0, 'Xanthia', '::', ACCESS_EDIT)) {
            return false;
        }

        // extract all arguments passed to this function
        extract($args);
       
        // set the skin name from the id passed this function
        if(isset($id)) {
            $skinName = $id;
        } else {
            return false;
        }

    ///////////////////////////////////// End Do Not Edit ////////////////////////////////////////

        // create theme
        $skinID = CreateTheme($skinName);

        // Create theme palettes
        // Create one entry per palette available for this theme
        //    CreatePalette($skinName, $skinID, <default = 1 otherwise 0>, <palette name>,<background>,
        //                <color1>,<color2>,<color3>,<color4>,<color5>,<color6>, <color7>,
        //                  <color8>, <sepcolor>, <text1>, <text2>, <link>, <vlink>, <hover>);

        // Create theme configuration variables
        //   CreateThemeVar($skinID, <variablename>, <language define>, <value>, '');
        CreateThemeVar($skinID, 'pagewidth',_TM_PAGEWIDTH,'100%','');
        CreateThemeVar($skinID,'lcolwidth',_TM_LCOLWIDTH,'140','');
        CreateThemeVar($skinID,'rcolwidth',_TM_RCOLWIDTH,'170','');
        CreateThemeVar($skinID,'indexcol',_TM_INDEXCOL,'1','');
        CreateThemeVar($skinID,'righton',_TM_RIGHTON,'0','');

        // Create theme templates
        // CreateThemeTemplate($skinID, <template label>, <template filename>, <template type>);
        CreateThemeTemplate($skinID, 'master', 'master.htm', 'theme');
        CreateThemeTemplate($skinID, 'lsblock', 'leftblock.htm', 'block');
        CreateThemeTemplate($skinID, 'rsblock', 'rightblock.htm', 'block');
        CreateThemeTemplate($skinID, 'table1', 'table1.htm', 'theme');
        CreateThemeTemplate($skinID, 'table2', 'table2.htm', 'theme');
        CreateThemeTemplate($skinID, 'News-index', 'summary.htm', 'theme');
        CreateThemeTemplate($skinID, 'News-article', 'article.htm', 'theme');
        CreateThemeTemplate($skinID, 'ccblock', 'centerblock.htm', 'block');
        CreateThemeTemplate($skinID, '*home', 'home.htm', 'module');
        CreateThemeTemplate($skinID, '*user', 'user.htm', 'module');
        CreateThemeTemplate($skinID, '*admin', 'admin.htm', 'module');

        // For autotheme ports - create a theme template call for each additional block area
        // usually area1 - area9
        CreateThemeTemplate($skinID, 'area1', 'area1block.htm', 'block');
        CreateThemeTemplate($skinID, 'area2', 'area2block.htm', 'block');
        CreateThemeTemplate($skinID, 'area3', 'area3block.htm', 'block');
        CreateThemeTemplate($skinID, 'area4', 'area4block.htm', 'block');
        CreateThemeTemplate($skinID, 'area5', 'area5block.htm', 'block');
        CreateThemeTemplate($skinID, 'area6', 'area6block.htm', 'block');
        CreateThemeTemplate($skinID, 'area7', 'area7block.htm', 'block');
        CreateThemeTemplate($skinID, 'area8', 'area8block.htm', 'block');
        CreateThemeTemplate($skinID, 'area9', 'area9block.htm', 'block');

        // Add zones for theme
        pnModSetVar('Xanthia', $skinName.'newzone','|1:Area 1 Blocks:ZAREA1|2:Area 2 Blocks:ZAREA2|3:Area 3 Blocks:ZAREA3|4:Area 4 Blocks:ZAREA4|5:Area 5 Blocks:ZAREA5|6:Area 6 Blocks:ZAREA6|7:Area 7 Blocks:ZAREA7|8:Area 8 Blocks:ZAREA8|9:Area 9 Blocks:ZAREA9');

        // Create theme zones
        // CreateThemeZone($skinID, <definition - language define>, <label>, <type>, <active>, <skin type>);
        CreateThemeZone($skinID, _TM_MASTER, 'master', 0, 1, 'theme');
        CreateThemeZone($skinID, _TM_LEFTSIDEB, 'lsblock', 0, 1, 'block');
        CreateThemeZone($skinID, _TM_RIGHTSIDEB,  'rsblock', 1, 1, 'block');
        CreateThemeZone($skinID, _TM_OPENTABLE1, 'table1', 0, 1, 'theme');
        CreateThemeZone($skinID, _TM_OPENTABLE2, 'table2', 0, 1, 'theme');
        CreateThemeZone($skinID, _TM_NEWSINDEX, 'News-index', 0, 1, 'theme');
        CreateThemeZone($skinID, _TM_NEWSART, 'News-article', 0, 1, 'theme');
        CreateThemeZone($skinID, _TM_CENTERB, 'ccblock', 1, 1, 'block');
        CreateThemeZone($skinID, _TM_HOMEPAGE, '*home', 1, 1, 'module');
        CreateThemeZone($skinID, _TM_USERPAGE, '*user', 1, 1, 'module');
        CreateThemeZone($skinID, _TM_ADMINPAGE, '*admin', 1, 1, 'module');
        // For autotheme ports - create a theme zone call for each additional block area
        // usually area1 - area9
        CreateThemeZone($skinID, _TM_AREA1, 'area1', 1, 1, 'block');
        CreateThemeZone($skinID, _TM_AREA2, 'area2', 1, 1, 'block');
        CreateThemeZone($skinID, _TM_AREA3, 'area3', 1, 1, 'block');
        CreateThemeZone($skinID, _TM_AREA4, 'area4', 1, 1, 'block');
        CreateThemeZone($skinID, _TM_AREA5, 'area5', 1, 1, 'block');
        CreateThemeZone($skinID, _TM_AREA6, 'area6', 1, 1, 'block');
        CreateThemeZone($skinID, _TM_AREA7, 'area7', 1, 1, 'block');
        CreateThemeZone($skinID, _TM_AREA8, 'area8', 1, 1, 'block');
        CreateThemeZone($skinID, _TM_AREA9, 'area9', 1, 1, 'block');
        // Report success
        return true;


    I'm sure I must be missing a step but I don't know what. Any help I can get would be great.

    Thanks in advance
  • Have you applied a template to those blocks you want to show? Often, without a template, blocks won't show up

    --
    itbegins.co.uk - Zikula Consulting

    birtwistle.me.uk - Personal Blog


    Please read the Support Guide
  • Thanks for the reply.
    I thought that was what this bit did:

    Code

    CreateThemeTemplate($skinID, 'area1', 'area1block.htm', 'block');


    I think thats where I'm going wrong some how. I'm just about at the stage where I'd give up except I want to use 760rc3 and that seems not to work properly with AutoTheme.
  • Try doing it through the admin menu rather than in the init script...

    --
    itbegins.co.uk - Zikula Consulting

    birtwistle.me.uk - Personal Blog


    Please read the Support Guide
  • Ok, Thanks.

    That seems to be one of the big differences between Axanthia and AutoTheme, the ability to just create a theme on my localhost with AutoTheme and upload the whole thing including the config file and it will work straight off.

    With Xanthia I can't find a way to do that. I configure the theme on my dev machine and have to do it all over again when I upload it to the live site. Also I haven't yet found a way of previewing module specific pages, I can only seem to be able to preview the home page not *admin or *user etc. If I've got those two points wrong I would be glad to here it as I've got about 20 blocks to make for this theme and any time I can save would be great.
  • Quote


    With Xanthia I can't find a way to do that. I configure the theme on my dev machine and have to do it all over again when I upload it to the live site


    You avoid that by putting all the info in the init file. Alternatively, you can dump the tables on your dev box and import them to the live box.

    Quote

    I can only seem to be able to preview the home page not *admin or *user etc.


    Simply add &theme=yourtheme to the URL of any page to change the theme.

    --
    itbegins.co.uk - Zikula Consulting

    birtwistle.me.uk - Personal Blog


    Please read the Support Guide
  • Quote

    You avoid that by putting all the info in the init file


    Thats why I'm trying to get it to work with that init file I posted in my original question but I seem to be getting nowhere with it. Maybe thats why I've never seen anything except straight 3 column Xanthia themes with left right and center blocks on theme sites. Maybe eveyone else is in the same boat, it's just to hard to export anything but standard Xanthia themes.

    Thanks for you help HammerHead
  • 0 users

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