vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=34)
-   -   User Points System (https://vborg.vbsupport.ru/showthread.php?t=64316)

Reeve of shinra 04-23-2004 10:00 PM

User Points System
 
What does this script do?

This script is a very simple and easy to use system for giving or deducting arbitrary points from a given user. Its the vb3 edition of the popular vb2 hack found here

It also easy to set this up to give users points through PM's, Journals (if you have one), or just about anything that can pull in custom profile fields.

Why is this in beta?

I really dont think anyone will have an issue with this hack as we've been using this for months already but we had to variabilize a few things so the possibility exists.

There is also one extra query per page for an uncached template. I just dont understand how thats done in vb3 and havent had time to really look into it. :(


What are the differences between this and the vb2 version?

The vb3 version doesnt have the mass user gil update feature but it has an easier interface to give or take points from the postbit.

Since points can be given very quickly from the postbit, our mods stopped using the mass updater and there just wasnt a need on our part to port it over.

Whats the difference between this and upoints hack?

User preferance mostly... I think this points hack offers a simpler way of manually giving or taking points which some people prefer. Others simply need a points hack without the complexity of having a store.

One thing I will note in advance is that this points hack does not give points automatically for people creating or replying to threads. Its just not something our site needed. However it can work with those options in the ustore.

Can this work with the ustore?

Thankfully Link coded the store to be able to take advantage of the different user points systems that would be released.

If you have this ustore / upoints hack installed, go to the UTT points settings and under the ucash settings use the following:

Points Table: userfield
Points Field: field x
(where x is the custom field you will be creating).

You will need to alter some of the template changes but from what I've seen, you should be able to get the added benifit of getting points for new threads, replies, etc.


Will this work with vbPetz?

I havent installed vbpetz yet so I have no clue how well this would intergrate with thier system.

And thats about all I can think of right now. Screen shots below:

The first shows the box you enter the points in, hit enter or click the coin to submit and you get a pop up box confirmation. If you reload the page, you'll see the second post which shows the users points (gil) updated and the points (gil) paid on that specific post. The logic is that reloading a page sux and its easier to click the okay button on a javascript box. Its not bad at all. ^^

ChrisBaktis 04-24-2004 09:39 AM

Im not sure what chmod to '777' means.

MindTrix 04-24-2004 11:38 AM

IT means right click on the folder or file in your FTP program, and choose CHMOD, then change it to 777

Vivi Ornitier 04-24-2004 05:50 PM

so for this hack, do you get points from postin or do mods j ust give points.

The Quibbler 04-24-2004 07:02 PM

Is it possible to see how many total points the members in a usergroup have?

Reeve of shinra 04-24-2004 11:18 PM

At the moment, no - though it should be a simple query to find out.

The Quibbler 04-24-2004 11:40 PM

Hmm… might me a nice feature to add to future versions. I’m pretty inexperienced with query stuff, any chance of more detailed instructions?

Anyway, nice hack.

/me clicks install

ChrisBaktis 04-25-2004 07:41 PM

I have uploaded the gillog.txt file and right clicked on it and have no idea how im supposed to change something to 777. Is the 777 in the file or what. Im not expierenced at this and really have no clue.

ChrisBaktis 04-25-2004 08:19 PM

Any chance in hiring you to install this?

Reeve of shinra 04-26-2004 12:33 AM

What FTP program are you using? If your using WS-FTP or CuteFTP, you can right click in the file and under properties check off the boxes for read / write / execute under Owner, Group, World. If you still have a problem, let me know and I will help you through it.

(my aim is thetomblack... I'll be on for antoher hour or two)

NexVision 04-26-2004 06:54 PM

installs anyway to change wut it says from gil's to something else like points or anything

ChrisBaktis 04-27-2004 12:43 AM

I just wanted to say thanks to Reeve of shinra for all the help. Reeve really helped out this newbie and I now have a working points system! Thanks again!

:) ChrisBaktis clicks install

Reeve of shinra 04-27-2004 01:26 AM

NexVision: when you create the new custom field, name it whatever you want.
When you do your template edits, simply put Points: $post[fieldx] where x is the new field # and points is the name you want.

The only thing at this point thats harded coded is the pop up box confirming the points you gave and the little box that shows how many points were paid on that post -- both of which are only viewable to admins or mods and can be changed in the template you need to add.

NexVision 04-27-2004 02:30 AM

Quote:

Originally Posted by Reeve of shinra
NexVision: when you create the new custom field, name it whatever you want.
When you do your template edits, simply put Points: $post[fieldx] where x is the new field # and points is the name you want.

The only thing at this point thats harded coded is the pop up box confirming the points you gave and the little box that shows how many points were paid on that post -- both of which are only viewable to admins or mods and can be changed in the template you need to add.

sweet im gonna poke around tom thanx for the quick response

Reeve of shinra 04-27-2004 02:39 AM

If you really wanna be trick, you can add this on to Erwins warning and ban system.

https://vborg.vbsupport.ru/showthrea...875#post505875

You'll need to reverse Erwins code so that a user is banned on negative points rather than positive though ;)

Skyline_GT 04-27-2004 07:59 AM

Good Stuff..
But I really want this to make it like a user must pay a certain number of points before they can download attachments?
Like buy the attachment using points.

Reeve of shinra 04-28-2004 12:32 AM

Skyline: You want to post this as a request for a ushop intergration... otherwise you'll have to take a look at the existing attachment hacks to see if you can add a code in to deduct points upon download (should be simple enough I image)

Skyline_GT 04-30-2004 01:55 AM

I suck at coding:(

daFish 04-30-2004 09:00 AM

Do you plan to store the points each user has in the database as a new field in the table user?
Would be a good alternative to the textfile. ;)

Reeve of shinra 04-30-2004 06:52 PM

No, the text file is just a record of what admin / mod gave points to a user.

The users points are stored in a custom profile field - which offers a lot of diversity and efficiency as to where its displayed.

ChrisBaktis 05-03-2004 02:57 AM

Couple things I noticed that maybe you can help on:

1) The first time I go to give points it asks me to login (even if I am logged in already) - when I do it takes me to the gilupdate.php page which is blank - I then have to go back and back to the first page and re-add the points

2)When I add points I get the Gil Paid box but nothing shows until I refresh the page - is there a way for me to make it so the page refreshes when I hit 'Ok' on the Gils Paid box?

