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 :: Polls :: Message Navigator
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 04:51
npetreley is currently offline  npetreley   United States
Messages: 10
Registered: April 2002
Location: Right here.
Karma: 0
Junior Member
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
}
}

  Switch to threaded view of this topic Create a new topic Submit Reply
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: Tue Nov 26 19:38:41 GMT 2024

Total time taken to generate the page: 0.02960 seconds