Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 02:55 pm EDT

Geeklog Forums

Remove "Edit"-link in preview


tokyoahead

Anonymous
When previewing an article, there is the usual "edit"-link on the article that is previewed. However clicking it provikes an error since the article has not been saved yet. I think it would be a nice thing to remove it on the preview-page.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Not fully tested, but try this:

In lib-common.php, function COM_article(), add $mode and $LANG24 to the list of the global variables (first statement in that function). Then, a bit further down, change
Text Formatted Code
if( SEC_hasAccess( $A['owner_id'], ...
 
to
Text Formatted Code
if(( $mode != edit ) && ( $mode != $LANG24[9] ) && SEC_hasAccess( $A['owner_id'],...
 


bye, Dirk
 Quote

All times are EDT. The time is now 02:55 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content