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
Return to the default flat view 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:
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
}
}

[Message index]
 
Read Message
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 20 18:54:49 GMT 2024

Total time taken to generate the page: 0.04153 seconds