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)

Reeve of shinra 11-28-2001 11:44 PM

Crinos - do what we do and put something funny in its place.
For example one of our staff has his say - 1,000,000 pesos.

Of course they can always change that but as staff - you should trust them. =)

squawell - that has to do with the hack ... you probably dont have the semi colon at the end of line 19.

Crinos 11-29-2001 12:59 AM

Hmm, well, is there any way to "hide" user points for a specific usergroup? Both in the postbit and getinfo? Thanks :)

Reeve of shinra 11-29-2001 01:36 AM

I think thats possible but I dont know if I have time to check it out ... maybe next week sometime.

Crinos 11-30-2001 05:09 AM

Kewl! I'll be waiting eagerly then ... Thanks!

Palmer ofShinra 12-01-2001 06:53 AM

Umm... don't expect me to actually conde anything at the moment...

But the way I'm seeing...

Make a new template... call it postbit_points

It consists of one line...

The line you use to display (and link) points normally in postbit.

Replace the part in postbit with $points

In the showthread part of functions.php

Stick this in...

eval("\$points = \"".gettemplate("postbit_points")."\";");

Stick that Eval inside an IF clause that checks $post[usergroupid]

That way people who belong to certain groups won't display Points at all.

Or if you want to hide EVERYONES points from certain usergroups, use $bbuserinfo[usergroupid] instead.

As for getinfo... I really don't know atm...

Tryfwar 12-01-2001 05:30 PM

Please could you explain how to set it up so that only 1 or 2 users could edit the points but everyone else could view them?

Thanks alot in advance,

Tryfwar

Palmer ofShinra 12-01-2001 06:03 PM

Read the thread. It tells you where to change the permissions.

Tryfwar 12-01-2001 07:30 PM

I created a new template called: postbit_points

added the following line:
<a href="moderator.php?s=$session[sessionhash]&action=points&userid=$userinfo[userid]" target=_blank>ELP:</a> $post[field5]

removed that line from postbits and replaced it with $points

edited functions.php and added this to the Start buildpostbit section: (wasn't too sure where exactly to do this as i couldn't find a IF $post[usergroupid])
eval("\$points = \"".gettemplate("postbit_points")."\";");

I then uploaded the new functions.php.

anyway, i can't seem to work out exactly where i should place this line :(

Any hints? :) Thanks

Psychdrone 12-02-2001 01:32 AM

HOw do i make it so that admins/mods, may add text, not just #s in the field?

THanks

And thanks again for the wonderful hack!!

squawell 12-02-2001 02:27 AM

i have a problem with this code:

IF YOU ARE USING VB 2.2.0

Find:
=====================
makenavoption("Build Mailing List","email.php?action=genlist");
=====================

Replace with:
=====================
makenavoption("Build Mailing List","email.php?action=genlist","<br>");
makenavoption("Points","../mod/points.php?s=<?php echo $session[sessionhash]; ?>&action=masspoints");
=====================

but in my admin panel it can't work why??

Radon3k 12-02-2001 04:30 PM

Hey man, great hack! Thanks a lot! :) Just one question for ya...How can I make it to where Moderators can give out Points (in my case, Awards)? You have to edit the user profile to give it to them, and I've looked everywhere and so far only Administrator's can give them out. How can I make it to where Moderators can give out awards? Thanks again for the great hack! :)

Radon3k 12-02-2001 05:26 PM

Also, how do I make it to where they can see the "Awards" or "Points" when they post? Everytime I've installed it on my test board, it only shows up in their profile, yet you can still see "Points" or "Awards" underneath" the # of posts they have..Help! heh..thanks! :)

Radon3k 12-02-2001 07:04 PM

Scratch this. I figured it out. Apparently everytime you add a custom user field, then delete it, it adds another # anyway. So mine wouldn't show b/c instead of "5" it was going up. Ended up at "8" heh...Thanks for the great hack! :)



Edit: Still would like to know about letting Mods give out awards. Thanks again! :)

Palmer ofShinra 12-03-2001 12:00 AM

Quote:

