Jump to content
bbuske

Disable PIREP Edit

Recommended Posts

Hello,

when people try to edit a PIREP after they have sent it, an error is coming up about a missing function.

While this would be nice to work, editing PIREPs is not really necessary anyway. So I wonder if there is an option to disable it somewhere. I know there was an app.config file in V5 but I have not found something similar in V7.

Any help is appreciated.

Cheers

Share this post


Link to post
Share on other sites

Hello and sorry the lack of time here, Just this moment saw your post.

I have disabled mine a very long time ago, there is no reason what so ever a Pilot should edit a filed PIREP. there are 2 ways to disable this very easily.

The very easy way is this;

<?php
	// Only show this column if they're logged in, and the pilot viewing is the
	//	owner/submitter of the PIREPs
	if(Auth::LoggedIn() && Auth::$pilot->pilotid == $pirep->pilotid) {
		?>
	<td align="right">
		<a href="<?php echo url('/pireps/addcomment?id='.$pirep->pirepid);?>">Add Comment</a><br />
		<a href="<?php echo url('/pireps/editpirep?id='.$pirep->pirepid);?>">Edit PIREP</a>
	</td>
	<?php
	}
	?>

<?php
	// Only show this column if they're logged in, and the pilot viewing is the
	//	owner/submitter of the PIREPs
	if(Auth::LoggedIn() && Auth::$pilot->pilotid == $pirep->pilotid) {
		?>
	<!--<td align="right">
		<a href="<?php echo url('/pireps/addcomment?id='.$pirep->pirepid);?>">Add Comment</a><br />
		<a href="<?php echo url('/pireps/editpirep?id='.$pirep->pirepid);?>">Edit PIREP</a>
	</td>-->
	<?php
	}
	?>

First paragraph is what you have, you will see in the second paragraph a simple remarked "OUT", this remarks out the visible Add comment and Edit PIREP lines, this is the easy way of using a remark jesture for HTML and/or php, the <!--    //// my stuff //// -->  remarks out anything in between the <!--   and the -->  REMEMBER IMPORTANT type it exactly the way I've got it for the 2 remarks, the 

<!-- and --> are the remark calls.... Hope this helps anyone.

Share this post


Link to post
Share on other sites

Almost, but with that, he'll lost the ability for his pilots to write a comment.  It'd be better to just comment out the "edit PIREP" link:

<td align="right">
		<a href="<?php echo url('/pireps/addcomment?id='.$pirep->pirepid);?>">Add Comment</a><br />
		<!––<a href="<?php echo url('/pireps/editpirep?id='.$pirep->pirepid);?>">Edit PIREP</a>––>
	</td>

 

Share this post


Link to post
Share on other sites

Well, no wonder that code looked familiar. Yeah - I haven't really had a good look at v7 either.

Edited by ProAvia

Share this post


Link to post
Share on other sites

In v7, there is a read-only mode which is active after it's been accepted/rejected or cancelled. It can still be edited beforehand, in case there's some additions that need to be added - mainly custom fields or pax/cargo counts which may not get filled in through ACARS

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...