vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Reputation Click Tracker (https://vborg.vbsupport.ru/showthread.php?t=72781)

tubedogg 12-11-2004 10:00 PM

Reputation Click Tracker
 
(I couldn't think of a good name for this, so there you go...)

This is a relatively simple hack that adds a box to the User CP showing a user how many reputation clicks he has given in the last 24 hours, and how many more he can give, and it also shows this information in a small graph (using the poll images). [see the screenshot]

It requires you to modify one file, one template, and add one template. Instructions are in the file named INSTALL in the ZIP archive attached to this post.

Questions, post em here. Please do not contact me privately about this hack as it will be ignored.

Version History
1.0.1, 12 December 2004 4:25PM EST:
- Fixed small bug with date display.

1.0.0:
- Initial release.

docvader 12-12-2004 12:40 AM

Wow. Am I the first? Gosh...

Installed, in a matter of minutes, very easily. Works great! Thanks.

rich
russbo.com

Sadie Frost 12-12-2004 01:59 AM

Quote:

Originally Posted by docvader
Wow. Am I the first? Gosh...

Installed, in a matter of minutes, very easily. Works great! Thanks.

rich
russbo.com

That's great - takes the guesswork out of rep giving :)

yinyang 12-12-2004 07:28 AM

is there anyway to put this in your postbit? my users would use the rep function more if they see how much they have to give from the forum displays. or can you put it in the navbar area?

sabret00the 12-12-2004 09:17 AM

nice work :)

Paul M 12-12-2004 09:54 AM

Cool,

We already display reputation given, this looks a nice addition.

ambumann 12-12-2004 12:18 PM

Thanks for the good work!

n3ol3o 12-12-2004 02:14 PM

seems to work fine, my members will love you for this- they know and care more about rep than i do!

nighteyes 12-12-2004 06:17 PM

Nice one ;)

deb0 12-12-2004 06:38 PM

well done! Well done indeed!

nighteyes 12-12-2004 07:12 PM

A bug? The following was reported by one our members who had exceeded their daily limit...

Quote:

In the last 24 hours, you have given reputation to 10 posters.
This is the daily limit, so you may not give reputation again until 01-02-1970 01:00 AM.

nighteyes 12-12-2004 07:22 PM

Just tested this myself (gave reputation to 10 users) and I'm seeing the same message. Any ideas?

tubedogg 12-12-2004 07:25 PM

Quote:

Originally Posted by nighteyes
A bug? The following was reported by one our members who had exceeded their daily limit...

Easy fix.

In usercp.php find this line:
$earliest = $check['dateline'];

Move it right below $sofar++; so it's above the }, i.e.
Code:

                $sofar++;
                $earliest = $check['dateline'];
        }

Change this line:
Code:

                $nexttime = date($vboptions['dateformat'].' '.$vboptions['timeformat'], ($check['dateline']+86400));
To this:
Code:

                $nexttime = vbdate($vboptions['dateformat'].' '.$vboptions['timeformat'], ($earliest+86400));
ZIP updated to v1.0.1.

nighteyes 12-12-2004 07:34 PM

Wow that was very quick :D Implemented those changes and it works perfectly....... thanks alot. Very useful hack.

Bison 12-12-2004 07:37 PM

Thanks for the fix tubedogg, but I have a question to ask ... isn't this true that admins have no restrictions to giving rep points? If so, then can there be a condition where if this is true, then all that shows up for admins is how many times they have given rep points?

tubedogg 12-12-2004 08:24 PM

Quote:

Originally Posted by Bison
Thanks for the fix tubedogg, but I have a question to ask ... isn't this true that admins have no restrictions to giving rep points? If so, then can there be a condition where if this is true, then all that shows up for admins is how many times they have given rep points?

Yes you're right...admins have no limit. However determining how many times an admin has given reputation could put a lot of load on the server, if the admin has given a lot.

A condition could be used to say "you have no limit", but I'm not sure I'd want to determine the number of times reputation has been given for the above reason.

Bison 12-12-2004 08:28 PM

Under the current situation, an admin is shown that he has only X amount of times that he can give Rep points. How could I fix it to show that there's no limit?

Erwin 12-12-2004 08:33 PM

This is great. :) Thanks!

Bison 12-12-2004 08:48 PM

Correct this if i'm wrong:

HTML Code:

<if condition="$bbusergroupid = 6">

                <td align="left" valign="top" class="alt1" width="50%">
                        In the last 24 hours, you have given reputation to <b>$sofar</b> posters.<br />
                        There is no daily limit for <b>admins</b>, so you may give reputation as often as you like.</td>
</if>

For non-admins:

HTML Code:

<if condition="$bbusergroupid != 6">
                <td align="left" valign="top" class="alt1" width="50%">
                        In the last 24 hours, you have given reputation to <b>$sofar</b> posters.<br />
                        <if condition="$nexttime != 0">
                        This is the daily limit, so you may not give reputation again until $nexttime.
                        <else />
                        You can give reputation to <b>$clicksremain</b> more poster<if condition="$clicksremain > 1">s</if> today.</td>
                        </if>


