Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
Add backround image to Extra-Lite header
  • Posted: 21.03.2005, 23:38
     
    bluehall
    rank:
    Freshman Freshman
    registered:
     September 2004
    Status:
    offline
    last visit:
    23.11.05
    Posts:
    7
    This may be more of a PHP question, not sure, but I couldn't find help anywhere else.

    I replaced the logo.gif (/images/logo.gif) for/ExtraLite/theme.php with my logo. Ok so far. However, i want to tile a 1px wide image (/images/bg.png) in the table (or cell) background.



    Can anyone help with this?
    Im using PN .750

    Here is the theme.php related to the header for your reference. Thanks in advance.

    Code

    echo "</head>";
        echo "<body>";
        if(pnModAvailable('Banners'))
        {
            pnBannerDisplay();
        }
        echo "<table border=\"0\" cellpadding=\"4\" cellspacing=\"0\" style=\"width:100%\">\n" .
             "<tr>\n" .
             "<td style=\"background-color:$GLOBALS[bgcolor1]\">\n" .
             "<table border=\"0\" cellspacing=\"0\" cellpadding=\"3\" style=\"width:100%;background-color:$GLOBALS[bgcolor1]\">\n" .
             "<tr>\n" .
             "<td>\n" .
             "<a href=\"index.php\"><img src=\"" . WHERE_IS_PERSO . "images/logo.gif\" alt=\"" . _WELCOMETO . " $sitename\" /></a>\n" .
             "</td><td align=\"right\">" .
             '<form action="modules.php" method="post">' .
             '<div>' .
             '<input type="hidden" name="name" value="Search" />' .
             '<input type="hidden" name="file" value="index" />' .
             '<input type="hidden" name="op" value="modload" />' .
             '<input type="hidden" name="action" value="search" />' .
             '<input type="hidden" name="overview" value="1" />' .
             '<input type="hidden" name="active_stories" value="1" />' .
             '<input type="hidden" name="bool" value="AND" />' .
             '<input type="hidden" name="stories_cat" value="" />' .
             '<input type="hidden" name="stories_topics" value="" />' .
             '<div style="text-align:right">' .
             '<span class="pn-normal">' . _SEARCH . '&nbsp;</span>' .
             "<input class=\"pn-text\" name=\"q\" type=\"text\" value=\"\" />&nbsp;\n" .
             '</div>' .
             '</div>' .
             '</form>' .
             "</td></tr></table>\n</td></tr>\n<tr><td valign=\"top\" style=\"width:100%;background-color:$GLOBALS[bgcolor1]\">" .
  • Posted: 22.03.2005, 20:32
     
    bluehall
    rank:
    Freshman Freshman
    registered:
     September 2004
    Status:
    offline
    last visit:
    23.11.05
    Posts:
    7
    Solved the problem myslef:

    I hope this helps others having the same problem. I simply changed this:

    Code

    "<td style=\"background-color:$GLOBALS[bgcolor1]\">\n" .

    to this:

    Code

    background-image: url(images/bg.png);">\n" .


    using the image in the table background caused alignment problems with the image in the foreground of the table (logo.gif), I simply changed 2 of the cell padding parameters to 0. Here is what I changed:

    Code

    echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n" .
             "<tr>\n" .
             "<td style=\"background-color:$GLOBALS[bgcolor1]\">\n" .
             "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"width:100%;background-color:$GLOBALS[bgcolor1]\">\n" .

Extensions Moderation

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula