vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Integration with vBulletin - Extended Reputation (https://vborg.vbsupport.ru/showthread.php?t=251044)

CheeSie 09-22-2010 10:00 PM

Extended Reputation
 
1 Attachment(s)
Extended Reputation

This is a modification I had to develop to control the rep at my own forum. After it was tweaked to my personal preferences I gave it another tweak and added some features other might find useful and I'm now releasing it to you guys!

Features
This integrates with vBulletin. All settings that can be changed will be listed under Admin Panel -> Options -> User Reputation Options.
Usergroup permissions will of course be listed within the usergroups :)
Everything should be fully phrased! (I'm Danish, so there might be some grammar errors.. sorry :()

The add reputation form alteration:
Why do users have to give their full amount of reputation? I think it's better for them to give the amount they prefer, therefore this mod enables them to give a custom amount of reputation.

The settings added are:
  • Disable Negative Reputation
    Global on/off switch for enabling/disabling negative reputation.. it's easier to use this than setting the permission for each usergroup.
  • Force Post Report On Negative Reputation
    Make the user report the post they're giving negative reputation. The comment given for the reputation will be used as the report reason as well, this also enables the moderators to make sure the reputation is valid. Often users negative rep posts that are against the forum rules, this makes sure it's being reported!
  • Extended Report Information
    Extend the report filed through giving reputation to also include the amount of reputation given.
  • Use Primary Usergroup Permissions
    This is useful if you want the usergroup permissions to be based on the primary usergroup instead of whichever permissions the users membergroup has (if they have any membergroups)
  • Allow 0 Point Reputations
    Globally enable/disable the users from giving 0 point reputations (my users thought these were annoying and served no real purpose).
  • Positive Reputation Per Post
    Define how many times a post can receive positive reputation, can be set to unlimited.
  • Negative Reputation Per Post
    Define how many times a post can receive negative reputation, can be set to unlimited.
  • Minimum Length Of Reputation Comment
    Define a minimum length of the reputation comment given.
  • Users Banned From Using Reputation
    A list of userids that are banned from giving reputation.

Usergroup permissions:
  • Positive reputation cap
    A cap on how much positive reputation that can be given by this usergroup.
  • Negative reputation cap
    A cap on how much negative reputation that can be given by this usergroup.
  • Maximum amount of times reputation can be given per day
    Define how many times this usergroup can give reputation per day (does not override the one set in the vBulletin options)

Installation
  1. Upload the files from the 'upload' folder.
  2. Import the product
  3. Rebuild bitfields (it should do it automatically, but if it doesn't...)
  4. Do the template edit (listed below)
  5. Edit the settings to your likings!

Template Edit
Replace everything from reputationbit with (vBulletin 4.2 and later):
HTML Code:

<div class="blockbody formcontrols">
    <h3 class="blocksubhead">{vb:rawphrase add_to_reputation}: {vb:raw userinfo.username}</h3>
    <div class="blockrow">
        <label for="reputation">{vb:rawphrase xtdrep_giveto}</label>
        <label for="rb_reputation_pos_{vb:raw postid}" style="float:none;"><input type="radio" name="reputation" value="pos" id="rb_reputation_pos_{vb:raw postid}" checked="checked" tabindex="1" /> {vb:rawphrase xtdrep_posrep} {vb:rawphrase xtdrep_maxpoints, {vb:raw show.maxposrep}}</label>
        <vb:if condition="$show['negativerep']">
            <label for="rb_reputation_neg_{vb:raw postid}" style="float:none;"><input type="radio" name="reputation" value="neg" id="rb_reputation_neg_{vb:raw postid}" tabindex="1" /> {vb:rawphrase xtdrep_negrep} {vb:rawphrase xtdrep_maxpoints, {vb:raw show.maxnegrep}}</label>
            <vb:if condition="$show['reportonneg']">
                <p class="description" style="margin-left: 0px;">{vb:rawphrase xtdrep_negrepcomment}</p>
            </vb:if>
        </vb:if>
    </div>
   
    <div class="blockrow">
        <label for="rep2give">{vb:rawphrase xtdrep_points}</label>
        <input type="text" class="textbox" maxlength="5" name="rep2give" tabindex="2" id="rep2give_{vb:raw postid}" style="width:50px;" value="{vb:raw show.xtd_initrep}" />
    </div>

    <div class="blockrow">
        <label for="reason">{vb:rawphrase your_comments_on_this_post}:</label>
        <input type="text" class="primary textbox" maxlength="250" name="reason" tabindex="1" id="reason_{vb:raw postid}"/>
    </div>
</div>

<div class="blockfoot actionbuttons">
    <div class="group">
        <input type="hidden" name="do" value="addreputation" />
        <input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
        <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
        <input type="hidden" name="p" value="{vb:raw postid}" />
        <input type="hidden" name="url" value="{vb:raw url}" />
        <input type="submit" name="reputationsubmit" class="button" tabindex="1" value="{vb:rawphrase add_to_reputation}" accesskey="s" />
    </div>
</div>

Replace everything from reputationbit with (before vBulletin 4.2):
HTML Code:

<div class="blockbody formcontrols">
    <h3 class="blocksubhead">{vb:rawphrase add_to_reputation}: {vb:raw userinfo.username}</h3>
    <div class="blockrow">
        <label for="reputation">{vb:rawphrase xtdrep_giveto}</label>
        <label for="rb_reputation_pos_{vb:raw postid}" style="float:none;"><input type="radio" name="reputation" value="pos" id="rb_reputation_pos_{vb:raw postid}" checked="checked" tabindex="1" /> {vb:rawphrase xtdrep_posrep} {vb:rawphrase xtdrep_maxpoints, {vb:raw bbuserinfo.maxposrep}}</label>
        <vb:if condition="$show['negativerep']">
            <label for="rb_reputation_neg_{vb:raw postid}" style="float:none;"><input type="radio" name="reputation" value="neg" id="rb_reputation_neg_{vb:raw postid}" tabindex="1" /> {vb:rawphrase xtdrep_negrep} {vb:rawphrase xtdrep_maxpoints, {vb:raw bbuserinfo.maxnegrep}}</label>
            <vb:if condition="$bbuserinfo['reportonneg']">
                <p class="description" style="margin-left: 0px;">{vb:rawphrase xtdrep_negrepcomment}</p>
            </vb:if>
        </vb:if>
    </div>
   
    <div class="blockrow">
        <label for="rep2give">{vb:rawphrase xtdrep_points}</label>
        <input type="text" class="textbox" maxlength="5" name="rep2give" tabindex="2" id="rep2give_{vb:raw postid}" style="width:50px;" value="{vb:raw bbuserinfo.xtd_initrep}" />
    </div>

    <div class="blockrow">
        <label for="reason">{vb:rawphrase your_comments_on_this_post}:</label>
        <input type="text" class="primary textbox" maxlength="250" name="reason" tabindex="1" id="reason_{vb:raw postid}"/>
    </div>
</div>

<div class="blockfoot actionbuttons">
    <div class="group">
        <input type="hidden" name="do" value="addreputation" />
        <input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
        <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
        <input type="hidden" name="p" value="{vb:raw postid}" />
        <input type="hidden" name="url" value="{vb:raw url}" />
        <input type="submit" name="reputationsubmit" class="button" tabindex="1" value="{vb:rawphrase add_to_reputation}" accesskey="s" />
    </div>
</div>

Updates
  • v0.02 (23/09-2010): Added more settings. Releasing on vBulletin.org
  • v0.01 (22/09-2010): Released on my own forum.

Notes
This is the first "product modification" I release, so if there's some errors please let me know.
The idea of the user based input was from another mod by Drew. I think it was for vb3..
I've added a screenshot of what the reputation screen will look like and the vbulletin options...

Support
I'll do my best to provide support.. But I'd for sure be more willing to help you if you marked this mod as installed :)

CheeSie 09-23-2010 04:52 PM

Reserved :)