Originally posted by Tryfwar
I created a new template called: postbit_points
eval("\$points = \"".gettemplate("postbit_points")."\";");

I then uploaded the new functions.php.

anyway, i can't seem to work out exactly where i should place this line :(

Any hints? :) Thanks

Anywhere inside

function getpostbit($post)

should do.

Try right after

eval("\$post[buddy] = \"".gettemplate("postbit_buddy")."\";");
===================
Psychdrone: I just added that, actually...

I'm updating the zip file after this post with the change.

Basically... where you type in the number of points to give...
If you put in a number, it adds or subtracts points.

If you type in text instead, it changes it to the text.
===================
Radon3k: Umm... Mods should be able to give out points by default.

I don't know what the problem would be.

Shadowz 12-03-2001 02:06 AM

I click the points link for any user, and just a blank white screen pop ups...

Any suggestions?

http://rapbattle.com/vb Check any thread, for yourself. :(
Thanks in advance

Crinos 12-03-2001 02:12 AM

Quote:

Originally posted by Palmer ofShinra
Basically... where you type in the number of points to give...
If you put in a number, it adds or subtracts points.

If you type in text instead, it changes it to the text.

Oooo, awesome! Fixed my earlier problem with this one ... now admins, mods and staffers get an "n/a" instead of points!

Thanks a bunch Palmer! :D

Tryfwar 12-03-2001 09:43 AM

Works great now thanks Palmer :)

Tryfwar 12-03-2001 07:21 PM

Would it work if i created a group called Points and then give it the appropriate usergroup number in points.php ?

Trying to make it so that only 1 user and admin/sup admin can edit the points.

if (!$bbuserinfo[usergroupid]==6)

Ok, this is Administrator group, what if i made another group with only 1 user in it and that group became id 15 say. How could i make the if statement include group 6 and 15 ?

Wouldn't it be better to use user id's instead in this case, as apposed to group id's...*sigh* sorry for the spam =/

Palmer ofShinra 12-04-2001 09:54 AM

Easy... first find the userid's of whoever you want to have permission.

Say it was here and I wanted you to have permission... your userid is 2722.

Change all the
PHP Code:

