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)
-   -   Warnings System Hack v2.1 (https://vborg.vbsupport.ru/showthread.php?t=43265)

g-force2k2 09-18-2002 01:50 PM

okay Nuclion :p try changing the whole code that you just posted into one line ;)

PHP Code:

  $DB_site->query("UPDATE user SET profileview=profileview+1 WHERE userid='$userinfo[userid]'"); 

that should do the entire trick ;) for that at least... then reapply my code and see what happens regards...

g-force2k2

NuclioN 09-18-2002 02:05 PM

error is moving to line 1737 after doing that.

// Store hack By Lesane

$storeadmin = $DB_site->query_first("SELECT * FROM <--- line 1737
storeadmin");
$pointname=$storeadmin[pointname];
$storename=$storeadmin[storename];

$store=$DB_site->query_first("SELECT storep FROM user WHERE userid='$userinfo[userid]'");
$storepoints=$store[storep];

g-force2k2 09-18-2002 03:47 PM

if you want you can pm me the member.php and i will take a look for you... if you remove my code is this still a produced error? regards...

g-force2k2

NuclioN 09-18-2002 04:15 PM

Yep, error is gone when i remove the code out of the member.php!
I've send a pm with the member.php
;)

Neo 09-18-2002 07:06 PM

Quote:

Originally posted by g-force2k2
Nuclion did you make the file modification to the admin/functions.php yet? regards...

neo what do you mean text formatted? regards...

g-force2k2

Yup but I am more concerned about the the error in admin/functions.php

g-force2k2 09-18-2002 07:48 PM

neo what error did you get in admin/functions.php?

regards...

g-foce2k2

alpha2503 09-19-2002 10:36 AM

i'm sorry for asking you again with this old problem, but when i klick on the links in the postbit template, there will only show up a blank popup and if i open the warn.php?s=... directly via the link in the forumhome template it's blank, too... i use version 2.1 of this hack... does anyone can help me ? maybe with my bad english,too ;) !

Apok2002 09-20-2002 04:15 AM

How about a master log that is viewable by the public? So that they can see all the warnings ever given out to everyone, by any admin/mod? Just like what we see in the admin cp?

I thought that is what the warn.php would do. But I guess that just displays the warning levels and points?

Also, in the template set that I have, I need to change the font color. It is currently white, which is difficult to see on my light blue background. Check it out here:

www.ez-company.net/forums/warn.php

What is the easiest way to do that?


Also, I installed this w/o a single glitch. No errors whatsoever. I think a few of these errors people are getting, are due to not setting the vBulletin Options - Warning System settings. But it really is a nice hack. I just need to work on the postbit icon addition...and somehow get a warning list of all users who have been given a warning, on a public page for all to see.

drives fast 09-20-2002 10:16 PM

Okay....I have put this through some paces on my test forum and here is some interesting stuff:

First install:
1) Install when flawlessly
2) Noticed that it didn't update usertitle when the hack banned a member. **Fix posted by g-force2k2**
3) After doing some editing in the templates...all of a sudden I started getting a parse error when trying to view posts and the postbit template would not show. un-installing the hack completely did not solve th4e parse error and the database had to be overwritten to get it to go away.

Second Install:
1) Install went flawlessly
2) While customizing templates I noticed that a few of my hacks had stopped working: Moderator graphic and donator hack and site supporter hack......all had stuff to display in postbit.
3) un-installed hack in this order checking to see when the others would appear again,,,first un-installed the database parts.....my other hacks still did not show.....un-installed the script modifications.....my other hacks still did not show......un-installed the 3 template modifications....my other hacks showed back up again.
4) Also before I un-installed I tried some features and found that when you use the system to un-ban someone after the points system banned then their usertitle didn't change back to "member" but I think I can fix that.

