vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   User Points System (https://vborg.vbsupport.ru/showthread.php?t=32060)

Radon3k 12-12-2001 06:44 PM

Quote:

Originally posted by Palmer ofShinra
For NO PERMISSION problems, try this...

In MODERATOR.PHP

Change

if ($permissions[ismoderator] or $ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid] AND canviewprofile=1"))

INTO

if ($permissions[ismoderator] or $ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid]"))

(In short, remove the "AND canviewprofile=1")

And calling the script directly as just mod/points.php

Won't work. It needs the ?action=points as well as the other info in the URL to function.


Where does the "?action=points" go? That's the thing I'm tripped up on. Thanks :)

Palmer ofShinra 12-13-2001 12:25 AM

Any link to give points should read...

your.domain.here.com/board/mod/points.php?action=points

Reeve of shinra 12-13-2001 01:13 AM

Avenger,

I am not sure how to go about the decimal points then. I am kind of curious about this myself so I may putz around with it over the next couple of days. I will post if I find anything.

About your other question, we are currently using two instances of the points hack successfully.

The easiest way I can think to do this would be to install the first hack and get that working successfully. Then rename points.php to something else, lets be original and say points1.php, and install it the same way you went about installing the hack the first time around.

Just remember that you will need a NEW custom profle field that you will need to reference. You will also need to change link in the postbit to point to the correct file.

BTW: Is this for a win / loss record ?

Reeve of shinra 12-13-2001 01:24 AM

Sleepbryd,

Unfortunately, this will not work with vb 2.0.1 - when you create the custom profile field you are not presented with the option of making it invisible / uneditable by the user. Hence they can change the value placed.

If your moderately good with php and sql, you can manually add the field and reference it directly in the script. Thats about as much support as I could give pertaining to this.

Reeve

Radon3k 12-13-2001 08:03 PM

Ok I'm sorry I'm such a pest, but I truly don't understand this...In the template_postbit thing that you edit, when you add that big link so when a mod clicks on "Points" under someone's name they can add the points. But, it doesn't work becuz it just opens a blank page. I have read all of the posts in here several times ans I still cannot figure it out. I want mods to be able to give out points, and I realize you have to make the link point to where you want it to, and I've tried, but it doesn't work. Again, sorry for being such a pest!!

Palmer ofShinra 12-13-2001 08:05 PM

Did you edit moderator.php properly?

Radon3k 12-13-2001 09:56 PM

Yep, I added the stuff in the instructions like you said.

dotagious 12-13-2001 10:47 PM

[QUOTE]Originally posted by Reeve of shinra
Avenger,

I am not sure how to go about the decimal points then. I am kind of curious about this myself so I may putz around with it over the next couple of days. I will post if I find anything.

About your other question, we are currently using two instances of the points hack successfully.

The easiest way I can think to do this would be to install the first hack and get that working successfully. Then rename points.php to something else, lets be original and say points1.php, and install it the same way you went about installing the hack the first time around.

Just remember that you will need a NEW custom profle field that you will need to reference. You will also need to change link in the postbit to point to the correct file.

BTW: Is this for a win / loss record ?

Radon3k 12-15-2001 02:49 AM

Ok I've followed the instructions to the tee..But I still cannot figure out how to do the linking thing to points.php so that mods can give out points. Please assist if you can, thanks!! :)

Radon3k 12-15-2001 04:05 PM

I reistalled the hack, and the link where it says "Points:" still doesn't work. Everything else works, just I can't get that link to work...I'm gonna go crazy figruin this thing out... :confused:

Reeve of shinra 12-15-2001 09:09 PM

Radon3k - Your problem might be because you have your VB setup in your main directory .... (not under FORUM like VB.org does).

In your postbit template, Try replacing:
<a href="../mod/points.php?s

with:
<a href="http://www.thessp.net/mod/points.php?s

Leaving the rest of the url intact.

Radon3k 12-15-2001 09:17 PM

