Recent Topics

1 Oct 10, 2006 16:17    

how can i edit the file (inc/VIEW/items/_browse_posts_exp.inc.php) that only edit the post by author or admin?


//example
<if $user == author or admin>

// Display edit button if current user has the rights:
$Item->edit_link( ' ', ' ', '#', '#', 'ActionButton' );

</if>


2 Oct 10, 2006 19:31

anybody help me... to take the law into one's hands

the answer:

inc/MODEL/items/_item.class.php

find:


if( ! $current_User->check_perm( 'blog_post_statuses', $this->status, false,

$this->blog_ID ) )
		{ // User has no right to edit this post
			return false;
		}

and displace with:


// only the author (or admin) can delete posts
     if( $current_User->get( 'ID' ) != $this->Author->get( 'ID' )  )
     { // test for author
          if( $current_User->get( 'ID' ) != 1 )
          { // test for admin
               return false;
           }
      }


[url=http://wonderwinds.com/hackblog.php/2005/01/31/lim_iting_who_can_delete_edit_publish_po]more....[/url]


Form is loading...