Third install:
1) tried to run the installer but it kept telling me "duplicate value and referenced the number 40 so I changed all the 40's to 140 like was suggested in a post and it installed.
2) I had modified the installer with the template modifications of mine and the warnings list additions I wanted so it would install them first shot and I wouldn't have to go in a update all that again but I noticed that the templates (that I modified in the installer) showed up in the templates list as already edited instead of originals (started to think)
3) I then noticed that there was two sets of options in the vb options now but if I looked in the database....there was no settinggroup entries for the warnings system and a couple more that were there before were not present either.
4) I ran the un-installer again...it said successful just like every time. I also un-installed the template and script mods.
5) No matter how much I looked I couldn't find evidence that the hack still existed but it still showed 2 sets of setting groups in the admin panel.
6) I had to overwrite the settinggroup table to get that to go away. (thinking some more)

Fourth Install:
1) Changed the values to 33 (since that was next in line in my database) and installed fine once more.
2) everything seems fine...no problems like before....my other hacks still worked so I started using the functions again.
3) after asessing points to a member...I went to the admin panel and took them back and it said that there were no members warned......seemed correct.
4) I then asessed points to that member again and in the admin panel...took them back....seemed correct.
5) I then asessed enough points for that member to be banned and then went to the admin panel and through the warnings system unbanned that member and it said like it should that it was done, so I then went to the post I was testing all this in and clicked on the "[View Warnings]" link and the three warnings that should have been deleted showed up. A quick look in the database shows that they in fact had not been deleted.

So....it would apear that the uninstall doesn't work corectly and causes some strange stuff to happen in the database.

The templates showing up as already edited instead of original after modifying the install script suggests that some data was still in the database (although invisible) from the original install and edit.

the remove and delete warnings function isn't working even though it says it is from the admin panel

Would it be possible for you to look into these issues?

I love this hack and want to use it

Neo 09-22-2002 12:23 AM

Quote:

Originally posted by g-force2k2
neo what error did you get in admin/functions.php?

regards...

g-foce2k2

I wasnt able to see... but what happend was the entire site turned to a white blank page.

g-force2k2 09-23-2002 03:58 PM

Quote:

Originally posted by Neo


I wasnt able to see... but what happend was the entire site turned to a white blank page.

not sure O_o maybe there was a cross over of required files... thats really the only thing i can think of :p sorry to hear man ;) regards...

g-foce2k2

squawell 09-24-2002 01:19 PM

first this is a useful hack to me...thankz ur hard work...

sencond i have a little question.....

how can i add if user's posts over XX(what u want it to be)posts

also have permission use the warning member system??

Mike11212 09-28-2002 07:47 AM

I get the following error when i click the email button in a users profile
Fatal error: Call to undefined function: checkwarnlink() in /home3/mike1121/public_html/board/member.php on line 1418

marocnl 09-28-2002 02:22 PM

Jo pIEpAl,

All works well accept for 1 issue. When i remove a warning for a user it doesn't update de warning points shown in each post of the user. Please let me know what necessary changes i need to make in admin_warning.php. I think it all happens there, not? ;)

The other request to have a php-file that shows all the warnings of your board on in a listing. Please make this happen.

HELP!! Just to emphasize how fast i want this :D

Great hack btw :smoke:

squawell 09-29-2002 12:59 PM

so strange.....

i complete install....and no error

but...i cant see it show up in postbit and getinfo......

why??and where can set if user warning points have to baned

which usergroup that user will be there??because i dont have usergroupid 8.....

how to fixed that?

g-force2k2 09-29-2002 01:36 PM

Quote:

Originally posted by marocnl
All works well accept for 1 issue. When i remove a warning for a user it doesn't update de warning points shown in each post of the user. Please let me know what necessary changes i need to make in admin_warning.php. I think it all happens there, not? ;)

macocnl worked fine for me... what exactly is wrong?

Squawell:

you have to submit you vbulletin options... all of your configurations are in the vbulletin options under the warnings section...

