hi gijoe
i have a question regard the block cloneable feature that comes with myblocksadmin
i have insered the code into the xoops_version.php
Quote:
$modversion['blocks'][(block_number)]['can_clone'] = true ;
and now my question is, how can i clone a block now? i though i will get a button or something like that, where i can easily clone a block.
hi krobi.
Did you install the recent myblocksadmin correctly?
If success, go to
modules/(your_module)/admin/myblocksadmin.php
You can see "clone" link in the right of block's admin.
hi gijoe
yes i have installed the recent version of myblocksadmin, onto xoops 2.0.9.2
the only thing that i have noticed it that line in the php debug mode
Quote:
Notice [PHP]: Undefined index: show_func in file modules/PDdownloads/admin/myblocksadmin.php line 145
i tried it with two modules, the first is a wf-download mod and the second a xoopspartner mod and in both module i get that php notice.
i dont get a "clone" link, i only have the normal myblockadmin on the screen as i know it from older versions.
edit: i only need to but that line into xoops_version.php, is that right? i only ask for secure
Quote:
krobi wrote:
i only need to but that line into xoops_version.php, is that right? i only ask for secure 
right.
If you don't understand the action of cloning, try the recent xhld.
It is a good sample of usages of myblocksadmin.
oh good i see it
http://www.power-dreams.com/xoops/uploads/smil41b921b120466.gif.
in the xhld 2.8 (i have installed that version).
okay so strange that this doesn't work on the other modules, hm i will look into that maybe i find the error.
but i think gijoe you will find the problem faster than i

i will tell you when i have news
maestro gijoe
i found the problem

in your readme you write i only need to but that file into the xoops_version.php
its right but you should als write that the file should be by the block that someone want to be cloneable and than he/she should insert the correct number instead of (block_number)
then cloneable blocks work,
but now i have another problem, i got a white screen. i will check if its because of myblocksadmin or because of the modifications of the modul.
edit: okay thats only a problem of the modificates xoopspartners modul, so gijoe your work is great.
Thanks GIJOE for the module!!
But here is a question: how can i clone a system block?
I tried to clone new users block, but no luck, there was an error report: invalid block..
Could you recommend me something?
hi banesto. (Miguel Indurain?)
Quote:
But here is a question: how can i clone a system block?
I tried to clone new users block, but no luck, there was an error report: invalid block..
Could you recommend me something?
blocks admin module supports cloning block_type of 'C' or 'D'.
'C' means custom block.
'D' means duplicated block.
Althogh I don't recommend it, you can hack like this:
line 342 of blocksadmin.inc.php
// block type check
$block_type = $block->getVar('block_type') ;
if( $block_type != 'C' && $block_type != 'M' && $block_type != 'D' ) {
redirect_header('myblocksadmin.php',4,'Invalid block');
}