PDA

View Full Version : Advanced Warning System (AWS)


Pages : 1 2 [3] 4 5

sv1cec
01-03-2005, 05:54 AM
I need a little help. I followed the install directions perfectly (I think, I may have made a mistake.) Everything LOOKS ok in the mod and admincp's and the warn [user] links are at the top of all posts, etc. When I click on the Ban [user] links I am directed to (EG) http://mahplace.com/forums/Warn.php?do=WarnUser&id=2128&post=769427 but the output of that page is just <html><body></body></html>

Any ideas why the page is not parsing?

EDIT: Note that I am using an installer package I downloaded yesterday.
Check that you have the template warn_addwarn. What does it contain?

Rgds

jonnerd154
01-03-2005, 06:18 AM
Check that you have the template warn_addwarn. What does it contain?

Rgds

oh crap, I'm the one at fault here. I am also creating a new layout at the moment and I did not have the new layout (the one I view my forum in) selected as the default when I ran the install script. I defaulted it and ran it again, now it is working!

Thanks, sorry to bother you with a non-existant problem!

*clicks Install*

jonnerd154
01-03-2005, 06:21 AM
++++, cancel the above. Now everything is parcing but when I try to search for users in the admincp I get the PHP error "Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /usr/local/apache/dev/forums/admincp/user.php on line 643" is that another one of my mistakes? If so, any pointers?

jonnerd154
01-03-2005, 06:30 AM
Nevermind....I lost a comma in the update. Sorry. You have a great hack here and it's just my stupidity that kept it from working. Thanks!

bold
01-03-2005, 06:51 AM
Check your modifications in private.php, you must have missed something.

Rgds

i've re-checked many times over. does my error message give you any idea where i could've made a mistake?

sv1cec
01-03-2005, 07:51 AM
i've re-checked many times over. does my error message give you any idea where i could've made a mistake?
Can you please tell me when you get that error message? I think I've found a problem, but I need to be sure from you.

Rgds

sv1cec
01-03-2005, 08:17 AM
i've re-checked many times over. does my error message give you any idea where i could've made a mistake?
Bold,

Try this and let me know if it works. In file private.php, as you have already changed it, find:


$w=$warn_opts['automatic_warner'];
$autowarner=$DB_site->query_first("select username from ".TABLE_PREFIX."user where userid=$w");
$autowarner=vbstrtolower($autowarner['username']);

$w=$warn_opts['warner'];
$warner=$DB_site->query_first("select username from ".TABLE_PREFIX."user where userid=$w");
$warner=vbstrtolower($warner['username']);

$w=$warn_opts['collector'];
$collector=$DB_site->query_first("select username from ".TABLE_PREFIX."user where userid=$w");
$collector=vbstrtolower($collector['username']);


Replace that with:


if (!$warn_opts['collector']=='' OR !$warn_opts['collector']=='0')
{
if (!$warn_opts['automatic_warner']=='')
{
$w=$warn_opts['automatic_warner'];
$autowarner=$DB_site->query_first("select username from ".TABLE_PREFIX."user where userid=$w");
$autowarner=vbstrtolower($autowarner['username']);
}
if (!$warn_opts['warner']=='')
{
$w=$warn_opts['warner'];
$warner=$DB_site->query_first("select username from ".TABLE_PREFIX."user where userid=$w");
$warner=vbstrtolower($warner['username']);
}
$w=$warn_opts['collector'];
$collector=$DB_site->query_first("select username from ".TABLE_PREFIX."user where userid=$w");
$collector=vbstrtolower($collector['username']);
}


I assume that your problem arises, because you have not defined a collector or an automatic warner or a hidden warner, and the program does not check for their existence. Unfortunatelly, I have these defined in my system, and the program didn't complained when I was checking it.

Please let me know if it works.

Rgds

bold
01-03-2005, 04:09 PM
Bold,

Try this and let me know if it works. In file private.php, as you have already changed it, find:


$w=$warn_opts['automatic_warner'];
$autowarner=$DB_site->query_first("select username from ".TABLE_PREFIX."user where userid=$w");
$autowarner=vbstrtolower($autowarner['username']);

$w=$warn_opts['warner'];
$warner=$DB_site->query_first("select username from ".TABLE_PREFIX."user where userid=$w");
$warner=vbstrtolower($warner['username']);

$w=$warn_opts['collector'];
$collector=$DB_site->query_first("select username from ".TABLE_PREFIX."user where userid=$w");
$collector=vbstrtolower($collector['username']);


Replace that with:


if (!$warn_opts['collector']=='' OR !$warn_opts['collector']=='0')
{
if (!$warn_opts['automatic_warner']=='')
{
$w=$warn_opts['automatic_warner'];
$autowarner=$DB_site->query_first("select username from ".TABLE_PREFIX."user where userid=$w");
$autowarner=vbstrtolower($autowarner['username']);
}
if (!$warn_opts['warner']=='')
{
$w=$warn_opts['warner'];
$warner=$DB_site->query_first("select username from ".TABLE_PREFIX."user where userid=$w");
$warner=vbstrtolower($warner['username']);
}
$w=$warn_opts['collector'];
$collector=$DB_site->query_first("select username from ".TABLE_PREFIX."user where userid=$w");
$collector=vbstrtolower($collector['username']);
}


I assume that your problem arises, because you have not defined a collector or an automatic warner or a hidden warner, and the program does not check for their existence. Unfortunatelly, I have these defined in my system, and the program didn't complained when I was checking it.

Please let me know if it works.

Rgds

Hey that worked! Thanks for taking the time to work on my problem. Thanks!

sv1cec
01-03-2005, 05:21 PM
Hey that worked! Thanks for taking the time to work on my problem. Thanks!
It was not your problem Sir, it was a problem with my hack, so I had to fix it.

I'll release a new version tonight, after I put the twins to bed and get something to eat.

Rgds

mojo8850
01-03-2005, 11:27 PM
Hey Is This A Complete Different Package..

I Mean Do I Have To Install The Warning Hack 1.0 Then Upgrade 1.5 Then Install This..

Or Can I Install This As It's Own..!

bahawolf
01-04-2005, 12:17 AM
Would it be possible to have it so you could warn someone directly from the AdminCP with their username?

Torqued
01-04-2005, 12:27 AM
Hey Is This A Complete Different Package..

I Mean Do I Have To Install The Warning Hack 1.0 Then Upgrade 1.5 Then Install This..

Or Can I Install This As It's Own..!

If you do not have any previous versions of the this hack installed, you can just install v3.0.2 on its own.

sv1cec
01-04-2005, 05:07 AM
Hey Is This A Complete Different Package..

I Mean Do I Have To Install The Warning Hack 1.0 Then Upgrade 1.5 Then Install This..

Or Can I Install This As It's Own..!
No, Zero Tolerance's hack is not required. But if you have it installed, you have to have version 1.5 of that hack, in order to upgrade to this one. Or you may just uninstall that hack and install this one directly.

Rgds

sv1cec
01-04-2005, 05:12 AM
Would it be possible to have it so you could warn someone directly from the AdminCP with their username?
Yeap, and this is something I am working on. But the bug found a few posts back, made me go back and test everything again, so that you guys do not have problems. To test, I had to backup my database and download it to my Sun at home, where I discovered that the postindex table is creating problems with phpMyAdmin backup file. This of course, was discovered after it has corrupted my database in the Sun a couple of times. I now have a relatively stable system on the Sun, on which I'll do the tests.

Hopefully, you 'll have a bug fix release (the fix is already shown a few posts back), and my comments on upgrading to vBulletin 3.0.4.

Rgds

sv1cec
01-04-2005, 11:52 AM
Version 3.0.3 is out. It fixes the bug noticed a few posts back in the private.php file. If you haven't declared any Hidden Warner or any Automatic Warner, the program crashed because of an SQL statement.

Please apply the upgrade instructions found in the UpgradeToLatestVersion.txt file.

Rgds and apologies for any inconvenience.

----------

John

sv1cec
01-04-2005, 11:58 AM
Compatibility with vBulletin 3.0.4

It looks as if there are no compatibility issues with this hack and vBulletin 3.0.4 released a couple of days ago.

Of course, the installation of the new vB release, will overwrite any changes you have made to the php files, so I would suggest that you use some file comparison utility (like Beyond Compare) to edit the new files according to your old ones.

The only other issue that I've noticed (and for the name of God, I can't understand why it happens) is that the "Message Tag" that I've used in the settings, is not preserved. In other words, the new release makes this setting disappear. All you have to do, is to run the following query manually, after you have upgraded everything, to make this setting re-appear (I remind you that this setting is found in vBulletin Options, Site Name/URL/Contact Details, and it is used by AWS when sending e-mails to users, in the subject line. You may want to note the contents of this settings, before you start the upgrade, so that you can then restore its value.

If you have any questions, please don't hesitate to ask.

Rgds

T3MEDIA
01-04-2005, 01:57 PM
Does beyond compare work?

Guy G
01-04-2005, 02:37 PM
Getting MySQL error when going into the admin panel...
something is wrong with table prefix not working...

Database error in vBulletin 3.0.3:

Invalid SQL: select * from vb3_ warning_options where oid='1'
mysql error: Table '*DataBase Name*_vbulletin.vb3_' doesn't exist

mysql error number: 1146

Date: Tuesday 04th of January 2005 10:29:14 AM
Script: http://forum.ex-zone.com/admincp/index.php?

Guy G
01-04-2005, 02:41 PM
Getting MySQL error when going into the admin panel...
something is wrong with table prefix not working...

Database error in vBulletin 3.0.3:

Invalid SQL: select * from vb3_ warning_options where oid='1'
mysql error: Table '*DataBase Name*_vbulletin.vb3_' doesn't exist

mysql error number: 1146

Date: Tuesday 04th of January 2005 10:29:14 AM
Script: http://forum.ex-zone.com/admincp/index.php?


ok solved...
this

else
{
$DB_site->reporterror = 1;
$warn_opts=$DB_site->query_first("select * from ".TABLE_PREFIX." warning_options where oid='1'");
$aws='1';
}

became to this and its solved...

else
{
$DB_site->reporterror = 1;
$warn_opts=$DB_site->query_first("select * from ".TABLE_PREFIX."warning_options where oid='1'");
$aws='1';
}

sv1cec
01-04-2005, 03:02 PM
ok solved...
this

else
{
$DB_site->reporterror = 1;
$warn_opts=$DB_site->query_first("select * from ".TABLE_PREFIX." warning_options where oid='1'");
$aws='1';
}

became to this and its solved...

else
{
$DB_site->reporterror = 1;
$warn_opts=$DB_site->query_first("select * from ".TABLE_PREFIX."warning_options where oid='1'");
$aws='1';
}

Thanks for catching that space, I might have spend a day and not find it.

Rgds

sv1cec
01-04-2005, 03:12 PM
Does beyond compare work?
Well, it depends on what you want from it. Yes it does, I checked all the new files vs the old ones and did the upgrades (changes which are done by the various hacks) in less than 2 hours.

Rgds

T3MEDIA
01-04-2005, 04:17 PM
abit off topic but how much more modified is the new version?

sv1cec
01-04-2005, 05:45 PM
abit off topic but how much more modified is the new version?
The new version (I assume version 3.0.3) compared to what?

If you are refering to the Zero Tolerance's hack, quite a bit more. Read the features list, and you'll understand.

If you want to find out what's the difference between the current release and some previous one, there is a file here, called Versions.txt. Read that file to see what's been added in each release.

Rgds

Guy G
01-04-2005, 05:46 PM
uninstalled... sorry, i experienced a lot of database errors and such.
ill wait for an update if there gonna be one.
thx

sv1cec
01-04-2005, 05:49 PM
uninstalled... sorry, i experienced a lot of database errors and such.
ill wait for an update if there gonna be one.
thx
No problem, but you do not tell me what the errors were, so I can't be either of help to you or release an update. The issue is that the install script has been tested yesterday on a clear vB 3.0.4 installation, and it worked like a charm.

As for the program, there has been only one or two bugs refered to me, and they've been corrected the same day. Can't be of more help without input from you.

Rgds

Rhoads
01-04-2005, 06:28 PM
Thnx sv1cec

Installed on vb3.0.4 en there is no problem.
Thnx for the great Hack :up:

Delphiprogrammi
01-04-2005, 06:54 PM
yes same here works fine with vb3.04

Rhoads
01-04-2005, 07:11 PM
Oke, I have a little problem when I do the 3.0.2 to 3.0.3 update :

When I run the query:
UPDATE `".TABLE_PREFIX."warning_options` SET version='3.0.3' WHERE oid=1

It's say's :
fault
SQL-query :
UPDATE `".TABLE_PREFIX."warning_options` SETversion = '3.0.3' WHERE oid = 1
MySQL retourneerde:
Incorrect table name '".TABLE_PREFIX."warning_options'

Delphiprogrammi
01-04-2005, 09:21 PM
hi,

drop the TABLE_PREFIX part and replace it with your "real" table name so if you have a database table name "vb_" the querry becomes


UPDATE vb_warning_options SET version='3.0.3' WHERE oid=1


seem you have a dutch MySQL ?

laat dat TABLE_PREFIX gedeelte weg en vervang het door je "tabel" naam dan gaat het werken

T3MEDIA
01-04-2005, 10:03 PM
I have been getting error from the database but I assumed it was something else. What exactly was your errors? Please let me know

Rhoads
01-05-2005, 12:39 AM
hi,

drop the TABLE_PREFIX part and replace it with your "real" table name so if you have a database table name "vb_" the querry becomes


UPDATE vb_warning_options SET version='3.0.3' WHERE oid=1


seem you have a dutch MySQL ?

laat dat TABLE_PREFIX gedeelte weg en vervang het door je "tabel" naam dan gaat het werken
Thnx Delphiprogrammi, that was the problem, and now it's updated ;)

Torqued
01-05-2005, 01:40 AM
John,

Getting an error after upgrading from 3.0 to 3.0.3

Database error in vBulletin 3.0.3:

Invalid SQL: update vb3warning_options set
hierarchical='Yes',
automatic='No',
automaticpm='No',
autocomments='Yes',
warner='0',
automatic_warner='0',
collector='1',
banned_limit='3',
points_before_banned='10',
banned_usergroup_id='8',
troll_usergroup_id='8',
protected_usergroups='6|6',
aprotected_usergroups='6',
restore_groupid='0',
incr_ban_days='No',
max_no_bans='3',
bans_mature='0',
viewoption='All',
multiple_per_post='Yes',
send_pm_warning='Yes',
send_em_warning='No',
email_on_ban='Yes',
historical='Yes',
allowoffpost='Yes',
warnings_per_page='15'
where oid='1'
mysql error: Unknown column 'collector' in 'field list'


Here is what is in my warning_options table:

oid int(15) No auto_increment
version varchar(10) Yes NULL
hierarchical char(3) Yes NULL
automatic char(3) Yes NULL
automaticpm char(3) Yes NULL
autocomments char(3) Yes NULL
automatic_warner int(10) UNSIGNED Yes
warner int(10) UNSIGNED Yes NULL
collector int(10) UNSIGNED Yes NULL
banned_limit int(15) No 0
points_before_banned int(15) No 0
banned_usergroup_id int(15) Yes 0
protected_usergroups varchar(50) Yes NULL
aprotected_usergroups varchar(50) Yes
troll_usergroup_id varchar(10) Yes NULL
restore_groupid smallint(5) UNSIGNED Yes
incr_ban_days char(3) Yes NULL
max_no_bans int(5) Yes NULL Change
bans_mature int(10) Yes NULL
viewoption char(3) Yes NULL
multiple_per_post char(3) Yes NULL
send_pm_warning char(3) Yes NULL
send_em_warning char(3) Yes NULL
email_on_ban char(3) Yes NULL
historical char(3) Yes NULL
allowoffpost char(3) Yes NULL
warnings_per_page int(3) Yes NULL

I don't understand why it's saying the "collector" field isn't there..

sv1cec
01-05-2005, 05:53 AM
John,

Getting an error after upgrading from 3.0 to 3.0.3



Here is what is in my warning_options table:

oid int(15) No auto_increment
version varchar(10) Yes NULL
hierarchical char(3) Yes NULL
automatic char(3) Yes NULL
automaticpm char(3) Yes NULL
autocomments char(3) Yes NULL
automatic_warner int(10) UNSIGNED Yes
warner int(10) UNSIGNED Yes NULL
collector int(10) UNSIGNED Yes NULL
banned_limit int(15) No 0
points_before_banned int(15) No 0
banned_usergroup_id int(15) Yes 0
protected_usergroups varchar(50) Yes NULL
aprotected_usergroups varchar(50) Yes
troll_usergroup_id varchar(10) Yes NULL
restore_groupid smallint(5) UNSIGNED Yes
incr_ban_days char(3) Yes NULL
max_no_bans int(5) Yes NULL Change
bans_mature int(10) Yes NULL
viewoption char(3) Yes NULL
multiple_per_post char(3) Yes NULL
send_pm_warning char(3) Yes NULL
send_em_warning char(3) Yes NULL
email_on_ban char(3) Yes NULL
historical char(3) Yes NULL
allowoffpost char(3) Yes NULL
warnings_per_page int(3) Yes NULL

I don't understand why it's saying the "collector" field isn't there..
That's strange. Where did you get the list of the columns? Did you do a "describe warning_options" or did you copy it from the hack instructions?

Rgds

sv1cec
01-05-2005, 05:56 AM
I have been getting error from the database but I assumed it was something else. What exactly was your errors? Please let me know
T3Media, what errors are you getting?

sv1cec
01-05-2005, 06:09 AM
Version 3.0.4 has been released. It allows you to warn a user directly from your AdminCP, or to be more precise, from the User Manager section of AdminCP. Obviously, only non-post-related warnings can be issued from there.

I hope you enjoy.

Vixion
01-05-2005, 08:54 AM
I have version 2.3.5 but I don't understand how to update it from version 2.3.5 tot 3.0.4.

Do I need to update from 2.3.5 tot 3.0 and then 3.0 tot 3.0.4?

sv1cec
01-05-2005, 09:42 AM
I have version 2.3.5 but I don't understand how to update it from version 2.3.5 tot 3.0.4.

Do I need to update from 2.3.5 tot 3.0 and then 3.0 tot 3.0.4?
You have to update from 2.3.5 to the next release. Then from that one to the next etc.

Torqued
01-05-2005, 11:54 AM
That's strange. Where did you get the list of the columns? Did you do a "describe warning_options" or did you copy it from the hack instructions?

Rgds

I copied it from PHPMyAdmin. I had uninstalled a v 1.x (including removing the tables) and then successfully ran the 3.0 installer before this upgrade.

sv1cec
01-05-2005, 12:34 PM
I copied it from PHPMyAdmin. I had uninstalled a v 1.x (including removing the tables) and then successfully ran the 3.0 installer before this upgrade.
And what are you trying to do when you get that error message? Update the Warning Options? That's strange. I am not sure what to say. I assume you applied all changes from 3.0 to 3.0.1, to 3.0.2, to 3.0.3, right?

If this is a new installation, and you do not have any warnings you want to preserve, try running the uninstaller and then reinstall from scratch. It just does not make sense.

JayJay
01-05-2005, 12:35 PM
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/-/public_html/forum/includes/init.php on line 522




Unable to add cookies, header already sent.
File: /home/-/public_html/forum/includes/init.php
Line: 522


Any idea what would be causing that error when loading 'mod_warn.php' in the modCP?

Torqued
01-05-2005, 12:53 PM
And what are you trying to do when you get that error message? Update the Warning Options? That's strange. I am not sure what to say. I assume you applied all changes from 3.0 to 3.0.1, to 3.0.2, to 3.0.3, right?

If this is a new installation, and you do not have any warnings you want to preserve, try running the uninstaller and then reinstall from scratch. It just does not make sense.

Yes. I applied all the changes for 3.0 -> 3.0.3. I was trying to update the Warning Options. I'll try running the uninstaller and reinstall again.

edited to add:

Uninstalled and reinstalled.. updating options seems to work fine now. :ermm:

Since I had made the file edits up to 3.0.3, I just applied the file edits for 3.0.3 -> 3.0.4 and am seeing a couple of issues when trying to warn from the Admin CP:

1: When entering a specific userID to warn, it just takes me to the user list.

2: When selecting Warn User from their profile page, it just takes me to a blank screen.

sv1cec
01-05-2005, 01:05 PM
Yes. I applied all the changes for 3.0 -> 3.0.3. I was trying to update the Warning Options. I'll try running the uninstaller and reinstall again.

edited to add:

Uninstalled and reinstalled.. seems to be working fine now. :ermm:
OK, because if it didn't, I would have to crash my mind. It wasn't logical, was it?!!

Rgds

Torqued
01-05-2005, 01:07 PM
OK, because if it didn't, I would have to crash my mind. It wasn't logical, was it?!!

Rgds

Looks like we were cross-posting. :)

Uninstalled and reinstalled.. updating options seems to work fine now.

Since I had made the file edits up to 3.0.3, I just applied the file edits for 3.0.3 -> 3.0.4 and am seeing a couple of issues when trying to warn from the Admin CP:

1: When entering a specific userID to warn, it just takes me to the user list.

2: When selecting Warn User from their profile page, it just takes me to a blank screen.

sv1cec
01-05-2005, 01:08 PM
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/-/public_html/forum/includes/init.php on line 522




Unable to add cookies, header already sent.
File: /home/-/public_html/forum/includes/init.php
Line: 522


Any idea what would be causing that error when loading 'mod_warn.php' in the modCP?
JayJ,

When does this happen? As soon as you log in the modcp? Or when you click on the link in the left frame, where it is supposed to say "View Issued Warnings"?

Also, which AWS version are you running?

Rgds

JayJay
01-05-2005, 01:19 PM
When one clicks the 'View Issued Warnings' link in the left-hand panel. I downloaded my version of AWS around 3-4 hours ago, therefore it is fairly recent.

It's weird since I updated to 3.0.4 today, and that particular file has not been touched or edited.

JayJay
01-05-2005, 01:26 PM
If it helps any, it refers to this section of the init.php file:

// add default special templates
if (!CACHE_DATASTORE_FILE OR !defined('CACHE_DATASTORE_FILE'))
{
$specialtemplates = array_merge(array(
'options',
'cron',
'forumcache',
'usergroupcache',
'stylecache'
), $specialtemplates);
}

sv1cec
01-05-2005, 01:28 PM
When one clicks the 'View Issued Warnings' link in the left-hand panel. I downloaded my version of AWS around 3-4 hours ago, therefore it is fairly recent.

It's weird since I updated to 3.0.4 today, and that particular file has not been touched or edited.
Does the report opens? If yes, does it have the sort buttons? Maybe it's an old version?

Give me a couple of minutes, I have found a small problem in that file, but it shouldn't be the one which is causing your problem.

I'll post here, when the new version is uploaded.

Rgds

Vixion
01-05-2005, 01:28 PM
I am getting errors...

UPDATE `vb3_warning_options` SET version=\'3.0\' WHERE oid=1

MySQL retourneerde:

You have an error in your SQL syntax near '\'3.0\' WHERE oid=1' at line 1

and

CREATE TABLE `vb3_ban_dates` (
`banned_serno` int(15) NOT NULL auto_increment,
`banned_user` int(15) NOT NULL default \'0\',
`banned_ban` int(2) default \'0\',
`banned_warning` int(15) NOT NULL,
`banned_by` int(15) NOT NULL default \'0\',
`banned_dateline` int(15) NOT NULL default \'0\',
`banned_status` char(1),
`banned_reason` mediumtext,
PRIMARY KEY (`banned_serno`)
) TYPE=MyISAM

MySQL retourneerde:

You have an error in your SQL syntax near '\'0\',
`banned_ban` int(2) default \'0\',
`banned_warning` int(15) NOT NUL' at line 3


What can I do to solve this problem?

sv1cec
01-05-2005, 02:12 PM
I am getting errors...

UPDATE `vb3_warning_options` SET version=\'3.0\' WHERE oid=1

MySQL retourneerde:

You have an error in your SQL syntax near '\'3.0\' WHERE oid=1' at line 1

and

CREATE TABLE `vb3_ban_dates` (
`banned_serno` int(15) NOT NULL auto_increment,
`banned_user` int(15) NOT NULL default \'0\',
`banned_ban` int(2) default \'0\',
`banned_warning` int(15) NOT NULL,
`banned_by` int(15) NOT NULL default \'0\',
`banned_dateline` int(15) NOT NULL default \'0\',
`banned_status` char(1),
`banned_reason` mediumtext,
PRIMARY KEY (`banned_serno`)
) TYPE=MyISAM

MySQL retourneerde:

You have an error in your SQL syntax near '\'0\',
`banned_ban` int(2) default \'0\',
`banned_warning` int(15) NOT NUL' at line 3


What can I do to solve this problem?
Why are you adding backslashes?

It would also help if I knew the error number that the database returned.

sv1cec
01-05-2005, 02:14 PM
If it helps any, it refers to this section of the init.php file:

// add default special templates
if (!CACHE_DATASTORE_FILE OR !defined('CACHE_DATASTORE_FILE'))
{
$specialtemplates = array_merge(array(
'options',
'cron',
'forumcache',
'usergroupcache',
'stylecache'
), $specialtemplates);
}
JayJ, I am not using these templates at all.

Please download version 3.0.5 I just uploaded and check out the new mod_warn.php file. It should work the way you are, without doing any other changes. Of course, do make the other changes after you verify that everything is OK with your problem.

Rgds

JayJay
01-05-2005, 02:20 PM
Thanks - I'll give that a try now and then tell you how I get on :)

sv1cec
01-05-2005, 02:26 PM
Looks like we were cross-posting. :)

Uninstalled and reinstalled.. updating options seems to work fine now.

Since I had made the file edits up to 3.0.3, I just applied the file edits for 3.0.3 -> 3.0.4 and am seeing a couple of issues when trying to warn from the Admin CP:

1: When entering a specific userID to warn, it just takes me to the user list.

2: When selecting Warn User from their profile page, it just takes me to a blank screen.

For the first, it's strange because I took the code directly from vB's admincp entry page and it works fine in my system. Anyone else is having this problem? If you go into the User Manager and you select Warn User from the Quick User Links, do you get the warn screen?

As for the second, check your warn_addwarn_nopost template, that's the one that is called from that point.

I'll look more into these two issues later tonight, my hands are kind of full right now.

Rgds

Rhoads
01-05-2005, 02:47 PM
For the first, it's strange because I took the code directly from vB's admincp entry page and it works fine in my system. Anyone else is having this problem? If you go into the User Manager and you select Warn User from the Quick User Links, do you get the warn screen?

As for the second, check your warn_addwarn_nopost template, that's the one that is called from that point.

I'll look more into these two issues later tonight, my hands are kind of full right now.

Rgds
I have the same problem :

1: When entering a specific userID to warn, it just takes me to the user list.
2: When selecting Warn User from their profile page, it just takes me to a blank screen with "Internal Server Error" "The server encountered an internal error or misconfiguration and was unable to complete your request."

It was good, but after the 3.0.4 and 3.0.5 update it's wrong.

Torqued
01-05-2005, 02:59 PM
For the first, it's strange because I took the code directly from vB's admincp entry page and it works fine in my system. Anyone else is having this problem? If you go into the User Manager and you select Warn User from the Quick User Links, do you get the warn screen?

As for the second, check your warn_addwarn_nopost template, that's the one that is called from that point.

I'll look more into these two issues later tonight, my hands are kind of full right now.

Rgds

I think I may be onto something:

My default style was a child style of the Default VB Style.

I switched my default style back to the parent Default VB Style and reinstalled. Now I get a 404 error when selecting the Warn User from the dropdown in the user profile.

Still getting just the user list when entering a userID. Searching by username now seems to be working.

I changed the following in admincp/user.php:

"/Warn.php?$session[sessionurl]do=WarnUserNoPost&id=$userid"

to:

"../Warn.php?$session[sessionurl]do=WarnUserNoPost&id=$userid"

Once I did that, I no longer get the 404, but instead get this:

An Error Has Occured!
An error has occured, the following message has been left below:

You may not issue warnings which are not related to a post

Edited to add: Ignore that last part right there.. when I reinstalled, I forgot I had to go back and change my warning options again. lol. sorry for being a retard! :nervous:

Still am getting only the whole userlist when I enter in a numeric userid via Warn User in the AdminCP

Viol8or
01-05-2005, 04:17 PM
Another suggestion sv1cec:

Situation: a certain person has already got a few warnings. He makes a new posts that needs a warning to. ModA comes by, spots the post and gives warning. Few hours later ModB passes by, spots post. If it's smart moderator, he will first check the logs or warnings to see if this post was warned before. A lot of mods however will skip this step, and it's rather time consuming on bigger boards as well. Therefor it would be nice if the post that got the warning was marked in any way, or has a prevention from further warnings.
We had situations we users got 2 or 3 warnings for the same post.
Can be handy?

sv1cec
01-05-2005, 06:17 PM
I think I may be onto something:

My default style was a child style of the Default VB Style.

I switched my default style back to the parent Default VB Style and reinstalled. Now I get a 404 error when selecting the Warn User from the dropdown in the user profile.

Still getting just the user list when entering a userID. Searching by username now seems to be working.

I changed the following in admincp/user.php:

"/Warn.php?$session[sessionurl]do=WarnUserNoPost&id=$userid"

to:

"../Warn.php?$session[sessionurl]do=WarnUserNoPost&id=$userid"

Once I did that, I no longer get the 404, but instead get this:

An Error Has Occured!
An error has occured, the following message has been left below:

You may not issue warnings which are not related to a post

Edited to add: Ignore that last part right there.. when I reinstalled, I forgot I had to go back and change my warning options again. lol. sorry for being a retard! :nervous:

Still am getting only the whole userlist when I enter in a numeric userid via Warn User in the AdminCP
Folks,

I think that at some time, I installed a hack which allowed you to search by the User ID. I swear to God, it works fine with the code as it is in my site. I am trying to find out what else need to be changed, but I can't. I think it was a mini-mod that did that, but I can't find it at the moment.

I'll look at that and let you know as soon as possible.

As for the post being marked, this is an excellent idea, and I think it can be done.

Umtil later.

SamirDarji
01-05-2005, 07:34 PM
Another suggestion sv1cec:

Situation: a certain person has already got a few warnings. He makes a new posts that needs a warning to. ModA comes by, spots the post and gives warning. Few hours later ModB passes by, spots post. If it's smart moderator, he will first check the logs or warnings to see if this post was warned before. A lot of mods however will skip this step, and it's rather time consuming on bigger boards as well. Therefor it would be nice if the post that got the warning was marked in any way, or has a prevention from further warnings.
We had situations we users got 2 or 3 warnings for the same post.
Can be handy?
I wouldn't think preventing a warning would be a solution, but what about changing the color or font (or both) of the "warn user" link in the post when there is already a warning for that post? This way, a mod will know there is already a warning on that post, but still has the option to warn again if it is warranted.

mojo8850
01-05-2005, 09:22 PM
Thanks sv1cec..

Nice One Guys For Replying Appreciate It..!

Viol8or
01-06-2005, 05:08 AM
I wouldn't think preventing a warning would be a solution, but what about changing the color or font (or both) of the "warn user" link in the post when there is already a warning for that post? This way, a mod will know there is already a warning on that post, but still has the option to warn again if it is warranted.

This would indeed be an acceptable solution.

sv1cec
01-06-2005, 05:43 AM
Good morning Gang,

Here is the answer to your problem. I knew it was not something difficult:

In your includes/adminfunctions_user.php find:


$condition .= iif($user['email'], " AND email LIKE '%" . addslashes_like($user['email']) . "%'");


Right above that, add:


$condition .= iif($user['userid'], " AND user.userid = '" . addslashes_like($user['userid']) . "'");


That should solve your search with User ID problem.

Let me go and update the installation instructions and all.

Rgds

sv1cec
01-06-2005, 06:11 AM
Refering to the warned post being marked, I was thinking about this and I want to share those thoughts with you.

At the moment, the only place where the warned postid is stored, is in the table warnings. If we were to have a "red flag" for posts that have been warned, that means that I should add a query, which will read the warnings table, for each post. Too much server overload I think.

The alternative would be, to mark the post as "warned" in the "post" table. In that way, when the post is read, to be displayed, the warned red flag is read as well. But, that means that almost all files that issue "post-related" warnings, will have to be edited (off my head right now, I would say that these are three or four files, but maybe I can make it less).

I think I should do it that way, otherwise I know one member here, whose hair will stand up, if we add another query per shown post.

Rgds

Viol8or
01-06-2005, 10:04 AM
I like the alternative option. Doesn't have to be included right away, if done in a next release I would be more than happy :)
Thanks for being so cooperative and active responding!

Viol8or
01-06-2005, 10:10 AM
Maybe another possibility (but hey I'm just a php/mysql noob) ... just give a pop up or warning to the moderator when they try to give a second warning to an already warned post.
That why I think you only got to store the id's of the marked posts and query them when a new warning is been issued.
But then again, I'm just a noob in these things.

sv1cec
01-06-2005, 12:09 PM
Well folks, here is what I've done. I added a column in the post table. Every time a post is warned, I add 1 to that column. Every time a warning is removed, I subtract 1 from that column. If that column is >0, then there is at least one warning for that post. If this is so, a large stop-like sign appears in the postbit, in that post.

I just uploaded 3.0.6.

One more thing. If there are any users who still have problems with 3.0.5 or any previous release, please let me know now.

Thanks and Rgds

Rhoads
01-06-2005, 02:55 PM
Thnx, works fine, but :

In users management, still it just takes me to a blank screen with a Internal Server Error when I selecting Warn User.

sv1cec
01-06-2005, 04:04 PM
Thnx, works fine, but :

In users management, still it just takes me to a blank screen with a Internal Server Error when I selecting Warn User.
Do you also get an error when trying to warn someone from their Profile?

Rgds

Rhoads
01-06-2005, 05:11 PM
Do you also get an error when trying to warn someone from their Profile?

Rgds

No, than is works fine, the link brings me to example : http://www.mysite.nl/forum/Warn.php?do=WarnUserNoPost&id=61

From the users management the link brings me nowhere.

Maby it's a problem of my forum DIR, I have my home page in the root en than a forum DIR.

mikaelweb1
01-06-2005, 05:47 PM
Database error in vBulletin 3.0.4:

Invalid SQL: insert into warnings values('','30','1','1105040863','','256','2','N',' A','','')
mysql error: Column count doesn't match value count at row 1

mysql error number: 1136

sv1cec
01-06-2005, 06:54 PM
Database error in vBulletin 3.0.4:

Invalid SQL: insert into warnings values('','30','1','1105040863','','256','2','N',' A','','')
mysql error: Column count doesn't match value count at row 1

mysql error number: 1136
Not very helpful, I need more info to help you out. Where you get that, under what conditions, what options you use etc. Try to be more descriptive.

sv1cec
01-06-2005, 06:59 PM
No, than is works fine, the link brings me to example : http://www.mysite.nl/forum/Warn.php?do=WarnUserNoPost&id=61

From the users management the link brings me nowhere.

Maby it's a problem of my forum DIR, I have my home page in the root en than a forum DIR.
If your forum directory is one level up from the admincp directory, it should work fine.

Do this test. While you are in your admincp, go to the address bar of your browser and enter this :

http://www.mysite.nl/forum/admincp/../Warn.php?$session[sessionurl]do=WarnUserNoPost&return=user&id=61

Does that bring you anything?

Rgds

Rhoads
01-06-2005, 07:13 PM
If your forum directory is one level up from the admincp directory, it should work fine.

Do this test. While you are in your admincp, go to the address bar of your browser and enter this :

http://www.mysite.nl/forum/admincp/../Warn.php?$session[sessionurl]do=WarnUserNoPost&return=user&id=61

Does that bring you anything?

Rgds
It brings me to : http://www.mysite.nl/forum/Warn.php?do=ViewMyWarnings But with the url which you gave me.

sv1cec
01-06-2005, 09:20 PM
PLEASE DO NOT USE THE AUTOMATIC WARNING FEATURE OF THIS HACK.

I have discovered a bug, where the automatic warning is attributed not to the post that issued it, but to the post before it.

I am working on the solution, but until I have everything finalize, please turn off the Automatic Warnings for posts.

Thank you and I am sorry for the inconvenience.

sv1cec
01-06-2005, 10:15 PM
Version 3.0.7 was just uploaded, which corrects the bug in the Automatic Warnings for posts.

The bug affected only replies posted in a thread, not the first post in a thread, or edits done to an existing post.

For those who have "ObsceneWords"-type of warnings in your forum, I think you should check them out. I had only 3 of them, and the one was the first in a thread, so it was not affected. The rest were fixed easily with a little investigating work in the post table and a few SQL commands.

Gentlemen, I am really sorry for any inconvenience I caused you.

:-(

nubian
01-06-2005, 10:18 PM
sql syntax help please

ALTER TABLE `".TABLE_PREFIX."post` ADD COLUMN `warn_flag` int(5) default 0 AFTER attach

my prefix is vb3 but

i thought it would be like this:
ALTER TABLE vb3_post ADD COLUMN `warn_flag` int(5) default 0 AFTER attach

but i keep getting a syntax error
MySQL said:


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 'default0 AFTER attach' at line 1

please help

sv1cec
01-06-2005, 10:19 PM
It brings me to : http://www.mysite.nl/forum/Warn.php?do=ViewMyWarnings But with the url which you gave me.
That's strange. Warn.php takes you to "ViewMyWarnings" if it doesn't find any other "do" directive. OK, let's try this:


http://www.mysite.nl/forum/admincp/../Warn.php?do=WarnUserNoPost&return=user&id=61


Let me know where that takes you.

Rgds

Torqued
01-06-2005, 10:20 PM
Dangit, John! What do you think we're paying you all that good money for! ;) lol

Thanks for all of your hard work. I'll be upgrading tonight. :)

sv1cec
01-06-2005, 10:25 PM
Dangit, John! What do you think we're paying you all that good money for! ;) lol

Thanks for all of your hard work. I'll be upgrading tonight. :)
Torqued,

I feel really sorry. I have done tests on tests and more tests on anything, and this slipped my attention. I guess I can blame vB a little, because somwhere above my code, it calls a function, with the parameter $_POST['postid'], so I assumed (without checking, the idiot), that that parameter was the postid of the new reply. However, this was not the case, this is the id of the previous post in the thread, and is used inside the called function to link the posts together. It is inside that function that the new reply's id is generated.

So I goofed big time!

At least I had the fix out within one hour I noticed the problem.

Time to go to bed, it's 2:30 am here.

Rgds

nubian
01-06-2005, 10:30 PM
So I goofed big time!

At least I had the fix out within one hour I noticed the problem.

Time to go to bed, it's 2:30 am here.

Rgds oh please oh please help me with my syntax error b4 you do go to bed.
i'm not sql guy
thanks in advance

sv1cec
01-06-2005, 10:37 PM
sql syntax help please

ALTER TABLE `".TABLE_PREFIX."post` ADD COLUMN `warn_flag` int(5) default 0 AFTER attach

my prefix is vb3 but

i thought it would be like this:
ALTER TABLE vb3_post ADD COLUMN `warn_flag` int(5) default 0 AFTER attach

but i keep getting a syntax error
MySQL said:


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 'default0 AFTER attach' at line 1

please help
You have not left a space between the word "default" and the zero. I think this is your error. Is it?

I'll wait for you to tell me. I'll have another cigarette.

Rgds

nubian
01-06-2005, 10:44 PM
You have not left a space between the word "default" and the zero. I think this is your error. Is it?

I'll wait for you to tell me. I'll have another cigarette.

Rgds

i tired this:
ALTER TABLE vb3_post ADD COLUMN `warn_flag` int(5) default 0 AFTER attach

and got this:
Error

SQL-query :

ALTER TABLE vb3_post ADD COLUMN `warn_flag` int( 5 ) default 0 AFTER attach

MySQL said:

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 'default0 AFTER attach' at line 1

there is a space between default and 0

nubian
01-06-2005, 10:47 PM
MySQL 4.0.22

sv1cec
01-06-2005, 10:55 PM
MySQL 4.0.22
Are you sure you have to add that underscore after vb3 and before the table name? I am not using a prefix, so I have no idea. Someone answered a similar question a few posts back, have a look. The rest of the query looks OK, except from the fact that in the SQL error you are getting the word "default" and the zero after it, are stuck together, there should be a space there between them. Try that too,

Sorry, have to go to bed, I have to take the twins to school tomorrow morning and it's the first day after the holidays, so I need to get up really early to face all the ... tornados they'll have for me.

Rgds

Rhoads
01-06-2005, 11:14 PM
That's strange. Warn.php takes you to "ViewMyWarnings" if it doesn't find any other "do" directive. OK, let's try this:


http://www.mysite.nl/forum/admincp/../Warn.php?do=WarnUserNoPost&return=user&id=61


Let me know where that takes you.

Rgds

Oke, this link bring me to the good adress, there is a progress :up:


http://www.mysite.nl/forum/Warn.php?do=WarnUserNoPost&id=61

nubian
01-06-2005, 11:19 PM
where you quoted this when upgrading from 3.0.5 to 3.0.6:

On a different issue, I noticed that the Warning Points and the Bans that a user has, appeared in postbit,
if the "Who can view Warning Points & Bans" option, was set to all, even if the person viewing was not a register user.
To correct that, open your postbit (or postbit_legacy) template and find:

<if condition="$viewoption=='All'">

Replace that with:

<if condition="$viewoption=='All' and $bbuserinfo[userid]>0">

i don't have that line of code in ostbit or postbit legacy
mind you your hack is the only hack that has altered my postbit and postbit legacy.

sv1cec
01-06-2005, 11:19 PM
Oke, this link bring me to the good adress, there is a progress :up:


http://www.mysite.nl/forum/Warn.php?do=WarnUserNoPost&id=61

Well, yeah, that should bring you to the right address, and you can change the file to use that link, but that doesn't solve the problem of why it doesn't work for you. Unless your admincp directory is somewhere I can't imagine!

Change the file and you are done.

sv1cec
01-06-2005, 11:29 PM
where you quoted this when upgrading from 3.0.5 to 3.0.6:



i don't have that line of code in ostbit or postbit legacy
mind you your hack is the only hack that has altered my postbit and postbit legacy.
Yes, this is part of my hack code. You just have to change it and add that $bbuserinfo>0

Goodnight!!!

nubian
01-06-2005, 11:31 PM
Yes, this is part of my hack code. You just have to change it and add that $bbuserinfo>0

Goodnight!!!
i meant that i don't have this line of code:
<if condition="$viewoption=='All'">

Rhoads
01-06-2005, 11:57 PM
Well, yeah, that should bring you to the right address, and you can change the file to use that link, but that doesn't solve the problem of why it doesn't work for you. Unless your admincp directory is somewhere I can't imagine!

Change the file and you are done.

Oke nice sv1cec

But what and in which file must I editting so that the fix is there.
Sorry, but with the little update's of you, I am ff the way lost.

Then the 3.0.5 to 3.0.6 update :

You say :

Edit your postbit template and find:

<td valign="top" nowrap="nowrap">

<div class="smallfont">
<div>User ID: $post[userid]</div>
<if
condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>


But in my template there is no
<div>User ID: $post[userid]</div>

This state there at me

<td valign="top" nowrap="nowrap">

<div class="smallfont">
<if
condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>

sv1cec
01-07-2005, 04:49 AM
Oke nice sv1cec

But what and in which file must I editting so that the fix is there.
Sorry, but with the little update's of you, I am ff the way lost.

Then the 3.0.5 to 3.0.6 update :

You say :

Edit your postbit template and find:

<td valign="top" nowrap="nowrap">

<div class="smallfont">
<div>User ID: $post[userid]</div>
<if
condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>


But in my template there is no
<div>User ID: $post[userid]</div>

This state there at me

<td valign="top" nowrap="nowrap">

<div class="smallfont">
<if
condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>

Drl2005, edit file admincp/user.php and search for :


"../Warn.php?$session[sessionurl]do=WarnUserNoPost&return=user&id=$userid"


Replace that with the statement that worked for you.

As for the last replace instructions, yes, enter my code above the one you mention. If I remember correctly, the User ID was something I added for my convenience in my forum.

Sorry!

sv1cec
01-07-2005, 04:59 AM
i meant that i don't have this line of code:
<if condition="$viewoption=='All'">
Nubian,

That part of the code exists since the first release (or to be more accurate since version 1.3). If you do not have it, then you haven't installed the hack properly.

Shall we take it from scratch? What version do you have installed? Which version do you try to install now? Are you installing for the first time?

Nubian, sorry but I can't remember everything, especially today, I went to bed a 03:30 am yesterday night and it's 08:00 right now, so please do not expect too much from me.

Rgds

Rhoads
01-07-2005, 10:10 AM
Drl2005, edit file admincp/user.php and search for :


"../Warn.php?$session[sessionurl]do=WarnUserNoPost&return=user&id=$userid"


Replace that with the statement that worked for you.

As for the last replace instructions, yes, enter my code above the one you mention. If I remember correctly, the User ID was something I added for my convenience in my forum.

Sorry!

Oke very very very thank :classic:

I have only added the 2 points at the beginning of that rule, and it works perfectly now, the page opened now in my admincp themselves.

Thanks once again

PS : And now I see that there is another update of vBulletin :confused:

nubian
01-07-2005, 11:36 AM
Nubian,

That part of the code exists since the first release (or to be more accurate since version 1.3). If you do not have it, then you haven't installed the hack properly.

Shall we take it from scratch? What version do you have installed? Which version do you try to install now? Are you installing for the first time?

Nubian, sorry but I can't remember everything, especially today, I went to bed a 03:30 am yesterday night and it's 08:00 right now, so please do not expect too much from me.

Rgds

sv1cec, i'm sorry but i was able to figure out what went wrong on my end.
also the sql sntax error i was getting....
my sql doesn't like:

ALTER TABLE vb3_post ADD COLUMN `warn_flag` int( 5 ) default 0 AFTER attach

but in stead it likes:
ALTER TABLE 'vb3_post' ADD COLUMN `warn_flag` int( 5 ) default '0' AFTER attach

i do appreciate your support greatly and once again this is an awesome mod.
thank you

sv1cec
01-07-2005, 01:22 PM
sv1cec, i'm sorry but i was able to figure out what went wrong on my end.
also the sql sntax error i was getting....
my sql doesn't like:

ALTER TABLE vb3_post ADD COLUMN `warn_flag` int( 5 ) default 0 AFTER attach

but in stead it likes:
ALTER TABLE 'vb3_post' ADD COLUMN `warn_flag` int( 5 ) default '0' AFTER attach

i do appreciate your support greatly and once again this is an awesome mod.
thank you
Glad you figure it out. What SQL are you using by the way?

nubian
01-07-2005, 01:32 PM
Glad you figure it out. What SQL are you using by the way?

MySQL 4.0.22

Revan
01-07-2005, 02:43 PM
Okay Im gonna start remaking this version now, to work with $vboptions
sv1, I seem to remember some guy saying that he wasn't gonna release new versions every 3 days *sees 2 update emails in his inbox just today*
*cough*
XD

Viol8or
01-07-2005, 06:45 PM
Hack seem to work perfectly with VBB 3.0.5

Dennis B
01-07-2005, 08:07 PM
sv1cec,

This is an awesome hack, thanks for sharing.
A question, though. I'm doing the file mods and at this step in your instructions:

9. Open file includes/functions_newpost.php and find:

global $DB_site, $vboptions, $vbphrase, $bbuserinfo, $forumperms, $usergroupcache, $wehavecensoredwords, $weneedacounter, $_REQUEST;

Replace that with:

global $DB_site, $vboptions, $vbphrase, $bbuserinfo, $forumperms, $usergroupcache, $wehavecensoredwords, $weneedacounter, $newpostid, $_REQUEST;

I can't find that line. I doubled-checked in versions 3.0.3 and 3.0.5 - which I'm running.

The line I can find is

global $DB_site, $vboptions, $vbphrase, $bbuserinfo, $forumperms, $usergroupcache, $_REQUEST;

which is pretty close.

Shouldn't the variables $wehavecensoredwords, $weneedacounter be just in the second line...?

Thanks,

nubian
01-07-2005, 09:55 PM
sv1cec,

This is an awesome hack, thanks for sharing.
A question, though. I'm doing the file mods and at this step in your instructions:

9. Open file includes/functions_newpost.php and find:

global $DB_site, $vboptions, $vbphrase, $bbuserinfo, $forumperms, $usergroupcache, $wehavecensoredwords, $weneedacounter, $_REQUEST;

Replace that with:

global $DB_site, $vboptions, $vbphrase, $bbuserinfo, $forumperms, $usergroupcache, $wehavecensoredwords, $weneedacounter, $newpostid, $_REQUEST;

I can't find that line. I doubled-checked in versions 3.0.3 and 3.0.5 - which I'm running.

The line I can find is

global $DB_site, $vboptions, $vbphrase, $bbuserinfo, $forumperms, $usergroupcache, $_REQUEST;

which is pretty close.

Shouldn't the variables $wehavecensoredwords, $weneedacounter be just in the second line...?

Thanks,

i ran into the same exact situation so don't feel like you screwed up.
i just replaced what seemed to be the closest one there since you aren't removing any line of code but simply just adding.

Dennis B
01-07-2005, 11:45 PM
Thanks nubian. :up:

sv1cec
01-08-2005, 05:20 AM
sv1cec,

This is an awesome hack, thanks for sharing.
A question, though. I'm doing the file mods and at this step in your instructions:

9. Open file includes/functions_newpost.php and find:

global $DB_site, $vboptions, $vbphrase, $bbuserinfo, $forumperms, $usergroupcache, $wehavecensoredwords, $weneedacounter, $_REQUEST;

Replace that with:

global $DB_site, $vboptions, $vbphrase, $bbuserinfo, $forumperms, $usergroupcache, $wehavecensoredwords, $weneedacounter, $newpostid, $_REQUEST;

I can't find that line. I doubled-checked in versions 3.0.3 and 3.0.5 - which I'm running.

The line I can find is

global $DB_site, $vboptions, $vbphrase, $bbuserinfo, $forumperms, $usergroupcache, $_REQUEST;

which is pretty close.

Shouldn't the variables $wehavecensoredwords, $weneedacounter be just in the second line...?

Thanks,
It depends.

If you are installing from scratch, yes you are right, these two variables should be only in the second line. I had a mistake in the installation instructions (corrected).

But if you are just ugrading, then these variables were there, from the previous version, actually they are there since version 2.0 if memory serves me right.

Rgds

sv1cec
01-08-2005, 05:39 AM
Okay Im gonna start remaking this version now, to work with $vboptions
sv1, I seem to remember some guy saying that he wasn't gonna release new versions every 3 days *sees 2 update emails in his inbox just today*
*cough*
XD
Well, one of the updates was a bug fix, and it was a serious bug, which made me turn red! So what was I supposed to do? Keep the fix for next month?

Gentlemen, I can withhold any updates and release them once a month. I've asked you in the past, what's your prefered way and got no anwers. It looks as if I have one vote for delayed releases, so that I do not send out new versions every two days (or sometimes every day). If I have no opposite views from you guys on this subject, I'll keep all the updates and release them once a month.

Viol8or
01-08-2005, 07:14 AM
Feature updates don't have to be there in 2 days for, I'm happy you are willing to incorporate them and can wait a few days/weeks if necessary.
However, bugfixes should not be delayed, is my opinion.

j_86
01-08-2005, 05:03 PM
This hack is VB3.05 compatiable, bar one very small code change related to the instructions, which isn't a big problem because most people who edit PHP files don't have mutiline search boxes and will search for the first line of code to change. I forgot which instruction it was, i'll find it again soon.

Viol8or
01-08-2005, 05:42 PM
I think this is the one ... global $DB_site, $vboptions, $vbphrase, $bbuserinfo, $forumperms, $usergroupcache, $wehavecensoredwords, $weneedacounter, $newpostid, $_REQUEST;

But was stated a few post ago.

Revan
01-08-2005, 05:45 PM
Well, one of the updates was a bug fix, and it was a serious bug, which made me turn red! So what was I supposed to do? Keep the fix for next month?I was kidding, mate... :p

Viol8or
01-08-2005, 07:01 PM
I've encountered an error when trying to change something in the 'Manage Warning Options' page:

Database error in vBulletin 3.0.5:

Invalid SQL: update gf_warning_options set hierarchical='Yes', automatic='Yes', automaticpm='No', autocomments='No', warner='0', automatic_warner='1', collector='1', banned_limit='7', points_before_banned='10', banned_usergroup_id='16', troll_usergroup_id='8', protected_usergroups='6|6', aprotected_usergroups='6', restore_groupid='0', incr_ban_days='Yes', max_no_bans='4', bans_mature='31', viewoption='All', multiple_per_post='Yes', send_pm_warning='Yes', send_em_warning='Yes', email_on_ban='No', historical='Yes', allowoffpost='Yes', warnings_per_page='20'
where oid='1'
mysql error: Unknown column 'autocomments' in 'field list'

mysql error number: 1054

Date: Saturday 08th of January 2005 10:00:11 PM
Script: http://mysite.org/admincp/admin_warn.php
Referer: http://mysite.org/admincp/admin_warn.php?act=manageoptions

Did an install from scratch to latest version of AWS
If I look at the table it is indeed not there.

Rhoads
01-08-2005, 07:23 PM
Hello sv1cec

When I look at the users (View Banned Users) in the mod of adminCP I get the next error.

Parse error: parse error in /var/www/html/forum/modcp/banning.php on line 518

It's a edit file of the warning system, what can I do.

vb 3.0.5 file :

print_table_header("$vbphrase[banned_users]: $vbphrase[temporary_ban] <span class=\"normal\">$vbphrase[usergroups]: " . implode(', ',
$querygroups) . "</span>", 7);

Edited file :

print_table_header("$vbphrase[banned_users]: $vbphrase[temporary_ban] <span class=\"normal\">$vbphrase[usergroups]: " . implode(', ',
$querygroups) . "</span>", 8);$querygroups) . "</span>", 7);

Thnx, it's the only problem for me with 3.0.7 and vb3.0.5 ;)

Delphiprogrammi
01-08-2005, 07:25 PM
hi,

updated to the latest release all works fine except for the new feature with that "stop" sign like image i don't see it and i am logged into my administrator account & did all the template modifications and uploaded the images to /images/misc/Warn.gif all is ee is a read line with the users warning level

Viol8or you need to add that colum to your database run


ALTER TABLE `".TABLE_PREFIX."warning_options ADD COLUMN autocomments char(3)


drop TABLE_PREFIX if MySQL complains about it and replace it by your table name

Delphiprogrammi
01-08-2005, 07:28 PM
Hello sv1cec

When I look at the users (View Banned Users) in the mod of adminCP I get the next error.

Parse error: parse error in /var/www/html/forum/modcp/banning.php on line 518

It's a edit file of the warning system, what can I do.

vb 3.0.5 file :

print_table_header("$vbphrase[banned_users]: $vbphrase[temporary_ban] <span class=\"normal\">$vbphrase[usergroups]: " . implode(', ',
$querygroups) . "</span>", 7);

Edited file :

print_table_header("$vbphrase[banned_users]: $vbphrase[temporary_ban] <span class=\"normal\">$vbphrase[usergroups]: " . implode(', ',
$querygroups) . "</span>", 8);$querygroups) . "</span>", 7);

Thnx, it's the only problem for me with 3.0.7 and vb3.0.5 ;)


look carefully that you didn't forgot a ( { ) } or quotes parse error is php syntax related error you should look in the line number php tells you OR in the lines of code above it

Rhoads
01-08-2005, 08:18 PM
look carefully that you didn't forgot a ( { ) } or quotes parse error is php syntax related error you should look in the line number php tells you OR in the lines of code above it

Thnx Delphiprogrammi

It's fixed, I forget to delete $querygroups) . "</span>", 7); after replacing that with $querygroups) . "</span>", 8); :ermm:

drumsy
01-09-2005, 12:31 AM
I seem to having a template problem when upgrading postbit_legacy. The instructions say to look for this:

<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]" />

And replace with this:

<td class="alt1">
<TABLE width=100%><TR>
<TD width=90%><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>
</td><TD width=10% align="$stylevar[right]">
<if condition="THIS_SCRIPT=='showthread' AND ($bbuserinfo[usergroupid]==5 OR $bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7) AND $post[warn_flag]>0">
<A HREF="Warn.php?do=ViewPostWarnings&post=$post[postid]" onclick="window.open('Warn.php?do=ViewPostWarnings&post=$post[postid]','','width=1000, height=500, resizable=yes, scrollbars=yes'); return false;" target="_blank"><img src="images/misc/warn.gif" border=0></a>
</if>
</td></tr></table>
<hr size="1" style="color:$stylevar[tborder_bgcolor]" />

However when I do so, and I refresh a thread, the first post looks fine, but the second and so on start nesting inside each other.

Any pointers?

Rhoads
01-09-2005, 12:44 AM
I seem to having a template problem when upgrading postbit_legacy. The instructions say to look for this:

<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]" />

And replace with this:

<td class="alt1">
<TABLE width=100%><TR>
<TD width=90%><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>
</td><TD width=10% align="$stylevar[right]">
<if condition="THIS_SCRIPT=='showthread' AND ($bbuserinfo[usergroupid]==5 OR $bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7) AND $post[warn_flag]>0">
<A HREF="Warn.php?do=ViewPostWarnings&post=$post[postid]" onclick="window.open('Warn.php?do=ViewPostWarnings&post=$post[postid]','','width=1000, height=500, resizable=yes, scrollbars=yes'); return false;" target="_blank"><img src="images/misc/warn.gif" border=0></a>
</if>
</td></tr></table>
<hr size="1" style="color:$stylevar[tborder_bgcolor]" />

However when I do so, and I refresh a thread, the first post looks fine, but the second and so on start nesting inside each other.

Any pointers?

I have the same problem :cry:

nubian
01-09-2005, 03:57 AM
is this hack 3.0.5 compliant?

sv1cec
01-09-2005, 06:04 AM
Answers to all good people who wrote with problems (if I forget someone, it's not intentional, I just got my first sip of coffee):

Delphiporogrammer: Stop Sign: Did you upload the image in your images/misc directory? It looks as if you have it named Warn.gif. I think it should be warn.gif (caps are critical in a Unix system, I do not know what you are running your server on).

Others with nested threads: Guys, you are lucky, because your system CAN show you the classic layout, even if it shows it nested! LoL, I think I've screwed up my files somewhere, and even though I select the "Classic" layout, I still do not get it, in my active site. Checking my test site now. Yeap. it does the same, so I think I have to look into it. I need to find which file is creating this problem. Give me some time.

Nubian, yes, it works OK with 3.0.5, apart from the problem with the Classic view.

Rgds

sv1cec
01-09-2005, 06:27 AM
Gentlemen,

Those of you who can see the Classic view of your posts, please try the following:

In the postbit.legacy template, I suggested that you make the following change, in order to show the Warn Sign.


<td class="alt1">
<TABLE width=100%><TR>
<TD width=90%><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>
</td><TD width=10% align="$stylevar[right]">
<if condition="THIS_SCRIPT=='showthread' AND ($bbuserinfo[usergroupid]==5 OR $bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7) AND $post[warn_flag]>0">
<A HREF="Warn.php?do=ViewPostWarnings&post=$post[postid]" onclick="window.open('Warn.php?do=ViewPostWarnings&post=$post[postid]','','width=1000, height=500, resizable=yes, scrollbars=yes'); return false;" target="_blank"><img src="images/misc/warn.gif" border=0></a>
</if>
</td></tr></table>
<hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<!-- / icon and title -->
</if>


Please replace that part of the code with the one listed below, and tell me if the nested thingy stopped.


<td class="alt1">
<TABLE width=100%><TR>
<TD width=90%>
<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>
</if>
</td>
<TD width=10% align="$stylevar[right]">
<if condition="THIS_SCRIPT=='showthread' AND ($bbuserinfo[usergroupid]==5 OR $bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7) AND $post[warn_flag]>0">
<A HREF="Warn.php?do=ViewPostWarnings&post=$post[postid]" onclick="window.open('Warn.php?do=ViewPostWarnings&post=$post[postid]','','width=1000, height=500, resizable=yes, scrollbars=yes'); return false;" target="_blank"><img src="images/misc/warn.gif" border=0></a>
</if>
</td>
</tr></table>
<hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<!-- / icon and title -->


Please let me know if that works, because I can't test it. Both my test and active site, refuse to change from the Modern Look to the Classic one, talk about big time mess!

Rgds

Rhoads
01-09-2005, 10:28 AM
Gentlemen,

Please let me know if that works, because I can't test it. Both my test and active site, refuse to change from the Modern Look to the Classic one, talk about big time mess!

Rgds

It's works sv1cec :up:
Thnx you

Dennis B
01-09-2005, 10:38 AM
sv1cec,

Just tested the new postbit_legacy above in 3.0.5, working well. :)

Thanks.

sv1cec
01-09-2005, 11:14 AM
sv1cec,

Just tested the new postbit_legacy above in 3.0.5, working well. :)

Thanks.
Hey guys,

Let me know something, because after installing all those patches and hacks on my server, I begun loosing control.

From where do you select if a user will use the postbit or the postbit legacy template? In other words, where does a user declares if he wants the modern or the classic layout?

I've re-installed this functionality on my system, I had forgotten to compare a file and it was that single one, where I needed to change something, but this (in my system) was implemented with a hack.

Can you please tell me what is the standard way of doing it?

Rgds

Dennis B
01-09-2005, 11:35 AM
sv1cec,

Read this (http://www.vbulletin.com/forum/showthread.php?t=101577). ;)

Dennis B
01-09-2005, 11:42 AM
sv1cec,

If I may, here's an alternative idea for the postbit_legacy layout, where the warn sign gets displayed in the left box, where the username, avatar and other icons are.

Revert postbit_legacy to its default text concerning the warn sign part (post above by sv1cec).

Then find:
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon]</div>And right above it insert:

<!-- AWS stop sign hack -->
<if condition="THIS_SCRIPT=='showthread' AND ($bbuserinfo[usergroupid]==5 OR $bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7) AND $post[warn_flag]>0">
<br />
<div>
<a href="Warn.php?do=ViewPostWarnings&post=$post[postid]" onclick="window.open('Warn.php?do=ViewPostWarnings&post=$post[postid]','','width=1000, height=500, resizable=yes, scrollbars=yes'); return false;" target="_blank"><img src="images/misc/warn.gif" border=0></a>
</div>
</if>
<!-- hack end -->

sv1cec
01-09-2005, 11:54 AM
sv1cec,

If I may, here's an alternative idea for the postbit_legacy layout, where the warn sign gets displayed in the left box, where the username, avatar and other icons are.

Revert postbit_legacy to its default text concerning the warn sign part (post above by sv1cec).

Then find:
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon]</div>And right above it insert:

<!-- AWS stop sign hack -->
<if condition="THIS_SCRIPT=='showthread' AND ($bbuserinfo[usergroupid]==5 OR $bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7) AND $post[warn_flag]>0">
<br />
<div>
<a href="Warn.php?do=ViewPostWarnings&post=$post[postid]" onclick="window.open('Warn.php?do=ViewPostWarnings&post=$post[postid]','','width=1000, height=500, resizable=yes, scrollbars=yes'); return false;" target="_blank"><img src="images/misc/warn.gif" border=0></a>
</div>
</if>
<!-- hack end -->
Dennis,

Thanks for that link, that is what I have done (mostly). But for the name of God, I couldn't remember where that was in the standard vB. I guess it is a general setting, applicable to all users, all posts. Thanks for the heads-up though, appreciated.

As for your alternative position for the Warn Sign (I have to come up with a better name for it), it's fine with me, users can easily move that around, wherever they want, I just have too many things in that part of the legacy template (warning links, user away info etc), so I thought I'd place it there. But of course, users can move it wherever they see fit.

Again, thanks and rgds

Dennis B
01-09-2005, 12:04 PM
no problem, and thank you for such great support on this hack. :up:

sv1cec
01-09-2005, 03:54 PM
no problem, and thank you for such great support on this hack. :up:
Doing my best Dennis, doing my best.

Rgds

j_86
01-09-2005, 04:00 PM
sv1cec you should ask for your own Premium forum.

sajjid
01-09-2005, 04:33 PM
i have edited all the files but have not run the install script because i cannot figure the following:
in your instructions it says
In the same template find:(postbit)
<if condition="$show['reputation']">$post[reputationdisplay]</if>
closes i can find in the templete is
<if condition="$show['reputation']"><if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower] </if><div>$post[reputationdisplay]</div></if>

Also

3. NAVBAR TEMPLATE
In your navbar template, find:
<tr><td class="thead">$vbphrase[miscellaneous]</td></tr>
i can only find this in header tamplete please shed some light.
i am using vb 3.0.5

ok i have installed it but now i get pharse error if i replace this code in the ./includes/functions_newpost.php
global $DB_site, $vboptions, $vbphrase, $bbuserinfo, $forumperms, $usergroupcache, $_REQUEST;

to this
global $DB_site, $vboptions, $vbphrase, $bbuserinfo, $forumperms, $usergroupcache, $wehavecensoredwords, $weneedacounter, $newpostid, $_REQUEST

but if i dont make this change everything is ok i think

sv1cec
01-09-2005, 07:01 PM
i have edited all the files but have not run the install script because i cannot figure the following:
in your instructions it says
In the same template find:(postbit)
<if condition="$show['reputation']">$post[reputationdisplay]</if>
closes i can find in the templete is
<if condition="$show['reputation']"><if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower] </if><div>$post[reputationdisplay]</div></if>

Also

3. NAVBAR TEMPLATE
In your navbar template, find:
<tr><td class="thead">$vbphrase[miscellaneous]</td></tr>
i can only find this in header tamplete please shed some light.
i am using vb 3.0.5

ok i have installed it but now i get pharse error if i replace this code in the ./includes/functions_newpost.php
global $DB_site, $vboptions, $vbphrase, $bbuserinfo, $forumperms, $usergroupcache, $_REQUEST;

to this
global $DB_site, $vboptions, $vbphrase, $bbuserinfo, $forumperms, $usergroupcache, $wehavecensoredwords, $weneedacounter, $newpostid, $_REQUEST

but if i dont make this change everything is ok i think
The installation instructions were all based on vB 3.0.3, so expect to find some differences. I just upgraded to 3.0.5 too, so I didn't have the time to redo them for this release.

First point, yeah that looks ok to use as the closest equivalent to my instructions.

In the NAVBAR template, if you check the Quick Links menu, it should say something like "Miscellaneous". I am not sure, but I do not think NAVBAR was changed from 3.0.3 to 3.0.5. Check where it has the drop down menus.

As for the last issue, you have to make that change. And that statement is not responsible for any parse error, unless you didn't put the semi-colon at the end. Maybe I forgot to put the semicolon in the instructions? No, it's there, but I do not see it in the code you posted. Check that there is a semicolor at the end of that statement, when you change it.

Rgds

sv1cec
01-09-2005, 07:05 PM
sv1cec you should ask for your own Premium forum.
I am not sure I even know what a premium forum is, my friend.

Rgds

sajjid
01-09-2005, 07:10 PM
The installation instructions were all based on vB 3.0.3, so expect to find some differences. I just upgraded to 3.0.5 too, so I didn't have the time to redo them for this release.

First point, yeah that looks ok to use as the closest equivalent to my instructions.

In the NAVBAR template, if you check the Quick Links menu, it should say something like "Miscellaneous". I am not sure, but I do not think NAVBAR was changed from 3.0.3 to 3.0.5. Check where it has the drop down menus.

As for the last issue, you have to make that change. And that statement is not responsible for any parse error, unless you didn't put the semi-colon at the end. Maybe I forgot to put the semicolon in the instructions? No, it's there, but I do not see it in the code you posted. Check that there is a semicolor at the end of that statement, when you change it.

Rgds

yes it was the semi-colon me maybe sleepy thanks well spotted also Quick Links menu is in the header
thanks

Delphiprogrammi
01-09-2005, 08:43 PM
Delphiporogrammer: Stop Sign: Did you upload the image in your images/misc directory? It looks as if you have it named Warn.gif. I think it should be warn.gif (caps are critical in a Unix system, I do not know what you are running your server on).
Rgds

yes i uploaded that images and true caps is a critical thing on a unix system but if that was the reason why it would result in a death image i don't see *anything* in the postbit besides the red line with the warning level.

gonna check one more time i'm sure i did something wrong :)


my server runs on fedora (redhat ) linux

rh2004
01-09-2005, 11:06 PM
Hey how do I show the Warnings: (level) to everyone that is displayed in postbit...

Just the Warning: (level)

Not how many times banned

sv1cec
01-10-2005, 04:55 AM
yes i uploaded that images and true caps is a critical thing on a unix system but if that was the reason why it would result in a death image i don't see *anything* in the postbit besides the red line with the warning level.

gonna check one more time i'm sure i did something wrong :)


my server runs on fedora (redhat ) linux
I am sure you will find a little something that you missed. Oh yes, please keep in mind that the stop sign, appears for admins/mods/supermods only, not for simple users.

Rgds

sv1cec
01-10-2005, 05:02 AM
Hey how do I show the Warnings: (level) to everyone that is displayed in postbit...

Just the Warning: (level)

Not how many times banned
The way the hack is, these two go together. If you go in the Warning Options, in the Viewing Options, you can select either Mgm (which means management, so only the proper admin/mods/supermods can see the warnings level and bans) or All.

If you want to alter that, go in your post bit template and change the code in the part that begins with :


<if condition="$viewoption=='All' and $bbuserinfo[userid]>0">
.
.
.
and ends with
.
.
.
<BR>Number of bans: $post[warning_bans]
<font color="#000000">
</if>
</if>

</div>

rh2004
01-10-2005, 05:31 AM
The way the hack is, these two go together. If you go in the Warning Options, in the Viewing Options, you can select either Mgm (which means management, so only the proper admin/mods/supermods can see the warnings level and bans) or All.

If you want to alter that, go in your post bit template and change the code in the part that begins with :


<if condition="$viewoption=='All' and $bbuserinfo[userid]>0">
.
.
.
and ends with
.
.
.
<BR>Number of bans: $post[warning_bans]
<font color="#000000">
</if>
</if>

</div>



Cool I just set it to all in options and it shows now, thanks

rinkrat
01-10-2005, 05:50 AM
Just installed and when I save my settings in admincp I get

mysql error: Unknown column 'collector' in 'field list'


Database error in vBulletin 3.0.5:

Invalid SQL: update warning_options set
hierarchical='Yes',
automatic='No',
automaticpm='No',
autocomments='No',
warner='8040',
automatic_warner='LGKbot',
collector='rinkrat',
banned_limit='14',
points_before_banned='5',
banned_usergroup_id='17',
troll_usergroup_id='16',
protected_usergroups='6|5|6|7',
aprotected_usergroups='5|6|7',
restore_groupid='2',
incr_ban_days='Yes',
max_no_bans='2',
bans_mature='',
viewoption='Mgm',
multiple_per_post='Yes',
send_pm_warning='Yes',
send_em_warning='No',
email_on_ban='Yes',
historical='Yes',
allowoffpost='Yes',
warnings_per_page='20'
where oid='1'
mysql error: Unknown column 'collector' in 'field list'

mysql error number: 1054

Date: Sunday 09th of January 2005 11:43:33 PM
Script: http://www.letsgokings.com/bbs/admincp/admin_warn.php
Referer: http://www.letsgokings.com/bbs/admincp/admin_warn.php?act=manageoptions
Username: RinkRat

sv1cec
01-10-2005, 06:17 AM
Just installed and when I save my settings in admincp I get

mysql error: Unknown column 'collector' in 'field list'


Database error in vBulletin 3.0.5:

Invalid SQL: update warning_options set
hierarchical='Yes',
automatic='No',
automaticpm='No',
autocomments='No',
warner='8040',
automatic_warner='LGKbot',
collector='rinkrat',
banned_limit='14',
points_before_banned='5',
banned_usergroup_id='17',
troll_usergroup_id='16',
protected_usergroups='6|5|6|7',
aprotected_usergroups='5|6|7',
restore_groupid='2',
incr_ban_days='Yes',
max_no_bans='2',
bans_mature='',
viewoption='Mgm',
multiple_per_post='Yes',
send_pm_warning='Yes',
send_em_warning='No',
email_on_ban='Yes',
historical='Yes',
allowoffpost='Yes',
warnings_per_page='20'
where oid='1'
mysql error: Unknown column 'collector' in 'field list'

mysql error number: 1054

Date: Sunday 09th of January 2005 11:43:33 PM
Script: http://www.letsgokings.com/bbs/admincp/admin_warn.php
Referer: http://www.letsgokings.com/bbs/admincp/admin_warn.php?act=manageoptions
Username: RinkRat
Obviously, for some reason that column does not exist in your table. Just add it, with the following SQL query:

ALTER TABLE `".TABLE_PREFIX."warning_options` ADD COLUMN `collector` int(10) unsigned AFTER warner WHERE oid=1

Remember to remove ".TABLE_PREFIX." if you are not using one.

Also, from your error message, I see that you are not .... following the instructions. The warners and collector are supposed to be user ids not user names.

Also, there is not version column in your table. What version are you trying to install?

Rgds

Delphiprogrammi
01-10-2005, 10:15 AM
I am sure you will find a little something that you missed. Oh yes, please keep in mind that the stop sign, appears for admins/mods/supermods only, not for simple users.

Rgds

yes there whas a line of requirerd code missing in the postbit template the stop sign is working fine now but if i click on the image (it is linked) then i see a death image and i have no idea what image should appear there :s attached is Warn.png (showing the stop sign image is working) and error.png is the thing with the death image :confused:

rgds

sv1cec
01-10-2005, 11:15 AM
Upload the following two images to your web server, in images/misc.

https://vborg.vbsupport.ru/external/2005/01/4.gif

https://vborg.vbsupport.ru/external/2005/01/5.gif

Use the name closeOFF.gif for the first and closeON.gif for the second.

Don't worry too much about this image though, in the next release, all admin functionality is handled within admin_warn.php, which means that there will be no calls to Warn.php, unless absolutely necessary.

Also, you might try the image below, to see if it works better in your forum. I've adjusted it, so that the grey color around the sign is transparent.

https://vborg.vbsupport.ru/external/2005/01/6.gif

Rgds

Delphiprogrammi
01-10-2005, 01:14 PM
thanks sv1cec working

rgds

rinkrat
01-10-2005, 02:10 PM
Obviously, for some reason that column does not exist in your table. Just add it, with the following SQL query:

ALTER TABLE `".TABLE_PREFIX."warning_options` ADD COLUMN `collector` int(10) unsigned AFTER warner WHERE oid=1

Remember to remove ".TABLE_PREFIX." if you are not using one.

Also, from your error message, I see that you are not .... following the instructions. The warners and collector are supposed to be user ids not user names.

Also, there is not version column in your table. What version are you trying to install?

Rgds

I just grabbed the one from this thread and used the script to update from the other warning hack. I ran the script and even ran the complete script and no go. I'll try adding the column from that command.

rinkrat
01-10-2005, 02:13 PM
SQL-query :

ALTER TABLE `warning_options` ADD COLUMN `collector` int( 10 ) unsigned AFTER warner WHERE oid =1

MySQL said:
#1064 - 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 'WHERE oid=1' at line 1


OK I took off the end bit and it worked after this error.

THANKS!!

The Realist
01-10-2005, 03:21 PM
In my members warning section within there profile, the choose warning options is blank and none show up.

I have added warning to the system?

Any ideas?

Also.....

My postbit_legacy template is differant from the basic one, can someone help us put the correct code in this template please.

My Original Template:

<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>


Code Needed to be added:

<td class="alt1">
<TABLE width=100%><TR>
<TD width=90%><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>
</td><TD width=10% align="$stylevar[right]">
<if condition="THIS_SCRIPT=='showthread' AND ($bbuserinfo[usergroupid]==5 OR $bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7) AND $post[warn_flag]>0">
<A HREF="Warn.php?do=ViewPostWarnings&post=$post[postid]" onclick="window.open('Warn.php?do=ViewPostWarnings&post=$post[postid]','','width=1000, height=500, resizable=yes, scrollbars=yes'); return false;" target="_blank"><img src="images/misc/warn.gif" border=0></a>
</if>
</td></tr></table>
<hr size="1" style="color:$stylevar[tborder_bgcolor]" />


Thanks.

sv1cec
01-10-2005, 03:34 PM
In my members warning section within there profile, the choose warning options is blank and none show up.

I have added warning to the system?

Any ideas?

Also.....

My postbit_legacy template is differant from the basic one, can someone help us put the correct code in this template please.

My Original Template:

<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>


Code Needed to be added:

<td class="alt1">
<TABLE width=100%><TR>
<TD width=90%><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>
</td><TD width=10% align="$stylevar[right]">
<if condition="THIS_SCRIPT=='showthread' AND ($bbuserinfo[usergroupid]==5 OR $bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7) AND $post[warn_flag]>0">
<A HREF="Warn.php?do=ViewPostWarnings&post=$post[postid]" onclick="window.open('Warn.php?do=ViewPostWarnings&post=$post[postid]','','width=1000, height=500, resizable=yes, scrollbars=yes'); return false;" target="_blank"><img src="images/misc/warn.gif" border=0></a>
</if>
</td></tr></table>
<hr size="1" style="color:$stylevar[tborder_bgcolor]" />


Thanks.
Got me mixed up here. Warning Options in profile? Maybe you mean the links to warn xyz and to view xyz's warnings? Are you sure that you have set up your options properly? Are you and admin or a mod viewing the profile? If the answer is yes, check that you have made all the changes properly.

We cross-posted, please send me a larger part of your template, what you posted is not enough for me to help you.

Rgds


Rgds

PKRWUD
01-10-2005, 06:04 PM
Just installed this last night and I absolutely LOVE it!!! Instructions were excellent, and it installed without a single problem! Took me 2 hours to do it, lol, but it works perfect, I think...

The only issue I may have is that none of my moderators can see the WARN image. I can see it everytime I come across a post where the member was warned, but they can't see it at all, even posts they warned in their own forums.

Is this the way it's designed to work? If not, where should I look to correct this, and if it is designed that way, is there something I can do to enable the mods to see it?

Thanks!

*edit*
I'm running vB3.0.5, if it matters.

sv1cec
01-10-2005, 06:20 PM
Just installed this last night and I absolutely LOVE it!!! Instructions were excellent, and it installed without a single problem! Took me 2 hours to do it, lol, but it works perfect, I think...

The only issue I may have is that none of my moderators can see the WARN image. I can see it everytime I come across a post where the member was warned, but they can't see it at all, even posts they warned in their own forums.

Is this the way it's designed to work? If not, where should I look to correct this, and if it is designed that way, is there something I can do to enable the mods to see it?

Thanks!


*edit*
I'm running vB3.0.5, if it matters.
No, this is not the way it should work. Mods, supermods and admins should be able to see the Warn sign, that's the whole idea behind it. Actually, the management team has also the ability to click on the sign to see the warnings the post has received.

If the sign does not appear for your mods, while it appears for you (I assume you are the admin), check the postbit template (or postbit_legacy).

This is the code that you should have in postbit (assuming your mods, supermods and admins are usergroups 6,5 and 7):


<!-- Show warned sign -->

<if condition="THIS_SCRIPT=='showthread' AND ($bbuserinfo[usergroupid]==5 OR $bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7) AND $post[warn_flag]>0">
<td><A HREF="Warn.php?do=ViewPostWarnings&post=$post[postid]" onclick="window.open('Warn.php?do=ViewPostWarnings&post=$post[postid]','','width=1000, height=500, resizable=yes, scrollbars=yes'); return false;" target="_blank"><img src="images/misc/warn.gif" border=0></a></td>
</if>

<!-- End of show warned sign -->


Let me know if you got it.

Oh, next release the Warn Sign behaviour changes a bit. Again, the management team will be able to see the sign and click on it to see the warnings the post has received, but if the "Who can see the warning level and bans" is set to "All" then the rest of the gang can see the sign (i.e. they can tell the post was warned), but they can't view the warnings.

Rgds

The Realist
01-10-2005, 06:28 PM
I dont see any warn sign and Im admin?

Id this right?

PKRWUD
01-10-2005, 06:48 PM
Okay, that was my problem. Apparently it's not going to work properly because I have 6 usergroups between the mods, super mods, and admin. I'm guessing I should add the other three usergroups to each of the instances in postbit (actually legacy postbit) where that occurs?

PKRWUD
01-10-2005, 06:59 PM
Actually, now that I look at it, it may be a little more complicated than that. I've got everyone seeing the image now, but they don't all share the same abilities. My staff user groups are as follows: 6 & 13 are admins, 5 & 21 are super mods, and 7 & 20 are mods. With that in mind, what changes should I make to the legacy postbit?

*edit*
One more question; is this supposed to allow any moderator to issue a warning anywhere, or only in their own forums?

sv1cec
01-10-2005, 07:33 PM
Actually, now that I look at it, it may be a little more complicated than that. I've got everyone seeing the image now, but they don't all share the same abilities. My staff user groups are as follows: 6 & 13 are admins, 5 & 21 are super mods, and 7 & 20 are mods. With that in mind, what changes should I make to the legacy postbit?


*edit*
One more question; is this supposed to allow any moderator to issue a warning anywhere, or only in their own forums?
The whole hack is based on the standard usergroups of vB, that's 5, 6 and 7. Changing it to work with 6 usergroups instead of 3 is not going to be easy. Try to find instances where it refers to $bbuserinfo[usergoupid]==6 and add $bbuserinfo[usergoupid]==13, same thing for 5 and 21 and 7 and 20. I can't remember right now if that is all you have to edit though.

To answer your second question, the mods can warn only in the forums they can moderate.

PKRWUD
01-10-2005, 07:42 PM
That's pretty much what I figured, but my coding skills don't really exist, I'm an engine man. lol. What is the proper syntax for adding two user groups together like you are suggesting? I'm not asking for the whole code, but do I write "$bbuserinfo[usergoupid]==6, $bbuserinfo[usergoupid]==13" or "$bbuserinfo[usergoupid]==6 and $bbuserinfo[usergoupid]==13", etc. ? What's the proper way to write it out so that the browser recognizes those two go together?

rinkrat
01-11-2005, 02:43 AM
Jeez, now I'm getting this when I try and warn someone from admincp

Database error in vBulletin 3.0.5:

Invalid SQL: insert into warnings values('','8449','1','1105418299','test','','1','N ','A','','')
mysql error: Column count doesn't match value count at row 1

mysql error number: 1136

Date: Monday 10th of January 2005 08:38:19 PM
Script: http://www.letsgokings.com/bbs/Warn.php
Referer: http://www.letsgokings.com/bbs/Warn.php?do=WarnUserNoPost&return=user&id=8449
Username: RinkRat
IP Address: 66.214.41.130

sv1cec
01-11-2005, 04:33 AM
Jeez, now I'm getting this when I try and warn someone from admincp

Database error in vBulletin 3.0.5:

Invalid SQL: insert into warnings values('','8449','1','1105418299','test','','1','N ','A','','')
mysql error: Column count doesn't match value count at row 1

mysql error number: 1136

Date: Monday 10th of January 2005 08:38:19 PM
Script: http://www.letsgokings.com/bbs/Warn.php
Referer: http://www.letsgokings.com/bbs/Warn.php?do=WarnUserNoPost&return=user&id=8449
Username: RinkRat
IP Address: 66.214.41.130
Strange, this error shows the proper columns OK. What is the description of your warnings table? Run this query and post your results here:

DESCRIBE warnings

Rgds

sv1cec
01-11-2005, 04:38 AM
That's pretty much what I figured, but my coding skills don't really exist, I'm an engine man. lol. What is the proper syntax for adding two user groups together like you are suggesting? I'm not asking for the whole code, but do I write "$bbuserinfo[usergoupid]==6, $bbuserinfo[usergoupid]==13" or "$bbuserinfo[usergoupid]==6 and $bbuserinfo[usergoupid]==13", etc. ? What's the proper way to write it out so that the browser recognizes those two go together?
It depends on the statement. Most of the times, it should be OR, like :


<if condition="$bbuserinfo[usergroupid]==6">
do this
</if>


should be converted to :


<if condition="$bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==13">
do this
</if>


Rgds

rinkrat
01-11-2005, 05:17 AM
Strange, this error shows the proper columns OK. What is the description of your warnings table? Run this query and post your results here:

DESCRIBE warnings

Rgds


Host: localhost
Database : lgk2
Generation Time: Jan 10, 2005 at 11:14 PM
Generated by: phpMyAdmin 2.6.0-alpha2 / MySQL 4.0.15-standard
SQL-query: DESCRIBE warnings;
Rows: 10
Field Type Null Key Default Extra
wid int(15) PRI NULL auto_increment
warned_user int(15) 0
warned_by int(15) 0
warned_time int(15) 0
warned_reason text
warned_post int(15) 0
warned_warning_id int(15) 0
warned_status char(1) YES NULL
removed_by int(15) YES NULL
removed_date int(15) YES NULL

sv1cec
01-11-2005, 06:25 AM
Host: localhost
Database : lgk2
Generation Time: Jan 10, 2005 at 11:14 PM
Generated by: phpMyAdmin 2.6.0-alpha2 / MySQL 4.0.15-standard
SQL-query: DESCRIBE warnings;
Rows: 10
Field Type Null Key Default Extra
wid int(15) PRI NULL auto_increment
warned_user int(15) 0
warned_by int(15) 0
warned_time int(15) 0
warned_reason text
warned_post int(15) 0
warned_warning_id int(15) 0
warned_status char(1) YES NULL
removed_by int(15) YES NULL
removed_date int(15) YES NULL
Rinkrat,

That does not make sense. Your table has the right columns, the SQL statement is trying to insert the right number of values, what on earth is this? Here is my warnings table description:


wid int(15) PRI auto_increment
warned_user int(15) 0
warned_by int(15) 0
warned_time int(15) 0
warned_reason text
warned_post int(15) 0
warned_warning_id int(15) 0
caused_ban char(1) YES
warned_status char(1) YES
removed_by int(15) YES
removed_date int(15) YES


Exactly the same as yours. And at that part of the code, the hack is using Warn.php routines, which should be fine, since they work OK here, and I assume with others, because no one has complained about it.

Do me a favor, try to add a non-post related warning from a user's public profile. See if that produces the same error.

Rgds

rinkrat
01-11-2005, 07:26 AM
OK here it is.



Database error in vBulletin 3.0.5:

Invalid SQL: insert into warnings values('','145','1','1105435458','Ignore this I'm just testing','','1','N','A','','')
mysql error: Column count doesn't match value count at row 1

mysql error number: 1136

Date: Tuesday 11th of January 2005 01:24:18 AM
Script: http://www.letsgokings.com/bbs/Warn.php
Referer: http://www.letsgokings.com/bbs/Warn.php?do=WarnUserNoPost&return=user&id=145
Username: RinkRat
IP Address: 66.214.41.130



OK I just tried a warning from a thread and got this


Database error in vBulletin 3.0.5:

Invalid SQL: insert into warnings values('','1742','1','1105435656','Just testing ignore this.','809396','11','N','A','','')
mysql error: Column count doesn't match value count at row 1

mysql error number: 1136

Date: Tuesday 11th of January 2005 01:27:36 AM
Script: http://www.letsgokings.com/bbs/Warn.php
Referer: http://www.letsgokings.com/bbs/Warn.php?do=WarnUser&id=1742&post=809396
Username: RinkRat
IP Address: 66.214.41.130


I might have screwed up the edits (there were a lot) but I was really careful. Maybe I'll try it all over again.

sv1cec
01-11-2005, 07:53 AM
OK here it is.



Database error in vBulletin 3.0.5:

Invalid SQL: insert into warnings values('','145','1','1105435458','Ignore this I'm just testing','','1','N','A','','')
mysql error: Column count doesn't match value count at row 1

mysql error number: 1136

Date: Tuesday 11th of January 2005 01:24:18 AM
Script: http://www.letsgokings.com/bbs/Warn.php
Referer: http://www.letsgokings.com/bbs/Warn.php?do=WarnUserNoPost&return=user&id=145
Username: RinkRat
IP Address: 66.214.41.130



OK I just tried a warning from a thread and got this


Database error in vBulletin 3.0.5:

Invalid SQL: insert into warnings values('','1742','1','1105435656','Just testing ignore this.','809396','11','N','A','','')
mysql error: Column count doesn't match value count at row 1

mysql error number: 1136

Date: Tuesday 11th of January 2005 01:27:36 AM
Script: http://www.letsgokings.com/bbs/Warn.php
Referer: http://www.letsgokings.com/bbs/Warn.php?do=WarnUser&id=1742&post=809396
Username: RinkRat
IP Address: 66.214.41.130


I might have screwed up the edits (there were a lot) but I was really careful. Maybe I'll try it all over again.
OK, let's do this test. Open your includes/functions_warning.php file and find:


$DB_site->query("insert into ".TABLE_PREFIX."warnings values('','{$user['userid']}','{$bbuser}','".time()."','{$wcomment}','{$wpost}','{$warn_type['tid']}','N','A','','')");


Replace that line with:


$DB_site->query("insert into ".TABLE_PREFIX."warnings (wid, warned_user, warned_by, warned_time, warned_reason, warned_post, warned_warning_id, caused_ban, warned_status, removed_by, removed_date) values('','{$user['userid']}','{$bbuser}','".time()."','{$wcomment}','{$wpost}','{$warn_type['tid']}','N','A','','')");


See if that works OK.

Rgds

PKRWUD
01-11-2005, 09:35 AM
It depends on the statement. Most of the times, it should be OR, like :


<if condition="$bbuserinfo[usergroupid]==6">
do this
</if>


should be converted to :


<if condition="$bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==13">
do this
</if>


Rgds



Well, it took a little trial and error, but I got it to work. If you're interested, the code I used follows...

Again, Admin is 6 & 13, Super Mods are 5 & 21, and Mods are 7 & 20:

<if condition="$hierarchical=='Yes'">
<if condition="($post[usergroupid]!=6 AND $post[usergroupid]!=5 AND $post[usergroupid]!=7 AND can_moderate($forum[forumid], '', $bbuserinfo[userid])) OR ($post[usergroupid]==7 AND can_moderate($forum[forumid], '', $bbuserinfo[userid]) AND $bbuserinfo[usergroupid]==5) OR
($bbuserinfo[usergroupid]==6 AND $post[usergroupid]!=6) OR ($post[usergroupid]!=13 AND $post[usergroupid]!=21 AND $post[usergroupid]!=20 AND can_moderate($forum[forumid], '', $bbuserinfo[userid])) OR ($post[usergroupid]==20 AND can_moderate($forum[forumid], '', $bbuserinfo[userid]) AND $bbuserinfo[usergroupid]==21) OR
($bbuserinfo[usergroupid]==13 AND $post[usergroupid]!=13)
">
<a href='Warn.php?do=WarnUser&id=$post[userid]&post=$post[postid]'>Warn $post[username]</a> ?
</if>
<if condition="($post[usergroupid]!=6 AND $post[usergroupid]!=5 AND $post[usergroupid]!=7 AND ($bbuserinfo[usergroupid]==7 OR $bbuserinfo[usergroupid]==5)) OR ($post[usergroupid]==7 AND $bbuserinfo[usergroupid]==5) OR ($bbuserinfo[usergroupid]==6 AND $post[usergroupid]!=6) OR ($post[usergroupid]!=13 AND $post[usergroupid]!=21 AND $post[usergroupid]!=20 AND ($bbuserinfo[usergroupid]==20 OR $bbuserinfo[usergroupid]==21)) OR ($post[usergroupid]==20 AND $bbuserinfo[usergroupid]==21) OR ($bbuserinfo[usergroupid]==13 AND $post[usergroupid]!=13)">
<a href='Warn.php?do=ViewWarnings&id=$post[userid]'>View $post[username]'s Warnings</a> ?
</if>
<if condition="($post[userid]==$bbuserinfo[userid] AND $post[usergroupid]!=6 AND $post[warning_level]>0) OR ($post[userid]==$bbuserinfo[userid] AND $post[usergroupid]!=13 AND $post[warning_level]>0)">
<a href='Warn.php?do=ViewMyWarnings'>View your Warnings</a> ?
</if>
</if>
</if>

<!-- end of warning system -->

sv1cec
01-11-2005, 09:40 AM
Well, it took a little trial and error, but I got it to work. If you're interested, the code I used follows...

Again, Admin is 6 & 13, Super Mods are 5 & 21, and Mods are 7 & 20:

<if condition="$hierarchical=='Yes'">
<if condition="($post[usergroupid]!=6 AND $post[usergroupid]!=5 AND $post[usergroupid]!=7 AND can_moderate($forum[forumid], '', $bbuserinfo[userid])) OR ($post[usergroupid]==7 AND can_moderate($forum[forumid], '', $bbuserinfo[userid]) AND $bbuserinfo[usergroupid]==5) OR
($bbuserinfo[usergroupid]==6 AND $post[usergroupid]!=6) OR ($post[usergroupid]!=13 AND $post[usergroupid]!=21 AND $post[usergroupid]!=20 AND can_moderate($forum[forumid], '', $bbuserinfo[userid])) OR ($post[usergroupid]==20 AND can_moderate($forum[forumid], '', $bbuserinfo[userid]) AND $bbuserinfo[usergroupid]==21) OR
($bbuserinfo[usergroupid]==13 AND $post[usergroupid]!=13)
">
<a href='Warn.php?do=WarnUser&id=$post[userid]&post=$post[postid]'>Warn $post[username]</a> ?
</if>
<if condition="($post[usergroupid]!=6 AND $post[usergroupid]!=5 AND $post[usergroupid]!=7 AND ($bbuserinfo[usergroupid]==7 OR $bbuserinfo[usergroupid]==5)) OR ($post[usergroupid]==7 AND $bbuserinfo[usergroupid]==5) OR ($bbuserinfo[usergroupid]==6 AND $post[usergroupid]!=6) OR ($post[usergroupid]!=13 AND $post[usergroupid]!=21 AND $post[usergroupid]!=20 AND ($bbuserinfo[usergroupid]==20 OR $bbuserinfo[usergroupid]==21)) OR ($post[usergroupid]==20 AND $bbuserinfo[usergroupid]==21) OR ($bbuserinfo[usergroupid]==13 AND $post[usergroupid]!=13)">
<a href='Warn.php?do=ViewWarnings&id=$post[userid]'>View $post[username]'s Warnings</a> ?
</if>
<if condition="($post[userid]==$bbuserinfo[userid] AND $post[usergroupid]!=6 AND $post[warning_level]>0) OR ($post[userid]==$bbuserinfo[userid] AND $post[usergroupid]!=13 AND $post[warning_level]>0)">
<a href='Warn.php?do=ViewMyWarnings'>View your Warnings</a> ?
</if>
</if>
</if>

<!-- end of warning system -->
Just wish that this is the only place that you have to change the code for your situation. I just can't check where you need to make this change to make the hack safe for your condition.

One thing I would suggest, is to avoid using the Hierarchical Schema, and declare those additional user groups, as protected user groups, so that they can't be warned. I know that not using the hierarchical schema reduces the functionality, in the sense that a super mod cannot warn a moderator, but it also simplifies things, which in your case is something you would like.

Correction: This solves your Warn sign issue. But it does not solve the hack's operation issues. There are more places where you have to do the same changes, like for example, when the "Warn XYZ" and "View XYZ's Warnings". The code there also uses the group information to decide if the links should be visible or not. Also, in the place where the warning points and the number of bans is shown.

It's none of my business of course, but why are you using two groups for each role?

Rgds


Rgds

Revan
01-11-2005, 09:50 AM
OK here it is.



Database error in vBulletin 3.0.5:

Invalid SQL: insert into warnings values('','145','1','1105435458','Ignore this I'm just testing','','1','N','A','','')
mysql error: Column count doesn't match value count at row 1

mysql error number: 1136

Date: Tuesday 11th of January 2005 01:24:18 AM
Script: http://www.letsgokings.com/bbs/Warn.php
Referer: http://www.letsgokings.com/bbs/Warn.php?do=WarnUserNoPost&return=user&id=145
Username: RinkRat
IP Address: 66.214.41.130

That there looks like a missing addslashes()
Just throwing the few cents I got about this out there :)

PKRWUD
01-11-2005, 10:07 AM
Correction: This solves your Warn sign issue. But it does not solve the hack's operation issues. There are more places where you have to do the same changes, like for example, when the "Warn XYZ" and "View XYZ's Warnings". The code there also uses the group information to decide if the links should be visible or not. Also, in the place where the warning points and the number of bans is shown.

It's none of my business of course, but why are you using two groups for each role?

Rgds



I was going to say I noticed that the Warnings by Warners Statistic doesn't list anyone in the other three usergroups. If you get a chance, and have the time, I'd appreciate it if you could note where else I will need to make changes.

I first tried adding an "OR" to each one, followed by it's counterpart, but that made it possible for all the staff to warn in every forum, and allowed the members to see the links. The way it is now, every staff member can see the WARN image, and the view links, but only the super mod, admin, and the specific mod for that forum can see and use the warn links. It may not be right, but so far, I absolutely love it. It took me a couple hours to install it, but I haven't received a single error message yet, and for me, that's an accomplishment worth celebrating. :)

The two Admin usergroups are for webmaster and admin, which have slightly different abilities, but are still both admin. The rest of the usergroups were doubled a couple years ago when we decided to create a second usergroup for sponsoring members, sponsoring moderators, and sponsoring super mods, and everything has just been built around that ever since.

I'm sure there was/is an easier method, but I'm a mechanic, not a coder, and this stuff is as foreign to me as cooking. lol.

Delphiprogrammi
01-11-2005, 10:16 AM
sv1cec,

i'm having a problem to upgrade to 3.0.8 with an SQL querry this sql querry


ALTER TABLE `".TABLE_PREFIX."warning_options` ADD COLUMN warnings_before_banned int(5) NOT NULL default '0' AFTER points_before_banned WHERE oid='1'


MySQL is giving me error 1064 and i tryed like 10 times (i do remove the TABLE_PREFIX part) but it doesn't help what the heck is this ?


#1064 - You have an error in your SQL syntax near 'WHERE oid = '1'' at line 1


regards

sv1cec
01-11-2005, 11:07 AM
That there looks like a missing addslashes()
Just throwing the few cents I got about this out there :)
I am not sure, because this happened even when his text was just "test".

And the value of that variable is going through a function which is supposed to replace the '.

I am puzzled.

sv1cec
01-11-2005, 12:35 PM
I was going to say I noticed that the Warnings by Warners Statistic doesn't list anyone in the other three usergroups. If you get a chance, and have the time, I'd appreciate it if you could note where else I will need to make changes.

I first tried adding an "OR" to each one, followed by it's counterpart, but that made it possible for all the staff to warn in every forum, and allowed the members to see the links. The way it is now, every staff member can see the WARN image, and the view links, but only the super mod, admin, and the specific mod for that forum can see and use the warn links. It may not be right, but so far, I absolutely love it. It took me a couple hours to install it, but I haven't received a single error message yet, and for me, that's an accomplishment worth celebrating. :)

The two Admin usergroups are for webmaster and admin, which have slightly different abilities, but are still both admin. The rest of the usergroups were doubled a couple years ago when we decided to create a second usergroup for sponsoring members, sponsoring moderators, and sponsoring super mods, and everything has just been built around that ever since.

I'm sure there was/is an easier method, but I'm a mechanic, not a coder, and this stuff is as foreign to me as cooking. lol.
That's easy. Edit your admin_warn.php file and find:


if ($_GET['act'] == "viewstats2")
{
$get_warns=$DB_site->query("select wt.userid, wt.username, wt.usergroupid from
".TABLE_PREFIX."user wt WHERE (usergroupid=5 OR usergroupid=6 OR usergroupid=7) ORDER BY userid");


Replace that with:


if ($_GET['act'] == "viewstats2")
{
$get_warns=$DB_site->query("select wt.userid, wt.username, wt.usergroupid from
".TABLE_PREFIX."user wt WHERE (usergroupid=5 OR usergroupid=6 OR usergroupid=7 OR usergroupid=13 OR usergroupid=21 OR usergroupid=20 ) ORDER BY userid");


As for the other changes, what you should do, is make sure that wherever there is a reference to group 6, there is also a reference to the equivalent group. Typically, the two references should be OR-ed and even better put them in a parenthesis like ($bbuserinfo[usergroupidi]==6 OR $bbuserinfo[usergroupid]==13 ). Same with the rest.

Let me know how you are progressing.

Rgds

sv1cec
01-11-2005, 12:36 PM
sv1cec,

i'm having a problem to upgrade to 3.0.8 with an SQL querry this sql querry


ALTER TABLE `".TABLE_PREFIX."warning_options` ADD COLUMN warnings_before_banned int(5) NOT NULL default '0' AFTER points_before_banned WHERE oid='1'


MySQL is giving me error 1064 and i tryed like 10 times (i do remove the TABLE_PREFIX part) but it doesn't help what the heck is this ?


#1064 - You have an error in your SQL syntax near 'WHERE oid = '1'' at line 1


regards
Remove the WHERE oid='1'. We are altering the table, not updating it.

Stupid me!!! I am going to correct that in the zip.

rinkrat
01-11-2005, 12:54 PM
OK, let's do this test. Open your includes/functions_warning.php file and find:


$DB_site->query("insert into ".TABLE_PREFIX."warnings values('','{$user['userid']}','{$bbuser}','".time()."','{$wcomment}','{$wpost}','{$warn_type['tid']}','N','A','','')");


Replace that line with:


$DB_site->query("insert into ".TABLE_PREFIX."warnings (wid, warned_user, warned_by, warned_time, warned_reason, warned_post, warned_warning_id, caused_ban, warned_status, removed_by, removed_date) values('','{$user['userid']}','{$bbuser}','".time()."','{$wcomment}','{$wpost}','{$warn_type['tid']}','N','A','','')");


See if that works OK.

Rgds



I couldn't find that exact line in a fresh upload of the file but found something very close and changed it. This is what I get now.

Database error in vBulletin 3.0.5:

Invalid SQL: insert into warnings (wid, warned_user, warned_by, warned_time, warned_reason, warned_post, warned_warning_id, caused_ban, warned_status, removed_by, removed_date) values('','1742','1','1105455062','Just testing ignore this.','809396','11','N','A','','')
mysql error: Unknown column 'caused_ban' in 'field list'

mysql error number: 1054

Date: Tuesday 11th of January 2005 06:51:02 AM
Script: http://www.letsgokings.com/bbs/Warn.php
Referer: http://www.letsgokings.com/bbs/Warn.php?do=WarnUser&id=1742&post=809396
Username: RinkRat
IP Address: 66.214.41.130

rinkrat
01-11-2005, 12:56 PM
It appears as if all of the errors are listing the first value as being empty

values('','1742','1'

Is that right? I don't know php/mysql real well so I have no idea.

sv1cec
01-11-2005, 02:54 PM
No, this is not your problem, this column is an auto-increment column, so you shouldn't enter a value.

Add the missing column by running this query:

ALTER TABLE `warning_options` ADD COLUMN `caused_ban` char(1) AFTER warned_warning_id

Then try again.

rinkrat
01-11-2005, 03:21 PM
OK here I go.. It's weird because I ran the upgrade script adn even went back and ran the install script.

rinkrat
01-11-2005, 03:23 PM
Error

SQL-query :

ALTER TABLE `warning_options` ADD COLUMN `caused_ban` char( 1 ) AFTER warned_warning_id

MySQL said:
#1054 - Unknown column 'warned_warning_id' in 'warning_options'

Here's the table:

Field Type Attributes Null Default Extra Action
oid int(15) No auto_increment Change Drop Primary Index Unique Fulltext
banned_limit int(15) No 0 Change Drop Primary Index Unique Fulltext
points_before_banned int(15) No 0 Change Drop Primary Index Unique Fulltext
banned_usergroup_id int(15) No 0 Change Drop Primary Index Unique Fulltext
protected_usergroups varchar(255) No Change Drop Primary Index Unique Fulltext
version varchar(10) Yes NULL Change Drop Primary Index Unique Fulltext
hierarchical char(3) Yes NULL Change Drop Primary Index Unique Fulltext
automatic char(3) Yes NULL Change Drop Primary Index Unique Fulltext
automaticpm char(3) Yes NULL Change Drop Primary Index Unique Fulltext
autocomments char(3) Yes NULL Change Drop Primary Index Unique Fulltext
automatic_warner int(10) UNSIGNED Yes NULL Change Drop Primary Index Unique Fulltext
warner int(15) Yes NULL Change Drop Primary Index Unique Fulltext
troll_usergroup_id varchar(10) Yes NULL Change Drop Primary Index Unique Fulltext
aprotected_usergroups varchar(10) Yes NULL Change Drop Primary Index Unique Fulltext
restore_groupid smallint(5) UNSIGNED Yes NULL Change Drop Primary Index Unique Fulltext
incr_ban_days char(3) Yes NULL Change Drop Primary Index Unique Fulltext
max_no_bans int(5) Yes NULL Change Drop Primary Index Unique Fulltext
bans_mature int(10) Yes NULL Change Drop Primary Index Unique Fulltext
viewoption char(3) Yes NULL Change Drop Primary Index Unique Fulltext
multiple_per_post char(3) Yes NULL Change Drop Primary Index Unique Fulltext
send_pm_warning char(3) Yes NULL Change Drop Primary Index Unique Fulltext
send_em_warning char(3) Yes NULL Change Drop Primary Index Unique Fulltext
email_on_ban char(3) Yes NULL Change Drop Primary Index Unique Fulltext
historical char(3) Yes NULL Change Drop Primary Index Unique Fulltext
allowoffpost char(3) Yes NULL Change Drop Primary Index Unique Fulltext
warnings_per_page int(3) Yes NULL Change Drop Primary Index Unique Fulltext
collector int(10) UNSIGNED Yes NULL Change Drop Primary Index Unique Fulltext

sv1cec
01-11-2005, 04:24 PM
Error

SQL-query :

ALTER TABLE `warning_options` ADD COLUMN `caused_ban` char( 1 ) AFTER warned_warning_id

MySQL said:
#1054 - Unknown column 'warned_warning_id' in 'warning_options'

Here's the table:

Field Type Attributes Null Default Extra Action
oid int(15) No auto_increment Change Drop Primary Index Unique Fulltext
banned_limit int(15) No 0 Change Drop Primary Index Unique Fulltext
points_before_banned int(15) No 0 Change Drop Primary Index Unique Fulltext
banned_usergroup_id int(15) No 0 Change Drop Primary Index Unique Fulltext
protected_usergroups varchar(255) No Change Drop Primary Index Unique Fulltext
version varchar(10) Yes NULL Change Drop Primary Index Unique Fulltext
hierarchical char(3) Yes NULL Change Drop Primary Index Unique Fulltext
automatic char(3) Yes NULL Change Drop Primary Index Unique Fulltext
automaticpm char(3) Yes NULL Change Drop Primary Index Unique Fulltext
autocomments char(3) Yes NULL Change Drop Primary Index Unique Fulltext
automatic_warner int(10) UNSIGNED Yes NULL Change Drop Primary Index Unique Fulltext
warner int(15) Yes NULL Change Drop Primary Index Unique Fulltext
troll_usergroup_id varchar(10) Yes NULL Change Drop Primary Index Unique Fulltext
aprotected_usergroups varchar(10) Yes NULL Change Drop Primary Index Unique Fulltext
restore_groupid smallint(5) UNSIGNED Yes NULL Change Drop Primary Index Unique Fulltext
incr_ban_days char(3) Yes NULL Change Drop Primary Index Unique Fulltext
max_no_bans int(5) Yes NULL Change Drop Primary Index Unique Fulltext
bans_mature int(10) Yes NULL Change Drop Primary Index Unique Fulltext
viewoption char(3) Yes NULL Change Drop Primary Index Unique Fulltext
multiple_per_post char(3) Yes NULL Change Drop Primary Index Unique Fulltext
send_pm_warning char(3) Yes NULL Change Drop Primary Index Unique Fulltext
send_em_warning char(3) Yes NULL Change Drop Primary Index Unique Fulltext
email_on_ban char(3) Yes NULL Change Drop Primary Index Unique Fulltext
historical char(3) Yes NULL Change Drop Primary Index Unique Fulltext
allowoffpost char(3) Yes NULL Change Drop Primary Index Unique Fulltext
warnings_per_page int(3) Yes NULL Change Drop Primary Index Unique Fulltext
collector int(10) UNSIGNED Yes NULL Change Drop Primary Index Unique Fulltext
Sorry, wrong input on my behalf. Here is the proper query:

ALTER TABLE `warnings` ADD COLUMN `caused_ban` char(1) AFTER warned_warning_id

Then use the modification I told you before in the functions_warning.php and try to issue a warning.

jluerken
01-11-2005, 04:35 PM
Hi,

I upgraded to 3.0.8 and have two questions.

1.

In the user section in the admincp I have now two different links with the same name and output. See attachment. Can I delete one or are they really different?

2.

I entered a lot of censored words but still the users don't get warned automatically when using them. sv1cec do you think you'll find time to take a look at this at my board next days?

Kind regards
jluerken

sv1cec
01-11-2005, 05:45 PM
Hi,

I upgraded to 3.0.8 and have two questions.

1.

In the user section in the admincp I have now two different links with the same name and output. See attachment. Can I delete one or are they really different?

2.

I entered a lot of censored words but still the users don't get warned automatically when using them. sv1cec do you think you'll find time to take a look at this at my board next days?

Kind regards
jluerken
On issue 1, yes, the first line can be deleted. The code for the two buttons is the one I have in the UpgradeToLatestVersion.txt file.


print_description_row("<center><a href=\"../Warn.php?$session[sessionurl]do=WarnUserNoPost&return=user&id=$userid\"><img src=\"../images/misc/warnuser.gif\" border='0'></a>&nbsp;<a href=\"admin_warn.php?act=do_finduserwarnings&userid=$userid\" onclick=\"window.open('admin_warn.php?act=do_finduserwarning s&userid=$userid','','width=1024, height=500, resizable=yes, scrollbars=yes'); return false;\" target=\"_blank\"><img src=\"../images/misc/viewuserwarnings.gif\" border='0'></a></center>");


On the second issue, in order for the automatic warnings to work you have to have defined:

- censored words
- set the automatic warnings for posts to 'yes'
- define an automatic warner
- define a warning type called 'ObsceneWords' and charaterize it as automatic

If one of them is not done, the warnings cannot be issued. If you have done all these and you still have problems, I can have a look at your site and try to figure out what's the problem.

Rgds

rinkrat
01-11-2005, 05:51 PM
OK it looks like it worked!! Thanks so much for taking the time to see this through and for the prompt replies. This is part of what makes VB so cool is the great community. You rule!

Oh yeah, after I get the success message it gets forwarded to the wrong address

"The requested URL /admincp/user.php was not found on this server."

It's actually in /bbs/admincp/user.php Where can I fix this?

jluerken
01-11-2005, 05:59 PM
- define a warning type called 'ObsceneWords' and charaterize it as automatic


I did not had this in my installation.
I will add it an test this in the next days.

Thanks for the fast feedback.

One more question.

I have only one cron called: delete_old_warnings in my sheduled task folder but in the cron folder of 3.0.8 there are two files called kill_bans.php and kill.warns.php.

Do I have forgotten to add a second sheduled job?

sv1cec
01-11-2005, 06:09 PM
I did not had this in my installation.
I will add it an test this in the next days.

Thanks for the fast feedback.

One more question.

I have only one cron called: delete_old_warnings in my sheduled task folder but in the cron folder of 3.0.8 there are two files called kill_bans.php and kill.warns.php.

Do I have forgotten to add a second sheduled job?
Yes, the kill_bans is used to kill bans which expire, from the user account. See the related Option, on Bans Maturity. If you do not plan to use that, no need to install it.

sv1cec
01-11-2005, 06:11 PM
OK it looks like it worked!! Thanks so much for taking the time to see this through and for the prompt replies. This is part of what makes VB so cool is the great community. You rule!

Oh yeah, after I get the success message it gets forwarded to the wrong address

"The requested URL /admincp/user.php was not found on this server."

It's actually in /bbs/admincp/user.php Where can I fix this?
First of all, I do not remember what you are trying to do. Please remind me. I mean after all these posts, I do not remember what you were doing when you got the error, so let me know.

Also, what is your $vboptions[bburl] ?

rinkrat
01-11-2005, 07:05 PM
First of all, I do not remember what you are trying to do. Please remind me. I mean after all these posts, I do not remember what you were doing when you got the error, so let me know.

Also, what is your $vboptions[bburl] ?


When I am in Admincp and issue a warning I get the success message "You have issued a warning" or whatever, then I'm forwarded to /admincp/user.php instead of /bbs/admincp/user.php (the correct location of bbs root is /bbs/).

Torqued
01-12-2005, 12:57 AM
John,

I found a small typo in the instructions for 3.0.7 -> 3.0.8:

For the code after // ########################## REQUIRE BACK-END :

in this code:

else
{
$DB_site->reporterror = 1;
$warn_opts=$DB_site->query_first("select * from ".TABLE_PREFIX." warning_options where oid='1'");
$aws='1';
}

There is an extra space between ".TABLE_PREFIX." and warning_options

Instead of ".TABLE_PREFIX." warning_options

Should be ".TABLE_PREFIX."warning_options

I was getting an error when trying to access my AdminCP before I fixed this.

edited to add:

Also, it is not saving my options when I click on "Update Warning Options"

:(

I had initially installed up to 3.0.3, so I ran the uninstaller script, uploaded the 3.0.8 files, then the 3.0.8 installer script, and then did the file edits for 3.0.3 -> 3.0.8. I figured that would be quicker/easier than all of the manual table/template edits. :D

I'm also getting "Warning: Division by zero in /admincpanel/admin_warn.php on line 672" when trying to view "Statistics - Warnings per user" via the admincp.

and "Warning: Division by zero in /admincpanel/admin_warn.php on line 1889"
when trying to view "Statistics - Bans per User" via the admincp

sv1cec
01-12-2005, 04:03 AM
Rinkrat

OK, edit your Warn.php file and search for :


$url="/$admincpdir/user.php?do=edit&userid={$_POST['id']}";


Replace that with:


$url="$vboptions[bburl]/$admincpdir/user.php?do=edit&userid={$_POST['id']}";


rgds

sv1cec
01-12-2005, 04:44 AM
John,

I found a small typo in the instructions for 3.0.7 -> 3.0.8:

For the code after // ########################## REQUIRE BACK-END :

in this code:



There is an extra space between ".TABLE_PREFIX." and warning_options

Instead of ".TABLE_PREFIX." warning_options

Should be ".TABLE_PREFIX."warning_options

I was getting an error when trying to access my AdminCP before I fixed this.

edited to add:

Also, it is not saving my options when I click on "Update Warning Options"

:(

I had initially installed up to 3.0.3, so I ran the uninstaller script, uploaded the 3.0.8 files, then the 3.0.8 installer script, and then did the file edits for 3.0.3 -> 3.0.8. I figured that would be quicker/easier than all of the manual table/template edits. :D

I'm also getting "Warning: Division by zero in /admincpanel/admin_warn.php on line 672" when trying to view "Statistics - Warnings per user" via the admincp.

and "Warning: Division by zero in /admincpanel/admin_warn.php on line 1889"
when trying to view "Statistics - Bans per User" via the admincp
Torqued,

Space thingy, you are right, some stupid editor must have brought that in, sorry I'll correct that.

Saving the warning options? Does it come up with any message? It's wierd, 'cause it works fine in both my test site and in the production one. Try downloading the zip again and upload the admin_warn.php to your server's admincp directory.

The two division by zero errors you get, are because the warning_options are not saved and the program tries to divide by the number of lines per page, the last field in the warning_options, which is zero, since the value you entered didn't get saved.

Try what I suggested and come back to me.

Rgds

sifuhall
01-12-2005, 11:23 AM
I just installed the latest version (upgraded from zero tolerance's version, boy has this hack grown!) and somehow I ended up without any warnng templates at all!

In the admincp everthing seems to be working, but when I try to issue a warning all I get is a blank page. That is when I noticed I do not have any templates that begin with 'warn'.

Torqued
01-12-2005, 11:45 AM
I just installed the latest version (upgraded from zero tolerance's version, boy has this hack grown!) and somehow I ended up without any warnng templates at all!

In the admincp everthing seems to be working, but when I try to issue a warning all I get is a blank page. That is when I noticed I do not have any templates that begin with 'warn'.

Is your default style a child style?

Torqued
01-12-2005, 11:52 AM
Torqued,

Space thingy, you are right, some stupid editor must have brought that in, sorry I'll correct that.

Saving the warning options? Does it come up with any message? It's wierd, 'cause it works fine in both my test site and in the production one. Try downloading the zip again and upload the admin_warn.php to your server's admincp directory.

The two division by zero errors you get, are because the warning_options are not saved and the program tries to divide by the number of lines per page, the last field in the warning_options, which is zero, since the value you entered didn't get saved.

Try what I suggested and come back to me.

Rgds

Ok. did the above.. here is what happens:

I set all my warning options and click on Update Warning Options.. It then takes me to the next screen that says:

Your Warning System menu has been modified.
AdminCP will be reloaded.
Your AWS Options have been updated.

When it refreshes and I go back into warning options, none of my options have been saved.. :(

sv1cec
01-12-2005, 11:55 AM
I just installed the latest version (upgraded from zero tolerance's version, boy has this hack grown!) and somehow I ended up without any warnng templates at all!

In the admincp everthing seems to be working, but when I try to issue a warning all I get is a blank page. That is when I noticed I do not have any templates that begin with 'warn'.
Yes you do, but if you followed the installation instructions, all the warn templates are now in a section called "Advanced Warning System Templates" which is towards the bottom of your template list. Open that, and you will get all your templates collected in one place.

As for the blank page, could you please be more specific? Where are you trying to warn from? There are several places you can issue a warning now, from a post, from a user's public profile (non-post-related) and for AdminCP itself (again, non-post-related).

Also what Torqued said, is that your default style?

sv1cec
01-12-2005, 12:13 PM
Ok. did the above.. here is what happens:

I set all my warning options and click on Update Warning Options.. It then takes me to the next screen that says:

Your Warning System menu has been modified.
AdminCP will be reloaded.
Your AWS Options have been updated.

When it refreshes and I go back into warning options, none of my options have been saved.. :(
Strange! Can you please tell me what options do you set? I might have find an issue with the messages that are shown after the saving, but the saving itself shouldn't have any problem.

sv1cec
01-12-2005, 12:28 PM
Torqued,

I am checking the saving routine and I can find no reason why the options are not saved. If you check the file admin_warn.php, at the section called 'do_update_warnopt', you will see that there is no way that the options cannot be saved. A couple of checks in the ifs and then a update.

Doesn't make sense, unless something is wrong in the setup of your forums or your database.

I did find a small problem with a } in that routine, which prevented the correct return of the program to the Options screen or the AdminCP index, but that is after the insert query.

Please tell me the options you are using, so that I can duplicate your scenario. If you want, you may download the new zip, I changed the position of that bracket, but I know this is not what causes your problem.

Delphiprogrammi
01-12-2005, 12:41 PM
sv1cec,

i'm having SQL errors when i try to view "view banned users" in my admincp also i noticed AWS is not showing the version number anymore it just shows 'advanced warning system version (this is empty)'


Database error in vBulletin 3.0.5:

Invalid SQL: select b.*, u.*, a.username AS warner, w.*, wt.* from vb3_ban_dates as b
LEFT JOIN vb3_user AS u ON(u.userid = b.banned_user)
LEFT JOIN vb3_user AS a ON(a.userid = b.banned_by)
LEFT JOIN vb3_warnings AS w ON(w.wid = b.banned_warning)
LEFT JOIN vb3_warning_types AS wt ON(wt.tid = w.warned_warning_id)
ORDER BY b.banned_user, b.banned_ban LIMIT 0,
mysql error: You have an error in your SQL syntax near '' at line 6

mysql error number: 1064
script admin_warn.php?act=viewbans


now i'm totally stucked

regards

Omikaru
01-12-2005, 12:43 PM
I'm having the same problem as Torqued.

But I've also got a few more:

I cannot warn people for post-related offences but they can be warned outside of that. I did the templates as your instructions told me.

Also, I cannot save the warn options. No matter what settings I put, it won't save.

I installed it just as your instructions said, so there shouldn't be a problem.

By the way, I'm using 3.0.5.

sv1cec
01-12-2005, 01:00 PM
sv1cec,

i'm having SQL errors when i try to view "view banned users" in my admincp also i noticed AWS is not showing the version number anymore it just shows 'advanced warning system version (this is empty)'


Database error in vBulletin 3.0.5:

Invalid SQL: select b.*, u.*, a.username AS warner, w.*, wt.* from vb3_ban_dates as b
LEFT JOIN vb3_user AS u ON(u.userid = b.banned_user)
LEFT JOIN vb3_user AS a ON(a.userid = b.banned_by)
LEFT JOIN vb3_warnings AS w ON(w.wid = b.banned_warning)
LEFT JOIN vb3_warning_types AS wt ON(wt.tid = w.warned_warning_id)
ORDER BY b.banned_user, b.banned_ban LIMIT 0,
mysql error: You have an error in your SQL syntax near '' at line 6

mysql error number: 1064
script admin_warn.php?act=viewbans


now i'm totally stucked

regards
Delphi, did you enter a number of warnings per page, when viewing logs?

Your error is because the program cannot find how many lines per page to show.

Maybe you too have the same problem with the saving???

I am totally confused with this issue.

As for the Version number, did you run the query which updates that to the latest version number, when you upgraded?

Torqued
01-12-2005, 01:04 PM
Torqued,

I am checking the saving routine and I can find no reason why the options are not saved. If you check the file admin_warn.php, at the section called 'do_update_warnopt', you will see that there is no way that the options cannot be saved. A couple of checks in the ifs and then a update.

Doesn't make sense, unless something is wrong in the setup of your forums or your database.

I did find a small problem with a } in that routine, which prevented the correct return of the program to the Options screen or the AdminCP index, but that is after the insert query.

Please tell me the options you are using, so that I can duplicate your scenario. If you want, you may download the new zip, I changed the position of that bracket, but I know this is not what causes your problem.

Here are the options I am trying to save:

Use Hierarchical Schema? YES

Protected Usergroups [blank]

Maintain Historical Records? YES

Allow Non-Post-Related Warnings? YES

Allow multiple warnings for the same post? NO

Automation Options
Use Automatic Warnings from Posts? NO

Use Automatic Warnings from Private Messages? NO

Use Warning Type Description, as moderator comment, in Post-Related warnings? YES

Viewing Options
Who can view the Warning Points and bans? MGM

Warners
Who will be your Automatic Warner? 1

Use a Hidden Warner? 1

User ID of the Collector of disputes? 1

Banning Options
Ban Duration 3

Warning Points Limit 10

Warnings Number Limit 10

Banned Usergroup Banned Users

Permanent Ban Usergroup Banned Users

Restore Usergroup Previous Group

Use incremental banning periods? NO

Number of bans, before permanent banned? 3

Bans Maturity Period 180

Member Notification Options
Send PM to the warned member? YES

Send E-mail to the warned member? YES

Send E-mail to the banned members? YES

Warning Reports Options
Number of warnings per page, when viewing logs? 30

sv1cec
01-12-2005, 01:07 PM
I'm having the same problem as Torqued.

But I've also got a few more:

I cannot warn people for post-related offences but they can be warned outside of that. I did the templates as your instructions told me.

Also, I cannot save the warn options. No matter what settings I put, it won't save.

I installed it just as your instructions said, so there shouldn't be a problem.

By the way, I'm using 3.0.5.
I would say it is rather difficult to expect the hack to work properly without the options saved. You are saying that you may not warn for post related offences. What does the program do? Does it come up with an error message? Or you do not see the Warn link?

Please be more specific.

Rgds

Akex
01-12-2005, 01:18 PM
Well i had a problem to save my options too and i found why. After installing the hack the warning_options table remained empty with no records. So, when the script tries to update the table where oid = 1, it can't.

Fix for me : I added a record in this table with oid = 1 with phpmyadmin. Now it works well :).

Torqued
01-12-2005, 01:19 PM
John,

Don't know if this helps:

I'm not seeing any rows in the warning_options table... in phpMyAdmin, I can see the structure, but, it appears that there is not a row there to update... ??

Akex
01-12-2005, 01:20 PM
Same as me, do what i've done above :)

Torqued
01-12-2005, 01:26 PM
Same as me, do what i've done above :)

yeah. I did that. that seems to have fixed that part of it. :)

Delphiprogrammi
01-12-2005, 01:26 PM
i don't have any "warn user" links in my templates anymore althrough i edited them :S :S :S :S

sv1cec
01-12-2005, 01:26 PM
Same as me, do what i've done above :)
Wonder what happened to that row, it should be inserted by the install_warn.php file, when you first install the program.

Strange!!

sifuhall
01-12-2005, 01:27 PM
Yes you do, but if you followed the installation instructions, all the warn templates are now in a section called "Advanced Warning System Templates" which is towards the bottom of your template list. Open that, and you will get all your templates collected in one place.

As for the blank page, could you please be more specific? Where are you trying to warn from? There are several places you can issue a warning now, from a post, from a user's public profile (non-post-related) and for AdminCP itself (again, non-post-related).

Also what Torqued said, is that your default style?

Thanks for the reply.

I do not see the templates. I did a search all templates for the word warn and it only returned board_inactive_warning, memberinfo, navbar, polloptionn_table, postbit, and postbit_legacy (the seach was in all styles and search titles only was set to no).

The blank page occurs when I try to warn from a post or from the memberinfo page.

And yes, my default style is a child style

Akex
01-12-2005, 01:30 PM
i don't have any "warn user" links in my templates anymore althrough i edited them :S :S :S :S

The request error you got comes from the fact you don't have any record in warn_options table. Do what i'v done above, then modify warnings options and it will be alright.

Akex
01-12-2005, 01:35 PM
Wonder what happened to that row, it should be inserted by the install_warn.php file, when you first install the program.

Strange!!

Well it's not inserted, because the request contains 27 values instead of 28 in the table. ;)

sv1cec
01-12-2005, 01:41 PM
Thanks for the reply.

I do not see the templates. I did a search all templates for the word warn and it only returned board_inactive_warning, memberinfo, navbar, polloptionn_table, postbit, and postbit_legacy (the seach was in all styles and search titles only was set to no).

The blank page occurs when I try to warn from a post or from the memberinfo page.

And yes, my default style is a child style
Stupid question, but when you upgraded from ZT's hack, did you run the upgrade script? This script should create all your templates for you. However, I have no idea what happens if you are not using the default style, I think this has been covered somewhere in the beginning of this thread. Also, I think ZT has a hack out which allows you to copy the templates to all styles or something. If the problem comes from this issue, I cannot help, I do not know how that works.

Sorry! :-(

sv1cec
01-12-2005, 01:42 PM
Well it's not inserted, because the request contains 27 values instead of 28 in the table. ;)
John's red with shame!!!!!!

Runs to update the instructions!!!!

Buhooooooooooo!

Thanks for catching it Akex, or .... Merci Beaucoup Monsieur!

Akex
01-12-2005, 01:42 PM
You welcome :)

Delphiprogrammi
01-12-2005, 01:47 PM
Well i had a problem to save my options too and i found why. After installing the hack the warning_options table remained empty with no records. So, when the script tries to update the table where oid = 1, it can't.

Fix for me : I added a record in this table with oid = 1 with phpmyadmin. Now it works well :).

the question is what to add ? sorry dumb question but i'm totally confused :s

i alread did


UPDATE vb3_warning_options SET VERSION='3.0.8' WHERE oid=1


that worked fine but still no warning links

regards

sv1cec
01-12-2005, 01:58 PM
the question is what to add ? sorry dumb question but i'm totally confused :s

i alread did


UPDATE vb3_warning_options SET VERSION='3.0.8' WHERE oid=1


that worked fine but still no warning links

regards
Delphi,

Do you have one line of data in your warning_options table? If you do, then you can save your warning options. Then, if you define you want non-post-related warnings, the links will appear.

Rgds

sifuhall
01-12-2005, 02:05 PM
Stupid question, but when you upgraded from ZT's hack, did you run the upgrade script? This script should create all your templates for you. However, I have no idea what happens if you are not using the default style, I think this has been covered somewhere in the beginning of this thread. Also, I think ZT has a hack out which allows you to copy the templates to all styles or something. If the problem comes from this issue, I cannot help, I do not know how that works.

Sorry! :-(

I sure did run the upgrade script.

I think I have found the problem as well.

I completely redid the hack just a few moments ago (whew!) and when running the upgrade script I run step 1, everything is fine, I run step 2 and TADA! I have the templates, then I run step 3 and poof! the templates are gone.

I have got around this by running the upgrade all the way through (to get the database updates), then re-running it and stopping after step 2 so the templates are not removed.

Now no blank pages!

Delphiprogrammi
01-12-2005, 02:09 PM
hi sv1cec ,

no seems i can't save my AWS options i hit that button but the options i set aren't saved i got this line of SQL from a database backup dump


INSERT INTO `vb_3warning_options` VALUES (1, '3.0.8', 'Yes', 'Yes', 'Yes', 'Yes', 2, 2, NULL, 14, 30, 8, '6|6', '6', '8', 2, 'Yes', 2, 0, 'All', 'Yes', 'Yes', 'No', 'No', 'Yes', 'Yes', 15);


but MySQL is giving me errors

#1136 - Column count doesn't match value count at row 1

rgds

PKRWUD
01-12-2005, 02:15 PM
That's easy. Edit your admin_warn.php file and find:


if ($_GET['act'] == "viewstats2")
{
$get_warns=$DB_site->query("select wt.userid, wt.username, wt.usergroupid from
".TABLE_PREFIX."user wt WHERE (usergroupid=5 OR usergroupid=6 OR usergroupid=7) ORDER BY userid");


Replace that with:


if ($_GET['act'] == "viewstats2")
{
$get_warns=$DB_site->query("select wt.userid, wt.username, wt.usergroupid from
".TABLE_PREFIX."user wt WHERE (usergroupid=5 OR usergroupid=6 OR usergroupid=7 OR usergroupid=13 OR usergroupid=21 OR usergroupid=20 ) ORDER BY userid");


As for the other changes, what you should do, is make sure that wherever there is a reference to group 6, there is also a reference to the equivalent group. Typically, the two references should be OR-ed and even better put them in a parenthesis like ($bbuserinfo[usergroupidi]==6 OR $bbuserinfo[usergroupid]==13 ). Same with the rest.

Let me know how you are progressing.

Rgds


Okay, this is weird. I copied and pasted the code, and got this warning:

Parse error: parse error, unexpected T_VARIABLE in /home/pkrwud/public_html/vbulletin/admincp/admin_warn.php on line 1837

So, I copy and pasted the original code from the same post (quoted above), and got the same error again. In fact, I got that error when I clicked on any of the options in the Warning System portion of the Admin CP. So, I opened the original copy of that file on my hard drive, and copied and pasted from there, and now it's back to normal.

Maybe I'm missing it, but I'm not seeing any real difference between the two.

Why did I get that error? BTW, line 1837 is the one that starts with: $get_warns


And, I have another question (lucky you). In that same file, just below the code mentioned above, it says:

$cell = array();
$id=$warn['userid'];
if ($warn['usergroupid']==5)
{
$usergrp="Super Moderator";
}
else if ($warn['usergroupid']==6)
{
$usergrp="Administrator";
}
else if ($warn['usergroupid']==7)
{
$usergrp="Moderator";
}


Will I need to make changes here too?

Akex
01-12-2005, 02:25 PM
hi sv1cec ,

no seems i can't save my AWS options i hit that button but the options i set aren't saved i got this line of SQL from a database backup dump


INSERT INTO `vb_3warning_options` VALUES (1, '3.0.8', 'Yes', 'Yes', 'Yes', 'Yes', 2, 2, NULL, 14, 30, 8, '6|6', '6', '8', 2, 'Yes', 2, 0, 'All', 'Yes', 'Yes', 'No', 'No', 'Yes', 'Yes', 15);


but MySQL is giving me errors

#1136 - Column count doesn't match value count at row 1

rgds

run this query in phpmyadmin.

INSERT INTO `".TABLE_PREFIX."warning_options` values ('1','3.0.8', 'No', 'No','No','No','','','','7','10','10','8','','','8 ','','No','3','0','All','No','No','No','No','No',' No','15')


ps : replace ".TABLE_PREFIX." by the prefix you have for vb3.

PKRWUD
01-12-2005, 02:44 PM
Okay, this is weird. I copied and pasted the code, and got this warning:

Parse error: parse error, unexpected T_VARIABLE in /home/pkrwud/public_html/vbulletin/admincp/admin_warn.php on line 1837

So, I copy and pasted the original code from the same post (quoted above), and got the same error again. In fact, I got that error when I clicked on any of the options in the Warning System portion of the Admin CP. So, I opened the original copy of that file on my hard drive, and copied and pasted from there, and now it's back to normal.

Maybe I'm missing it, but I'm not seeing any real difference between the two.

Why did I get that error? BTW, line 1837 is the one that starts with: $get_warns


And, I have another question (lucky you). In that same file, just below the code mentioned above, it says:

$cell = array();
$id=$warn['userid'];
if ($warn['usergroupid']==5)
{
$usergrp="Super Moderator";
}
else if ($warn['usergroupid']==6)
{
$usergrp="Administrator";
}
else if ($warn['usergroupid']==7)
{
$usergrp="Moderator";
}


Will I need to make changes here too?


For the record, I've taken care of all of this, and it works great, but I'm still curious why I got that error when I copied and pasted the code from your reply.

Delphiprogrammi
01-12-2005, 02:46 PM
run this query in phpmyadmin.

INSERT INTO `".TABLE_PREFIX."warning_options` values ('1','3.0.8', 'No', 'No','No','No','','','','7','10','10','8','','','8 ','','No','3','0','All','No','No','No','No','No',' No','15')


ps : replace ".TABLE_PREFIX." by the prefix you have for vb3.

that worked like a champ thanks man

in french merci beaucup

sv1cec
01-12-2005, 02:57 PM
Originally Posted by PKRWUD

Okay, this is weird. I copied and pasted the code, and got this warning:

Parse error: parse error, unexpected T_VARIABLE in /home/pkrwud/public_html/vbulletin/admincp/admin_warn.php on line 1837

So, I copy and pasted the original code from the same post (quoted above), and got the same error again. In fact, I got that error when I clicked on any of the options in the Warning System portion of the Admin CP. So, I opened the original copy of that file on my hard drive, and copied and pasted from there, and now it's back to normal.

Maybe I'm missing it, but I'm not seeing any real difference between the two.

Why did I get that error? BTW, line 1837 is the one that starts with: $get_warns


And, I have another question (lucky you). In that same file, just below the code mentioned above, it says:


$cell = array();
$id=$warn['userid'];
if ($warn['usergroupid']==5)
{
$usergrp="Super Moderator";
}
else if ($warn['usergroupid']==6)
{
$usergrp="Administrator";
}
else if ($warn['usergroupid']==7)
{
$usergrp="Moderator";
}


Will I need to make changes here too?

Did you take care of the "TABLE_PREFIX"???

Yes, you should change the code in that other place as well.

Rgds

sv1cec
01-12-2005, 03:04 PM
I sure did run the upgrade script.

I think I have found the problem as well.

I completely redid the hack just a few moments ago (whew!) and when running the upgrade script I run step 1, everything is fine, I run step 2 and TADA! I have the templates, then I run step 3 and poof! the templates are gone.

I have got around this by running the upgrade all the way through (to get the database updates), then re-running it and stopping after step 2 so the templates are not removed.

Now no blank pages!

Wierd things happen today. You run the upgrade script and after the second step you have the templates, and then when it does the database things, the templates are gone????

In any case, please make sure your warning options table has all the columns. The correct columns are shown in the install_warn.php script.

rgds

PKRWUD
01-12-2005, 09:14 PM
Did you take care of the "TABLE_PREFIX"???

Yes, you should change the code in that other place as well.

Rgds


I'm sorry, but I'm not sure what you mean. In any case, this code gave me that error:

if ($_GET['act'] == "viewstats2")
{
$get_warns=$DB_site->query("select wt.userid, wt.username, wt.usergroupid++from
".TABLE_PREFIX."user wt WHERE (usergroupid=5 OR usergroupid=6 OR usergroupid=7) ORDER BY userid");



While this code worked:

if ($_GET['act'] == "viewstats2")
{
$get_warns=$DB_site->query("select wt.userid, wt.username, wt.usergroupid from
".TABLE_PREFIX."user wt WHERE (usergroupid=5 OR usergroupid=6 OR usergroupid=7) ORDER BY userid");


Like I said, it doesn't really matter because it works now. I was just curious why one worked and the other caused an error, when both look pretty much the same, to me anyway.

I figured out the second part, too.

I went through all the files in the download package, and all the template edits, and the only other place I found that needed to be changed was the MEMBERINFO template, so I changed it. To the best of my knowledge, everything is working great. :)

pfdc
01-13-2005, 02:04 AM
I have done all the modification . Everything seems to work, but nothing gets displayed in the showthread.php for the mods to add a warning. Please advise. This is my postbit_legacy:


<!-- post #$post[postid] -->
<if condition="$show['spacer']">$spacer_open<if condition="!$post['islastshown']"><div style="padding:0px 0px $stylevar[cellpadding]px 0px"></if></if>

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr>
<if condition="$show['announcement']">
<td class="thead" style="font-weight:normal" colspan="2">
<img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" />
<phrase 1="$post[startdate]" 2="$post[enddate]">$vbphrase[x_until_y]</phrase>
</td>
<else />
<td class="thead" style="font-weight:normal" $scrolltothis>
<!-- status icon and date -->
<a name="post$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" /></a>
$post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if>
$post[firstnewinsert]
<!-- / status icon and date -->
</td>
<td class="thead" style="font-weight:normal" align="$stylevar[right]">
&nbsp;


<if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new"><strong>$post[postcount]</strong></a></if>
</td>
</if>
</tr>
<tr valign="top">
<td class="alt2" width="175">

<div id="postmenu_$post[postid]">
<if condition="$show['profile']">
<a class="username" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
<else />
$post[musername]
</if>
</div>

<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>

<if condition="$show['avatar']">
<div class="smallfont">
&nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$avatarurl" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</div>
</if>

<div class="smallfont">
&nbsp;<br />
<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
<div>
$vbphrase[posts]: $post[posts]
</div>
<if condition="$show['reputation']"><div><if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower]</if>$post[reputationdisplay]</div></if>
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon]</div>
</div>

</td>
<td class="alt1">
<TABLE width=100%><TR>
<TD width=90%>
<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>
</if>
</td>
<TD width=10% align="$stylevar[right]">
<if condition="THIS_SCRIPT=='showthread' AND ($bbuserinfo[usergroupid]==5 OR $bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7) AND $post[warn_flag]>0">
<A HREF="Warn.php?do=ViewPostWarnings&post=$post[postid]" onclick="window.open('Warn.php?do=ViewPostWarnings&post=$post[postid]','','width=1000, height=500, resizable=yes, scrollbars=yes'); return false;" target="_blank"><img src="images/misc/warn.gif" border=0></a>
</if>
</td>
</tr></table>
<hr size="1" style="color:$stylevar[tborder_bgcolor]" />

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

<if condition="$show['attachments']">
<!-- attachments -->
<div style="padding:$stylevar[cellpadding]px">

<if condition="$show['thumbnailattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_thumbnails]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[thumbnailattachments]
</div>
</fieldset>
</if>

<if condition="$show['imageattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[imageattachments]
</div>
</fieldset>
</if>

<if condition="$show['imageattachmentlink']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[imageattachmentlinks]
</table>
</fieldset>
</if>

<if condition="$show['otherattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_files]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[otherattachments]
</table>
</fieldset>
</if>

<if condition="$show['moderatedattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attachments_pending_approval]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[moderatedattachments]
</table>
</fieldset>
</if>

</div>
<!-- / attachments -->
</if>

<if condition="$post['signature']">
<!-- sig -->
<div>
__________________<br />
$post[signature]
</div>
<!-- / sig -->
</if>

<if condition="$show['postedited']">
<!-- edit note -->
<div class="smallfont"> <hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<em>
<phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]">$vbphrase[last_edited_by_x_on_y_at_z]</phrase>.
<if condition="$post['edit_reason']">$vbphrase[reason]: $post[edit_reason]</if>
</em>
</div>
<!-- / edit note -->
</if>

</td>
</tr>
<tr>
<td class="alt2">
$post[onlinestatus]
<if condition="$show['reputationlink']"><a href="#" onclick="return reputation($post[postid])"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" border="0" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" /></a></if>
<if condition="$show['reportlink']"><a href="report.php?$session[sessionurl]p=$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a></if>
$post[iplogged]
&nbsp;
</td>
<td class="alt1" align="$stylevar[right]">
<!-- controls -->
<if condition="$post['editlink']">
<a href="$post[editlink]"><img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a>
</if>
<if condition="$post['forwardlink']">
<a href="$post[forwardlink]"><img src="$stylevar[imgdir_button]/forward.gif" alt="$vbphrase[forward_message]" border="0" /></a>
</if>
<if condition="$post['replylink']">
<a href="$post[replylink]"><img src="$stylevar[imgdir_button]/<if condition="$post['forwardlink']">reply_small<else />quote</if>.gif" alt="$vbphrase[reply_with_quote]" border="0" /></a>
</if>
<if condition="$SHOWQUICKREPLY AND !$show['threadedmode']">
<a href="$post[replylink]" onclick="return qr($post[postid]);"><img src="$stylevar[imgdir_button]/quickreply.gif" alt="$vbphrase[quick_reply_to_this_message]" border="0" /></a>
</if>
<!-- / controls -->
</td>
</tr>
</table>

<!-- post $post[postid] popup menu -->
<div class="vbmenu_popup" id="postmenu_$post[postid]_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$post[username]</td>
</tr>
<if condition="$show['profile']">
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]userid=$post[userid]">$vbphrase[view_public_profile]</a></td></tr>
</if>
<if condition="$show['pmlink']">
<tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&amp;userid=$post[userid]"><phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['emaillink']">
<tr><td class="vbmenu_option"><a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[send_email_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['homepage']">
<tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>
</if>
<if condition="$show['search']">
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=finduser&amp;userid=$post[userid]"><phrase 1="$post[username]">$vbphrase[find_more_posts_by_x]</phrase></a></td></tr>
</if>
<if condition="$post['userid']">
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr>
</if>
</table>
</div>
<!-- / post $post[postid] popup menu -->

<if condition="$show['spacer']"><if condition="!$post['islastshown']"></div></if>$spacer_close</if>
<!-- / post #$post[postid] -->


I appreciate any help.

sv1cec
01-13-2005, 04:19 AM
I have done all the modification . Everything seems to work, but nothing gets displayed in the showthread.php for the mods to add a warning. Please advise. This is my postbit_legacy:


<!-- post #$post[postid] -->
<if condition="$show['spacer']">$spacer_open<if condition="!$post['islastshown']"><div style="padding:0px 0px $stylevar[cellpadding]px 0px"></if></if>

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr>
<if condition="$show['announcement']">
<td class="thead" style="font-weight:normal" colspan="2">
<img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" />
<phrase 1="$post[startdate]" 2="$post[enddate]">$vbphrase[x_until_y]</phrase>
</td>
<else />
<td class="thead" style="font-weight:normal" $scrolltothis>
<!-- status icon and date -->
<a name="post$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" /></a>
$post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if>
$post[firstnewinsert]
<!-- / status icon and date -->
</td>
<td class="thead" style="font-weight:normal" align="$stylevar[right]">
&nbsp;


<if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new"><strong>$post[postcount]</strong></a></if>
</td>
</if>
</tr>
<tr valign="top">
<td class="alt2" width="175">

<div id="postmenu_$post[postid]">
<if condition="$show['profile']">
<a class="username" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
<else />
$post[musername]
</if>
</div>

<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>

<if condition="$show['avatar']">
<div class="smallfont">
&nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$avatarurl" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</div>
</if>

<div class="smallfont">
&nbsp;<br />
<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
<div>
$vbphrase[posts]: $post[posts]
</div>
<if condition="$show['reputation']"><div><if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower]</if>$post[reputationdisplay]</div></if>
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon]</div>
</div>

</td>
<td class="alt1">
<TABLE width=100%><TR>
<TD width=90%>
<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>
</if>
</td>
<TD width=10% align="$stylevar[right]">
<if condition="THIS_SCRIPT=='showthread' AND ($bbuserinfo[usergroupid]==5 OR $bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7) AND $post[warn_flag]>0">
<A HREF="Warn.php?do=ViewPostWarnings&post=$post[postid]" onclick="window.open('Warn.php?do=ViewPostWarnings&post=$post[postid]','','width=1000, height=500, resizable=yes, scrollbars=yes'); return false;" target="_blank"><img src="images/misc/warn.gif" border=0></a>
</if>
</td>
</tr></table>
<hr size="1" style="color:$stylevar[tborder_bgcolor]" />

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

<if condition="$show['attachments']">
<!-- attachments -->
<div style="padding:$stylevar[cellpadding]px">

<if condition="$show['thumbnailattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_thumbnails]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[thumbnailattachments]
</div>
</fieldset>
</if>

<if condition="$show['imageattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[imageattachments]
</div>
</fieldset>
</if>

<if condition="$show['imageattachmentlink']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[imageattachmentlinks]
</table>
</fieldset>
</if>

<if condition="$show['otherattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_files]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[otherattachments]
</table>
</fieldset>
</if>

<if condition="$show['moderatedattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attachments_pending_approval]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[moderatedattachments]
</table>
</fieldset>
</if>

</div>
<!-- / attachments -->
</if>

<if condition="$post['signature']">
<!-- sig -->
<div>
__________________<br />
$post[signature]
</div>
<!-- / sig -->
</if>

<if condition="$show['postedited']">
<!-- edit note -->
<div class="smallfont"> <hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<em>
<phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]">$vbphrase[last_edited_by_x_on_y_at_z]</phrase>.
<if condition="$post['edit_reason']">$vbphrase[reason]: $post[edit_reason]</if>
</em>
</div>
<!-- / edit note -->
</if>

</td>
</tr>
<tr>
<td class="alt2">
$post[onlinestatus]
<if condition="$show['reputationlink']"><a href="#" onclick="return reputation($post[postid])"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" border="0" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" /></a></if>
<if condition="$show['reportlink']"><a href="report.php?$session[sessionurl]p=$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a></if>
$post[iplogged]
&nbsp;
</td>
<td class="alt1" align="$stylevar[right]">
<!-- controls -->
<if condition="$post['editlink']">
<a href="$post[editlink]"><img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a>
</if>
<if condition="$post['forwardlink']">
<a href="$post[forwardlink]"><img src="$stylevar[imgdir_button]/forward.gif" alt="$vbphrase[forward_message]" border="0" /></a>
</if>
<if condition="$post['replylink']">
<a href="$post[replylink]"><img src="$stylevar[imgdir_button]/<if condition="$post['forwardlink']">reply_small<else />quote</if>.gif" alt="$vbphrase[reply_with_quote]" border="0" /></a>
</if>
<if condition="$SHOWQUICKREPLY AND !$show['threadedmode']">
<a href="$post[replylink]" onclick="return qr($post[postid]);"><img src="$stylevar[imgdir_button]/quickreply.gif" alt="$vbphrase[quick_reply_to_this_message]" border="0" /></a>
</if>
<!-- / controls -->
</td>
</tr>
</table>

<!-- post $post[postid] popup menu -->
<div class="vbmenu_popup" id="postmenu_$post[postid]_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$post[username]</td>
</tr>
<if condition="$show['profile']">
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]userid=$post[userid]">$vbphrase[view_public_profile]</a></td></tr>
</if>
<if condition="$show['pmlink']">
<tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&amp;userid=$post[userid]"><phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['emaillink']">
<tr><td class="vbmenu_option"><a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[send_email_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['homepage']">
<tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>
</if>
<if condition="$show['search']">
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=finduser&amp;userid=$post[userid]"><phrase 1="$post[username]">$vbphrase[find_more_posts_by_x]</phrase></a></td></tr>
</if>
<if condition="$post['userid']">
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr>
</if>
</table>
</div>
<!-- / post $post[postid] popup menu -->

<if condition="$show['spacer']"><if condition="!$post['islastshown']"></div></if>$spacer_close</if>
<!-- / post #$post[postid] -->


I appreciate any help.
That's because you haven't added the code for the links to warn and to see the warnings. Try this one below:


<!-- post #$post[postid] -->
<if condition="$show['spacer']">$spacer_open<if condition="!$post['islastshown']"><div style="padding:0px 0px $stylevar[cellpadding]px 0px"></if></if>

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr>
<if condition="$show['announcement']">
<td class="thead" style="font-weight:normal" colspan="2">
<img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" />
<phrase 1="$post[startdate]" 2="$post[enddate]">$vbphrase[x_until_y]</phrase>
</td>
<else />
<td class="thead" style="font-weight:normal" $scrolltothis>
<!-- status icon and date -->
<a name="post$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" /></a>
$post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if>
$post[firstnewinsert]
<!-- / status icon and date -->
</td>
<td class="thead" style="font-weight:normal" align="$stylevar[right]">
&nbsp;
<!-- checks for warning system -->
<if condition="THIS_SCRIPT=='showthread'">
<if condition="$hierarchical=='No'">
<if condition="$post[usergroupid]!=6 AND $post[usergroupid]!=7 AND $post[usergroupid]!=5 AND can_moderate($forum[forumid], '', $bbuserinfo[userid])">
<a href='Warn.php?do=WarnUser&id=$post[userid]&post=$post[postid]'>Warn $post[username]</a> ?
</if>
<if condition="$post[usergroupid]!=6 AND $post[usergroupid]!=7 AND $post[usergroupid]!=5 AND ($bbuserinfo[usergroupid]==7 OR $bbuserinfo[usergroupid]==5 OR $bbuserinfo[usergroupid]==6)">
<a href='Warn.php?do=ViewWarnings&id=$post[userid]'>View $post[username]'s Warnings</a> ?
</if>
<if condition="$post[userid]==$bbuserinfo[userid] AND $post[usergroupid]!=6 AND $post[usergroupid]!=7 AND $post[usergroupid]!=5 AND $post[warning_level]>0">
<a href='Warn.php?do=ViewMyWarnings'>View your Warnings</a> ?
</if>
</if>
<if condition="$hierarchical=='Yes'">
<if condition="($post[usergroupid]!=6 AND $post[usergroupid]!=5 AND $post[usergroupid]!=7 AND can_moderate($forum[forumid], '', $bbuserinfo[userid])) OR ($post[usergroupid]==7 AND can_moderate($forum[forumid], '', $bbuserinfo[userid]) AND $bbuserinfo[usergroupid]==5) OR
($bbuserinfo[usergroupid]==6 AND $post[usergroupid]!=6)">
<a href='Warn.php?do=WarnUser&id=$post[userid]&post=$post[postid]'>Warn $post[username]</a> ?
</if>
<if condition="($post[usergroupid]!=6 AND $post[usergroupid]!=5 AND $post[usergroupid]!=7 AND ($bbuserinfo[usergroupid]==7 OR $bbuserinfo[usergroupid]==5)) OR ($post[usergroupid]==7 AND $bbuserinfo[usergroupid]==5) OR ($bbuserinfo[usergroupid]==6 AND $post[usergroupid]!=6)">
<a href='Warn.php?do=ViewWarnings&id=$post[userid]'>View $post[username]'s Warnings</a> ?
</if>
<if condition="$post[userid]==$bbuserinfo[userid] AND $post[usergroupid]!=6 AND $post[warning_level]>0">
<a href='Warn.php?do=ViewMyWarnings'>View your Warnings</a> ?
</if>
</if>
</if>
<!-- end of warning system -->


<if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new"><strong>$post[postcount]</strong></a></if>
</td>
</if>
</tr>
<tr valign="top">
<td class="alt2" width="175">

<div id="postmenu_$post[postid]">
<if condition="$show['profile']">
<a class="username" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
<else />
$post[musername]
</if>
</div>

<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>

<if condition="$show['avatar']">
<div class="smallfont">
&nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$avatarurl" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</div>
</if>

<div class="smallfont">
&nbsp;<br />
<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
<div>
$vbphrase[posts]: $post[posts]
</div>
<if condition="$show['reputation']"><div><if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower]</if>$post[reputationdisplay]</div></if>
<if condition="$viewoption=='All'">
<if condition="$post[warning_level]>0">
<font color="#ff0000">
<BR>Warnings Level: $post[warning_level]
<font color="#000000">
</if>
<if condition="$post[warning_bans]>0">
<font color="#ff0000">
<BR>Number of bans: $post[warning_bans]
<font color="#000000">
</if>
</if>

<if condition="$viewoption=='Mgm' AND $hierarchical=='Yes'">
<if condition="($bbuserinfo[usergroupid]!=7 AND $bbuserinfo[usergroupid]!=6 AND $bbuserinfo[usergroupid]!=5 AND $post[userid]==$bbuserinfo[userid])
OR
($bbuserinfo[usergroupid]==7 AND $post[userid]==$bbuserinfo[userid])
OR
($bbuserinfo[usergroupid]==5 AND $post[userid]==$bbuserinfo[userid])
OR
($bbuserinfo[usergroupid]==7 AND $post[usergroupid]!=6 AND $post[usergroupid]!=5 AND $post[usergroupid]!=7)
OR
($bbuserinfo[usergroupid]==5 AND $post[usergroupid]!=6 AND $post[usergroupid]!=5)
OR
($bbuserinfo[usergroupid]==6)
">
<if condition="$post[warning_level]>0">
<font color="#ff0000">
<BR>Warnings Level: $post[warning_level]
<font color="#000000">
</if>
<if condition="$post[warning_bans]>0">
<font color="#ff0000">
<BR>Number of bans: $post[warning_bans]
<font color="#000000">
</if>
</if>
</if>

<if condition="$viewoption=='Mgm' AND $hierarchical=='No' AND
(($bbuserinfo[usergroupid]==7 OR $bbuserinfo[usergroupid]==5 OR
$bbuserinfo[usergroupid]==6) OR ($bbuserinfo[usergroupid]!=7 AND $bbuserinfo[usergroupid]!=6 AND $bbuserinfo[usergroupid]!=5 AND $post[userid]==$bbuserinfo[userid]))">
<if condition="$post[warning_level]>0">
<font color="#ff0000">
<BR>Warnings Level: $post[warning_level]
<font color="#000000">
</if>
<if condition="$post[warning_bans]>0">
<font color="#ff0000">
<BR>Number of bans: $post[warning_bans]
<font color="#000000">
</if>
</if>
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon]</div>
</div>

</td>
<td class="alt1">
<TABLE width=100%><TR>
<TD width=90%>
<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>
</if>
</td>
<TD width=10% align="$stylevar[right]">
<if condition="THIS_SCRIPT=='showthread' AND ($bbuserinfo[usergroupid]==5 OR $bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7) AND $post[warn_flag]>0">
<A HREF="Warn.php?do=ViewPostWarnings&post=$post[postid]" onclick="window.open('Warn.php?do=ViewPostWarnings&post=$post[postid]','','width=1000, height=500, resizable=yes, scrollbars=yes'); return false;" target="_blank"><img src="images/misc/warn.gif" border=0></a>
</if>
</td>
</tr></table>
<hr size="1" style="color:$stylevar[tborder_bgcolor]" />

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

<if condition="$show['attachments']">
<!-- attachments -->
<div style="padding:$stylevar[cellpadding]px">

<if condition="$show['thumbnailattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_thumbnails]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[thumbnailattachments]
</div>
</fieldset>
</if>

<if condition="$show['imageattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[imageattachments]
</div>
</fieldset>
</if>

<if condition="$show['imageattachmentlink']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[imageattachmentlinks]
</table>
</fieldset>
</if>

<if condition="$show['otherattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_files]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[otherattachments]
</table>
</fieldset>
</if>

<if condition="$show['moderatedattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attachments_pending_approval]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[moderatedattachments]
</table>
</fieldset>
</if>

</div>
<!-- / attachments -->
</if>

<if condition="$post['signature']">
<!-- sig -->
<div>
__________________<br />
$post[signature]
</div>
<!-- / sig -->
</if>

<if condition="$show['postedited']">
<!-- edit note -->
<div class="smallfont"> <hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<em>
<phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]">$vbphrase[last_edited_by_x_on_y_at_z]</phrase>.
<if condition="$post['edit_reason']">$vbphrase[reason]: $post[edit_reason]</if>
</em>
</div>
<!-- / edit note -->
</if>

</td>
</tr>
<tr>
<td class="alt2">
$post[onlinestatus]
<if condition="$show['reputationlink']"><a href="#" onclick="return reputation($post[postid])"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" border="0" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" /></a></if>
<if condition="$show['reportlink']"><a href="report.php?$session[sessionurl]p=$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a></if>
$post[iplogged]
&nbsp;
</td>
<td class="alt1" align="$stylevar[right]">
<!-- controls -->
<if condition="$post['editlink']">
<a href="$post[editlink]"><img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a>
</if>
<if condition="$post['forwardlink']">
<a href="$post[forwardlink]"><img src="$stylevar[imgdir_button]/forward.gif" alt="$vbphrase[forward_message]" border="0" /></a>
</if>
<if condition="$post['replylink']">
<a href="$post[replylink]"><img src="$stylevar[imgdir_button]/<if condition="$post['forwardlink']">reply_small<else />quote</if>.gif" alt="$vbphrase[reply_with_quote]" border="0" /></a>
</if>
<if condition="$SHOWQUICKREPLY AND !$show['threadedmode']">
<a href="$post[replylink]" onclick="return qr($post[postid]);"><img src="$stylevar[imgdir_button]/quickreply.gif" alt="$vbphrase[quick_reply_to_this_message]" border="0" /></a>
</if>
<!-- / controls -->
</td>
</tr>
</table>

<!-- post $post[postid] popup menu -->
<div class="vbmenu_popup" id="postmenu_$post[postid]_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$post[username]</td>
</tr>
<if condition="$show['profile']">
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]userid=$post[userid]">$vbphrase[view_public_profile]</a></td></tr>
</if>
<if condition="$show['pmlink']">
<tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&amp;userid=$post[userid]"><phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['emaillink']">
<tr><td class="vbmenu_option"><a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[send_email_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['homepage']">
<tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>
</if>
<if condition="$show['search']">
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=finduser&amp;userid=$post[userid]"><phrase 1="$post[username]">$vbphrase[find_more_posts_by_x]</phrase></a></td></tr>
</if>
<if condition="$post['userid']">
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr>
</if>
</table>
</div>
<!-- / post $post[postid] popup menu -->

<if condition="$show['spacer']"><if condition="!$post['islastshown']"></div></if>$spacer_close</if>
<!-- / post #$post[postid] -->


Rgds

Delphiprogrammi
01-13-2005, 04:53 AM
sv1cec ,

I came across another problem i enabled the thingy called "quick stylechooser" (i have more then one style in my vbulletin installation) thing is the AWS templates aren't added to all styles installed i use the vb3 default style and the vb3 classic style (ths last one works correctly ) hower the default doesn't have the AWS templates what can i do about this without getting into trouble .... ?

oooh well this hack (https://vborg.vbsupport.ru/showthread.php?t=72288) can copy templates from one style to another


rgds

sv1cec
01-13-2005, 05:21 AM
sv1cec ,

I came across another problem i enabled the thingy called "quick stylechooser" (i have more then one style in my vbulletin installation) thing is the AWS templates aren't added to all styles installed i use the vb3 default style and the vb3 classic style (ths last one works correctly ) hower the default doesn't have the AWS templates what can i do about this without getting into trouble .... ?

oooh well this hack (https://vborg.vbsupport.ru/showthread.php?t=72288) can copy templates from one style to another


rgds
Exactly, I think this is another Zero Tolerance hack, which I wanted to add to my site too, but since I only have one style, I never did. But, I'll add a link to that hack, since I have no instructions in AWS for how to use it with more than one styles.

Rgds
--------
John

pfdc
01-13-2005, 05:59 AM
That's because you haven't added the code for the links to warn and to see the warnings. Try this one below:


<!-- post #$post[postid] -->
<if condition="$show['spacer']">$spacer_open<if condition="!$post['islastshown']"><div style="padding:0px 0px $stylevar[cellpadding]px 0px"></if></if>

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr>
<if condition="$show['announcement']">
<td class="thead" style="font-weight:normal" colspan="2">
<img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" />
<phrase 1="$post[startdate]" 2="$post[enddate]">$vbphrase[x_until_y]</phrase>
</td>
<else />
<td class="thead" style="font-weight:normal" $scrolltothis>
<!-- status icon and date -->
<a name="post$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" /></a>
$post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if>
$post[firstnewinsert]
<!-- / status icon and date -->
</td>
<td class="thead" style="font-weight:normal" align="$stylevar[right]">
&nbsp;
<!-- checks for warning system -->
<if condition="THIS_SCRIPT=='showthread'">
<if condition="$hierarchical=='No'">
<if condition="$post[usergroupid]!=6 AND $post[usergroupid]!=7 AND $post[usergroupid]!=5 AND can_moderate($forum[forumid], '', $bbuserinfo[userid])">
<a href='Warn.php?do=WarnUser&id=$post[userid]&post=$post[postid]'>Warn $post[username]</a> ?
</if>
<if condition="$post[usergroupid]!=6 AND $post[usergroupid]!=7 AND $post[usergroupid]!=5 AND ($bbuserinfo[usergroupid]==7 OR $bbuserinfo[usergroupid]==5 OR $bbuserinfo[usergroupid]==6)">
<a href='Warn.php?do=ViewWarnings&id=$post[userid]'>View $post[username]'s Warnings</a> ?
</if>
<if condition="$post[userid]==$bbuserinfo[userid] AND $post[usergroupid]!=6 AND $post[usergroupid]!=7 AND $post[usergroupid]!=5 AND $post[warning_level]>0">
<a href='Warn.php?do=ViewMyWarnings'>View your Warnings</a> ?
</if>
</if>
<if condition="$hierarchical=='Yes'">
<if condition="($post[usergroupid]!=6 AND $post[usergroupid]!=5 AND $post[usergroupid]!=7 AND can_moderate($forum[forumid], '', $bbuserinfo[userid])) OR ($post[usergroupid]==7 AND can_moderate($forum[forumid], '', $bbuserinfo[userid]) AND $bbuserinfo[usergroupid]==5) OR
($bbuserinfo[usergroupid]==6 AND $post[usergroupid]!=6)">
<a href='Warn.php?do=WarnUser&id=$post[userid]&post=$post[postid]'>Warn $post[username]</a> ?
</if>
<if condition="($post[usergroupid]!=6 AND $post[usergroupid]!=5 AND $post[usergroupid]!=7 AND ($bbuserinfo[usergroupid]==7 OR $bbuserinfo[usergroupid]==5)) OR ($post[usergroupid]==7 AND $bbuserinfo[usergroupid]==5) OR ($bbuserinfo[usergroupid]==6 AND $post[usergroupid]!=6)">
<a href='Warn.php?do=ViewWarnings&id=$post[userid]'>View $post[username]'s Warnings</a> ?
</if>
<if condition="$post[userid]==$bbuserinfo[userid] AND $post[usergroupid]!=6 AND $post[warning_level]>0">
<a href='Warn.php?do=ViewMyWarnings'>View your Warnings</a> ?
</if>
</if>
</if>
<!-- end of warning system -->


<if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new"><strong>$post[postcount]</strong></a></if>
</td>
</if>
</tr>
<tr valign="top">
<td class="alt2" width="175">

<div id="postmenu_$post[postid]">
<if condition="$show['profile']">
<a class="username" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
<else />
$post[musername]
</if>
</div>

<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>

<if condition="$show['avatar']">
<div class="smallfont">
&nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$avatarurl" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</div>
</if>

<div class="smallfont">
&nbsp;<br />
<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
<div>
$vbphrase[posts]: $post[posts]
</div>
<if condition="$show['reputation']"><div><if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower]</if>$post[reputationdisplay]</div></if>
<if condition="$viewoption=='All'">
<if condition="$post[warning_level]>0">
<font color="#ff0000">
<BR>Warnings Level: $post[warning_level]
<font color="#000000">
</if>
<if condition="$post[warning_bans]>0">
<font color="#ff0000">
<BR>Number of bans: $post[warning_bans]
<font color="#000000">
</if>
</if>

<if condition="$viewoption=='Mgm' AND $hierarchical=='Yes'">
<if condition="($bbuserinfo[usergroupid]!=7 AND $bbuserinfo[usergroupid]!=6 AND $bbuserinfo[usergroupid]!=5 AND $post[userid]==$bbuserinfo[userid])
OR
($bbuserinfo[usergroupid]==7 AND $post[userid]==$bbuserinfo[userid])
OR
($bbuserinfo[usergroupid]==5 AND $post[userid]==$bbuserinfo[userid])
OR
($bbuserinfo[usergroupid]==7 AND $post[usergroupid]!=6 AND $post[usergroupid]!=5 AND $post[usergroupid]!=7)
OR
($bbuserinfo[usergroupid]==5 AND $post[usergroupid]!=6 AND $post[usergroupid]!=5)
OR
($bbuserinfo[usergroupid]==6)
">
<if condition="$post[warning_level]>0">
<font color="#ff0000">
<BR>Warnings Level: $post[warning_level]
<font color="#000000">
</if>
<if condition="$post[warning_bans]>0">
<font color="#ff0000">
<BR>Number of bans: $post[warning_bans]
<font color="#000000">
</if>
</if>
</if>

<if condition="$viewoption=='Mgm' AND $hierarchical=='No' AND
(($bbuserinfo[usergroupid]==7 OR $bbuserinfo[usergroupid]==5 OR
$bbuserinfo[usergroupid]==6) OR ($bbuserinfo[usergroupid]!=7 AND $bbuserinfo[usergroupid]!=6 AND $bbuserinfo[usergroupid]!=5 AND $post[userid]==$bbuserinfo[userid]))">
<if condition="$post[warning_level]>0">
<font color="#ff0000">
<BR>Warnings Level: $post[warning_level]
<font color="#000000">
</if>
<if condition="$post[warning_bans]>0">
<font color="#ff0000">
<BR>Number of bans: $post[warning_bans]
<font color="#000000">
</if>
</if>
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon]</div>
</div>

</td>
<td class="alt1">
<TABLE width=100%><TR>
<TD width=90%>
<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>
</if>
</td>
<TD width=10% align="$stylevar[right]">
<if condition="THIS_SCRIPT=='showthread' AND ($bbuserinfo[usergroupid]==5 OR $bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7) AND $post[warn_flag]>0">
<A HREF="Warn.php?do=ViewPostWarnings&post=$post[postid]" onclick="window.open('Warn.php?do=ViewPostWarnings&post=$post[postid]','','width=1000, height=500, resizable=yes, scrollbars=yes'); return false;" target="_blank"><img src="images/misc/warn.gif" border=0></a>
</if>
</td>
</tr></table>
<hr size="1" style="color:$stylevar[tborder_bgcolor]" />

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

<if condition="$show['attachments']">
<!-- attachments -->
<div style="padding:$stylevar[cellpadding]px">

<if condition="$show['thumbnailattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_thumbnails]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[thumbnailattachments]
</div>
</fieldset>
</if>

<if condition="$show['imageattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[imageattachments]
</div>
</fieldset>
</if>

<if condition="$show['imageattachmentlink']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[imageattachmentlinks]
</table>
</fieldset>
</if>

<if condition="$show['otherattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_files]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[otherattachments]
</table>
</fieldset>
</if>

<if condition="$show['moderatedattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attachments_pending_approval]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[moderatedattachments]
</table>
</fieldset>
</if>

</div>
<!-- / attachments -->
</if>

<if condition="$post['signature']">
<!-- sig -->
<div>
__________________<br />
$post[signature]
</div>
<!-- / sig -->
</if>

<if condition="$show['postedited']">
<!-- edit note -->
<div class="smallfont"> <hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<em>
<phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]">$vbphrase[last_edited_by_x_on_y_at_z]</phrase>.
<if condition="$post['edit_reason']">$vbphrase[reason]: $post[edit_reason]</if>
</em>
</div>
<!-- / edit note -->
</if>

</td>
</tr>
<tr>
<td class="alt2">
$post[onlinestatus]
<if condition="$show['reputationlink']"><a href="#" onclick="return reputation($post[postid])"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" border="0" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" /></a></if>
<if condition="$show['reportlink']"><a href="report.php?$session[sessionurl]p=$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a></if>
$post[iplogged]
&nbsp;
</td>
<td class="alt1" align="$stylevar[right]">
<!-- controls -->
<if condition="$post['editlink']">
<a href="$post[editlink]"><img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a>
</if>
<if condition="$post['forwardlink']">
<a href="$post[forwardlink]"><img src="$stylevar[imgdir_button]/forward.gif" alt="$vbphrase[forward_message]" border="0" /></a>
</if>
<if condition="$post['replylink']">
<a href="$post[replylink]"><img src="$stylevar[imgdir_button]/<if condition="$post['forwardlink']">reply_small<else />quote</if>.gif" alt="$vbphrase[reply_with_quote]" border="0" /></a>
</if>
<if condition="$SHOWQUICKREPLY AND !$show['threadedmode']">
<a href="$post[replylink]" onclick="return qr($post[postid]);"><img src="$stylevar[imgdir_button]/quickreply.gif" alt="$vbphrase[quick_reply_to_this_message]" border="0" /></a>
</if>
<!-- / controls -->
</td>
</tr>
</table>

<!-- post $post[postid] popup menu -->
<div class="vbmenu_popup" id="postmenu_$post[postid]_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$post[username]</td>
</tr>
<if condition="$show['profile']">
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]userid=$post[userid]">$vbphrase[view_public_profile]</a></td></tr>
</if>
<if condition="$show['pmlink']">
<tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&amp;userid=$post[userid]"><phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['emaillink']">
<tr><td class="vbmenu_option"><a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[send_email_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['homepage']">
<tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>
</if>
<if condition="$show['search']">
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=finduser&amp;userid=$post[userid]"><phrase 1="$post[username]">$vbphrase[find_more_posts_by_x]</phrase></a></td></tr>
</if>
<if condition="$post['userid']">
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr>
</if>
</table>
</div>
<!-- / post $post[postid] popup menu -->

<if condition="$show['spacer']"><if condition="!$post['islastshown']"></div></if>$spacer_close</if>
<!-- / post #$post[postid] -->


Rgds


Man I owe you one.. Thanks a lot bro..

dede1
01-13-2005, 05:18 PM
Hello

I have these problems(309) :
Warning: Division by zero in /admincp/admin_warn.php on line 665

Datenbankfehler in vBulletin 3.0.5:
Ungueltige SQL-Abfrage: select * from
user u where warnings>0 ORDER BY userid ASC LIMIT 0,
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 '' at line 2
mysql error number: 1064
Datum: 13.01.2005 20:13:03
Skript: xxxxxxxxxxxxxxxxx/admin_warn.php?act=viewwarnedusers
Referer: xxxxxxxxxxxxxxxxxadmincp/index.php?do=nav
and

Warning: Division by zero in /admincp/admin_warn.php on line 1856

Datenbankfehler in vBulletin 3.0.5:
Ungueltige SQL-Abfrage: select b.*, u.*, a.username AS warner, w.*, wt.* from ban_dates as b
LEFT JOIN user AS u ON(u.userid = b.banned_user)
LEFT JOIN user AS a ON(a.userid = b.banned_by)
LEFT JOIN warnings AS w ON(w.wid = b.banned_warning)
LEFT JOIN warning_types AS wt ON(wt.tid = w.warned_warning_id)
ORDER BY b.banned_user, b.banned_ban LIMIT 0,
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 '' at line 6
mysql error number: 1064
Datum: 13.01.2005 20:16:02
Skript: xxxxxxxxxxxxxxxxxxxxx/admincp/admin_warn.php?act=viewbans
Referer: xxxxxxxxxxxxxxxxxxxx/admincp/index.php

Delphiprogrammi
01-13-2005, 06:24 PM
hi,

division by zero errors that's probably because your warnings_options table is empty run this query in phpMyAdmin then set your AWS options and see if it get's saved after that those error messages should disappaer


INSERT INTO `".TABLE_PREFIX."warning_options` values ('1','3.0.8', 'No', 'No','No','No','','','','7','10','10','8','','','8 ','','No','3','0','All','No',' No','No','No','No','No','15')


replace "TABLE_PREFIX" with your own ...

pfdc
01-13-2005, 06:58 PM
Thanks for the great hack. I installed this hack an now the regular banning which I had befor is not working!! any ideas??

pfdc
01-13-2005, 07:42 PM
I am also getting bunch of emails saying that the table warning-options doesnt exsist. I checked in the mysql tables and the table actually exists there. What could be the problem? I get a blank page:

http://persianfootball.com/forums/modcp/banning.php?do=banuser

dede1
01-13-2005, 07:58 PM
hi,

division by zero errors that's probably because your warnings_options table is empty run this query in phpMyAdmin then set your AWS options and see if it get's saved after that those error messages should disappaer


INSERT INTO `".TABLE_PREFIX."warning_options` values ('1','3.0.8', 'No', 'No','No','No','','','','7','10','10','8','','','8 ','','No','3','0','All','No',' No','No','No','No','No','15')


replace "TABLE_PREFIX" with your own ...
Thanks :)

dede1
01-13-2005, 08:45 PM
Is missing warn me like on the picture of that left to that

https://vborg.vbsupport.ru/attachment.php?attachmentid=21862

sv1cec
01-14-2005, 04:28 AM
Hello

I have these problems(309) :
Warning: Division by zero in /admincp/admin_warn.php on line 665

and

Warning: Division by zero in /admincp/admin_warn.php on line 1856
Dede1,

This is a typical symptom of not having define the lines per page, for the reports, the last field in the Warning Options. First run this query, to see if you have one data line, in your warning_options table:

SELECT * FROM warning_options

If you do have a line there, with the warning options, then go into your admincp and in the warning options. Make sure you enter a value at the last field there.

If you do not have a line in the warning options, run the query below:

INSERT INTO `".TABLE_PREFIX."warning_options` values ('1','3.0.9', 'No', 'No','No','No','','','','7','10','10','8','','','8 ','','No','3','0','All','No','No','No','No','No',' No','15')

Let me know if that solves your problem

sv1cec
01-14-2005, 04:33 AM
Thanks for the great hack. I installed this hack an now the regular banning which I had befor is not working!! any ideas??
Just make sure that all the changes in banning.php are made correctly. You must have made a mistake there, somewhere.

sv1cec
01-14-2005, 04:34 AM
Is missing warn me like on the picture of that left to that

https://vborg.vbsupport.ru/attachment.php?attachmentid=21862
Dede1, check your postbit template, if one of the links is there and the other is not, you missed something in your postbit template.

rgds

dede1
01-14-2005, 05:00 AM
sv1cec thanks :)

Delphiprogrammi
01-14-2005, 04:57 PM
sv1cec,

Slightly offtopic question but i'm gonna ask anyway :ermm: if a member is banned and he trys to login he just get's the "no permission" page not mentioning he's banned i'd like to change that to something "you have have been banned for $time" etc etc you have any idea what phrase i need to edit ?

$vbphrase[nopermission_loggedin] <<-- this one will help

rgds

pfdc
01-14-2005, 05:18 PM
Just make sure that all the changes in banning.php are made correctly. You must have made a mistake there, somewhere.
I think I did everything right. here is my banning.php file



any help will be appreciated.

Zachery
01-14-2005, 05:31 PM
Never, ever post your vBulletin files at this site or any other, you are breaking the rules of this site as well as the vBulletin License agreement.

Please refrain from doing so again.

sv1cec
01-14-2005, 06:48 PM
sv1cec,

Slightly offtopic question but i'm gonna ask anyway :ermm: if a member is banned and he trys to login he just get's the "no permission" page not mentioning he's banned i'd like to change that to something "you have have been banned for $time" etc etc you have any idea what phrase i need to edit ?

$vbphrase[nopermission_loggedin] <<-- this one will help

rgds
I do not think you should change that phrase. This phrase is used for a special purpose, to tell the user that he used a wrong password or that he visited a page he is not permitted to. What we need to find, is where the ban check is done and change something there. I spend some time trying to figure out, where the ban condition is checked, but couldn't figure it out. I'll look again for that in the morning, 'cause it's 23:00 over here, and I need some rest.

Keep your fingers crossed.

sv1cec
01-14-2005, 06:53 PM
I think I did everything right. here is my banning.php file



any help will be appreciated.
The changes I make in the banning.php file, are just to add an extra field in the banning form and the userban table of course. It has no real connection to AWS, so restore your original banning.php file and see if it works OK. If it does, then try making the changes again, but with a little more attention.

Rgds

Delphiprogrammi
01-14-2005, 07:15 PM
I do not think you should change that phrase. This phrase is used for a special purpose, to tell the user that he used a wrong password or that he visited a page he is not permitted to. What we need to find, is where the ban check is done and change something there. I spend some time trying to figure out, where the ban condition is checked, but couldn't figure it out. I'll look again for that in the morning, 'cause it's 23:00 over here, and I need some rest.

Keep your fingers crossed.


offcourse sv1cec we all need some rest now and then no hurry in it really just thought it would be nice to tell a user he/she is banned and that's the reason he/she can't view anything not the "privileges" thingy

i keep my fingers crossed :nervous:

i'll have a look myself to

Delphiprogrammi
01-14-2005, 07:19 PM
I think I did everything right. here is my banning.php file



any help will be appreciated.

i've had a problem to editing that file allot of parse errors however i got around it by editing the database querys manually just look at you do not forgot anything like quotes or { } ( ) ; and stuff like that i would give you my working banning.php file but according to this site rules and the vbulletin licence i'm not allowed todo that just edit the file with care and always have an orginal banning.php on a safe please just in case

pfdc
01-14-2005, 07:32 PM
Never, ever post your vBulletin files at this site or any other, you are breaking the rules of this site as well as the vBulletin License agreement.

Please refrain from doing so again.

I am very very sorry as I didnt know this rule. It will never happen again.

pfdc
01-14-2005, 07:48 PM
I uploaded my old file and its working again. Does this in any ways limit the Warning system's capabilities?

Thanks for your help.

The changes I make in the banning.php file, are just to add an extra field in the banning form and the userban table of course. It has no real connection to AWS, so restore your original banning.php file and see if it works OK. If it does, then try making the changes again, but with a little more attention.

Rgds

sv1cec
01-15-2005, 04:32 AM
offcourse sv1cec we all need some rest now and then no hurry in it really just thought it would be nice to tell a user he/she is banned and that's the reason he/she can't view anything not the "privileges" thingy

i keep my fingers crossed :nervous:

i'll have a look myself to
Good morning to all,

although it is definitely not the same, why don't you enable the "e-mail on ban" feature? In that way, when the user is banned, he gets an e-mail and he knows. (I know, I know, I'll look into it, it's just that I haven't have my coffee yet).

Rgds ;-)

Widok
01-15-2005, 07:59 AM
Has installed, has created a rule with "Automatic Warnings".
Has written the message with ObsceneWords, I send - there is an error:
Warning: Invalid argument supplied for foreach() in /includes/functions.php on line 1844
At me in this file to this address:
foreach($nav_array AS $nav_url => $nav_title)
In a window such error:
Error
An Error Has Occured!
An error has occured, the following message has been left below:

Invalid Warning Type Specified
[ Back ]

Actually the message has gone, the Obscene Words were replaced on *, but the warning to the user has not gone.. :(

mcyates
01-15-2005, 12:05 PM
hello, i'm getting this error:


Database error in vBulletin 3.0.5:

Invalid SQL: update warning_options set
hierarchical='Yes',
automatic='No',
automaticpm='No',
autocomments='No',
warner='0',
automatic_warner='0',
collector='',
banned_limit='7',
points_before_banned='15',
warnings_before_banned='',
banned_usergroup_id='8',
troll_usergroup_id='14',
protected_usergroups='6|6|7',
aprotected_usergroups='6|7',
restore_groupid='0',
incr_ban_days='No',
max_no_bans='2',
bans_mature='',
viewoption='All',
multiple_per_post='Yes',
send_pm_warning='Yes',
send_em_warning='Yes',
email_on_ban='No',
historical='Yes',
allowoffpost='Yes',
warnings_per_page='15'
where oid='1'
mysql error: Unknown column 'collector' in 'field list'

mysql error number: 1054

Date: Saturday 15th of January 2005 01:58:42 PM
Script: http://www.myfootballforum.com/admincp/admin_warn.php
Referer: http://www.myfootballforum.com/admincp/admin_warn.php?act=manageoptions

MentaL
01-15-2005, 12:27 PM
Hi im getting this error im mod/banning.php


Parse error: parse error, unexpected T_STRING in /home/ragezone/public_html/forum/mod/banning.php on line 258


Why? eveyrthing else works fine. pm me answer please?

properclone
01-15-2005, 12:34 PM
Great hack.
Whats annoying is that say someone PMed you with a blocked word in, they get a warning point thing.
If you reply which automatically quotes it will give you a warning point thing yet you didnt swear it was the person who you quoted.

sv1cec
01-15-2005, 12:44 PM
hello, i'm getting this error:


Database error in vBulletin 3.0.5:

Invalid SQL: update warning_options set
hierarchical='Yes',
automatic='No',
automaticpm='No',
autocomments='No',
warner='0',
automatic_warner='0',
collector='',
banned_limit='7',
points_before_banned='15',
warnings_before_banned='',
banned_usergroup_id='8',
troll_usergroup_id='14',
protected_usergroups='6|6|7',
aprotected_usergroups='6|7',
restore_groupid='0',
incr_ban_days='No',
max_no_bans='2',
bans_mature='',
viewoption='All',
multiple_per_post='Yes',
send_pm_warning='Yes',
send_em_warning='Yes',
email_on_ban='No',
historical='Yes',
allowoffpost='Yes',
warnings_per_page='15'
where oid='1'
mysql error: Unknown column 'collector' in 'field list'

mysql error number: 1054

Date: Saturday 15th of January 2005 01:58:42 PM
Script: http://www.myfootballforum.com/admincp/admin_warn.php
Referer: http://www.myfootballforum.com/admincp/admin_warn.php?act=manageoptions


Check that you have a collector column in warning_options. If not, added with the following query:

ALTER TABLE warning_options ADD COLUMN collector int(10) unsigned AFTER warner

Remember to add any table prefix if you are using one.

sv1cec
01-15-2005, 12:45 PM
Hi im getting this error im mod/banning.php



Why? eveyrthing else works fine. pm me answer please?
Check that you haven't missed a ';' before that line somewhere.

Rgds

sv1cec
01-15-2005, 01:11 PM
Great hack.
Whats annoying is that say someone PMed you with a blocked word in, they get a warning point thing.
If you reply which automatically quotes it will give you a warning point thing yet you didnt swear it was the person who you quoted.
No, this should not happen, because the censored word is replaced by **** in the pm you got. So when you reply, the bad word is not there. However, your post made me find a small problem in that area of the instructions, so please make sure you apply the following edit:

In your private.php file, find:


$signature = intval($pm['signature']);
$iconid = intval($pm['iconid']);
$disablesmilies = iif($pm['disablesmilies'], 0, 1);


Right after that, add:


$pm_message=$message;

Then find:

[php]
// insert private message text
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "pmtext\n\t(fromuserid, fromusername, title, message, touserarray, iconid, dateline, showsignature, allowsmilie)\nVALUES\n\t($bbuserinfo[userid], '" . addslashes($bbuserinfo['username']) . "', '$title', '$message', '" . addslashes(serialize($tostring)) . "', $iconid, " . TIMENOW . ", $signature, $disablesmilies)");


Right before that, add:


$message=$pm_message;


I'll update the instructions, but all who is using the Automatic Private Warnings from PMs, should do this update.

Rgds

MentaL
01-15-2005, 01:26 PM
Thanks, Fixed!

Delphiprogrammi
01-15-2005, 07:54 PM
No, this should not happen, because the censored word is replaced by **** in the pm you got. So when you reply, the bad word is not there. However, your post made me find a small problem in that area of the instructions, so please make sure you apply the following edit:

In your private.php file, find:


$signature = intval($pm['signature']);
$iconid = intval($pm['iconid']);
$disablesmilies = iif($pm['disablesmilies'], 0, 1);


Right after that, add:


$pm_message=$message;

Then find:

[php]
// insert private message text
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "pmtext\n\t(fromuserid, fromusername, title, message, touserarray, iconid, dateline, showsignature, allowsmilie)\nVALUES\n\t($bbuserinfo[userid], '" . addslashes($bbuserinfo['username']) . "', '$title', '$message', '" . addslashes(serialize($tostring)) . "', $iconid, " . TIMENOW . ", $signature, $disablesmilies)");


Right before that, add:


$message=$pm_message;


I'll update the instructions, but all who is using the Automatic Private Warnings from PMs, should do this update.

Rgds


updated right now and don't forget our coffee sv1cec :up:

Delphiprogrammi
01-16-2005, 04:02 PM
well,

the bancheck is in /modcp/banning.php instead of the default "print_stop_message()" we could


<?php
Header("Location:banned.php");
?>


but it would require a custom template i have no experience with developing that also sv1cec where is the "mail on banned" feature i don't find it :speechless: not in user banning options nor in e-mail options

rgds

sv1cec
01-16-2005, 06:33 PM
well,

the bancheck is in /modcp/banning.php instead of the default "print_stop_message()" we could


<?php
Header("Location:banned.php");
?>


but it would require a custom template i have no experience with developing that also sv1cec where is the "mail on banned" feature i don't find it :speechless: not in user banning options nor in e-mail options

rgds
Are you sure it is in banning.php? Because I checked and there is no code which checks whether a user who tries to log in, is in the banned user groups. Unless I am too sleepy right now.

What I am looking for, is the code which accepts the user name, possibly converts it to a user id and then checks whether this id exists in userban. No matter where I looked, I can't find it.

No worries about the message, I can handle that, if only I can find the place where the ban check is made.

As for the Mail when banned, it is in the Member Notification Options, in the AdminCP/Warning System Options.