as for the other suggestion i will work on it when i get any time... right now i have serious personal problems that need attention... regards...

g-force2k2

marocnl 09-29-2002 07:43 PM

Quote:

Originally posted by g-force2k2


macocnl worked fine for me... what exactly is wrong?


g-force2k2

For example when i remove 1 warning, let's say worth 7 points, and the user had 17 points. After i remove the 7 points, by removing a warning worth that much, it still says 17 points in the posts of the users. I hope u understand what i mean.

Thnx 4 ur answer btw

g-force2k2 09-29-2002 10:56 PM

marocnl what do you do remove the warning from the warning logs? thats just for viewing purposes... try the 'view warned' link... should be on the admin cp options panel of the admin cp... that'll allow you to reduce the points... regards... hope that helps...

g-force2k2

squawell 09-30-2002 03:21 AM

Quote:

Originally posted by g-force2k2


macocnl worked fine for me... what exactly is wrong?

Squawell:

you have to submit you vbulletin options... all of your configurations are in the vbulletin options under the warnings section...

as for the other suggestion i will work on it when i get any time... right now i have serious personal problems that need attention... regards...

g-force2k2

sorry about that g-force2k2...

i finally find the problem just like u say...... :nervous:

and thankz ur hard work i will waiting for ur new function.....

marocnl 09-30-2002 09:51 AM

Quote:

Originally posted by g-force2k2
marocnl what do you do remove the warning from the warning logs? thats just for viewing purposes... try the 'view warned' link... should be on the admin cp options panel of the admin cp... that'll allow you to reduce the points... regards... hope that helps...

g-force2k2

I know one can reduce points there, but when i reduce points it will still show the warnings. So when you add the points of the warnings it will not be same as the points he has after you reduce them from the Admin CP. So to reduce them correctly, one should undertake three steps. First is to tsjek which warning you want to remove and the amount of points that warnings is worth. Then you should go to the Admin CP and remove the warning through warning log. Finally one should reduce the points through the option in Admin CP 'view warned'.

My idea is to make it so that when i remove a warning from the log it will automatically do the other steps. Tell me if i am mistaking.

g-force2k2 09-30-2002 10:38 AM

yeah squallwell i'll try and set on it today ;p just the usual things to do ;)

as for the warning log idea marocnl... i believe that the warning log is a way to check on who has been warned in the past... i don't think that it should be used to remove points in any manner... thats just my opinion... also because the warnings aren't actually stored to that user... so unless you view the warnings or logs you won't know why they were warned... don't get me wrong... your idea is possible... but i personally would stick to the 'view warned' step... regards...

g-force2k2

marocnl 09-30-2002 05:23 PM

Quote:

Originally posted by g-force2k2
yeah squallwell i'll try and set on it today ;p just the usual things to do ;)

as for the warning log idea marocnl... i believe that the warning log is a way to check on who has been warned in the past... i don't think that it should be used to remove points in any manner... thats just my opinion... also because the warnings aren't actually stored to that user... so unless you view the warnings or logs you won't know why they were warned... don't get me wrong... your idea is possible... but i personally would stick to the 'view warned' step... regards...

g-force2k2

Hmmmm, maybe i don't completely understand how ur hack works, but it seems to me that you don't wanna keep track of warnings when you 'forgive' the warned person and let him/her start with a clean sheet. Because if you keep the logs just the way they are and just remove the warning points, it will not give you the correct listing when you click on the [ view warnings for this person ] link in the messages.

I appreciate your answers, but try to understand what i mean. I honestly don't think this can be the meaning of your hack. If you're tired of answering i understand :knockedout: . It's not like this is such a BIG deal as i found a way to work around it. But being lasy i like things to be automated. I have some experience with php/mysql, mostly by implenting and carefully reading the hacks posted here. So i could do it my self, but as you probably make it much faster than i, iasked you 4 it. But i mainly want you now to understand what i mean.

Fell asleep yet? :sleep: :)


