Edit / Create right block (or box)
NPDS allows you to display blocks (or boxes) on the right 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 a group (see
users groups section) , for Anonymous only or visible by everyone.
Modify right 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.
As of NPDS 4.8 P3 :
- 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).
Delete right block :
Select the block and select delete right block, then click on OK.
you can only delete one block at a time.
Create right block :
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.
NPDS has an extended block system that allows to display :
- HTML
- 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,-:
As of 4.8-P4 AND in a same block, you can 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 !
Since 5.0-P1 AND in a same block, you can add :
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 ...)
=> This syntax is the only one which is supported !