Go Back   vb.org Archive > Search Forums
FAQ Community Calendar Today's Posts Search

Showing results 1 to 25 of 30
Search took 0.00 seconds.
Search: Posts Made By: Chris.08i
Forum: vB4 Programming Discussions 12-23-2015, 09:39 PM
Replies: 42
Views: 3,878
Posted By Chris.08i
I have tried this code global $vbulletin,...

I have tried this code

global $vbulletin, $db, $userinfo;

if ($vbulletin->GPC['points'] > 0) {
$points = $userinfo['ipoints'];
$rep = $userinfo['reputation'];

if ($points...
Forum: vB4 Programming Discussions 12-23-2015, 01:48 PM
Replies: 42
Views: 3,878
Posted By Chris.08i
Thanks. Perhaps the code to check for the...

Thanks.

Perhaps the code to check for the infraction points being handed out is wrong, or the hook is wrong? I am not sure how to check either of these though.
Forum: vB4 Programming Discussions 12-23-2015, 03:02 AM
Replies: 42
Views: 3,878
Posted By Chris.08i
Tried that before if I remember correctly. I...

Tried that before if I remember correctly. I tried again nevertheless.

Warning does nothing, and infraction does nothing.
Forum: vB4 Programming Discussions 12-23-2015, 02:54 AM
Replies: 42
Views: 3,878
Posted By Chris.08i
So I tried again with == 0 and != 0. When I...

So I tried again with == 0 and != 0.

When I tried == 0 - points get deducted when I issue warnings and they don't get deducted when giving an infraction.

When I tried != 0, points are not...
Forum: vB4 Programming Discussions 12-23-2015, 02:42 AM
Replies: 42
Views: 3,878
Posted By Chris.08i
That is correct. The hook I am using is...

That is correct.

The hook I am using is 'infraction_update_complete'
Forum: vB4 Programming Discussions 12-23-2015, 02:34 AM
Replies: 42
Views: 3,878
Posted By Chris.08i
I am not sure - from what Mark posted earlier, I...

I am not sure - from what Mark posted earlier, I assumed that $vbulletin->GPC['points'] was the code to determine the number of points being issued in the infraction.

So from my understanding:
...
Forum: vB4 Programming Discussions 12-23-2015, 02:24 AM
Replies: 42
Views: 3,878
Posted By Chris.08i
Thanks for the reply. I already have that...

Thanks for the reply.

I already have that exact code on my forums - yet it still does not work. It also doesn't make sense to me.

When I read your code, it basically only runs the deduction...
Forum: vB4 Programming Discussions 12-23-2015, 12:56 AM
Replies: 42
Views: 3,878
Posted By Chris.08i
I tried that - it doesn't work. I don't get...

I tried that - it doesn't work.

I don't get the server 500 error anymore, but it no longer deducts points if the infraction points being handed out is > 0
Forum: vB4 Programming Discussions 12-22-2015, 11:23 PM
Replies: 42
Views: 3,878
Posted By Chris.08i
I am trying to prevent the bottom code from...

I am trying to prevent the bottom code from running if the infraction points being handed out = 0.
Forum: vB4 Programming Discussions 12-22-2015, 08:40 PM
Replies: 42
Views: 3,878
Posted By Chris.08i
Hi Mark global $vbulletin, $db, $userinfo; ...

Hi Mark

global $vbulletin, $db, $userinfo;

if ($vbulletin->GPC['points'] == 0) {
continue;
}

$points = $userinfo['ipoints'];
$rep = $userinfo['reputation'];
Forum: vB4 Programming Discussions 12-19-2015, 10:59 PM
Replies: 42
Views: 3,878
Posted By Chris.08i
No, the current script works fine. I want it to...

No, the current script works fine. I want it to deduct based on the current active points, so using ipoints is correct.

However, I don't want to issue and deduction when the user is only issued a...
Forum: vB4 Programming Discussions 12-19-2015, 10:33 AM
Replies: 42
Views: 3,878
Posted By Chris.08i
I had an adaptation of mine that I have been...

I had an adaptation of mine that I have been using for the past couple days that have been working for me.

I have changed over to your code as it's much neater! Thank you again Mark for your time...
Forum: vB4 Programming Discussions 12-16-2015, 08:38 AM
Replies: 42
Views: 3,878
Posted By Chris.08i
Well that sums it up nicely! I was going to...

Well that sums it up nicely!

I was going to use if statements to create the effect I needed, turns out I don't need to!

Thanks so much for your help Mark, definitely learned a lot these couple...
Forum: vB4 Programming Discussions 12-16-2015, 05:13 AM
Replies: 42
Views: 3,878
Posted By Chris.08i
What if ipoints = 0? I still want to deduct...

What if ipoints = 0?

I still want to deduct 150 from their reputation.
Forum: vB4 Programming Discussions 12-15-2015, 10:58 PM
Replies: 42
Views: 3,878
Posted By Chris.08i
I want to deduct reputation points from the user...

I want to deduct reputation points from the user that is receiving the infraction.

The base amount is 150 points, but each active infraction point (ipoints in users table as far as I know) will...
Forum: vB4 Programming Discussions 12-15-2015, 08:36 PM
Replies: 42
Views: 3,878
Posted By Chris.08i
Infraction Hook

Hello,

It's me again - I was wondering if anyone could tell me which hook to latch my plugin onto if I wanted to modify a column within the users table.

I have tried the hooks...
Forum: vB4 Programming Discussions 12-15-2015, 05:55 AM
Replies: 6
Views: 478
Posted By Chris.08i
Yours looks a lot simpler than mine, and it makes...

Yours looks a lot simpler than mine, and it makes sense because I can follow it through haha.

Is it possible to write the count rather than the 1 and 0?
Forum: vB4 Programming Discussions 12-15-2015, 05:32 AM
Replies: 6
Views: 478
Posted By Chris.08i
I did some Google, and I read your previous post....

I did some Google, and I read your previous post.

I came up with this, but I don't know if it is correct for starters, nor how to use the comma-delimited output with the second query.

I also...
Forum: vB4 Programming Discussions 12-15-2015, 05:07 AM
Replies: 6
Views: 478
Posted By Chris.08i
Thank you so much for your quick reply. I...

Thank you so much for your quick reply.

I was hoping to implement this as a cron job, which I can then use whatever the cron job returns in my plugin.

As far as I know, you can't use userid's...
Forum: vB4 Programming Discussions 12-15-2015, 04:02 AM
Replies: 6
Views: 478
Posted By Chris.08i
Accessing the Infraction Table

Hello again,

I'm doing more work on my forums and I'm looking to do something related to the infraction table.

I have already created a new column in my user table, and I plan to have the value...
Forum: vB4 Programming Discussions 12-15-2015, 03:59 AM
Replies: 3
Views: 428
Posted By Chris.08i
Thanks again Mark. I actually have another...

Thanks again Mark. I actually have another question, but I will create another thread.

For this though - I actually wanted to calculate it on a weekly basis.

I made a new column in my user...
Forum: vB4 Programming Discussions 12-14-2015, 05:05 AM
Replies: 3
Views: 428
Posted By Chris.08i
Posts Per Week Statistic

Hello,

It's me again - so I'm looking to either create a plugin, or use whatever variables that are already available to somehow come up with a way to figure out a users post per week statistic.
...
Forum: vB4 Programming Discussions 12-14-2015, 05:01 AM
Replies: 4
Views: 649
Posted By Chris.08i
Thank you Mark!

Thank you Mark!
Forum: vB4 Programming Discussions 12-11-2015, 08:02 PM
Replies: 4
Views: 649
Posted By Chris.08i
I thought posts per day is an already calculated...

I thought posts per day is an already calculated variable somewhere?
Forum: vB4 Programming Discussions 12-11-2015, 12:30 PM
Replies: 4
Views: 649
Posted By Chris.08i
Posts Per Day Variable in Plugin

Hello,

I'm trying to create an if dependent on posts per day - however I'm unable to implement it within the PHP.

I'm fairly new to coding, so I maybe missing the mark completely.

I've...
Showing results 1 to 25 of 30

 
Forum Jump

All times are GMT. The time now is 01:14 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.01791 seconds
  • Memory Usage 2,036KB
  • 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
  • (1)footer
  • (1)forumjump
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (2)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)search_results
  • (25)search_results_postbit
  • (1)spacer_close
  • (1)spacer_open
  • (48)threadbit_pagelink 

Phrase Groups Available:
  • global
  • inlinemod
  • prefix
  • search
Included Files:
  • ./search.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/functions_search.php
  • ./includes/functions_databuild.php
  • ./includes/functions_forumlist.php
  • ./includes/functions_misc.php
  • ./includes/functions_forumdisplay.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • search_before_process
  • search_start
  • search_results_start
  • search_results_query_posts
  • search_results_prebits
  • threadbit_process
  • search_results_postbit
  • pagenav_page
  • pagenav_complete
  • forumjump
  • search_complete
  • navbits
  • navbits_complete