P.S.: I really wonder whether i am the only one with this question? Anybody else wanna back me up? :lick:

squawell 10-01-2002 07:19 AM

g-force2k2 i have a question

if someone have been warned can we have a namelist in main

page can see and do not goto member's profile to see his

static......

and another function.....

thread starter can warning who reply his thread??

can u also do that?? :bunny:

Gohan 10-01-2002 03:02 PM

Something Different?
// ++++++++++++++++++++
Go to the Admin CP and create a new usergroup.
Call the group Banned by Warnings :: And be sure to restrict all access to the forum from this usergroup!
Then Submit and right click the edit link to that new usergroup. Remember the Usergroupid for the config of the warnconfig.php!
(ie. 8)

==============================================

I don't understand *still confused yet*

I must add new usergroup and name of usergroup = "Call the group Banned by Warnings :: And be sure to restrict all access to the forum from this usergroup!"

Right?

g-force2k2 10-01-2002 05:34 PM

yeah Gohan thats correct ;) i have to update the instructions though because there is no more warnconfig.php the modifications are in the vbulletin options under warning options... regards...

And marocnl i understand exactly what you're looking for it just doesn't make any sense... a log is a log... just like your adminlog... why would you want to delete the logs of who has been warned...? regards...

g-force2k2

marocnl 10-02-2002 05:18 PM

Quote:

Originally posted by g-force2k2

And marocnl i understand exactly what you're looking for it just doesn't make any sense... a log is a log... just like your adminlog... why would you want to delete the logs of who has been warned...? regards...

g-force2k2

Hi there g-force2k2,

Hahahahaa.........i'm just laughing because this is getting very lame, don't ya think? :)

Many thnx 4 this great hack btw :rolleyes: :laugh:

Mike11212 10-02-2002 06:08 PM

i think you would want to delete a log when it gets to large to conserve disk space

cklaszlo 10-03-2002 01:23 PM

I downloaded the .ZIP and there isn't a warnconfig.php file in the zip. Am I missing something?

g-force2k2 10-04-2002 01:41 AM

no cklaszlo... no warnconfig.php needed... when i switched to the warnings hack v2.1 i accidently forgot to change that instruction... i should update the instructions soon... but lately personally problems have been overwhelming... regards...

g-forc2k2

dapence 10-04-2002 04:39 AM

This is a great hack, though I did need to uninstall it to deal with some other issues, and i noticed that it would not remove the entries in the settinggroup and setting tables. I examined install_warning.php, and noticed that the group id when installed is set to 40, but the group id is set to 44 in the uninstall section. I'm not a MySQL guru, so I may be wrong, but should this not be 40 as well.

Like I said, great hack, just thought I'd point this out ... unless it already has, in which case, I'm sorry. :)

thesteveco 10-04-2002 08:18 AM

Excellent hack, g-force2k2... it's exactly what I needed for my forum!

I have been experimenting with a number of 'fixes' for problems people have been having, but I think my particular issue is a bit different:

I can only see the 'View User Warnings' and 'Warn This User' link for my own posts! Odd, no?

Sound familiar? Make any sense? I have tweaked the settings in Options numerous times and been able to make the link beneath my own name appear and disappear, but can't seem to do so for the other users.

Fortunately this is on a test board so my problems are not too urgent, but could you ponder this and throw any ideas my way?

(I think this may be my first post on this board - LOL)

g-force2k2 10-04-2002 01:22 PM

dapence if you can't delete them from the installer (because it just doesn't work)

then delete them manually

ie: go to this url in your browser...

.../admin/setting.php?s=$session[sessionhash]

thesteveco do you have any screenshots? definately sounds weird... regards...

g-force2k2

dapence 10-05-2002 02:32 AM

No, I meant that the uninstall routine works find, except it will not remove the entries added to the settinggroup and setting tables.

code inserting ...

PHP Code:

$DB_site->query("INSERT INTO settinggroup VALUES (40, ... 

PHP Code:

$DB_site->query("INSERT INTO setting VALUES (NULL,40, ... 

code deleting

PHP Code:

$DB_site->query("DELETE FROM settinggroup WHERE displayorder=44 ... 

PHP Code:

$DB_site->query("DELETE FROM setting WHERE settinggroupid=44 ... 

So, the code removing the entries from the database won't work, because the typo in the setting order, and settinggroupid are set to 44, not 40.

So, if you reinstall it, there are duplicate entries in these tables.

Like I said, I'm not a MySQL guru, but I think I'm correct. Just thought you'd like to know. :)

thesteveco 10-05-2002 05:15 AM

g-force2k2,

I'm not sure what the problem was, but after taking things step by step, checking everything into CVS as I went, it worked on my secondary backup. I installed it on my production box and all is quite well!

Props to you - I look forward to seeing how effective this tool can be.

One other point... I intend to write a script (simple PHP page activated by a cron job) that will automatically decrement the warning level one point per day. When the points against a user drop below the banning threshold the user's account will be re-enabled.

This won't modify any of your scripts or templates, but I thought I'd throw it past you for your blessing just in case it was appropriate.

thesteveco 10-05-2002 05:43 PM

g-force2k2,

So I've written and tested that script - it works like a charm with one exception... I'd prefer to make the ban_limit variable dynamic but don't want to make too many assumptions when retrieving it from the setting table. For the time being it's a static value. If you want a copy of it and its associated cron job just let me know.

As for the hack I am seeing three problems currently.

The first is that some Registered users see only their own Warning Level and others see all.

The second, and similar, is that for Moderators, Super Moderators, and Administrators we occassionally do not have the Warning links at the bottom of posts.

For both of the above problems I have checked the HTML source to see if there was some sort of commenting problem but there is not... the link is not written into the page and so I'm assuming it has to do with the $post[warnlink] variable in the postbit template (set in member.php). I'll do some logic tests to see if I can help you further in diagnostics.

The third problem is with one of the hacks of your hack. :D I added the "Comment: $comment" to the warn_pmemail_notify and warn_banemail_notify templates to be a bit more verbose in the message to the offending users. The inclusion of an apostrophe generates a MySQL error as it is not escaped. It's an easy enough problem to solve, just thought I'd let you know.

Thanks again - I'm realy enjoying the hack - it's going to be an excellent addition to my board.

nbb 10-08-2002 03:32 PM

Just an idea...

What about setting the Warning Levels printed in the post to different colors, f example green (<33%) orange (>33<66%) and red (>66%) ??

g-force2k2 10-08-2002 07:56 PM

look forward to what you come up with thesteveco... the scripts not displaying right im not really sure about... as for the warning point decrementor thats fine... you can add that... thanks for the reply...

nbb i will see what i can do for you ;)

regards...

g-force2k2

g-force2k2 10-08-2002 08:06 PM

there nbb... test that out ;) i haven't tested it yet sorry... but it should work...

g-force2k2

mewgood 10-09-2002 05:22 AM

where is the warnconfig.php goes?
It is not in the zip file..

thesteveco 10-09-2002 07:41 AM

OMG - I'm totally going to regret this, but I have to be forthcoming and share my findings...

<--- laughing at self

After spending hours working through your PHP and setting the indenting, commenting, and spacing in a manner in which I can read it more quickly an thoroughly (you KNOW every coder is unique in their style) I found the stupidest little error that immediately explained everything...

I inserted the $post[warnlink] info in functions.php BEFORE the end of the $onlinestatus condition, not AFTER. Thus, all the people who were not online had the warnlink info, those who were did not. Super duh!

At least you know what to tell the next guy!! LOL!


All times are GMT. The time now is 01:02 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.01485 seconds
  • Memory Usage 1,866KB
  • 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
  • (5)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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