Yeah, I've tried that...I'll try again though, don't see the harm...I see you've registerd on my board, so I suppose you can witness my testing this ;)

Radon3k 12-15-2001 09:20 PM

Well that's what I get now when I try it...bah...It's better than a blank page I suppose...what now? hah...Thx:)

Radon3k 12-15-2001 09:28 PM

Gettin there...this is the error I get now: Parse error: parse error in H:\webspace\websites\thessp.net\thessp.net\www\mod \moderate.php on line 28



Now what? Thanks :)

Reeve of shinra 12-15-2001 09:45 PM

In the postbit, Try changing:
http://www.thessp.net/mod/moderate.php?

to:
http://www.thessp.net/mod/points.php?s

Radon3k 12-15-2001 10:02 PM

< a href="http://www.thessp.net/moderate.php?s=$session[sessionhash]&action=points&userid=$userinfo[userid]" target=_blank >

That's what it currently says...What do I change?

Edit: Meant to also add that the link is correct, but for the purposes of this board and I'm not sure if it would take it or not, so to be on the safe side I put spaces right after the "<" and before the ">"

Reeve of shinra 12-15-2001 10:37 PM

change it to this:

< a href="http://www.thessp.net/mod/points.php?s=$session[sessionhash]&action=points&userid=$userinfo[userid]" target=_blank >

Radon3k 12-15-2001 10:43 PM

Works! Great!! Thanks very much sir!!!! I appreciate all the help!! :)

Palmer ofShinra 12-16-2001 08:19 AM

I see the roblem now...

The link is supposed ot point to MODERATOR

You pointed it at MODERATE

ATE - ATOR

Notice the difference?

Moderator.php adds an extra layer of security checking to the process and doesn't place any noticable strain on the server.

Radon3k 12-16-2001 04:18 PM

I don't have moderaTOR, I only have moderATE. And I'm running vBulletin 2.2.1. But it's working now so thanks a lot! :)

JohnBradshaw 12-27-2001 08:13 PM

Can I buy the store from you please? I think it would be perfect on my site

Sadie Frost 01-07-2002 02:54 AM

Some people were talking about installing this hack twice - and I thought it was once to add points and once to take them away.

I am probably wrong about that, but in case I'm not (fat chance) to do that you only need to install the hack once, and then to take away points you just type in a negative number :)

Work great though! I am using "mithril" for my lord of the rings boards lol :)

Reeve of shinra 01-07-2002 06:42 AM

Lord of the Rings board ... oooo - I will have to drop by sometime.

Yeah, to take away 'points' just use a neg #.

JohnBradshaw 01-07-2002 08:00 AM

Can I buy the store from you please? I think it would be perfect on my site

Palmer ofShinra 01-08-2002 11:05 AM

No

Dalius 01-12-2002 05:30 PM

Quote:

Originally posted by Palmer ofShinra
No
LOL that just made me laugh :D

I'm writting my own version of the store hack, its not that hard

Shenlong 01-12-2002 05:41 PM

great hack!

Dalius 01-12-2002 06:23 PM

Problem:

When entering text into box, it says it got submited, but it doesnt change

i did reeve's 0 defult thing, could that have messed it since i made it int?

black 01-12-2002 11:26 PM

Quote:

Originally posted by Dalius

LOL that just made me laugh :D

I'm writting my own version of the store hack, its not that hard

Cool i was going to write my own version also... are you releasing it public

Psychdrone 01-12-2002 11:44 PM

if one of you could release it that would be nice:)

Dalius 01-13-2002 12:42 AM

Nope, i cant

i have to hardcode it into my site personally, releasing it will be too hard because everyone will have probs with it

Sadie Frost 01-13-2002 03:40 AM

Quote:

Originally posted by Dalius
Problem:

When entering text into box, it says it got submited, but it doesnt change

i did reeve's 0 defult thing, could that have messed it since i made it int?

I did the default thing and mine works fine :)

I can't put text in the point field on the profile though - if I change it back to how it was originally, will it work?