3) If I add poings in the PM section they do not save to the database - only when I do it from a post - can this be fixed?

4) Last how can I change the gil paid box to say 'Rusty Soaps Paid' instead of 'Gils Paid'?

Thanks for the support

Reeve of shinra 05-04-2004 12:27 AM

1. I havent experienced that so I am not sure what it would be. Techincally speaking, I dont think the script alone would cause that but I will think on it.

2. Loading, or reloading, a page takes more server resources. The small pop up box was more effecient.

It may not techinically matter, but we were trying to keep this simple and efficent -- technically, you would know if you gave points to someone in that thread and if you opened the thread later on, you would see that you - or someone else - awarded points to that person for that post.

(I hope that makes sense, I am a bit tired). I guess if you REALLY wanted it, I could dig up the old code that refreshed the page upon giving points.

3. I should have an update for that soon. Not sure how soon yet but its something planned as we would like to use that feature as well.

4.

A) On step 4, find this and replace the words gil paid with your choice.

PHP Code:

onClick="javascript:alert('Gil Paid!'); 

B) Then right below that in step 4 is this:

Gil paid: $post[gilpaid]

Again, change Gil Paid: to whatever you want (leave $post[gilpaid] alone)

ChrisBaktis 05-06-2004 04:22 PM

Thank you....On step 3 I thought it was supposed to work - im glad that it is not something I did wrong...thanks for the help

zetetic 05-18-2004 03:17 PM

This hack looks interesting... quick question:

Is the gil paid on individual posts stored somewhere, so the amount of gil given a user for a particular post would be reflected on the post itself?

I'm thinking that if so, I could use it to filter posts based on their gil value.

Thanks!

Reeve of shinra 05-18-2004 04:07 PM

Yes, the points given for a particular post are stored in a new field in the post table.

If I gave you five points for your post, any mod or admin viewing the thread would see that five points were given. This is not your total points however, the total points you have are stored in a vb custom field.

Out of curosity, what kind of post filtering were you lookinig to do?

zetetic 05-18-2004 11:44 PM

I'll PM my response so as not to derail your thread any more.

Arsenic33 06-12-2004 01:24 AM

I'm looking for a point system that has a little more to it, as oppossed to just a few points awarded by mods, I'm looking for a full on point system with point store. Fully editable etc...

Reeve of shinra 06-12-2004 02:38 PM

