vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Advanced Warning System (Beta Version) (https://vborg.vbsupport.ru/showthread.php?t=95921)

sv1cec 09-08-2005 10:00 PM

Advanced Warning System (Beta Version)
 
Advanced Warning System


IF YOU ARE RUNNING vB 3.6, THERE IS A NEW THREAD FOR THIS HACK UNDER THAT VERSION. vB 3.6 USERS GO HERE:

https://vborg.vbsupport.ru/showthread.php?t=124477


This is a direct port of the Advanced Warning System, as it was implemented in vB 3.0.x. This port has all the features of AWS version 3.4.16, except the Notes.

For a complete description of AWS capabilities, please refer to the following thread:

https://vborg.vbsupport.ru/showthread.php?p=574374

The vB 3.5 compliant version of AWS includes:

1 Product XML (17 Plugins, 107 Phrases, 26 Templates, 43 Settings)
1 ACP Navigation XML
1 PHP Functions File
3 Images
2 PHP Frontend Files
1 PHP Admin CP File
1 PHP Mod CP File
3 PHP Cronjob Files

This port would not be possible, without the help of KirbyDE, to whom I am greatful. KirbyDE will also be responsible for supporting you here, with questions related to this particular release. Also, this port would not have been possible, without the help of Juan P hernandez, who offered me a free test system, in which the porting was performed.

The hack has been tested and it is believed to be bug-free, however since this is a major hack, I release it today (September 9th 2005) as beta.

I hope you all enjoy it.

History (Productversion)
3.5.b
Initial Version

3.5.b1
Fixed a typo that caused Errors in User Datamanager.
Fixed a wrong object reference in functions_warning.php

3.5.b2
Fixed a Bug that caused PHP Error Messages.
Fixed a Typo in the Install Code that causes mySQL Errors.
Updated the Template Edit instructions to be (hopefully) compatible with RC3

3.5.b3
Fixed User not showing up in automatic warning PMs
Fixed 2 missing Phrases
Fixed Hidden Warner being Used for Automatic Warnings
Fixed "View x's Warnings" Button in Usermanager not working

3.5.b4
Removed one unsued Phrase, added one missing Phrase
Fixed a Typo that caused PHP Errors when sending PMs
Fixed a Typo that caused PHP Errors upon Installation
Changed Product ID for Admin CP Navigation XML from vbulletin to aws, so it won't show up any longer if AWS is uninstalled/disabled.

A bug was found which didn't allow you to delete an entered Warning Type. Bug fixed in the current distribution file.

If you found a Bug, please report it at http://bugs.kirbydemos.ath.cx

This helps to keep issues organized, which can't be guaranteed if it's only posted in the Thread.
Thank you.

P.S.1: After you install the hack per the instructions, please update your installation with the separate files listed. They are newer files not included in the zip.

P.S.2: If you want to use the Notes feature, as it existed in AWS 3.4.16, please install AWS per the instructions in the zip file, and THEN follow the instructions included in the warn_notes_update_instructions.txt.

IMPORTANT NOTE: Please keep in mind that this hack is not supported. What this means is that I have no obligation to support it. The reason for that, is because I have no access to a vB 3.5 system any more, so I can't work on this hack any more. Andreas (or KirbyDE) who undertook the support of this version of the AWS hack in the beginning, is obviously too busy to support it. So you are on your own, at least as far as the interaction with vB is concerned. If you have an issue with the hack files themselves, I'll do my best to solve it, but without a test environment, it is not easy. So users of vB 3.5 beware!

P.S. May 31st 2006: The zip file uploaded today, should contain all the debugging done by Delphi, so it should be fine as it is. You do not need the other files listed at the right, only the zip. Download it and follow the instructions in it, for installing the hack. I leave the other files there, just in case some one needs them, they will be deleted later.

SV1CEC

turksengel 09-09-2005 11:18 AM

first thanks coming from me thanks

wcbryant 09-09-2005 11:21 AM

Today is a good day!

Thanks so much, to both of you. Svc, for creating something so integral to my site that it's been hard to go without it, and certainly Kirby for making it 3.5.0 ready. I don't know where you find the time or energy, Kirby, but between this, vBookie, and a number of your own unique projects, I'm incredibly glad you do. ;)

Off to install now.

TTG 09-09-2005 11:25 AM

Are there any major benefits over Zero's warning system ?

sv1cec 09-09-2005 11:31 AM

Quote:

Originally Posted by TTG
Are there any major benefits over Zero's warning system ?

Well, read the description of what AWS can do here:

https://vborg.vbsupport.ru/showthread.php?p=574374

I am sure you will find that AWS is much more feature-loaded.

Diana Notacat 09-09-2005 11:53 AM

HURRAY! I wouldn't have been able to get alone without this! ^o^ I am so glad to see this ported!

Kru 09-09-2005 02:05 PM

I installed it and everything looks good until I tried to make some changes on an excisting user account. After I hit save I got the following error message:

Fatal error: Field alerts is not defined in $validfields in class vb_datamanager_user in /includes/class_dm.php on line 485

I logged out and tried to make a new account and received this error message:

Parse error: parse error, unexpected '[' in /var/www/vhosts/mirzone.net/httpdocs/forum/includes/class_dm_pm.php(523) : eval()'d code on line 96

After I disabled the warning hack everything was ok again.

mholtum 09-09-2005 02:31 PM

Installed like a champ

LittleBoy1 09-09-2005 02:36 PM

Please capture =)

