FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Plugins and Code Hacks » Edit button appears only as long as edit time is left
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
Edit button appears only as long as edit time is left [message #2654] Wed, 15 May 2002 00:51
npetreley is currently offline  npetreley   United States
Messages: 10
Registered: April 2002
Location: Right here.
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
This should make the edit button disappear after the time limit has run out (that is, if you reload the page). It replaces the similar code at the bottom of drawmsg.inc. It't not elegant, but it works.



if ( isset($GLOBALS["usr"]) && ($GLOBALS["usr"]->id == $obj->poster_id || $GLOBALS["MOD"]) ) {
if ( $GLOBALS["MOD"] || ( $GLOBALS["EDIT_TIME_LIMIT"] && ( time() < ($obj->post_stamp+($GLOBALS["EDIT_TIME_LIMIT"]*60)) ) ) )
echo '<a class="GenLink" href="post.php?msg_id='.$obj->id.'&'.$ret_n_sid.'">< img src="'.$GLOBALS["fud_img_suffix"].'msg_ed
}
}

Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: My first patch on 1.2.7
Next Topic: fud <-> email gateway
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Oct 22 22:45:18 EDT 2017

Total time taken to generate the page: 0.00602 seconds