Check out the upoints / ustore hack. Its more robust in that it can award points based on posts, replies, etc, ... its just something I have need of.

Arsenic33 06-12-2004 03:13 PM

thanks I'll look for/into it.

Reeve of shinra 07-08-2004 12:30 AM

Quote:

1) The first time I go to give points it asks me to login (even if I am logged in already) - when I do it takes me to the gilupdate.php page which is blank - I then have to go back and back to the first page and re-add the points
I finally ran into that error... and it kind of baffles me. I have it working as is on 3.0.1 and yet on 3.0.3 i was getting just what you described. I moved the gilupdate.php file to the /forums/ directory and simply changed the path to call it in the 'postbit_gilbox' template.

kall 07-08-2004 01:13 AM

*confused*

Is this a Points System, or some form of addon for an existing Points System?

Reeve of shinra 07-08-2004 02:36 AM

Kall. Its its own points system but you can use it as an add on for the ustore / upoint system and probably a few other hacks. We give out the points manually so this just made it simpler... its something we were using that we figured a few people might need or want.

ChrisBaktis 07-08-2004 08:02 PM

Question for you.

I want to add 2 different kind of points to a members account - one for buying things in our shop and one for contest points. Is it possible install this twice so I can add 2 differnent points to members accounts?

Reeve of shinra 07-09-2004 03:22 AM

Yeah. The simple way would be to install the hack a second time but change a the file name and template thats called.

Here's the start but I need to look over the php file itself to see what variables need to be changed.

* In step 2 change the name of gillog.txt to gillog2.txt

* In step 3 rename gilupdate.php to gilupdate2.php

* In step 5 add this instead:

PHP Code:

// ##### UserPoints Mod Options #####
    
if ($bbuserinfo[usergroupid]==OR $bbuserinfo[usergroupid]==OR $bbuserinfo[usergroupid]==7)
    {      
      eval(
'$gilBox2 .= "' fetch_template('postbit_gilbox2') . '";');
    }
    else
    {
      
$gilBox2 "";
    } 
// #### End of UserPoints Mod Hack #### 

* step 7 name the new template postbit_gilbox2 and insert this:

PHP Code:

<br />
<
form action="modcp/gilupdate2.php" method="post">
<
input type="hidden" name="action" value="private204">
<
input type="hidden" name="postid" value="$post[postid]">
<
input type="hidden" name="userid" value="$post[userid]">
<
input type="text" name="amount" size="3">&nbsp;
<
input type="image" src="images/coin.gif" border="0" name="submit" alt="Give Points" onClick="javascript:alert('Points Paid!');">
</
form>

<
br />
<
br />
Points Given$post[gilpaid2

step 9: use $gilBox2 instead of $gilBox

step 10:
ALTER TABLE `post` ADD `gilpaid2` TINYINT DEFAULT '0' NOT NULL ;

ChrisBaktis 07-10-2004 12:08 PM

Thank you - works great!

EnriqueHavoc 08-26-2004 01:44 AM

wait.. so is this working on 3.03?

Reeve of shinra 08-26-2004 02:08 AM

works fine on vb3.0.3.

EnriqueHavoc 09-01-2004 04:13 AM

awesome hack, thanks reeve :)

Crookedfoot 09-12-2004 06:11 PM

A modification question.

Is there a way to place the update fields for this on another page such as the Profile page, or a custom drop box in each post?

Here is why I ask.
For our forum we used to have the similar hack by Palmer ofShinra when we ran vb2.3.5, we loved it.
We had adapted it to six different fields for keeping track of tournaments and special titles.
To make it accessable to Staff Members and Admins I didn't install the controls to the postbit, and gave the appropriate URLs to those that needed it so people wouldn't make unauthorized changes.

I like how this version logs and can be set to specific groups, but with six fields, that's six white boxes with coins in every post.

No offence, but that is ugly if your an admin and you see that many boxes.

So far I haven't had much luck getting a working control into the Profile page, and my associate is still trying to get a drop box to work as well.

The only other option that comes to mind is to place this on one skin not used by those that need the controls and then they switch to it when needed.

Reeve of shinra 09-13-2004 12:29 AM

There is an addon for the upoints hack that lets you do mass updates for users in the same format as the old vb2 points hack which may suit you better. I will check on adding this to the profile page though.


All times are GMT. The time now is 04:47 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.01338 seconds
  • Memory Usage 1,840KB
  • 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_php_printable
  • (2)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