Dolphin Orca Forum Delete

I am posting this here since this isn't a stand alone orca but dolphin orca 6.1.4.


I just noticed that in my orca forum's a member has the option to delete their post totally. I am guessing that if they posted the original thread everything else or everyone elses comments might be deleted.


What I would like is they would be free to edit there post or reply but not delete it totally. I have gone over the permission settings for membership levels and basically it is pretty limited in the dolphin end.


I didn't see anything in the orca admin area for this either. This is even more limited for what you can set.


Anyone else have the same situation?

gameutopia

DialMe.com - Your One and Only Source For Boonex Dolphin Tutorials and Resources
Quote · 26 Aug 2008

tried     in /orca/classes/Forum.php

// check user permissions to delete or edit posts
$gl_allow_edit = 0;
$gl_allow_del = 0;

if ($this->_checkUserPerm ('', $forum_type, 'edit', $forum_id))
$gl_allow_edit = 1;

if ($this->_checkUserPerm ('', $forum_type, 'del', $forum_id))
$gl_allow_del = 1;

$u = $this->_getLoginUser();

$r = $fdb->getPost($post_id, $u);

// acquire user info
if (!$ui[$r['user']])
{               
$aa = $this->_getUserInfo ($r['user']);
$ui[$r['user']] = array ('posts' => (int)$fdb->getUserPosts($r['user']), 'avatar' => $aa['avatar'], 'url' => $aa['profile_url'], 'onclick' => $aa['profile_onclick']);
}

$allow_edit = $gl_allow_edit;
$allow_del = $gl_allow_del;

if (!$allow_edit && $r['user'] == $this->_getLoginUserName())
{
if ($this->_checkUserPerm ($r['user'], 'own', 'edit', $forum_id))
$allow_edit = 1;
}           

if (!$allow_del && $r['user'] == $this->_getLoginUserName())
{
if ($this->_checkUserPerm ($r['user'], 'own', 'del', $forum_id))
$allow_del = 1;
}

you have to recompile every test change

I want it right out so I just took it out of:

/orca/layout/base/xsl/forum_posts.xsl

code to remove:

<xsl:if test="allow_del = 1">
<xsl:element name="a">
<xsl:attribute name="style">margin-right:5px;</xsl:attribute>
<xsl:attribute name="href">javascript:void(0);</xsl:attribute>
<xsl:attribute name="onclick">f.deletePost(<xsl:value-of select="@id" />, <xsl:value-of select="../forum/id" />, <xsl:value-of select="../topic/id" />, true);</xsl:attribute>[L[Delete]]</xsl:element>
</xsl:if>

have fun Again...please noteNO changes in orca will reflect till you recompile hit the "en" if ya know what i mean

I have video tutorials to help you mrpowless.com
Quote · 28 Aug 2008
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.