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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×