if ($bbuserinfo[usergroupid]==6

type statements to
PHP Code:

if ($bbuserinfo[userid]==2722

.

Add ORs for whoever else you want to allow.

You should change moderator.php as well
PHP Code:

if ($action=="points") {

  
$userid verifyid("user",$userid);

  
$permissions=getpermissions();
  if (
$permissions[ismoderator] or $ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid]")) {
    
header("Location: mod/points.php?s=$session[sessionhash]&action=points&userid=$userid");
  } else {
    
show_nopermission();
  }
  exit;


should be replaced by
PHP Code:

if ($action=="points") {

    if (
$bbuserinfo[userid]==2722 {
    
header("Location: mod/points.php?s=$session[sessionhash]&action=points&userid=$userid");
  } else {
    
show_nopermission();
  }
  exit;


Replace the similar statement in points.php the same way.

squawell 12-04-2001 10:05 AM

hi~~Palmer ofShinra i have a little question

if i want admin supermod and mod can use this ~~

how should i do ??

and in admin panel when i click points but nothing happen~~

why??

Palmer ofShinra 12-04-2001 11:27 AM

If you do it just the way you're told, admins, mods and supermods should eb able to give points.

I know because that's how I set ti up, and it's been tested like that.

Link in the admin panel? Blank page?

Buddy... READ THE INSTRUCTIONS.

Did you uncomment the large chunk of code in points.php?

because that section is OPTIONAL, and there's no reason to add anything to the CP unless you use it.

But if you didn't uncomment the code, of course you'd get a blank page.

*sigh*

Shadowz 12-04-2001 01:51 PM

[Edited By: Sinecure]

Removed because of persistant profanity.

Reeve of shinra 12-04-2001 01:53 PM

Shadowz - your using two instances of the point hack right?
One for wins and another for losses? If so you have to play around with the hack or use two instances to get it running.

My educated guess is that the second instance your trying to use is causing the problems your experiencing. Try getting just the first to work then try the second.

Freddie Bingham 12-04-2001 04:28 PM

shadowz are you trying to get banned?

Shadowz 12-04-2001 07:23 PM

I dont care either way. Banned or not. Cuz this enviornment doesnt make me too comfortable. When I have too be uncertaint too ask a question or not, because there might be a negative backlash from someone more "computer gifted".

Not too mention im not gonna tolerate someones bullsh*t just because they made a hack.
What making a hack and knowing php, makes me inferior?
pshhhhh

All I wanted was an answer like Reeve's...
So simple and too the point. And even though my question might have seem stupid too him, he didnt show any arrogance, like "hes too good of a programmer too answer simple questions". So with that said, Thank you Reeve, its appreciated. And I stand strong in what I said too Palmer. F*CK YOU

Crinos 12-04-2001 08:59 PM

You take things too personally - and using profanity to debate your premise only makes you lower ...

Good luck getting help ;)

Radon3k 12-04-2001 10:21 PM

Great, thanks! :) But what script was it that I need to change? Also, what if I wanted to add more than one member to allow them to give out awards? Thanks again! :)

Reeve of shinra 12-05-2001 01:33 AM

heh I wish I saw the first post before it was censored but anyway ... its all good now I hope.

Radon3k - everything you need should be in this thread. If you have probs, let us know.

Radon3k 12-08-2001 05:15 PM

Ok I must be really blind. Please tell me how mods can add points or awards to other people. Becuz I just can't figure this out. I must be really blind. Thanks :)



Edit: Nevermind. I'm the biggest idiot in the world. I had no idea there was a Mod CP. But they don't have permission to change the profile, how do I enable this? I can't find it anywhere. Thanks, and sorry for all this trouble...

Palmer ofShinra 12-09-2001 09:32 AM

If you did the template edit exactly as described in the instructions, then there should be a

Points: 23

Display under each person's postcount, "From" etc next to posts.

The word Points is a link.

Click the Points link under the person in question's name.

That should pop up a window with a form to give the points.

Dalius 12-09-2001 02:39 PM

Has the file in the first post been updated, or do i have to install the hack and then add all the other stuff in this thread?

Radon3k 12-09-2001 08:26 PM

Ohh..I get it now, thanks :) I took out the link becuz it only made a blank page, but then that's where your post comes in about making the link work. I get ya, and only mods can do this, right? Thanks again! :)

dotagious 12-09-2001 08:43 PM

Can you add and subtract using decimal places?

Palmer ofShinra 12-10-2001 12:46 AM

It should work, but I haven't tried it...

Test for yourself if you want.

JohnBradshaw 12-10-2001 08:53 PM

Hi

I can't seem to download the file, and I am a registered member (no pirates over here!)

Can anyone help?

Cheers,

Crinos 12-11-2001 02:42 AM

You followed the instructions in this link yet?

https://vborg.vbsupport.ru/showthrea...threadid=31848

dotagious 12-11-2001 04:10 AM

[QUOTE]Originally posted by Palmer ofShinra
It should work, but I haven't tried it...

Test for yourself if you want.

Reeve of shinra 12-11-2001 05:28 PM

Avenger, earlier in this post I explained how to change the field type. By default it is text but changing it to an integer in phpmyadmin might help with your problem. As for the $ sign,... maybe you can put it in the begging then whatever #. like: $ post[field5] ....

dotagious 12-12-2001 02:51 AM

[QUOTE]Originally posted by Reeve of shinra
Avenger, earlier in this post I explained how to change the field type. By default it is text but changing it to an integer in phpmyadmin might help with your problem. As for the $ sign,... maybe you can put it in the begging then whatever #. like: $ post[field5] ....

sleepbirdcyp 12-12-2001 10:19 AM

IS this hack working on VBB 2.0.1 ????????

Thanks!!


All times are GMT. The time now is 02:26 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.01483 seconds
  • Memory Usage 1,830KB
  • 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
  • (4)bbcode_php_printable
  • (2)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
  • (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