it is working thank you.
And a special thank you because you are not just helping but also teaching.
<{if $xoops_showrblock == 1}>
<td id="rightcolumn">
<!-- Start right blocks loop -->
<{foreach item=block from=$xoops_rblocks}>
<{include file="default/theme_blockright.html"}>
<{/foreach}>
<!-- End right blocks loop -->
</td>
<{/if}>
<td id="leftcolumn">
<!-- Start left blocks loop -->
<{foreach item=block from=$xoops_lblocks}>
<{include file="default/theme_blockleft.html"}>
<{/foreach}>
<!-- End left blocks loop -->
</td>
<{if $xoops_lblocks > ""}>
<td id="leftcolumn">
<!-- Start left blocks loop -->
<{foreach item=block from=$xoops_lblocks}>
<{include file="default/theme_blockleft.html"}>
<{/foreach}>
<!-- End left blocks loop -->
</td>
<{/if}>
if (fs_is_dir("$dir/$oldName")) {
$success = fs_rename("$dir/$oldName", "$dir/$newName");
if (!$success) {
return 0;
}
$xoopsgalleryimage_handler =& xoops_getmodulehandler('image');
// Update xoopsgallery_image.image_albumdir with new album name
$sql = sprintf("UPDATE %s SET image_albumdir='%s' WHERE image_albumdir='%s'", $xoopsgalleryimage_handler->db->prefix('xoopsgallery_image'), $newName, $oldName);
$result = $xoopsgalleryimage_handler->db->queryF($sql);
// Update xoopscomments.com_extraparams with new album name
$sql = sprintf("UPDATE %s SET com_exparams=REPLACE(com_exparams, 'albumName=%s&', 'albumName=%s&') WHERE com_exparams LIKE '%%albumName=%s%%' AND com_modid=%d", $xoopsgalleryimage_handler->db->prefix('xoopscomments'), $oldName, $newName, $oldName, $GLOBALS['xoopsModule']->getVar('mid'));
$result = $xoopsgalleryimage_handler->db->queryF($sql);
}