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)

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! :)


All times are GMT. The time now is 06:21 AM.

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.01255 seconds
  • Memory Usage 1,749KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_html_printable
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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