RoryF 09-09-2005 03:45 PM

Question, does this allow me to send warning messages to user... not via PM, but it actually interupts the user?

TruthElixirX 09-09-2005 04:11 PM

Code:

Database error in vBulletin 3.5.0 Release Candidate 3:

Invalid SQL:
select * from vb3_warning_types order by warn_points, warn_maturity, warn_name;

MySQL Error  : Table 'vb3x5.vb3_warning_types' doesn't exist
Error Number : 1146
Date        : Friday, September 9th 2005 @ 01:11:16 PM
Script      : http://www.supportcore.org/testvb/ad...n.php?act=view
Referrer    : http://www.supportcore.org/testvb/ad...dex.php?do=nav
IP Address  : 69.154.2.3
Username    : Chris
Classname    : vb_database

Where are the queries to run..I never saw them..O_o. also in my admincp the Warning options section (The drop down box) is jsut a blank box that expands to fil lthe options. Also when I go to the user's oage in the admincp to warn them it has no option to do this in the user quick links.


EDIT:: Okay the queries are in the product xml file. What could be causing it not to run the right queries though?

Andreas 09-09-2005 04:37 PM

@Kru
Hmm, there is a Plugin that sets the Fields.
Did you import it as a Product?
And yre you using vBulletin 3.5?

@RoryF
No, it sends a PM or eMail.

@TruthElixirX
There should be a Warn-Button ad the bottom of the left Column in User Editor.
The Tables should be created automatically, did you import it as a Product?

Kru 09-09-2005 04:48 PM

Quote:

Originally Posted by KirbyDE
@Kru
Hmm, there is a Plugin that sets the Fields.
Did you import it as a Product?
And yre you using vBulletin 3.5?

Yes I imported it as a Product and of course I am using vb 3.5. otherwise I would have some problems to install this hack. ;)

Everything works fines besides of registering a new user after I install this hack.

I removed hack and reinstalled it again but still same error. :(

Andreas 09-09-2005 04:55 PM

Registering works fine for me. Where exactly do you get Problems?
Btw: I meant are you using RC3? ;)

TCM 09-09-2005 07:01 PM

Awesome! Thanks a ton!

* TCM installs.

EDIT: Or not, it bugged up my boards.

Kirk Y 09-09-2005 07:17 PM

Yipee! I'm so glad you ported this over, this is what I've been waiting for. This is by far the best Warning Hack... ever.

* acidburn0520 jumps for joy!

TruthElixirX 09-09-2005 07:45 PM

