i saw this idea in xoops.org forum and apply it in my theme in 2.2.4:
<{if $xoops_isadmin}>
<div class="edit">
<a href="<{$xoops_url}>/modules/system/admin.php?fct=blocksadmin&op=edit&id=<{$block.id}>"><img border="0" src="<{$xoops_imageurl}>images/edit.gif" title="<{$smarty.const._MA_NAV_EDITBLOCK}>" alt="<{$smarty.const._MA_NAV_EDITBLOCK}>" /></a>
<a href="<{$xoops_url}>/modules/system/admin.php?fct=blocksadmin&op=delete&id=<{$block.id}>"><img border="0" src="<{$xoops_imageurl}>images/delete.gif" title="<{$smarty.const._MA_NAV_DELETEBLOCK}>" alt="<{$smarty.const._MA_NAV_DELETEBLOCK}>" /></a>
</div>
<{/if}>
so after that admin can edit and delete blocks directly in user side.
questions:
1- it doesnt work in 2.0
2- how to add that in smarty variables like $block.title? is this possible? i think it would be a great feature.
Gijoe do you think it can be done with hack in core files? or apply in Altsys?
Quote:
irmtfan wrote:
Quote:2.0 does not assign block's id.
Quote:2- how to add that in smarty variables like $block.title? is this possible? i think it would be a great feature.
It is necessary to add some codes into header.php for 2.0.
eg)
$xoopsTpl->append('xoops_lblocks', array('title' => $block_arr[$i]->getVar('title'), 'id' => $block_arr[$i]->getVar('bid'), 'content' => $bcontent));
thank You,
you help me and other xoops members a lot.
also the way to do it for 2.0.14 is a little different and i add it to $block.title smarty variable and not use a new defined smarty.
i send it to xoops.org forum:
http://www.xoops.org/modules/newbb/viewtopic.php?topic_id=52332&start=0#forumpost232606i know it has not a nice look but it is what i want for themes.