Erwin 12-13-2004 06:27 AM

You might want to add the 'usercp_reptracker' template to the templatecache of usercp.php to save that 1 query. :)

In usercp.php, find:

PHP Code:

    'usercp_reputationbits' 

REPLACE with:

PHP Code:

    'usercp_reputationbits',
    
'usercp_reptracker' 

Done! :)

Erwin 12-13-2004 06:28 AM

One suggestion:

Show the reputation giving power as well. :)

docvader 12-13-2004 03:02 PM

Sure this works correctly? It's not refreshing down to zero on a daily basis (it still holds onto the three reputations I gave out last week (OK, I'm not too generous... LOL)

rich

tubedogg 12-13-2004 06:17 PM

Quote:

Originally Posted by docvader
Sure this works correctly? It's not refreshing down to zero on a daily basis (it still holds onto the three reputations I gave out last week (OK, I'm not too generous... LOL)

rich

The query looks for up to the last X times you've given in the last 24 hours, where X is the daily limit...

AND dateline >= ".(time()-86400)."

Unless time() is malfunctioning on your server, I can't see any reason why it would show 3 that you gave last week.

tubedogg 12-13-2004 06:18 PM

Quote:

Originally Posted by Erwin
One suggestion:

Show the reputation giving power as well. :)

Not a bad idea...

I'll be doing an updated version later today or tommorrow that takes this into account, plus the template caching and showing the admin how many times he has given overall.

docvader 12-13-2004 06:43 PM

Quote:

Originally Posted by tubedogg
Not a bad idea...

I'll be doing an updated version later today or tommorrow that takes this into account, plus the template caching and showing the admin how many times he has given overall.

Time is ok and functioning on my server, but I'm using Mac OSX, Jaguar 10.2 for my operating system. Not sure if the query is hitting it correctly, nor do I know how to check it, LOL.

Bison 12-13-2004 08:23 PM

Quote:

Originally Posted by tubedogg
Not a bad idea...

I'll be doing an updated version later today or tommorrow that takes this into account, plus the template caching and showing the admin how many times he has given overall.

Thanks Tubedogg! :banana:

trackpads 12-13-2004 11:19 PM

Kevin thanks!!!

Now get back to work on Hivemail! :-) (I kid I kid!!)

Mark.B 12-18-2004 04:58 PM

This is still not 100% right.

If you exceed the daily limit, the tracker simply says this:

In the last 24 hours, you have given reputation to 15 posters.
You can give reputation to 0 more poster today

In other words, the condition based around $nexttime is not working, it is not displaying the message about when you can give rep again.

Mark.B 12-18-2004 05:31 PM

Hmm...fixed this by changing $nexttime != 0 to $nexttime != '0' in the usercp_reptracker template.....

Also noticed the collapse toggle needs fixing as it currently collapses a different table.

In the usercp_reptracker find:
Code:

<tbody id="collapseobj_usercp_forums" style="$vbcollapse[collapseobj_usercp_forums]">
Change to:
Code:

<tbody id="collapseobj_usercp_tracker" style="$vbcollapse[collapseobj_usercp_tracker]">
Also find code:
Code:

<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('usercp_forums')">
Change to:
Code:

<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('usercp_tracker')">

trackpads 12-18-2004 10:18 PM

Thanks!

rex_b 12-20-2004 06:14 PM

nice work.. installed

T3MEDIA 12-20-2004 08:11 PM

Quote:

Originally Posted by Paul M
Cool,

We already display reputation given, this looks a nice addition.

why cant we get a hack that just makes reps like ebay? you can go on the profile page and leave a rep. you can only vote once on that pertiular user and thats that. other users can view what you said and wala. that what a rep really is. this is more like a post quality checker.

folkish 01-05-2005 05:19 AM

/me clicks install.

Very useful hack. Great work.

Trisha 01-16-2005 04:24 PM

installed! it looks and works great! thanks.

Lottis 01-26-2005 08:04 AM

I still get this message:
In the last 24 hours, you have given reputation to 0 posters.
This is the daily limit, so you may not give reputation again until 01-02-1970 01:00 AM.

Borgs8472 02-08-2005 06:14 PM

My users can't see the poll images... :(

.Tim 02-09-2005 03:26 AM

For some reason in IE only the USERCP page is stretched really wide after installing this hack and the Display reputation giving hack. Don't know which one caused the problem. Firefox and Opera work fine, IE is the only one with the problem. Any ideas?

.Tim 02-09-2005 12:26 PM

I just realized it's not only stretched, it doesn't show who gave the reputation or the comment.

LauraFL 02-11-2005 07:47 PM

Quote:

Originally Posted by Lottis
I still get this message:
In the last 24 hours, you have given reputation to 0 posters.
This is the daily limit, so you may not give reputation again until 01-02-1970 01:00 AM.

This is exactly what I am getting. Any idea how to fix it?

MAK-upl 02-18-2005 03:40 PM

coul'd somebody help me with that strange thing in graf ? vb 3,0,6


All times are GMT. The time now is 04:43 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01960 seconds
  • Memory Usage 1,827KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (2)bbcode_html_printable
  • (2)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete