PDA

View Full Version : Not working correctly


DaveBeel
06 Mar 2005, 14:20
I have just installed the Warning system from scratch and so far I am impressed.

There are a few things though that you say it can do, but I do not have available in my options.

Screenshot (http://www.vbulletin.org/forum/attachment.php?attachmentid=21859)

In the above screenshot there are a lot more options, including a Manage Warning Options. I do not have this option. I purely have Control Warnings, Warning Logs and Unban Banned Users.

I do not have any of the options to user hierarchical schema, banned usergroup etc.

Also the feature is decribed where the warning level is shown under the users profile and next to his posts. I don't have this facility either.

Please adivise. Thankyou

Further to this my moderators also don't have the ability to give out warnings. Even though they are still the default usergroup number as suggested.

sv1cec
07 Mar 2005, 06:08
Which version did you install? Did you downloaded the latest zip? From the description, either you haven't downloaded the latest zip file, or you have not run the proper install script.

Use the uninstaller to uninstall the changes, then use the install_warn.php from the latest zip.The warning options screen shot is quite old, but you should see a lot more options than those shown.

Let me know if this works.

Rgds

DaveBeel
08 Mar 2005, 17:46
Which version did you install? Did you downloaded the latest zip? From the description, either you haven't downloaded the latest zip file, or you have not run the proper install script.

Use the uninstaller to uninstall the changes, then use the install_warn.php from the latest zip.The warning options screen shot is quite old, but you should see a lot more options than those shown.

Let me know if this works.

Rgds

I installed the latest script mate. Only downloaded it two days ago and followed the instructions to the tee.

sv1cec
09 Mar 2005, 05:32
Do me a favor. Uninstall the hack, using the uninstaller and install it again running the install_warn.php file from the admincp directory. Download the latest zip first.

Rgds

DaveBeel
15 Mar 2005, 23:46
Okay done exactly as you said and ran the uninstaller, then re-ran the installer and I still only have Control warnings, Warning Logs and Unban Banned Users. No Manage Warning Options.

Please advise....
Screenshot Attached.

sv1cec
16 Mar 2005, 08:43
I thought I answered this, this morning, but my answer is not here!!!

In any case, have you done the edits properly? It looks as if the file admincp/index.php is not edited, as it is suggested. The missing menu options, are in that file.

Rgds

Delphiprogrammi
16 Mar 2005, 22:30
yeah you didn't edited the file $admncpdir/index.php open this file and find


$printhr = false;
if (can_administer('canadminstyles'))
{


above that add


$printhr = true ;
if ($aws=='1')
{
construct_nav_option ( 'Manage Warning Options', 'admin_warn.php?act=manageoptions', '<br />' ) ;
construct_nav_option ( 'Manage Warning Types', 'admin_warn.php?act=view', '<br />' ) ;
construct_nav_option ( 'Warn a User', 'admin_warn.php?act=warnuser', '<br />' ) ;
construct_nav_option ( 'View User Warnings', 'admin_warn.php?act=warnsperuser', '<br />' ) ;
construct_nav_option ( 'View Warnings Log', 'admin_warn.php?act=viewlogs', '<br />' ) ;
construct_nav_option ( 'View Banned Users', 'admin_warn.php?act=viewbannedusers', '<br />' ) ;
if ($warn_opts['automaticpm'] == 'Yes')
{
construct_nav_option ( 'View Auto-Warned PMs', 'admin_warn.php?act=viewwarnedpms', '<br />' ) ;
}
construct_nav_option ( 'Prune Warnings', 'admin_warn.php?act=prune', '<br />' ) ;
construct_nav_option ( 'Statistics - Warnings per Type', 'admin_warn.php?act=viewstats1', '<br />' ) ;
construct_nav_option ( 'Statistics - Warnings per Warner', 'admin_warn.php?act=viewstats2', '<br />' ) ;
construct_nav_option ( 'Statistics - Warnings per User', 'admin_warn.php?act=viewwarnedusers', '<br />' ) ;
construct_nav_option ( 'Statistics - Bans per User', 'admin_warn.php?act=viewbans', '<br />' ) ;


construct_nav_group ( 'Warning System', '<hr />' ) ;
}


that should do it

DaveBeel
17 Mar 2005, 00:08
yeah you didn't edited the file $admncpdir/index.php open this file and find


$printhr = false;
if (can_administer('canadminstyles'))
{


above that add


$printhr = true ;
if ($aws=='1')
{
construct_nav_option ( 'Manage Warning Options', 'admin_warn.php?act=manageoptions', '<br />' ) ;
construct_nav_option ( 'Manage Warning Types', 'admin_warn.php?act=view', '<br />' ) ;
construct_nav_option ( 'Warn a User', 'admin_warn.php?act=warnuser', '<br />' ) ;
construct_nav_option ( 'View User Warnings', 'admin_warn.php?act=warnsperuser', '<br />' ) ;
construct_nav_option ( 'View Warnings Log', 'admin_warn.php?act=viewlogs', '<br />' ) ;
construct_nav_option ( 'View Banned Users', 'admin_warn.php?act=viewbannedusers', '<br />' ) ;
if ($warn_opts['automaticpm'] == 'Yes')
{
construct_nav_option ( 'View Auto-Warned PMs', 'admin_warn.php?act=viewwarnedpms', '<br />' ) ;
}
construct_nav_option ( 'Prune Warnings', 'admin_warn.php?act=prune', '<br />' ) ;
construct_nav_option ( 'Statistics - Warnings per Type', 'admin_warn.php?act=viewstats1', '<br />' ) ;
construct_nav_option ( 'Statistics - Warnings per Warner', 'admin_warn.php?act=viewstats2', '<br />' ) ;
construct_nav_option ( 'Statistics - Warnings per User', 'admin_warn.php?act=viewwarnedusers', '<br />' ) ;
construct_nav_option ( 'Statistics - Bans per User', 'admin_warn.php?act=viewbans', '<br />' ) ;


construct_nav_group ( 'Warning System', '<hr />' ) ;
}


that should do it
Okay I am nearly there now guys and I thank you all for your assistance.

I have two remaining little problems and I think you may be able to sort them quickly. I have obviously typed something incorrectly somewhere.

Firstly. On the posts I have two lots of Warn and View commands at the top of each thread. Obviously I have duplicated somewhere but I would appreciate knowing which file to look at.

The second one is when I issue someone a warning I get the following message...

Database error in vBulletin 3.0.7:

Invalid SQL: update vb3_user set warning_level='2', warnings='1' where userid='4'
mysql error: Unknown column 'warnings' in 'field list'

mysql error number: 1054

Not sure what the problem is here.

If you think you could fix it quickly for me John I would appreciate it. Whether that be you telling me where I should go, or whether i give you access I am willing to do that.

Many thanks.

sv1cec
17 Mar 2005, 04:35
Okay I am nearly there now guys and I thank you all for your assistance.

I have two remaining little problems and I think you may be able to sort them quickly. I have obviously typed something incorrectly somewhere.

Firstly. On the posts I have two lots of Warn and View commands at the top of each thread. Obviously I have duplicated somewhere but I would appreciate knowing which file to look at.

The second one is when I issue someone a warning I get the following message...

Database error in vBulletin 3.0.7:

Invalid SQL: update vb3_user set warning_level='2', warnings='1' where userid='4'
mysql error: Unknown column 'warnings' in 'field list'

mysql error number: 1054

Not sure what the problem is here.

If you think you could fix it quickly for me John I would appreciate it. Whether that be you telling me where I should go, or whether i give you access I am willing to do that.

Many thanks.
For the second problem, run this query:

ALTER TABLE `".TABLE_PREFIX."user` add `warnings` int(5) default '0'

Remeber to change the ".TABLE_PREFIX." to your prefix, which I think is vb3_

For the first problem, check the mods in your postbit or postbit_legacy template. You have probably missed an <if> or some condition is not right.

Rgds

DaveBeel
19 Mar 2005, 14:30
I'm getting there mate. I really appreciated your assistance.

The database error is now clear, for some reason the database was missing both the warnings and warning_bans options. I manually added them and it seems to be working now.

I can't see anything in my postbit or postbit_legacy files so I have attached them to see if anyone on here can see a problem.

Another problem which has appeared since is when I click on remove warning I get the following.....

"Warning: Invalid argument supplied for foreach() in /includes/functions.php on line 1946"
(This is at the top of the screen)

Then it says
Error
An Error Has Occured!
An error has occured, the following message has been left below:
Invalid User ID Input

Hope you can help.
Thanks

sv1cec
19 Mar 2005, 14:48
First of all, please delete those files from here, if you do not want to hear from the forums moderators. You are not supposed to post complete vB files or templates here, it is a breech of your license agreement.

Second, before anything else, and because this thing reminds me of something I've fixed before, please download the latest zip file. Make sure you upload Warn.php and includes/function_warning.php files to your server. Let me know if this helped.

Rgds

DaveBeel
19 Mar 2005, 15:08
First of all, please delete those files from here, if you do not want to hear from the forums moderators. You are not supposed to post complete vB files or templates here, it is a breech of your license agreement.

Second, before anything else, and because this thing reminds me of something I've fixed before, please download the latest zip file. Make sure you upload Warn.php and includes/function_warning.php files to your server. Let me know if this helped.

Rgds
By uploading those two files I now get the following when I try to warn someone.

Database error in vBulletin 3.0.7:

Invalid SQL:
UPDATE vb3_user SET
usergroupid = ,
displaygroupid = ,
warnings=1,
warning_bans = 1,
usertitle = 'Temporarily Banned'
WHERE userid = 39

mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '
displaygroupid = ,
warnings=1,
warning_bans = 1,


mysql error number: 1064

Date: Saturday 19th of March 2005 04:09:37 PM
Script: http://www.webcadets.com/forum/Warn.php
Referer: http://www.webcadets.com/forum/Warn.php?do=WarnUser&id=39&post=245
Username: Dave
IP Address: 217.44.114.125


I haven't done the full install using version 3.3.0 but have using 3.2.0 before now, just had a two little problems above. Seems I have a big problem now though mate.
cheers

sv1cec
19 Mar 2005, 15:38
By uploading those two files I now get the following when I try to warn someone.

Database error in vBulletin 3.0.7:

Invalid SQL:
UPDATE vb3_user SET
usergroupid = ,
displaygroupid = ,
warnings=1,
warning_bans = 1,
usertitle = 'Temporarily Banned'
WHERE userid = 39

mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '
displaygroupid = ,
warnings=1,
warning_bans = 1,


mysql error number: 1064

Date: Saturday 19th of March 2005 04:09:37 PM
Script: http://www.webcadets.com/forum/Warn.php
Referer: http://www.webcadets.com/forum/Warn.php?do=WarnUser&id=39&post=245
Username: Dave
IP Address: 217.44.114.125


I haven't done the full install using version 3.3.0 but have using 3.2.0 before now, just had a two little problems above. Seems I have a big problem now though mate.
cheers
You really got me confused. You have been using version 3.2.0 before with no problems. Then you upgraded to version 3.3.0, following the instructions in the UpdateToLatestVersion.txt file. Is that right? But in the beginning of your thread, you said you just install 3.3.0 from scratch!

What is it? I can't help if you are giving me contradictory information.

Have you set your Warning Options properly, in the admincp?

DaveBeel
19 Mar 2005, 16:12
You really got me confused. You have been using version 3.2.0 before with no problems. Then you upgraded to version 3.3.0, following the instructions in the UpdateToLatestVersion.txt file. Is that right? But in the beginning of your thread, you said you just install 3.3.0 from scratch!

What is it? I can't help if you are giving me contradictory information.

Have you set your Warning Options properly, in the admincp?
Okay just to clear things up. Sorry if I was confusing. The one I installed from scratch was 3.2.0. I have now followed the full instructions for 3.3.0 and things seem to be working okay.

I still for some reason have two lots of Warn user and View User warnings on each post.

Everything else seems to be working okay apart from when I issue a warning I am getting a parse error at the top of the confirmation of issue page.

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/dbeel/public_html/forum/includes/functions_warning.php(475) : eval()'d code on line 19

The warning is still issued however.

sv1cec
19 Mar 2005, 16:43
For the two sets of Warn/View Warnings links, check your changes in your postbit/postbit_legacy templates.

For your second issue, check your warn_pm template. Make sure there is no warn_opts in there.

Also, how many styles are you using in your forums?

DaveBeel
19 Mar 2005, 17:04
For the two sets of Warn/View Warnings links, check your changes in your postbit/postbit_legacy templates.

For your second issue, check your warn_pm template. Make sure there is no warn_opts in there.

Also, how many styles are you using in your forums?
only using one style for all.

In regards to checking my warn_pm template where do you mean mate? Through the CP cos I can't find it?? :disappointed:

Blootix
20 Mar 2005, 06:12
Okay just to clear things up. Sorry if I was confusing. The one I installed from scratch was 3.2.0. I have now followed the full instructions for 3.3.0 and things seem to be working okay.

I still for some reason have two lots of Warn user and View User warnings on each post.

Everything else seems to be working okay apart from when I issue a warning I am getting a parse error at the top of the confirmation of issue page.

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/dbeel/public_html/forum/includes/functions_warning.php(475) : eval()'d code on line 19

The warning is still issued however.
I have the exact same problem as his second issue. And the warning is also still issued. And I checked warn_pm and there was no warn_opts.

[b]EDIT: ALSO: the Warn PM doesn't contain anything. See screenshot for more information.

sv1cec
20 Mar 2005, 06:59
Replace the contents of your warn_pm template with the code below:


Dear $user[username],

You have been warned for one of your posts, which violated $vboptions Rules. The reason you have been warned is because:

[b] $warn_type[warn_desc]
(Warning Type = $warn_type[warn_name])

For this violation, you have been given : $warn_type[warn_points] point(s).
The point(s) will remain in your account for $warn_type[warn_maturity] days.
After that, they will be removed automatically.

The post for which you are warned can be seen here:

$thread1

The admin/moderator who warned you, entered this comment:

=======================================
$_POST[comment]
=======================================

Your total Warning Level at the moment is: $level point(s).

If you reach the maximum of $vboptions[warn_points_before_banned], you will be banned from the Forums, for $peruserbanlimit days.

To see details about all the warnings you have received, until now, please click here ($vboptions[bburl]/Warn.php?do=ViewMyWarnings).

Please reply back if you have a dispute.


I have the exact same problem as his second issue. And the warning is also still issued. And I checked warn_pm and there was no warn_opts.

[b]EDIT: ALSO: the Warn PM doesn't contain anything. See screenshot for more information.
If your PM does not contain text, and this is a first-time installation, please open your private.php file and find:


warn_notify($thread1, $thread2, $bbuserinfo, $warnerdata['email'], $warnerdata['username'], $vboptions['warn_automatic_warner'], $warn_type, $level, $wcomment);
}
}
// End of automated warnings things


Right below that, add:


$message=$pm_message;

Blootix
20 Mar 2005, 07:10
add the following in your warn_pm template


Dear $user[username],

You have been warned for one of your posts, which violated $vboptions Rules. The reason you have been warned is because:

[b] $warn_type[warn_desc]
(Warning Type = $warn_type[warn_name])

For this violation, you have been given : $warn_type[warn_points] point(s).
The point(s) will remain in your account for $warn_type[warn_maturity] days.
After that, they will be removed automatically.

The post for which you are warned can be seen here:

$thread1

The admin/moderator who warned you, entered this comment:

=======================================
$_POST[comment]
=======================================

Your total Warning Level at the moment is: $level point(s).

If you reach the maximum of $vboptions[warn_points_before_banned], you will be banned from the Forums, for $peruserbanlimit days.

To see details about all the warnings you have received, until now, please click here ($vboptions[bburl]/Warn.php?do=ViewMyWarnings).

Please reply back if you have a dispute.



If your PM does not contain text, and this is a first-time installation, please open your private.php file and find:


warn_notify($thread1, $thread2, $bbuserinfo, $warnerdata['email'], $warnerdata['username'], $vboptions['warn_automatic_warner'], $warn_type, $level, $wcomment);
}
}
// End of automated warnings things


Right below that, add:


$message=$pm_message;

It was specifically the warning PM that did not contain anything. Every other PM contained their contents.

Thank you everything seems to be in order except for the "\" problem but I think that'll be fixed soon. No sweat.

Thanks!

sv1cec
20 Mar 2005, 07:18
Most welcome!

DaveBeel
20 Mar 2005, 11:52
Most welcome!
Thanks John for sorting out the parse error. Thats now working fine.

Not sure if your aware though, when someone replies to a warning PM the PM gets sent but is blank. Is there a problem somewhere else or is this me again?

sv1cec
20 Mar 2005, 12:07
I just tested the reply, and it works OK. Have you added that line I told you, in your private.php file?

Blootix
20 Mar 2005, 16:37
I just tested the reply, and it works OK. Have you added that line I told you, in your private.php file?
Me too. It works fine.

sv1cec
20 Mar 2005, 17:05
Oh, and the ' problem is solved in 3.3.1.

Sorry guys, but the upgrade to the latest release was quite a nightmare. It involved files from Revan and my files, which had to be merged into one. I am sure I had corrected this problem in the past, because I have comments in my site that contain ' and have no backslashes. Probably Revan missed that change, and I didn't catch it was missing either.

AS for your problem, if I remember correctly, the procedure which inserts a PM in the database, is the same if you create a new PM or if you reply to a PM, so that means that if a new PM is send OK, a reply should be also send OK.

DaveBeel
20 Mar 2005, 22:30
I just tested the reply, and it works OK. Have you added that line I told you, in your private.php file?

Many many thanks for all your assistance. Your correct I had missed that single line. Things seem to be working nicely now. Cheers John.

sv1cec
21 Mar 2005, 03:40
You are welcome.