Jump to content





RD-WoTanks Theme Design RD-BF3Clan Theme Design RD-Diablo3 Theme Design RD-CodMW2 Theme Design RD-DarkRot Theme Design RD-NascarV2 Theme Design RD-StellarG Theme Design RD-SinCity Theme Design

** Images Size Reduced ** ( RD Commercial Themes Available in the RD Shop, Purchase yours today!! ** Images Size Reduced **
( Click Image to Purchase Theme Design from the RD Shop!! )



Important Announcement!

The Registration process on this web site requires u to enter your PhpNuke, Evolution or Xtreme web site address.
This gets verified, so if u enter a BOGUS or INVALID web address the verification bot will mark your registered account as a TEMP Account.


Stop Topic View Increase By Author


  • Please log in to reply
1 reply to this topic

#1
5STAR

5STAR

    Respected VIP

  • Respected
  • 60 posts

Current mood: Mellow
How can I stop the increase of views by the author ? I had this installed on my v2.0.0, but I cant seam to find the coding for it.

Can you help ?

EDIT

Well after searching my old site I finally found the coding. I'm just posting this if any one else would want it.

#
#-----[ OPEN ]------------------------------------------------
#
modules/Forums/viewtopic.php
#
#-----[ FIND ]------------------------------------------------
#
$sql = "UPDATE " . TOPICS_TABLE . "
		SET topic_views = topic_views + 1
		WHERE topic_id = '$topic_id'";
if ( !$db->sql_query($sql) )
{
		message_die(GENERAL_ERROR, "Could not update topic views.", '', __LINE__, __FILE__, $sql);
}
#
#-----[ REPLACE WITH ]-----------------------------------------
#
/*****[BEGIN]*****************************************
[ Mod: Stop Author View Increase			  v1.0.1 ]
******************************************************/
if (!($postrow[0]['user_id'] == $userdata['user_id'])) {
		$sql = "UPDATE " . TOPICS_TABLE . "
				SET topic_views = topic_views + 1
				WHERE topic_id = '$topic_id'";
		if ( !$db->sql_query($sql) )
		{
				message_die(GENERAL_ERROR, "Could not update topic views.", '', __LINE__, __FILE__, $sql);
		}
}
/*****[END]*******************************************
[ Mod: Stop Author View Increase			  v1.0.1 ]
******************************************************/
#
#-----[ SAVE/CLOSE/UPLOAD THE FILE ]--------------------------


#2
TheMortal

TheMortal

    Site Admin

  • Administrators
  • 552 posts
  • LocationThe Mortal Realm

Current mood: Inspired
Thank you for sharing that and posting the code. I am going to b installing my NEW version of the Tutorials Mod and will add that one to it.