41
Quest
Re: Xoops 2.0.13.2 hack to add centre blocks above and below content block.
  • 2006/3/8 10:15

  • Quest

  • Friend of XOOPS

  • Posts: 1034

  • Since: 2005/11/19


When I download the respective file there are three files in the zip. Two zips: (one for default theme example and one for the code hacks) and one other file xoops2.0.13.2.multiblock.patch. What is this file? What if anything am I suppose to do with it?

Anyone know? Please help. I was using this for my previously installed XOOPS 2.2.4 version and it was great. I have since chosen to downgrade back to 2.0.13.2 and would like to have this very valuable and usefull capability back.

P.S. I hope this or something similar is going to be in the future versions.

Quest

42
Kumonryu_Kid
Re: Xoops 2.0.13.2 hack to add centre blocks above and below content block.

Just my 2p input to all of this - much of this based on how Joomla (seems to work).

I favour "blocks" in a theme to be called anything. You can then set a series of defaults that can be translated into the standard left, centre, rigth whatever, or alternatively force these block to be present in each theme.

Where the radio buttons now appear in the admin panels, these should be replaced with a drop down list to select available locations from.

Different types of blocks could be present at each location - under control of either the theme, HTML, or CSS. For example we could have a centre_titled block, a centre_no_title, centre_blue_background, etc...

One nice thing that Joomla also supports in Themes is that different themes can be applied to different pages. While the whole paradigm of how Joomla works vs how XOOPS works is different, it would be nice to assign different themes to different modules. For example, I'd like my front page to be nice two column layout, my main pages to be left(menu)-centre-right(context menu), and my forum to be single column. I know this is possible to do currently by choosing what shows or not, but this method adds the capability to really refine the design.

I am encouraged to see that there are large changes in the theme engine coming with the next upgrades - I'd just like to see them appear sooner!

In fact, the more I try to do things in Joomla, the more drawn back into XOOPS I am
Don't follow me, I'm lost too!

43
McNaz
Re: Xoops 2.0.13.2 hack to add centre blocks above and below content block.
  • 2006/3/8 11:23

  • McNaz

  • Just can't stay away

  • Posts: 574

  • Since: 2003/4/21


Quote:

Where the radio buttons now appear in the admin panels, these should be replaced with a drop down list to select available locations from.


I completely agree with you on this one. The absence of a drop down listbox (as implemented in XOOPS 2.3.x) is the only thing stopping me from modifying this patch to enable themes to self register their blocks.

44
McNaz
Re: Xoops 2.0.13.2 hack to add centre blocks above and below content block.
  • 2006/3/8 11:34

  • McNaz

  • Just can't stay away

  • Posts: 574

  • Since: 2003/4/21


Quote:

and one other file xoops2.0.13.2.multiblock.patch. What is this file? What if anything am I suppose to do with it?


A patch file is for use by Diff tools. For your purpose it is safe to ignore and you should overwrite the files with the ones in the archive. Please read the complete thread but this thread in particular.

Good luck!

45
Quest
Re: Xoops 2.0.13.2 hack to add centre blocks above and below content block.
  • 2006/4/16 11:51

  • Quest

  • Friend of XOOPS

  • Posts: 1034

  • Since: 2005/11/19


I was having some problems with a number 1 showing up on my pages at the top left corner after downloading and installing this hack. It would only show up if I selected a down_block to display.

I think I finally found the bugger causing the problem but am not sure if it will affect anything else.
In the multiblock header.php near the bottom was this coding:

case XOOPS_CENTERBLOCKDOWN_CENTER:
if (!isset($show_cblock_down)) {
$xoopsTpl->assign('xoops_showcdblock', 1);
$show_cblock_down = 1;
echo $show_cblock_down;
}

I removed the echo $show_cblock_down;colored in red above.

