Fork me on GitHub

Helius theme released  Bottom

  • Helius official release

    Download: Helius.zip
    Downloads page

    Previously unreleased, I ported this theme a while ago from PHP-Nuke by permission of Mikem at Nukemods (now closed), and CyberAlien, who made the original phpBB theme on which the PHP-Nuke theme was based.

    It features collapsible menus (though they don't stick), and shows how many Personal Messages a user has under the User name in the menu bar.

    It also incorporates the ability to control the column layout by switching columns on or off with the use of the varable idx in the URL:
    http://www.somesite.com/index.php?idx=X

    Code

    idx = Column layout, determines which blocks are displayed. X is 0, 1, 2, 3 or 4.
           0 = default; left blocks, no right blocks.
           1 = Home page (with left, right and center blocks with Admin message)
           2 = Display left and right blocks, no center blocks or Admin message.
           3 = No left blocks, display right blocks.
           4 = No left or right blocks, only HTML page with header and Footer.


    Screenshots:
    Helius front page
    PNphpBB2 in mode 2, …ft and Right blocks
    PNphpBB2 in Full screen mode

    It is also possible to preset a layout for specific modules in the theme; for instance near the top of the theme, these lines appear:

    Code

    $CurrentMod = strtolower(pnModGetName('currentMod'));
    // if ($CurrentMod == "pnphpbb2" or $CurrentMod == "xforum" or $CurrentMod == "gallery")  $index = 4;


    By uncommenting the second line (removing //), PNphpBB, XForum and Gallery will take on the full width of the theme, no blocks at all. Simply include other module names in lower case in the IF statement separated by an OR to set to the same layout, or make a different IF statement under the first for a different layout of other modules:

    Code

    if ($CurrentMod == "sections" or $CurrentMod == "reviews") $index = 3;


    The module names appear under the Module Admin menu, or use this underneath to test:
    echo strtolower($CurrentMod)."
    ";
    the name will appear at the top of the screen.


    This theme also includes a Short URL rewriting function for for Apache-hosted sites for making your site more search-engine and human-friendly. This feature is off by default however as not all servers will support it. To make your Postnuke site search-engine friendly, the URLs have to be simplified and shortened with no long query strings appended. The included function scans the output of Postnuke and renders a much simpler URL that looks like a regular static HTML page to the search engines, and are also much easier for us humans to digest, convenient for posting in forums. So instead of having

    modules.php?op=modload&name=News&file=article&sid=6&mode=thread&order=0&thold=0

    you may have
    Article6.phtml

    or instead of
    modules.php?op=modload&name=Search&file=index&action=search&overview=1&active_stories=1&stories_author=msandersen

    You have
    Search-msandersen-1-1-.phtml

    This functionality is enabled by installing the supplied .htaccess file and enabling it in the theme by changing the variable:

    Code

    $ShortURLs = true;

    near the top of the theme.

    There are limitations to this approach, however, firstly it's for sites hosted on Apache servers, and newer modules like Gallery can't be parsed. Although the core could be hacked to do this, that's not something I care to do.
    Also, PostNuke 0.8 is due to include its own ShortUrl module.
  • Nice work MS.
  • You should be able to convert AutoTheme themes just a easily to use this column layout method, although AT themes have this ability already, I believe per-module basis, though I don't think they do interactively.

    Details are in the NukeWrapper release notes in the Technical Notes section at the bottom. It also lists other themes converted to use the layouts:
    PostNukeBlue100
    Seabreeze
    PostNuke
    Bitrate2
    Icey
  • What does the conversion entail? It is just switching tags?
  • This is mainly for the standard themes, but can be easily adapted for AutoTheme if desired. Haven't tried it on one, though.

    Firstly, I add the following above the themeheader function (same in AT. Maybe in later version, the module needs to be modified? Which would mean it applies the ability to all AT themes I guess):

    Code

    global $index;
    $CurrentMod = strtolower(pnModGetName('currentMod'));
    // To default certain modules to certain layouts, uncomment the line bolow and set $index at the end.
    // if ($CurrentMod == "pnphpbb2" or $CurrentMod == "xforum" or $CurrentMod == "gallery")  $index = 4;

    if (phpversion() < "4.1.0")  $_REQUEST = array_merge($HTTP_GET_VARS, $HTTP_POST_VARS);
    if (isset($_REQUEST['idx']))  $index=$_REQUEST['idx'];


    To use the extra layout options (idx 2-4) above, edit the theme.php file (theme.html for AT).
    At the top of the "themefooter" function in the theme,
    the Right blocks are displayed if $index==1 .

    Code

    Change the line
        if ($index==1) {
        to
        if ($index==1 || $index==2 || $index==3) {

    This should surround the TD table cell code.
    Now you can use idx=2 in the URL, and the HTML page will be rendered with left and right blocks without centre blocks or Admin message.

    To use the idx=3 or 4 option to allow for no left column, the table cell for the
    left column (where blocks('left');, or whatever the AT tag is appears, just before the themefooter function) must be wrapped in an IF statement. Basically the leftmost table cell should be surrounded with

    Code

    if ($index != 3 && $index != 4) {
        ... {left column HTML here} ...
        }

    so it displays UNLESS $index is 3 or 4.
    Example:

    Code

    if ($index != 3 && $index != 4) { ?>
        <TD id="LeftCol" width="150" bgcolor="#D9DCC2" align="center" valign="top">
        <!-- Begin left block -->
        <?php blocks('left'); ?>
        <!-- end left block -->
        </TD>
        <?php }


    and the Right column code would look something like this:

    Code

    if ($index==1 || $index==2 || $index==3) { ?>
        <TD id="RightCol" align="center" valign="top" width="150">
        <!-- Begin right block -->
        <?php blocks('right'); ?>
        <!-- end right block -->
        </TD>
        <?php // End if $index
        } ?>
  • Have you an URL yet for us to review?
  • Hi there,

    I did this awhile back myself actually, but in a different way and while it is ok for at lite with only 11 block positions it could get a bit iccy for the AutoTheme commercial.

    Basically I made it so the theme would detect if certain blocks were turned on or off and adjust the theme accordingly.

    First I detected if the blocks were active or not and if active set a variable for their respective columns:

    Code

    if ($blockdisplay['left'] or $blockdisplay['Left1'] or $blockdisplay['Left2'] or $blockdisplay['Left3']) {
    $leftcol = "1";
    }
    if ($blockdisplay['center'] or $blockdisplay['Center1'] or $blockdisplay['Center2'] or $blockdisplay['Center3']) {
    $centercol = "1";
    }
    if ($blockdisplay['right'] or $blockdisplay['Right1'] or $blockdisplay['Right2'] or $blockdisplay['Right3']) {             
    $rightcol = "1";
    }


    Then it is a simple matter of using an if statement to make the code for the column become visible or invisible eg:

    Code

    if ($rightcol = "1") {
    html for the right column
    } else {
    html for right column not visible
    }


    Basically this means I could create one template that could be used globally for all layouts (well most of them). I didn't think this would have much effect on speed, etc and I only did it to see if it could be done and to save clients setting different templates, etc. Funny thing is, it seemed to make the site the theme was on a whole lot faster.

    The theme at http://club.webvida.com is made with this, only one template is used for the whole site - it takes a bit of thought, but it is possible :)

    Actually I would like to see the implementation of "block zones" to cater for this - I think Xanthia might have block zones and I know xaraya does. In my opinion it makes the site faster.

    Another thing - for some reason you cannot wrap the AT modules tag call in an if else statement, it throws an error, this further complicates things...

    Kindest regards
    Lobos

    --
    -Lobos
    Professional PHP Framework Services: Concept, Development and Deployment
  • I've tried to check out clubvida, but I can never get past the tiny little box in the middle of the screen (even with popup blocker turned off).
  • Lobos:
    club.webvida.com looks good. You seem to use Javascript to hide the Menu block.
    When I originally viewed it in FireFox, it displayed wrong. Namely, it put the Menu block (which presumably was hidden) underneath the rest of the design. Refreshing didn't help, so I cleared the Cache just to be sure, and remembered I'd turned off JS to access some pics on a site with one of those annoying anti-right click JS scripts. It now looks as it's supposed to. Not a problem, really, as only geeks turn off JS, I assume, for various reasons like the above.
  • Yes I am really going hard with JS right now, i used to worry about non-js browsers, but I don't care anymore... soon I am thinking to stop looking after 800x600 resolutions as well...

    REgards

    --
    -Lobos
    Professional PHP Framework Services: Concept, Development and Deployment
  • The only non-js browsers around are text-based ones like Lynx. What's more important is, what the DEFAULTS of a browser are, or what plugin the average browser has. Javascript is a default of ALL browsers now, as far as I know, and if you know enough to switch it off, you know enough to switch it on. Most news sites use Flash banners now, not just because you can do so much more, but because they know although it's not built into the browser, 95% of users have it installed. I doubt anyone bothers designing for Netscape 4 anymore. There are a few using 800x600, but at some point in all of these transitions, you have to say now is the time, and maybe going cold is the way, switching ovr completely not even considering how smaller resolutions are affected. Or try and be smart and do some fancy JS adjustment on the go. With WinXP on all new machines, few will use it from here on. It's still a toss-up, designers just have to make a choice and listen to customer feedback. And if they don't like it, stuff 'em! :)
  • Yes I agree, I think it is time to move away from 800x600 - even with 100% width themes, as even the 100% width themes look better on 800x600 as they have to be deigned around that resolution first. Might as well start looking to the future now - saves turning back later ;)

    --
    -Lobos
    Professional PHP Framework Services: Concept, Development and Deployment
  • On CMS systems like PN, you still have to be careful not being too static or inflexible. Various content go in blocks, and if the content force the cell to expand, you don't want your prescious graphics to blow apart. And if the design happen to be suitable for allowing flexspace, it wouldn't hurt to allow it to stretch on bigger monitors, really. at least a little. Try constraining it with max-width in the stylesheet for browsers which understand it, so side margins may appear on those big screens.

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