And if I can get a store type thing working on my boards, I'll post it here. :)

Reeve of shinra 01-18-2002 01:17 AM

Quote:

Originally posted by Dalius
Problem:

When entering text into box, it says it got submited, but it doesnt change

i did reeve's 0 defult thing, could that have messed it since i made it int?

Yes, if you change the field to an integer format then it cannot accept the text values your placing into it.

sahammondsr 01-20-2002 07:26 AM

First, great hack, and thanks for sharing.

We have a reward site where points are an actual currency that can be converted to tangible goods so a hack like this made perfect sense for us.

We ended up dumping it and writing our own. The reason I'm contacting you is to offer to share the code we've written. Our hack is very specific to our system and wouldn't work to just give it to users (it would take some cleaning up and generalizing and removing our point inserts (into other database tables) etc, but we've added a couple of core features that I think would enhance your hack immeasurably.

First, we've put a short segment of php into the include template and then added a few lines to the postbit template and now we have the ability to assign points inline to the posts (save a click). This of course is a time saver and its fairly simple for any user to do. I'm uploading a screenshot with this post so you can understand what I am referring to. This also eliminates the edit to moderator.php and just sends the request straight to points.php which validates the request itself. The add points box you see in the screenshot below only appears to moderators (end users do not see this box).

Second, we've created a user on our system called PointFairy and when we add points we have the points.php automatically insert a post into the thread saying that points were added as well as update the pointfairy user's sig to show total points issued to date by the point fairy. You can see an example of this in action at http://forums.primarewards.com/forum....php?forumid=7. Most of the threads there have an automated "pointfairy" message appended to them. You'll notice it updates post/thread counts and the links as well (we didn't make it e-mail because our system triggers an e-mail when points are added anyway, but that wouldn't be a big change either).

Once we remove our own database inserts (just dealing with vBulletin field5 and inserting the post, etc.), we've got points.php down to around 40 lines of PHP (this doesn't account for the mass processing that's in the original).

Anyway, the point in contacting you is to offer to send our code to you if you want to generalize it, document it, and either merge it with yours or perhaps even use it instead of yours for your next release. If you're interested, contact me at ceo@primainternet.com. I clean it up and make it a hack and post it here myself, but I just don't have the time to come back and support it, so you're welcome to it if you'd like it.

Thanks for the inspiration.

Reeve of shinra 01-20-2002 04:41 PM

We haven't released it here yet, but after a million and a half minor revisions we settled on a similiar inline text field that can award the needed points to the specific user. Our only addition to that is a pop up alert that tells you it was successful.

The Point Fairy is a very HOT idea. If your willing to share, then I would deffinitely love to intergrate that into what we're currently using and re-release it here.

sahammondsr 01-20-2002 05:05 PM

Thanks for dropping me a line. I sent the code to you, hope it helps :)

Palmer ofShinra 01-20-2002 06:14 PM

Quote:

Originally posted by Dalius
Nope, i cant

i have to hardcode it into my site personally, releasing it will be too hard because everyone will have probs with it

And that's exactly why I'm not releasing mine either...

But really... once you realize what you need to do, it becomes mind-numbingly simple.

Part of the problem with mine is that it's dependent on a whole whack of mini-hacks already added to our forum... and not documented...

Plus the code is a real mess.

Though I would be interested in seeing what others come up with for this...

Dalius 01-20-2002 10:43 PM

Im actually having probs making it

I can do the layout and stuff, but i dont know how to get it to actually how to take the points to make something

Shenlong 01-21-2002 12:22 AM

anyway I can make it so I give ITEMS instead of points, for example:

There are 3 fields

Misc. Items
Armor
Weapon

Misc. Item example=potion
armor example=steel plate
weapon=long sword

so u can go and edit the users ITEMs instead of points? can someone PLZ make this it would help me and a lot of other members a lot im sure

Psychdrone 01-21-2002 01:26 AM

ya that would be cool as #&@$


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