Making it:
case XOOPS_CENTERBLOCKDOWN_CENTER:
if (!isset($show_cblock_down)) {
$xoopsTpl->assign('xoops_showcdblock', 1);
$show_cblock_down = 1;

It seems to be working just fine now. If someone could have a look though and if they know please let me know if it was okay to remove this echo from the Hack's header.php.

46
shirosan
Re: Xoops 2.0.13.2 hack to add centre blocks above and below content block.
  • 2006/5/15 18:08

  • shirosan

  • Just popping in

  • Posts: 4

  • Since: 2006/5/15


I´ve got the 1 too and did that. But visitants can´t view my block, and it doesn´t appear in group admin page.

Could someone help me?

47
V6-Maniac
Re: Xoops 2.0.13.2 hack to add centre blocks above and below content block.
  • 2006/5/15 20:39

  • V6-Maniac

  • Just popping in

  • Posts: 86

  • Since: 2005/2/15


Yeap i have the solutions for you and everyone else.
Who wants to see the extra blocks in the admin groups page...

Go to...
<{XOOPS_ROOT}>/modules/system/admin/groups/groupsform.php

Beware: make a backup off your files first.
If this is going wrong please don't blame me...


Edit the groupsform.php file with you favorite editor.
And folow the steps below:

- select all content and delete this selected content in the original file.
- Copy content which is posted below
- Past content you just copied in the empty groupsform.php
- Close file and save.
- Go to your modules adminpage and press the update button for your system module.
- And now you will see the blocks in your groups admin page...


// $Id: groupform.php, v1.8 2006/05/15 22:51:30 multiblock $
//  ------------------------------------------------------------------------ //
//                XOOPS - PHP Content Management System                      //
//                    Copyright (c) 2000 XOOPS.org                           //
//                                                    //
//  ------------------------------------------------------------------------ //
//  This program is free software; you can redistribute it and/or modify     //
//  it under the terms of the GNU General Public License as published by     //
//  the Free Software Foundation; either version 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  You may not change or alter any portion of this comment or credits       //
//  of supporting developers from this source code or any supporting         //
//  source code which is considered copyrighted (c) material of the          //
//  original comment or credit authors.                                      //
//                                                                           //
//  This program is distributed in the hope that it will be useful,          //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //
// Author: Kazumi Ono (AKA onokazu)                                          //
// URL: http://www.myweb.ne.jp/, https://xoops.org/, http://www.xoopscube.jp/ //
// Project: The XOOPS Project                                                //
// ------------------------------------------------------------------------- //

include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";

$name_text = new XoopsFormText(_AM_NAME"name"3050$name_value);
$desc_text = new XoopsFormTextArea(_AM_DESCRIPTION"desc"$desc_value);

$s_cat_checkbox = new XoopsFormCheckBox(_AM_SYSTEMRIGHTS"system_catids[]"$s_cat_value);
//if (isset($s_cat_disable) && $s_cat_disable) {
//  $s_cat_checkbox->setExtra('checked="checked" disabled="disabled"');
//}
include_once(XOOPS_ROOT_PATH.'/modules/system/constants.php');
$handle opendir(XOOPS_ROOT_PATH.'/modules/system/admin');
while (
false != $file readdir($handle)) {
    if (
strtolower($file) != 'cvs' && !preg_match("/[.]/"$file) && is_dir(XOOPS_ROOT_PATH.'/modules/system/admin/'.$file)) {
        include 
XOOPS_ROOT_PATH.'/modules/system/admin/'.$file.'/xoops_version.php';
        if (!empty(
$modversion['category'])) {
            
$s_cat_checkbox->addOption($modversion['category'], $modversion['name']);
        }
        unset(
$modversion);
    }
}

$a_mod_checkbox = new XoopsFormCheckBox(_AM_ACTIVERIGHTS"admin_mids[]"$a_mod_value);
$module_handler =& xoops_gethandler('module');
$criteria = new CriteriaCompo(new Criteria('hasadmin'1));
$criteria->add(new Criteria('isactive'1));
$criteria->add(new Criteria('dirname''system''<>'));
$a_mod_checkbox->addOptionArray($module_handler->getList($criteria));

$r_mod_checkbox = new XoopsFormCheckBox(_AM_ACCESSRIGHTS"read_mids[]"$r_mod_value);
$criteria = new CriteriaCompo(new Criteria('hasmain'1));
$criteria->add(new Criteria('isactive'1));
$r_mod_checkbox->addOptionArray($module_handler->getList($criteria));

$r_lblock_checkbox = new XoopsFormCheckBox(''._LEFT.''
"read_bids[]"$r_block_value);
$new_blocks_array = array();
$blocks_array XoopsBlock::getAllBlocks("list"XOOPS_SIDEBLOCK_LEFT);
foreach (
$blocks_array as $key=>$value) {
    
$new_blocks_array[$key] = ".XOOPS_URL."/modules/system/admin.php?fct=blocksadmin&op=edit&bid=".$key."'>".$value." (ID: ".$key.")";
}
$r_lblock_checkbox->addOptionArray($new_blocks_array);

$r_cblock_checkbox = new XoopsFormCheckBox(""._CENTER.""
"read_bids[]"$r_block_value);
$new_blocks_array = array();
$blocks_array XoopsBlock::getAllBlocks("list"XOOPS_CENTERBLOCK_ALL);
foreach (
$blocks_array as $key=>$value) {
    
$new_blocks_array[$key] = ".XOOPS_URL."/modules/system/admin.php?fct=blocksadmin&op=edit&bid=".$key."'>".$value." (ID: ".$key.")";
}
$r_cblock_checkbox->addOptionArray($new_blocks_array);

$r_rblock_checkbox = new XoopsFormCheckBox(""._RIGHT.""
"read_bids[]"$r_block_value);
$new_blocks_array = array();
$blocks_array XoopsBlock::getAllBlocks("list"XOOPS_SIDEBLOCK_RIGHT);
foreach (
$blocks_array as $key=>$value) {
    
$new_blocks_array[$key] = ".XOOPS_URL."/modules/system/admin.php?fct=blocksadmin&op=edit&bid=".$key."'>".$value." (ID: ".$key.")";
}
$r_rblock_checkbox->addOptionArray($new_blocks_array);

// ############## START: multiblock hack ##############
$r_clblock_checkbox = new XoopsFormCheckBox(''._LEFT.''
"read_bids[]"$r_block_value);
$new_blocks_array = array();
$blocks_array XoopsBlock::getAllBlocks("list"XOOPS_CENTERBLOCKDOWN_LEFT);
foreach (
$blocks_array as $key=>$value) {
    
$new_blocks_array[$key] = ".XOOPS_URL."/modules/system/admin.php?fct=blocksadmin&op=edit&bid=".$key."'>".$value." (ID: ".$key.")";
}
$r_clblock_checkbox->addOptionArray($new_blocks_array);

$r_ccblock_checkbox = new XoopsFormCheckBox(''._CENTER.''
"read_bids[]"$r_block_value);
$new_blocks_array = array();
$blocks_array XoopsBlock::getAllBlocks("list"XOOPS_CENTERBLOCKDOWN_CENTER);
foreach (
$blocks_array as $key=>$value) {
    
$new_blocks_array[$key] = ".XOOPS_URL."/modules/system/admin.php?fct=blocksadmin&op=edit&bid=".$key."'>".$value." (ID: ".$key.")";
}
$r_ccblock_checkbox->addOptionArray($new_blocks_array);

$r_crblock_checkbox = new XoopsFormCheckBox(''._RIGHT.''
"read_bids[]"$r_block_value);
$new_blocks_array = array();
$blocks_array XoopsBlock::getAllBlocks("list"XOOPS_CENTERBLOCKDOWN_RIGHT);
foreach (
$blocks_array as $key=>$value) {
    
$new_blocks_array[$key] = ".XOOPS_URL."/modules/system/admin.php?fct=blocksadmin&op=edit&bid=".$key."'>".$value." (ID: ".$key.")";
}
$r_crblock_checkbox->addOptionArray($new_blocks_array);


$r_block_tray = new XoopsFormElementTray(_AM_BLOCKRIGHTS"");
$r_block_tray->addElement($r_lblock_checkbox);
$r_block_tray->addElement($r_cblock_checkbox);
$r_block_tray->addElement($r_rblock_checkbox);
$r_block_tray->addElement($r_clblock_checkbox);
$r_block_tray->addElement($r_ccblock_checkbox);
$r_block_tray->addElement($r_crblock_checkbox);

// ############## END: multiblock hack ##############

$op_hidden = new XoopsFormHidden("op"$op_value);
$fct_hidden = new XoopsFormHidden("fct""groups");
$submit_button = new XoopsFormButton("""groupsubmit"$submit_value"submit");
$form = new XoopsThemeForm($form_title"groupform""admin.php""post"true);
$form->addElement($name_text);
$form->addElement($desc_text);
$form->addElement($s_cat_checkbox);
$form->addElement($a_mod_checkbox);
$form->addElement($r_mod_checkbox);
$form->addElement($r_block_tray);
$form->addElement($op_hidden);
$form->addElement($fct_hidden);
if ( !empty(
$g_id_value) ) {
    
$g_id_hidden = new XoopsFormHidden("g_id"$g_id_value);
    
$form->addElement($g_id_hidden);
}
$form->addElement($submit_button);
$form->setRequired($name_text);
$form->display();
?>

48
orgunozcu
Re: Xoops 2.0.13.2 hack to add centre blocks above and below content block.
  • 2006/8/23 20:13

  • orgunozcu

  • Not too shy to talk

  • Posts: 136

  • Since: 2005/9/1 5


i stiil have 1 problem header of page..


can somebody know how can i solve?

and changed groupform.php too of course..

49
orgunozcu
Re: Xoops 2.0.13.2 hack to add centre blocks above and below content block.
  • 2006/8/24 8:25

  • orgunozcu

  • Not too shy to talk

  • Posts: 136

  • Since: 2005/9/1 5


case XOOPS_CENTERBLOCKDOWN_CENTER:
if (!isset($show_cblock_down)) {
$xoopsTpl->assign('xoops_showcdblock', 1);
$show_cblock_down = 1;


ok ı did that now it is ok.. my 2.13.2 is now like that 2.14 Süper Thank..

50
davidl2
Re: Xoops 2.0.13.2 hack to add centre blocks above and below content block.
  • 2006/8/24 8:30

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


Or better still, simply update to 2.0.14

Login

Who's Online

162 user(s) are online (50 user(s) are browsing Support Forums)


Members: 0


Guests: 162


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits