Sug: Reputation Notification |
Author: |
Message: |
ipab
Veteran Member
Design Evolved
Posts: 1017 Reputation: 32
35 / /
Joined: May 2004
|
RE: Sug: Reputation Notification
quote: Originally posted by Regexp
Just compare today with the lastest reputation given. You can add a cookie, but you can also let it be daily
elaborate please
edit: btw its still querying the database isnt it
This post was edited on 07-22-2005 at 12:16 AM by ipab.
56656E692C 20566964692C 2056696369
|
|
07-22-2005 12:16 AM |
|
|
L. Coyote
Senior Member
Captain Obvious
Posts: 981 Reputation: 49
39 / /
Joined: Aug 2004
Status: Away
|
RE: Sug: Reputation Notification
quote: Originally posted by ipab
quote: Originally posted by Regexp
Just compare today with the lastest reputation given. You can add a cookie, but you can also let it be daily
elaborate please
edit: btw its still querying the database isnt it
Of course, one query.
I'm not good at explaining, so I'll do some kind of pseudo-code.
code: query "select * from mybb_reps where id={$id}"
while(array = mysql_fetch_assoc(query)) {
today_begin = mktime(0, 0, 0, date("m"), date("d"), date("Y"));
today_end = today_begin + 86400;
if(array['lastrep'] >= today_begin && array['lastrep'] <= today_end) {
todayreps_total++;
todayreps_points += array['reppoint'];
}
}
# etc.
# echo
Please note: this code is probably bogus (aside from being pseudo and making up table stuff). I'm actually sculpting ( I'll take pictures later) and didn't have time to think about the timestamp comparison, so it might be wrong.
WDZ probably knows how to do it in a simple way.
This post was edited on 07-22-2005 at 12:34 AM by L. Coyote.
Hack, hack, hack!
Finally became a Systems Analyst!
|
|
07-22-2005 12:27 AM |
|
|
Lou
Veteran Member
Posts: 2475 Reputation: 43
– / /
Joined: Aug 2004
|
RE: Sug: Reputation Notification
quote: Originally posted by traxor
You have received a +2 reputation
You have received a +1 reputation
You have received a -1 reputation
You have received a -2 reputation
cant we only give a +1 rep and a -1 rep and not a +2 and a -2 ? or am I mistaken?
The future holds bright things in it\\\'s path, but only time will tell what they are and where they come from.
Messenger Stuff Forums
|
|
07-22-2005 12:50 AM |
|
|
L. Coyote
Senior Member
Captain Obvious
Posts: 981 Reputation: 49
39 / /
Joined: Aug 2004
Status: Away
|
RE: Sug: Reputation Notification
quote: Originally posted by lou_habs
quote: Originally posted by traxor
You have received a +2 reputation
You have received a +1 reputation
You have received a -1 reputation
You have received a -2 reputation
cant we only give a +1 rep and a -1 rep and not a +2 and a -2 ? or am I mistaken?
Admins, mods, and elite members can give +2 and -2.
Hack, hack, hack!
Finally became a Systems Analyst!
|
|
07-22-2005 12:52 AM |
|
|
ipab
Veteran Member
Design Evolved
Posts: 1017 Reputation: 32
35 / /
Joined: May 2004
|
RE: Sug: Reputation Notification
o, i get what you mean. Simple enough, u have me moderately convinced. tbh i doubt WDZ is going to do it though. (he has a rep to keep up u kno )
56656E692C 20566964692C 2056696369
|
|
07-22-2005 12:59 AM |
|
|
Hank
Banned
Posts: 3129 Reputation: 5
– / – /
Joined: Nov 2003
Status: Away
|
RE: Sug: Reputation Notification
how many people actually care bout whether they get a Rep or not ?
|
|
07-22-2005 01:06 AM |
|
|
L. Coyote
Senior Member
Captain Obvious
Posts: 981 Reputation: 49
39 / /
Joined: Aug 2004
Status: Away
|
|
07-22-2005 01:06 AM |
|
|
surfichris
Former Admin
Posts: 2365 Reputation: 81
Joined: Mar 2002
|
RE: Sug: Reputation Notification
quote: Originally posted by Regexp
I thought we were being hosted by C2Media and didn't have server problems anymore...
The servers are hosted by EV1Servers. They are provided by C2Media. Big difference. quote: Originally posted by Regexp
query "select * from mybb_reps where id={$id}"
while(array = mysql_fetch_assoc(query)) {
today_begin = mktime(0, 0, 0, date("m"), date("d"), date("Y"));
today_end = today_begin + 86400;
if(array['lastrep'] >= today_begin && array['lastrep'] <= today_end) {
todayreps_total++;
todayreps_points += array['reppoint'];
}
}
# etc.
# echo
Go through every single reputation for the user?
This would probably work
code: $query = $db->query("SELECT COUNT(r.rid) AS rep_total, SUM(IF(r.dateline>'$mybbuser[lastvisit]',reputation,'0')) AS reps_new FROM reputations r WHERE r.uid='$mybb[uid]' GROUP BY r.uid");
$rep = $db->fetch_array($query);
That would show since last visit too..
However I agree with Wj.
Why do you people make such a big deal out of the reputation system? Furthermore, what's with the useless suggestions here recently?
|
|
07-22-2005 06:00 AM |
|
|
L. Coyote
Senior Member
Captain Obvious
Posts: 981 Reputation: 49
39 / /
Joined: Aug 2004
Status: Away
|
RE: Sug: Reputation Notification
quote: Originally posted by Chris Boulton
quote: Originally posted by Regexp
I thought we were being hosted by C2Media and didn't have server problems anymore...
The servers are hosted by EV1Servers. They are provided by C2Media. Big difference.quote: Originally posted by Regexp
query "select * from mybb_reps where id={$id}"
while(array = mysql_fetch_assoc(query)) {
today_begin = mktime(0, 0, 0, date("m"), date("d"), date("Y"));
today_end = today_begin + 86400;
if(array['lastrep'] >= today_begin && array['lastrep'] <= today_end) {
todayreps_total++;
todayreps_points += array['reppoint'];
}
}
# etc.
# echo
Go through every single reputation for the user?
This would probably work
code: $query = $db->query("SELECT COUNT(r.rid) AS rep_total, SUM(IF(r.dateline>'$mybbuser[lastvisit]',reputation,'0')) AS reps_new FROM reputations r WHERE r.uid='$mybb[uid]' GROUP BY r.uid");
$rep = $db->fetch_array($query);
That would show since last visit too..
However I agree with Wj.
Why do you people make such a big deal out of the reputation system? Furthermore, what's with the useless suggestions here recently?
Oh, I see! Looks interesting. I don't know so much SQL. I'll write that down and study. It might save me some trouble.
Meh, I liked the coding challenge. That's the only reason I kept posting. I couldn't care less about the reps.
Hack, hack, hack!
Finally became a Systems Analyst!
|
|
07-22-2005 06:06 AM |
|
|
Stigmata
Veteran Member
Posts: 3520 Reputation: 45
21 / /
Joined: Jul 2003
|
RE: Sug: Reputation Notification
they said no.
why do you still keep talking
|
|
07-22-2005 06:09 AM |
|
|
Pages: (4):
« First
«
1
2
[ 3 ]
4
»
Last »
|
|