1
mutex
different blocks in one module... ??
  • 2005/3/26 2:29

  • mutex

  • Just popping in

  • Posts: 4

  • Since: 2005/3/26


Hi,

As it is possible to display different blocks in one module... ??
Example:

Module1

index.php-> block 1 and block 2
view.php-> only block 3

2
script_fu
Re: different blocks in one module... ??

Hum can you be a little bit more descriptive? We need a lil more info to go on than what you have posted. What are you useing this for? Your purpose for doing this be?

-----------------------------------
Btw welcome to xoops! One post was all you needed to do. Just bump it up once in awhile you will get an answer.

3
studioC
Re: different blocks in one module... ??
  • 2005/3/26 9:21

  • studioC

  • Friend of XOOPS

  • Posts: 922

  • Since: 2003/12/7


hello mutex,

Quote:
As it is possible to display different blocks in one module... ??


not by default. You can only set blocks active each module.

hacking source and querry for needed blocks and displayed modules will help sometimes but ... by default , no ...

michael

4
mutex
Re: different blocks in one module... ??
  • 2005/3/26 18:47

  • mutex

  • Just popping in

  • Posts: 4

  • Since: 2005/3/26


I have made so

ADD to DB:

INSERT INTO `xoops_modules` VALUES (47, 'index1', 100, 1104183105, 1, 1, 'sample_mod', 1, 1, 1, 1, 1, 1);
INSERT INTO `xoops_modules` VALUES (48, 'index2', 100, 1104183105, 1, 1, 'sample_mod', 1, 1, 1, 1, 1, 1);


header.php--->

{
$xoopsTpl->assign('xoops_pagetitle', htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES));
if(preg_match("/index1\.php$/i", xoops_getenv('PHP_SELF')) && $xoopsModule->getVar('dirname') =='sample_mod')
{
$block_arr =& $xoopsblock->getAllByGroupModule($xoopsUser->getGroups(),47, false, XOOPS_BLOCK_VISIBLE);
}
elseif(preg_match("/index2\.php$/i", xoops_getenv('PHP_SELF')) && $xoopsModule->getVar('dirname') =='sample_mod')
{
$block_arr =& $xoopsblock->getAllByGroupModule($xoopsUser->getGroups(),48, false, XOOPS_BLOCK_VISIBLE);
}elseif(!empty($xoopsOption['show_cblock'])) {
$block_arr =& $xoopsblock->getAllByGroupModule($xoopsUser->getGroups(), 0, true, XOOPS_BLOCK_VISIBLE);
} else {
$block_arr =& $xoopsblock->getAllByGroupModule($xoopsUser->getGroups(),0, false, XOOPS_BLOCK_VISIBLE);
}
}


admin->blocks->> add need bock to index1 & index2

Login

Who's Online

402 user(s) are online (278 user(s) are browsing Support Forums)


Members: 0


Guests: 402


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