Welcome, Guest. Please Login or Register.
May 06, 2024, 02:02:45 PM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Completed mods  |  [Code] Views / Replies .. « previous next »
Pages: [1] Reply Ignore Print
Author Topic: [Code] Views / Replies ..  (Read 3889 times)
tazthedev
Full Member
***
Posts: 161


I'm a llama!

[Code] Views / Replies ..
« on: June 14, 2002, 12:02:32 AM »
Reply with quote

Hi !!

This code is for peoples who do not want the  "Views.." (Read x times... ) to be increased by 1 if the user has already replied to a specific thread ...

Its nice for warez boards :)


In the file display.php, look for the following line...
$request = mysql_query("UPDATE {$db_prefix}topics SET numViews=numViews+1 WHERE ID_TOPIC=$viewnum");


Put the 2 following line right above the $request line ...


   $reqviews = mysql_query("SELECT posterName FROM {$db_prefix}messages WHERE (posterName='$username' AND ID_TOPIC=$viewnum) LIMIT 1");   
   if (mysql_num_rows($reqviews)==0)





The others mods are coming ... :)


« Last Edit: June 14, 2002, 11:39:40 AM by tazthedev » Logged
tazthedev
Full Member
***
Posts: 161


I'm a llama!

Re:[Code] Views / Replies ..
« Reply #1 on: June 14, 2002, 06:06:17 PM »
Reply with quote

well... think it wont be appreciate by anyone  ::)

;)
Logged
David
Destroyer Dave
Global Moderator
YaBB God
*****
Posts: 5761


I'm not a llama!

WWW
Re:[Code] Views / Replies ..
« Reply #2 on: June 14, 2002, 06:57:53 PM »
Reply with quote

This is a good mod.  Don't get the lack of replies wrong.  One thing that would make it better is being able to add another column so in the message index you see both total visits and individual visits.  ;D
Logged

tazthedev
Full Member
***
Posts: 161


I'm a llama!

Re:[Code] Views / Replies ..
« Reply #3 on: June 14, 2002, 10:18:13 PM »
Reply with quote

Thx, David, :)

well... maybe not for the individual/total visits...

but, I will give the admin and/or the user, the choice to activate or not that mod... nice no ? :)

« Last Edit: June 14, 2002, 10:51:13 PM by tazthedev » Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Completed mods  |  [Code] Views / Replies .. « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.051 seconds with 19 queries.