Dynamic Theme

Issue #133 resolved
Former user created an issue

Originally reported on Google Code with ID 133

The Theme file is PHP with CSS header.
- It includes images which coded as Base64 (no need for external images)
- Some colors are defined as variables for quick changes
- The theme works best with the new changes i made for next version 1.9.4_r259 (view
icons instead of words)

to make quick changes for a new design, change these variables:

   $bg = '#879845';
   $bgContent = '#DEE4BE';
   $tdhead = '#474F28';
   $border ='#879845';
   $td1 = '#E9E9E2';
   $td2 = '#fff';
   $nav = '#E2E2D8';
   $radius = 5;

To change icons, you need the Base64 code from the new icon and add it to the list
of images with its name. Here how to create encoded image:

<?php echo base64_encode(file_get_contents('http://theUrlOfTheImage.com/icon.png'));
?>

Download the zip file for this theme:

Reported by teryaki1963 on 2012-11-06 07:02:59

<hr> * Attachment: dynamicTheme.png<br>dynamicTheme.png * Attachment: dynamic.zip

Comments (7)

  1. Christopher Kramer
    Looks good. And a cool approach to load the images like that. CSS allows us to do this
    directly without PHP using data-urls. See https://en.wikipedia.org/wiki/Data_URI_scheme
    . But this has the disadvantage that it does not work in older IEs (pre 8) and that
    it avoids caching possibilities. On the other hand it saves HTTP requests.
    
    Some small comments:
    - Please avoid shorthand php-tags like <? and <?=
      Instead always use <?php and <?php echo
      Simply because lots of people have it disabled. Especially the <? syntax causes lots
    of problems (e.g. with XML), so better avoid it
    - You reference to "style.php" but the file is called "dynamic.php". Anyway, better
    let PHP detect the filename and use that in case the user renames the file.
    - logo.png and bg.gif are referenced in the css but are missing
    - it looks a bit "buggy" for me even after I fixed the above points. See Screenshot
    of Firefox 16.0.2 attached.
    
    
    Anyway, this looks already really cool. Thanks for your contribution.
    
    You can find my modified version attached.
    

    Reported by crazy4chrissi on 2012-11-06 13:28:46 - Labels added: Theme

    <hr> * Attachment: issue_133.png<br>issue_133.png * Attachment: dynamic.php

  2. Former user Account Deleted
         Please avoid shorthand php-tags like <? and <?=
    yah i knew this but still using it :( my shame
    
         logo.png and bg.gif are referenced in the css but are missing
    they are fixed now i need only the logo.png for phpLiteAdmin
    
         it looks a bit "buggy" for me even after I fixed the above points. See Screenshot
    yep, your fixed file still has 15 <?= in it. please try the latest download. I hope
    it works now!
    
    And thx for help :)
    

    Reported by teryaki1963 on 2012-11-06 14:26:58

    <hr> * Attachment: dynamic.zip

  3. Christopher Kramer
    Thanks, now it looks very good.
    Just one thing I noticed: The "Delete database" Tab uses the icon (only half). Problem
    is that it has the .delete class which will be replaced by the icon. Instead, use the
    .drop class like for the "Drop table"-tab and it works nice.
    
    You can commit your theme to svn (create a new folder under source/themes) if you like.
    

    Reported by crazy4chrissi on 2012-11-06 14:48:53

  4. Christopher Kramer
    I just committed this theme to SVN and included it in the themes-download-package.
    

    Reported by crazy4chrissi on 2012-11-06 15:55:17

  5. Former user Account Deleted
        Instead, use the .drop class like for the "Drop table"-tab and it works nice
    yep, class="delete_db" is added!
    

    Reported by teryaki1963 on 2012-11-07 05:45:17

  6. Log in to comment