WB_BlocksManager allows you to customize block's appearance modul by modul.
Manual set up:
- How to proceed :
- Make a safety backup of your mainfile.php
- Generate "MySQL" tables by helping yourself with your "PhpMyAdmin or another SQL base manager Launch the MySQL.sql request.
- Copy the WB_BlocksManager files :
- blocks_mnager.php dans /admin/modules
- case.blocks_mnager.php dans /admin/case
- links.blocks_mnager.php dans /admin/links
- wb_blocksmanager.gif dans /images/admin/
- Search for "function blocks($side)" in your mainfile.php file.
- Insert the "$name" inside "global" of your function blocks($side)
for example: global $storynum, $prefix, $multilingual, $currentlang, $db, $admin, $user, $name;
- Search for "$side = $pos;" in the "function blocks($side)" file from the file mainfile.php
- Erase or hide the following lines helping yourself with
forexample : // $sql = "SELECT bid, bkey, title, content, url, blockfile, view FROM ".$prefix."_blocks WHERE bposition='$pos' AND active='1' $querylang ORDER BY weight ASC";
- Insert the following lines
if (isset($name)) {
$sql = "SELECT b.bid, b.bkey, b.title, b.content, b.url, b.blockfile, b.view FROM ".$prefix."_blocks b, ".$prefix."_blocks_manager m WHERE b.bid=m.bid AND m.title='$name' AND m.bposition='$pos' AND b.active='1' $querylang ORDER BY m.weight ASC";
} else {
$sql = "SELECT b.bid, b.bkey, b.title, b.content, b.url, b.blockfile, b.view FROM ".$prefix."_blocks b WHERE b.bposition='$pos' AND b.active='1' $querylang ORDER BY b.weight ASC";
}
- At the end of /admin/language menu, add the following lines
- lang-english.txt -> lang-english.php
- lang-french.txt -> lang-french.php
Caution !
- Check table's prefix (*), "mysql.sql uses "nuke"
************************ traduction FR ************************
WB_BLocksManager permet de personnaliser l'affichage des blocks par module.
Installation manuelle
- Voici comment procéder pour une installation manuelle :
- Faire une copie de sauvegarde de votre fichier "mainfile.php".
- Créer les tables MySQL : A l'aide de phpMyAdmin ou d'un autre gestionnaire de base SQL, lancez la requête "mysql.sql".
- Copier les fichiers de WB_BlocksManager :
- blocks_mnager.php dans /admin/modules
- case.blocks_mnager.php dans /admin/case
- links.blocks_mnager.php dans /admin/links
- wb_blocksmanager.gif dans /images/admin/
- Chercher la fonction "function blocks($side)" dans le fichier "mainfile.php".
- Insérer la variable "$name" dans le "global" de la fonction.
par ex. : global $storynum, $prefix, $multilingual, $currentlang, $db, $admin, $user, $name;
- Chercher "$side = $pos;" dans la fonction "function blocks($side)" du fichier "mainfile.php".
- Supprimer ou cacher la ligne suivante à l'aide des "//".
par ex. : // $sql = "SELECT bid, bkey, title, content, url, blockfile, view FROM ".$prefix."_blocks WHERE bposition='$pos' AND active='1' $querylang ORDER BY weight ASC";
- Insérer à la suite :
if (isset($name)) {
$sql = "SELECT b.bid, b.bkey, b.title, b.content, b.url, b.blockfile, b.view FROM ".$prefix."_blocks b, ".$prefix."_blocks_manager m WHERE b.bid=m.bid AND m.title='$name' AND m.bposition='$pos' AND b.active='1' $querylang ORDER BY m.weight ASC";
} else {
$sql = "SELECT b.bid, b.bkey, b.title, b.content, b.url, b.blockfile, b.view FROM ".$prefix."_blocks b WHERE b.bposition='$pos' AND b.active='1' $querylang ORDER BY b.weight ASC";
}
- Ajouter à la fin des fichiers du répertoire /admin/language :
- lang-english.txt -> lang-english.php
- lang-french.txt -> lang-french.php
Remarques
- ATTENTION ! Vérifiez le prefix de la table. Celui utilisé par "mysql.sql" est "nuke_".