pointalk 10-09-2010 11:03 AM

give 1 reputation also receive 1 reputation point

and show reputation_sender + comments + date within the given_reputation_post.

can you add this feature?

pointalk 10-16-2010 04:00 AM

problem solved

S3Ponline 10-18-2010 05:44 AM

Hmmm..aren't I suppose to be able to see reputation comments in my usercp? I don't see anything at all for reputation but everything is turned on.

sticky 10-18-2010 06:38 AM

Any way to integrate this aspect with the helpful answers mod:

Quote:

Negative reputation cap
A cap on how much negative reputation that can be given by this usergroup.
I use reputation heavily on the forum as a moderating tool and it is primarily used through helpful answers. The problem is some users abuse negative reputations so a cap is the only thing I am missing as a check on neg rep power.

COL NIL SATIS 10-21-2010 06:44 PM

tagged

CheeSie 10-23-2010 10:32 AM

Quote:

Originally Posted by pointalk (Post 2110618)
this mod influence ./includes/cron/promotion.php(can not do Scheduled Task )

please update

Hmm you sure?
It doesn't on my forum.. It shouldn't use any of the hooks called from the promotion script..

Quote:

Originally Posted by sticky (Post 2111218)
Any way to integrate this aspect with the helpful answers mod:



I use reputation heavily on the forum as a moderating tool and it is primarily used through helpful answers. The problem is some users abuse negative reputations so a cap is the only thing I am missing as a check on neg rep power.

The cap can be specified in the usergroup permissions..

pointalk 10-28-2010 11:22 PM

Ok, receive a fixed amount of a percantage amount of the rep given youself.


Show reputation_amount + comments + reputation_sender + date within the given_reputation_post.

Before give reputation to a post
https://vborg.vbsupport.ru/external/2010/10/11.jpg

After give reputation to a post
https://vborg.vbsupport.ru/external/2010/10/12.jpg

FReeSTER 12-01-2010 05:45 PM

Bump but where is those options you show there because all I see are the ones per usergroup


All times are GMT. The time now is 01:54 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.01107 seconds
  • Memory Usage 1,798KB
  • 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
  • (2)bbcode_html_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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