Quote:

Originally Posted by KirbyDE
@TruthElixirX
There should be a Warn-Button ad the bottom of the left Column in User Editor.
The Tables should be created automatically, did you import it as a Product?


Yes it is set as a product and no that column is not there.

TosaInu 09-09-2005 07:49 PM

Same problem as Kru. I'm using vb 3.5 rc3 on a fresh database.

Fatal error: Field alerts is not defined in $validfields in class vb_datamanager_user in /includes/class_dm.php on line 485

It's so much easier to get this installed now. I think though that the template notes require a bit of an update (possibly because rc3 has some changes in postbit-legacy).

Example

-
Code:

        <td class="alt1">
        <if condition="$show['messageicon'] OR $post['title']">
                        <!-- icon and title -->
                        <div class="smallfont">
                                <if condition="$show['messageicon']"><img class="inlineimg" src="$post[iconpath]" alt="$post[icontitle]" border="0" /></if>
                                <if condition="$post['title']"><strong>$post[title]</strong></if>
                        </div>
                        <hr size="1" style="color:$stylevar[tborder_bgcolor]" />
                        </if>

is without
Code:

<td class="alt1">
and the replace should also be without that.

-The warningpoints are added for postbit, but not for postbit-legacy.

-Need to find
Code:

  <div>$post[message]</div>
                <!-- / message -->

in postbit-legacy
But only
Code:

                <!-- message -->
                <div id="post_message_$post[postid]">$post[message]</div>
                <!-- / message -->

can be found.

I like this plugin system :)

TosaInu 09-09-2005 07:58 PM

I'm not a coder, but I guess the problem is in class_dm_user.php.
This hack adds 5 fields to the database table user, but the script doesn't know what to do with those when a new user is added.

Here's a fix (WAIT for a real coder to really fix it)

Open includes/class_dm_user.php and find (located at top of file in
Code:

var $validfields = array(
)

Code:

'pmunread'          => array(TYPE_UINT,      REQ_NO),
Add below that

Code:

                'warnings'    => array(TYPE_INT,      REQ_NO),
                'warning_level' => array(TYPE_INT,      REQ_NO),

                'warning_bans'            => array(TYPE_INT,        REQ_NO),
                'alerts'            => array(TYPE_INT,      REQ_NO),
                'warn_notes'          => array(TYPE_UINT,      REQ_NO),

This allows to add users.

Michael-DLR 09-10-2005 03:48 AM

Quote:

Originally Posted by TosaInu
Same problem as Kru. I'm using vb 3.5 rc3 on a fresh database.

Fatal error: Field alerts is not defined in $validfields in class vb_datamanager_user in /includes/class_dm.php on line 485

It's so much easier to get this installed now. I think though that the template notes require a bit of an update (possibly because rc3 has some changes in postbit-legacy).

Example

-
Code:

        <td class="alt1">
        <if condition="$show['messageicon'] OR $post['title']">
                        <!-- icon and title -->
                        <div class="smallfont">
                                <if condition="$show['messageicon']"><img class="inlineimg" src="$post[iconpath]" alt="$post[icontitle]" border="0" /></if>
                                <if condition="$post['title']"><strong>$post[title]</strong></if>
                        </div>
                        <hr size="1" style="color:$stylevar[tborder_bgcolor]" />
                        </if>

is without
Code:

<td class="alt1">
and the replace should also be without that.

-The warningpoints are added for postbit, but not for postbit-legacy.

-Need to find
Code:

  <div>$post[message]</div>
                <!-- / message -->

in postbit-legacy
But only
Code:

                <!-- message -->
                <div id="post_message_$post[postid]">$post[message]</div>
                <!-- / message -->

can be found.

I like this plugin system :)

This is the one place I am stuck to get the code in the template correct. The rest I was able to figure out. Does anyone know the right code to put in the template for this one?

Also, after clicking add warning from a post I get the following error:
Fatal error: Call to a member function on a non-object in C:\Program Files\Ensim\Sitedata\***\forums\includes\functions _warning.php on line 581

