xoops forums

DMarvelus

Just popping in
Posted on: 2006/6/8 8:11
DMarvelus
DMarvelus (Show more)
Just popping in
Posts: 70
Since: 2005/1/29
#1

"clonable" blocks

I noticed that with 2.2, i could add a block twice on two different pages.

Is there any way i can do that on 2.0.14? I may have missed it.

if not, then is there any word when/if 2.0 will get this feature?

davidl2

XOOPS is my life!
Posted on: 2006/6/8 8:54
davidl2
davidl2 (Show more)
XOOPS is my life!
Posts: 4843
Since: 2003/5/26
#2

Re: "clonable" blocks

This won't appear in 2.0.14 - as it is at an RC stage, and normally these don't have any additional features.

It may possibly appear in a later version.. but please submit it as a request at the Sourceforge site - or at devteam.xoops.org

MadFish

Friend of XOOPS
Posted on: 2006/6/8 10:02
MadFish
MadFish (Show more)
Friend of XOOPS
Posts: 1056
Since: 2003/9/27
#3

Re: "clonable" blocks

You can manually clone blocks in 2.0.13, it only takes a minute or two. I've pasted some old notes below (I haven't got time to check it, but it was based on a forum post I found in here anyway).

Procedure to Clone the Block in Wfdownload module

1. edit xoops_version
.php copy the following block and reassign the variable and number

$modversion
['blocks'][4]['file'] = "wfdownloads_mytop.php"
$modversion['blocks'][4]['name'] = _MI_WFD_BNAME4;
$modversion['blocks'][4]['description'] = "modify shows recently added donwload files";
$modversion['blocks'][4]['show_func'] = "b_wfdownloads_top_myshow"
$modversion['blocks'][4]['edit_func'] = "b_wfdownloads_top_myedit";
$modversion['blocks'][4]['options'] = "date|10|19";
$modversion['blocks'][4]['template'] = 'wfdownloads_block_mynew.htl';


2. Replicate file 'wfdownloads_top.php' to other name (in the 
example I have name it 
'wfdownloads_mytop.php'this file is
under folder 
'block'

3. rename the function under file wfdownloads_top.php
to something that have assign in 1.

4. replicate template to other name that assign in 1.

New Block will appear as system block under Admin menu


This is particularly nice when used with some blocks that allow you to select category-specific content, like the Recent News block (latest news) and Recent Posts block (CBB). Combine it with a duplicatable content module (like Tiny D) and you can create category-specific sub-portals on your site.

Working on that now :)