Welcome, Guest. Please Login or Register.
May 14, 2025, 04:25:41 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  |  Mod Ideas and Creation  |  Number of Posts Since Last Visit « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Number of Posts Since Last Visit  (Read 3274 times)
BiErLeEuW
Full Member
***
Posts: 174


WWW
Number of Posts Since Last Visit
« on: July 24, 2003, 11:33:54 AM »
Reply with quote

I think this will be a nice field in you profile... Can some-one generade this to a mod :)

sorry for bad english
Logged
Grudge
Global Moderator
Full Member
*****
Posts: 178


Damn llama's don't like me :(

Re:Number of Posts Since Last Visit
« Reply #1 on: July 24, 2003, 12:23:57 PM »
Reply with quote

Do you mean amount of posts on the board made since you last visited or the amount of posts you have made since you logged in??

If its the former I don't know what use this would be in the profile??

If it's the former I'm great at these things but I would guess you could do something like:

Firstly - add a new column (INT) to {db_prefix}members called PrevLog. Can do this with a db file or phpmyadmin

In loginout.php go to :

$request = mysql_query("DELETE FROM {$db_prefix}log_online WHERE identity='$ID_MEMBER'") or database_error(__FILE__, __LINE__);

and add this:

$timeout=time();
$result =  mysql_query("UPDATE {$db_prefix}members SET PrevLogin='$timeout WHERE memberName='$username'") or database_error(__FILE__, __LINE__);


Then, whereever you want to add the total amount of new posts since your last visit:
$request=mysql_query("SELECT PrevLogin FROM {$db_prefix}members WHERE memberName='$username'") or database_error(__FILE__, __LINE__);
$timeon = mysql_fetch_array($request);
$request=mysql_query("SELECT subject FROM {$db_prefix}messages WHERE posterTIME>$timeon[0]") or database_error(__FILE__, __LINE__);
$numnew=mysql_num_rows($request);


Then you can print the variable $numnew whereever you want to display it (profile, info center - whereever)

I think this should work. I'm not *quite* sure how logging out is handled if you don't logout manually and this depends on the logout function getting called for you - hopefully it does get called :o. It will just count all the messages that have been added since you last got logged out.
Logged
BiErLeEuW
Full Member
***
Posts: 174


WWW
Re:Number of Posts Since Last Visit
« Reply #2 on: July 24, 2003, 12:30:35 PM »
Reply with quote

ahh tnx :)

Can you make a boardmod file and update db file of it?
Logged
Grudge
Global Moderator
Full Member
*****
Posts: 178


Damn llama's don't like me :(

Re:Number of Posts Since Last Visit
« Reply #3 on: July 24, 2003, 12:34:49 PM »
Reply with quote

If I do this can you just confirm that this is what you meant?!

Also - I will quickly test the logout thing before I write the boardmod file. I'll get back to you shortly.

Where do you want this value? I'm thinking sticking the info on the board index is where it is of greatest importance?
Logged
BiErLeEuW
Full Member
***
Posts: 174


WWW
Re:Number of Posts Since Last Visit
« Reply #4 on: July 24, 2003, 12:39:07 PM »
Reply with quote

i mean how many posts have be placed by "member" since last visit

but not loggin! Because if you always automatic logged in you have always posts ;)
Logged
Grudge
Global Moderator
Full Member
*****
Posts: 178


Damn llama's don't like me :(

Re:Number of Posts Since Last Visit
« Reply #5 on: July 24, 2003, 04:25:41 PM »
Reply with quote

http://www.yabbse.org/community/index.php?thread=25004

This is what I came up with. Best I could do :\
Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Number of Posts Since Last Visit « 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.099 seconds with 21 queries.