32
finally i found a way to add edit and delete icons
it is for XOOPS 2.0.14 only.
open class/theme_blocks.php
around line 100 do this change:
// Start - change this function like below to add Edit and Delete icons for all blocks in title - hacked by irmtfan @ xoops.org
function buildBlock( $xobject, &$template ) {
// The lame type workaround will change
[color=ff0000]global $xoopsUser;[/color]
$block = array(
'module' => $xobject->getVar( 'dirname' ),
[color=ff0000]'title' => ($xoopsUser && $xoopsUser->isAdmin()) ? $xobject->getVar( 'title' ).
"<a href=".XOOPS_URL."/modules/system/admin.php?fct=blocksadmin&op=edit&bid=".$xobject->getVar('bid').
"> <img src=".XOOPS_URL."/images/icons/edit.gif"." title="._EDIT." alt="._EDIT." /> </a>".
"<a href=".XOOPS_URL."/modules/system/admin.php?fct=blocksadmin&op=delete&bid=".$xobject->getVar('bid').
"> <img src=".XOOPS_URL."/images/icons/delete.gif"." title="._DELETE." alt="._DELETE." /> </a>" : $xobject->getVar( 'title' ) ,[/color]
//'name' => strtolower( preg_replace( '/[^0-9a-zA-Z_]/', '', str_replace( ' ', '_', $xobject->getVar( 'name' ) ) ) ),
'weight' => $xobject->getVar( 'weight' ),
'lastmod' => $xobject->getVar( 'last_modified' ),
[color=ff0000]'id' => $xobject->getVar('bid'), // it is not needed and i just add it for those theme designers that want to have a Smarty variable. ( <{$block.id}> ==> block id )[/color]
);
// End - hacked by irmtfan @ xoops.org
then you can edit and delete blocks easily in user side.
thanks to Gijoe for help me to do this.
http://www.peak.ne.jp/xoops/md/xhnewbb/viewtopic.php?topic_id=1651&post_id=6215#forumpost6215
and also thanks to technigrafa for Original idea.