Andreas 09-10-2005 04:01 AM

1) Regarding the $validfields error:
There was a slight Typo in Plugin "AWS: Setup UserDM", should have been $this->validfields instead of $this->validvields.
Dunno why I didn't notice any errors though ...

2) The Error in functions_warning.php should be fixed as well now.

As sv1cec stated, this is Beta so such Bugs are to be expected :)

hydrostatic 09-10-2005 04:07 AM

This seem to conflict with ZT's RPG Inferno hack... as when I installed this, I cannot run his.

It comes up with this error when I try to access inferno... I know that you guys don't really support this kind of stuff, but I would like to know if there's a possible way to fix it :nervous:

PHP Code:

Fatal errorCannot redeclare sendpm() (previously declared in /home/blootix/public_html/forums/inferno.php:576in /home/blootix/public_html/forums/includes/functions_warning.php on line 23 


Michael-DLR 09-10-2005 04:07 AM

Quote:

Originally Posted by KirbyDE
1) Regarding the $validfields error:
There was a slight Typo in Plugin "AWS: Setup UserDM", should have been $this->validfields instead of $this->validvields.
Dunno why I didn't notice any errors though ...

2) The Error in functions_warning.php should be fixed as well now.

As sv1ec stated, this is Beta so such Bugs are to be expected :)

Thank You!

Michael

Andreas 09-10-2005 04:08 AM

Nope, no way to fix this any time soon.
But in the furure it will use the Datamangers anyway, so this function becomes somewhat obsolete.

hydrostatic 09-10-2005 04:11 AM

Quote:

Originally Posted by KirbyDE
Nope, no way to fix this any time soon.
But in the furure it will use the Datamangers anyway, so this function becomes somewhat obsolete.

Awww... oh well. I guess I'll have to wait for future versions then.

I'll not click uninstall though, because I want to be notified for future versions and to show my support :).

Kru 09-10-2005 04:31 AM

Quote:

Originally Posted by KirbyDE
1) Regarding the $validfields error:
There was a slight Typo in Plugin "AWS: Setup UserDM", should have been $this->validfields instead of $this->validvields.
Dunno why I didn't notice any errors though ...

2) The Error in functions_warning.php should be fixed as well now.

As sv1cec stated, this is Beta so such Bugs are to be expected :)

Perfect works, now. Great work!!! :)


INSTALLED ;)

TruthElixirX 09-10-2005 07:04 AM

Quote:

Originally Posted by TruthElixirX
Yes it is set as a product and no that column is not there.


Any idea yet on what could be my roblem?

Andreas 09-10-2005 07:09 AM

No idea, sorry.
Feel free to send me a PM with an ACP Login and i'll take look.
Mental note to myself: You need a support ticket system.

TosaInu 09-10-2005 07:21 AM

You mean adding the Warningpoints bit in postbit-legay Michael-DLR? I got something. I added it after
Code:

<if condition="$show['reputation']">
<div><if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower]</if>$post[reputationdisplay]</div></if>

I didn't get an error when warning a member.

TruthElixirX 09-10-2005 07:28 AM

Quote:

Originally Posted by KirbyDE
No idea, sorry.
Feel free to send me a PM with an ACP Login and i'll take look.
Mental note to myself: You need a support ticket system.


Just thought of something. If in my config.php I ave it set to where no one, not even myself, can run queries could this be affecting it?

TosaInu 09-10-2005 07:39 AM

Quote:

Originally Posted by KirbyDE
1) Regarding the $validfields error:
There was a slight Typo in Plugin "AWS: Setup UserDM", should have been $this->validfields instead of $this->validvields.
Dunno why I didn't notice any errors though ...

Nice. Wasn't the note field also added by this hack. Shouldn't it have a $this line in that plugin too?

Andreas 09-10-2005 07:39 AM

No. Queries are run by the System.

kommuni 09-10-2005 11:47 AM

Quote:

