Edit / Create block (or box)


NPDS allows you to display blocks (or boxes) on the side of your website.
NPDS (with an appropriate theme) allows to display blocks on most pages.

A Block can be visible only to administrators, members, or groups, for Anonymous only or visible by everyone.

Modify block :
Change the required informations inside the block and select the appropriate action, then click on OK.
You can only modify one block at a time.

Delete block :
Select the block and select delete block, then click on OK. you can only delete one block at a time.

Create block (lft or right) :
Enter its title, its index (allows a sorted display) and its content then click on Create a block ....
By default the new block is activated automatically.


Block and SuperCache :
 - Blocks are "SuperCached" and can be activated or deactivated without changing themes config files.
 - A block with a cache time of 0 (zero) won't be cached.
 - Blocks have an online help that can be used using the 'contextual-help' module (or leave it blank for no help).

NPDS has an extended block system that allows to display :
- HTML (if you want to create a bloc that support HTML / select the HTML option)
- Javascript
- PHP and/or SSI (Serveur Side Include)
- PHP / NPDS function

If you need to include code you must respect this syntax :
. For PHP and/or SSI code :
    include#your_folder/your_file.php (without ', without ").
    your_file.php Must be a php file ! and the display (no echo "..."; but $content.="...";) Must be in $content.

. For PHP and/or NPDS Functions :
    function#your_function => function#Xblock (without ', without", without () and without ;).

    If your function has parameters :
     function#your_function => function#XNews (without ', without", without () and without ;).
     params#your_param => params#5,10,false (without ', without" but separated by commas).

     for instance :
     function#category

     function#oldNews
     params#$storynum

     function#RecentForumPosts
     params#Forums Infos,15,0,false,10,false,-: 

You can also put the two sentences :
 include#your_folder/your_file.php (without ', without").
 then
 function#your_function => function#XNews (without ', without ", without () and without ;).
 params#your_param => params#5,10,false (without ', without " but separated by commas).
 => that allows you to load your code and to execute it !

Block CSS :
 class-title#name of a class in your CSS file.
 class-content#name of a class in your CSS file.
 => So you can associate a CSS for each block (title and content) !

 - Theme-Dynamic has two new meta-words : B_class_title and B_class_content that you can use in bloc.html
 - PHP themes have two new variables : $B_class_title and $B_class_content that can be 'imported' in the themesidebox function (using a global ...)


Bloc CSS Specific :
For having a specific css specifique, you have to:
  • check the value in administration
  • remember the Bloc' ID
  • declare the ID and Class in style.css or by using pages.php (the one of your theme)


  • Exemple :

    CSS Specific on the Left Bloc ID 2

    #LB_2 .LB_title {
    color: #FF0000;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.25em;
    font-weight: bold;
    height: 21px;
    text-align: center;
    line-height: 21px;
    }
    #LB_2 .LB_contain ul {
    list-style: none;
    width: 150px;
    margin:0px;
    padding:0px;
    }
    #LB_2 .LB_contain li {
    margin:0;
    padding:0;
    }
    #LB_2 .LB_contain li a {
    min-height: 1.5em;
    height: auto !important;
    height: 1.5em;
    line-height: 1.5em;
    margin: 1px 0px 1px 0px;
    padding: 0px 5px 0px 5px;
    border-bottom: solid 1px #C8C8C8;
    border-left: solid 10px #427FBC;
    color: #646464;
    text-decoration: none;
    font-weight: normal;
    font-size: 1em;
    }
    #LB_2 .LB_contain li a:hover {
    border-left: solid 10px #cccccc;
    background: #f0f0f0;
    font-weight: bold;
    color: #000000;
    text-decoration: none;
    }


    Block URI :
     uri#list_of_uri_separate_by_space for show block ONLY in the referrer URI.
     The cache-Time does to be set to zero in this case.
     Exemple: uri#index.php user.php forum.php static.php?op=statik.txt&npds=1
     The uri# tag allow the use of * : for exemple : viewforum.php?forum=* or viewtopic.php?topic=*&forum=10
     => This syntax is the only one which is supported !


    Hidden Block :
     hidden#... to not show the theme of the blocks but load the content.
     This allows to use the block system for 'load' of javascript, PHP files, CSS files, ...
     Example : hidden#<script type="text/javascript" src="lib/yui/build/yui/yui-min.js"></script>
     => This syntax is the only one which is supported !