Originally Posted by KirbyDE
Registering works fine for me. Where exactly do you get Problems?
Btw: I meant are you using RC3? ;)

Hi Kirby,

i'm using a blank RC3-Installation and it is reproducable the AWS - when i deactivate it the problems go away. :( strange thingy.

Andreas 09-10-2005 12:00 PM

Did you try Product Version 1.0.1?

TosaInu 09-10-2005 12:44 PM

These fields are added to MySQL table users (by the installer of course).
'warnings' 'warning_level' 'warning_bans' 'alerts' 'warn_notes'

And this is (oddly?) required in plugin manager AWS: Setup UserDM to get it working for adding new members. I say oddly, because I fail to see the logic of warning stuff for registering new members. I'ld expect that the SQL server just uses default values when there's no info supplied by the board.

Code:

$this->validfields['alerts'] = array(TYPE_INT,        REQ_NO);
$this->validfields['warnings'] = array(TYPE_INT,      REQ_NO);
$this->validfields['warning_level'] = array(TYPE_INT, REQ_NO);
$this->validfields['warning_bans'] = array(TYPE_INT, REQ_NO);

Why not

Code:

$this->validfields['alerts'] = array(TYPE_INT,        REQ_NO);
$this->validfields['warnings'] = array(TYPE_INT,      REQ_NO);
$this->validfields['warning_level'] = array(TYPE_INT, REQ_NO);
$this->validfields['warning_bans'] = array(TYPE_INT, REQ_NO);
$this->validfields['warn_notes'] = array(TYPE_UINT, REQ_NO);


TruthElixirX 09-10-2005 04:07 PM

I uninstalled AWS and reinstalled it and everything works fine. Tables got added. :).

EDIT:: Heh. I just tried Alerting a user for something and got this after clicking "Add Warning"

Code:

print_standard_error(...)
is now redundant. Instead, use
standard_error(fetch_error(...))


GoTTi 09-10-2005 06:53 PM

your instructions are off i think. are you following instructions off a clean copy of vbulletin? when im searching for things in the template to modify, im getting not found errors. i gotta search for partial codes to get the right spot. so far this problem has been in the postbit areas.

installing on 350 rc3

sv1cec 09-10-2005 07:43 PM

Quote:

Originally Posted by hydrostatic
This seem to conflict with ZT's RPG Inferno hack... as when I installed this, I cannot run his.

It comes up with this error when I try to access inferno... I know that you guys don't really support this kind of stuff, but I would like to know if there's a possible way to fix it :nervous:

PHP Code:

Fatal errorCannot redeclare sendpm() (previously declared in /home/blootix/public_html/forums/inferno.php:576in /home/blootix/public_html/forums/includes/functions_warning.php on line 23 


Please compare the two routines with that name, the one used by AWS and the one used by the other hack. If the two are the same (and I think they will be), you can delete one of the two. I think ZT is using this routine in his new hacks, if it is not changed from the one he used in his initial Warning hack, then the one or the other can be deleted. If it is, then you have to somehow rename the routine in one of the two hacks, and change the callings to that routine, to use the new name.

Does this make sense?

Andreas 09-10-2005 08:19 PM

@TosaInu
The Code is not required when a new User registers.
But it is necessary if you add a new User through ACP, as the User Manager shows these Fields.
So they get set to the Datamanager when saving, and thus must be decalred as being valid.
warn_notes was not added becasue the Code this Version is based off does not support
them.

@GoTTi
I didn't check the instructions for RC3, but they were fine for RC1.
Gonna check that now.

@TruthElixirX
Thanks for pointing this out, will be fixed soon.

TruthElixirX 09-10-2005 09:21 PM

Quote:

Originally Posted by KirbyDE
@TruthElixirX
Thanks for pointing this out, will be fixed soon.


Awesome. Thank you. :).


All times are GMT. The time now is 02:24 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.02663 seconds
  • Memory Usage 1,871KB
  • 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
  • (16)bbcode_code_printable
  • (2)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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