vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Advanced Warning System (AWS) (https://vborg.vbsupport.ru/showthread.php?t=71992)

SamirDarji 12-14-2004 03:42 PM

As always, thank you for the unreal amount of assistance you have given us with this hack. I feel I can't say it enough times. :D

Quote:

Originally Posted by sv1cec
- postbit template. Mine (3.0.3) doesn't have any div there, so I can't be sure. I suggest you experiment.

Interesting. I'm also running 3.0.3. In your template, is your new code inside a div tag? If so, where does the tag start?

Quote:

Originally Posted by sv1cec
- banned user group not appearing, you are right, I haven't seen that, I'll look it up and post a correction here.

Let me know where to look and I'll also see if isn't just that I messed up somewhere.

Quote:

Originally Posted by sv1cec
- your last error is a result of not saving the warning options properly. One of the parameters defined there, is the records per page, so if that is not set, the program tries to divide by nothing.

Makes sense :)

Quote:

Originally Posted by sv1cec
First of all, try to see if you have the proper tables. Check the following tables by comparing the results of the "describe tablename" command with the columns described in the installation instructions. Second, check to see if the required templates have been added.

Where are these listed? I looked through every .txt file.

I just started parsing through the upgrade_warn.php and looking in phpmyadmin to see about the database tables. That's where the problem seems to be. Looks like it never updated the warning_options table, although it did all the other ones. I'm assuming that everything up to this point probably worked. So now how do I fix it?

SamirDarji 12-14-2004 03:49 PM

Quote:

Originally Posted by sv1cec
What was I thinking?????

OK, to fix the issue with the banned users group not appearing in the drop-down menus of the other options, please open your admin_warn.php file and find:

PHP Code:

    if($usergroup['usergroupid']!=$warn_opts['banned_usergroup_id'] AND $usergroup['usergroupid']!=$warn_opts['troll_usergroup_id'] AND $usergroup['usergroupid']!=$warn_opts['restore_groupid'])
{
    
$uoption.="<option value='{$usergroup['usergroupid']}'>{$usergroup['title']} (ID: {$usergroup['usergroupid']})</option>";
    
$tuoption.="<option value='{$usergroup['usergroupid']}'>{$usergroup['title']} (ID: {$usergroup['usergroupid']})</option>";
    
$restoreoption.="<option value='{$usergroup['usergroupid']}'>{$usergroup['title']} (ID: {$usergroup['usergroupid']})</option>";
    } 

Replace that part of code with:

PHP Code:

if($usergroup['usergroupid']!=$warn_opts['banned_usergroup_id'])
    {
        
$uoption.="<option value='{$usergroup['usergroupid']}'>{$usergroup['title']} (ID: {$usergroup['usergroupid']})</option>";
    }
    if(
$usergroup['usergroupid']!=$warn_opts['troll_usergroup_id'])
    {
        
$tuoption.="<option value='{$usergroup['usergroupid']}'>{$usergroup['title']} (ID: {$usergroup['usergroupid']})</option>";
    }
    if(
$usergroup['usergroupid']!=$warn_opts['restore_groupid'])
    {
        
$restoreoption.="<option value='{$usergroup['usergroupid']}'>{$usergroup['title']} (ID: {$usergroup['usergroupid']})</option>";
    } 

I'll post a new version in the zip file, in a minute.

Yep, that fixed it. :D

sv1cec 12-14-2004 04:06 PM

Quote:

Originally Posted by beano33
Protected Usergroups isn't working on my installation. I have Use Hierarchical Schema set to no and added 13|18 as protected usergroups, but it's having no effect. Any suggestions? Everything else seems to be working as intended.

When you are saying it does not work, do you mean that the members which have groups 13 and 18 as PRIMARY user group, can still be warned? The hack checks only if someone's primary group is in the protected groups, so if someone is a registered user (group 2) and he also belongs in another group (additional user group), this is not checked.

Let me know, because everything seems to be OK here.

Rgds

beano33 12-14-2004 04:16 PM

Quote:

Originally Posted by sv1cec
When you are saying it does not work, do you mean that the members which have groups 13 and 18 as PRIMARY user group, can still be warned?
Rgds

Yes, that's the case. They're only used as primary groups.

sv1cec 12-14-2004 04:33 PM

Quote:

Originally Posted by beano33
Yes, that's the case. They're only used as primary groups.

I found the problem. When I moved some routines in the functions_warning.php file, I didn't pass along the proper parameters. Have it fixed, but give me a moment to update the zip file.

Then download the zip and upload Warn.php and includes/functions_warning.php files to your server.

Sorry for the inconvenience and thanks for cathing this.

Revan 12-14-2004 05:25 PM

Btw that "saving options properly" issue... Wouldnt it make more sense to put an if() around the page calculation page, saying summit liek if ($options['warn_perpage'] == 0) { $options['warn_perpage'] = 15; }, to avoid these bugs?

beano33 12-14-2004 05:32 PM

Quote:

Originally Posted by sv1cec
I found the problem. When I moved some routines in the functions_warning.php file, I didn't pass along the proper parameters. Have it fixed, but give me a moment to update the zip file.

Then download the zip and upload Warn.php and includes/functions_warning.php files to your server.

Sorry for the inconvenience and thanks for cathing this.

Thanks! Working fine now. :)

sv1cec 12-14-2004 05:33 PM

Quote:

Originally Posted by SamirDarji
As always, thank you for the unreal amount of assistance you have given us with this hack. I feel I can't say it enough times. :D

Interesting. I'm also running 3.0.3. In your template, is your new code inside a div tag? If so, where does the tag start?

Let me know where to look and I'll also see if isn't just that I messed up somewhere.

Makes sense :)

Where are these listed? I looked through every .txt file.

I just started parsing through the upgrade_warn.php and looking in phpmyadmin to see about the database tables. That's where the problem seems to be. Looks like it never updated the warning_options table, although it did all the other ones. I'm assuming that everything up to this point probably worked. So now how do I fix it?


OK, the description of each table is (more or less) shown inside the install_warn.php file, found inside the admincp directory in the upload directory of the zip.

Check them out and let me know where you stand.

Or you may try the uninstaller and start from scratch. It will remove the additional template, tables and phrases, and then you can run install_warn.php from scratch.


Rgds

SamirDarji 12-14-2004 05:41 PM

Quote:

Originally Posted by Revan
Btw that "saving options properly" issue... Wouldnt it make more sense to put an if() around the page calculation page, saying summit liek if ($options['warn_perpage'] == 0) { $options['warn_perpage'] = 15; }, to avoid these bugs?

It probably won't happen like it did in my case because I didn't even have the tables. If he would've had the check in there, I might not even have discovered the missing tables, lol.

sv1cec 12-14-2004 05:43 PM

Quote:

Originally Posted by Revan
Btw that "saving options properly" issue... Wouldnt it make more sense to put an if() around the page calculation page, saying summit liek if ($options['warn_perpage'] == 0) { $options['warn_perpage'] = 15; }, to avoid these bugs?

Added that in the latest zip. If I start trapping all those stupid errors, the code will get enormous, after all these are in the admins section, an admin should know better, but you can never count on that, can you?

Revan 12-14-2004 05:47 PM

Hehe.
Well a way to educate the admins then would be to add this instead of "$options['warn_perpage']" in the above example: "standard_error('You are too stupid to add proper values, so unless you fix this, the hack will not work.')"
;)

(the above should be taken with an open mind, as it was a joke and in no way an attempt to insult Samir, since it wasn't even his fault ;))

xoor 12-14-2004 05:49 PM

correct me if i'm wrong but when you set the "Allow Off-Post Warnings?" to yes, isnt the 'warn x' and view x's warnings links suppose to show in the users profile, like they do in posts...

SamirDarji 12-14-2004 05:49 PM

Quote:

Originally Posted by sv1cec
OK, the description of each table is (more or less) shown inside the install_warn.php file, found inside the admincp directory in the upload directory of the zip.

Check them out and let me know where you stand.

Or you may try the uninstaller and start from scratch. It will remove the additional template, tables and phrases, and then you can run install_warn.php from scratch.


Rgds

The upgrade installer upgrade_warn.php completed everything up to line 188. For some reason, it just didn't finish the last part of the upgrade. So how do I make it complete the last part? Is there a way to just run some queries manually or is there some more stuff to it than that?

SamirDarji 12-14-2004 05:51 PM

Quote:

Originally Posted by xoor
correct me if i'm wrong but when you set the "Allow Off-Post Warnings?" to yes, isnt the 'warn x' and view x's warnings links suppose to show in the users profile, like they do in posts...

Yes, I believe it should. Check your template mods and make sure you're not missing anything.

sv1cec 12-14-2004 05:54 PM

Quote:

Originally Posted by xoor
correct me if i'm wrong but when you set the "Allow Off-Post Warnings?" to yes, isnt the 'warn x' and view x's warnings links suppose to show in the users profile, like they do in posts...

Yes, they should.

sv1cec 12-14-2004 05:57 PM

Quote:

Originally Posted by SamirDarji
The upgrade installer upgrade_warn.php completed everything up to line 188. For some reason, it just didn't finish the last part of the upgrade. So how do I make it complete the last part? Is there a way to just run some queries manually or is there some more stuff to it than that?

You can certainly run some queries manually, but if you are not know what you are doing, it might be a problem. I suggest you uninstall and re-install from scratch. How many warnings did you have with Zero's hack?

Rgds

xoor 12-14-2004 05:59 PM

If its not too much of a problem, would someone be so kind to check my MEMBERINFO for the problem...

Quote:

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle] - $vbphrase[view_profile]: $userinfo[username]</title>
$headinclude
</head>
<body>
$header
$navbar

<!-- main info - avatar, profilepic etc. -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead">
<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td class="thead">$vbphrase[view_profile]<span class="normal">: $userinfo[username]</span></td>
<!-- checks for warning system -->
<td class="thead" align="right">
<div class="smallfont" style="float:$stylevar[right]">
<if condition="THIS_SCRIPT=='member' AND $warn_options[allowoffpost]=='Yes'">
<if condition="$hierarchical=='No'">
<if condition="($bbuserinfo[usergroupid]==7 OR $bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==5) AND $userinfo[usergroupid]!=6 AND $userinfo[usergroupid]!=5 AND $userinfo[usergroupid]!=7">
<a href='Warn.php?do=WarnUserNoPost&id=$userid'>Warn $userinfo[username] (non-post related)</a> ? <a href='Warn.php?do=ViewWarnings&id=$userinfo[userid]'>View $userinfo[username]'s Warnings</a>
</if>
<if condition="$userinfo[userid]==$bbuserinfo[userid] AND $userinfo[usergroupid]!=6 AND $userinfo[usergroupid]!=7 AND $userinfo[usergroupid]!=5 AND $userinfo[warning_level]>0">
<a href='Warn.php?do=ViewMyWarnings'>View your Warnings</a>
</if>
</if>
<if condition="$hierarchical=='Yes'">
<if condition="($userinfo[usergroupid]!=6 AND $userinfo[usergroupid]!=5 AND $userinfo[usergroupid]!=7 AND ($bbuserinfo[usergroupid]==5 OR $bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7)) OR ($userinfo[usergroupid]==7 AND $bbuserinfo[usergroupid]==5) OR ($bbuserinfo[usergroupid]==6 AND $userinfo[usergroupid]!=6)">
<a href='Warn.php?do=WarnUserNoPost&id=$userid'>Warn $userinfo[username] (non-post related)</a> ? <a href='Warn.php?do=ViewWarnings&id=$userinfo[userid]'>View $userinfo[username]'s Warnings</a>
</if>
<if condition="$userinfo[userid]==$bbuserinfo[userid] AND $userinfo[usergroupid]!=6 AND $userinfo[warning_level]>0">
<a href='Warn.php?do=ViewMyWarnings'>View your Warnings</a>
</if>
</if>
</if>
<!-- end of warning system -->
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="alt2">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td style="border-bottom:1px solid $stylevar[tborder_bgcolor]" colspan="3">
<if condition="$userinfo['rank'] OR $userinfo['reputationdisplay']">
<div style="float:$stylevar[right]; padding:4px">
<if condition="$userinfo['rank']"><div align="center">$userinfo[rank]</div></if>
<if condition="$userinfo['reputationdisplay']"><div align="center">$userinfo[reputationdisplay]</div></if>
</div>
</if>
<div style="font-size:18pt">$userinfo[musername]</div>
<if condition="$userinfo['usertitle']"><div class="smallfont">$userinfo[usertitle]</div></if>
</td>
<td style="border-bottom:1px solid $stylevar[tborder_bgcolor]" align="$stylevar[right]">
<div class="smallfont">
<b>User ID :</b> $userid
<if condition="$viewoption=='All'">
<if condition="$userinfo[warning_level]>0">
<font color="#ff0000">
<BR>Warnings Level: $userinfo[warning_level]
<font color="#000000">
</if>
<if condition="$userinfo[warning_bans]>0">
<font color="#ff0000">
<BR>Number of bans: $userinfo[warning_bans]
<font color="#000000">
</if>
</if>
</div>
<if condition="$viewoption=='Mgm' AND $hierarchical=='Yes'">
<if condition="($bbuserinfo[usergroupid]==7 AND $userinfo[userid]==$bbuserinfo[userid])
OR
($bbuserinfo[usergroupid]==7 AND $userinfo[usergroupid]!=6 AND $userinfo[usergroupid]!=5 AND $userinfo[usergroupid]!=7)
OR
($bbuserinfo[usergroupid]==5 AND $userinfo[userid]==$bbuserinfo[userid])
OR
($bbuserinfo[usergroupid]==5 AND $userinfo[usergroupid]!=6 AND $userinfo[usergroupid]!=5)
OR
($bbuserinfo[usergroupid]==6)
">
<if condition="$userinfo[warning_level]>0">
<font color="#ff0000">
<BR>Warnings Level: $userinfo[warning_level]
<font color="#000000">
</if>
<if condition="$userinfo[warning_bans]>0">
<font color="#ff0000">
<BR>Number of bans: $userinfo[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
)">
<if condition="$userinfo[warning_level]>0">
<font color="#ff0000">
<BR>Warnings Level: $userinfo[warning_level]
<font color="#000000">
</if>
<if condition="$userinfo[warning_bans]>0">
<font color="#ff0000">
<BR>Number of bans: $userinfo[warning_bans]
<font color="#000000">
</if>
</if>
</td>
<if condition="$show['profilepic']">
<td valign="middle" align="$stylevar[right]" rowspan="2" width="160">
<center><img src="image.php?u=$userinfo[userid]&amp;type=profile&amp;dateline=$userinfo[profilepicdateline]" alt="<phrase 1="$userinfo[username]">$vbphrase[xs_picture]</phrase>" border="0" style="border:1px solid $stylevar[tborder_bgcolor]" /></center>
</td>
</if>
</tr>
<tr valign="top">
<if condition="$show['avatar']">
<td colspan="3"><img src="$userinfo[avatarurl]" alt="<phrase 1="$userinfo[username]">$vbphrase[xs_avatar]</phrase>" border="0" style="border:1px solid $stylevar[tborder_bgcolor]; border-top:none" /></td>
<else />
<td colspan="3">&nbsp;</td>
</if>
<td class="smallfont" valign="bottom" align="$stylevar[right]">
<if condition="$show['lastactivity']">
<div>$vbphrase[last_activity]: $userinfo[lastactivitydate] <span class="time">$userinfo[lastactivitytime]</span>&nbsp;</div>
</if>
<if condition="$show['currentlocation']">
<div><if condition="$userinfo['action']">$userinfo[action] $userinfo[where]<if condition="$show['detailedtime']"> - <else /> @ </if> $userinfo[time]<else />$vbphrase[offline]</if>&nbsp;</div>
</if>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- / main info - avatar, profilepic etc. -->

<!-- button row -->
<if condition="$show['profilelinks']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
<tr align="center">
<if condition="$userinfo['showvcard']">
<td class="vbmenu_control"><a href="member.php?$session[sessionurl]do=vcard&amp;u=$userinfo[userid]">$vbphrase[download_vcard]</a></td>
</if>
<if condition="$show['member']">
<td class="vbmenu_control">
<if condition="$show['addbuddylist']">
<a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$userinfo[userid]"><phrase 1="$userinfo[username]">$vbphrase[add_x_to_buddy_list]</phrase></a>
<else />
<a href="profile.php?$session[sessionurl]do=removelist&amp;userlist=buddy&amp;u=$userinfo[userid]"><phrase 1="$userinfo[username]">$vbphrase[remove_x_from_your_buddylist]</phrase></a>
</if>
</td>
<td class="vbmenu_control">
<if condition="$show['addignorelist']">
<a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=ignore&amp;u=$userinfo[userid]"><phrase 1="$userinfo[username]">$vbphrase[add_x_to_ignore_list]</phrase></a>
<else />
<a href="profile.php?$session[sessionurl]do=removelist&amp;userlist=ignore&amp;u=$userinfo[userid]"><phrase 1="$userinfo[username]">$vbphrase[remove_x_from_your_ignorelist]</phrase></a>
</if>
</td>
</if>
<if condition="can_moderate()">
<td class="vbmenu_control"><a href="moderator.php?$session[sessionurl]do=useroptions&amp;u=$userinfo[userid]">$vbphrase[user_options]</a></td>
</if>
</tr>
</table>
</if>
<!-- / button row -->

<br />

<if condition="$show['signature']">
<!-- signature row -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead">$vbphrase[signature]</td>
</tr>
<tr>
<td class="alt1" title="$vbphrase[signature]">$userinfo[signature]</td>
</tr>
</table>
<!-- / signature row -->
<br />
</if>


<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat" width="50%">$vbphrase[forum_info]</td>
<td class="tcat" width="50%">$vbphrase[contact_info]</td>
</tr>
<tr valign="top">

<td class="panelsurround" align="center">
<div class="panel">
<div align="$stylevar[left]">

<div class="fieldset">
<div style="padding:$stylevar[formspacer]px">
$vbphrase[join_date]: <strong>$userinfo[datejoined]</strong>
</div>
</div>

<fieldset class="fieldset">
<legend>$vbphrase[posts]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td>
$vbphrase[total_posts]: <strong>$userinfo[posts]</strong> (<phrase 1="$postsperday">$vbphrase[x_posts_per_day]</phrase>)
</td>
</tr>
<if condition="$vboptions['profilelastpost']">
<tr>
<td>
$vbphrase[last_post]:<br />
<a href="$userinfo[lastposturl]">$userinfo[lastposttitle]</a><br />
$userinfo[lastpostdate] <span class="time">$userinfo[lastposttime]</span>
</td>
</tr>
</if>
<tr>
<td><a href="search.php?$session[sessionurl]do=finduser&amp;u=$userinfo[userid]"><phrase 1="$userinfo[username]">$vbphrase[find_all_posts_by_x]</phrase></a></td>
</tr>
<tr>
<td><a href="search.php?$session[sessionurl]do=process&amp;showposts=0&amp;starteronly=1&amp;e xactname=1&amp;searchuser=$userinfo[urlusername]"><phrase 1="$userinfo[username]">$vbphrase[find_all_threads_started_by_x]</phrase></a></td>
</tr>
</table>
</fieldset>

<if condition="$vboptions['usereferrer']">
<div class="fieldset">
<div style="padding:$stylevar[formspacer]px">
$vbphrase[referrals]: <strong>$referrals</strong>
</div>
</div>
</if>

<if condition="$show['usernotes']">
<div class="fieldset">
<div style="padding:$stylevar[formspacer]px">
$vbphrase[user_notes]: <strong>$usernote[total]</strong> [<a href="usernote.php?$session[sessionurl]u=$userinfo[userid]">$vbphrase[view]</a>]
<if condition="$show['usernotetotal']">
<br />($vbphrase[last]: $usernote[lastpostdate] <span class="time">$usernote[lastposttime]</span>)
</if>
</div>
</div>
</if>

</div>
</div>
</td>

<td class="panelsurround" align="center">
<div class="panel">
<div align="$stylevar[left]">

<div class="fieldset">
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<if condition="$show['homepage']">
<tr>
<td>
$vbphrase[home_page]:<br />
<a href="$userinfo[homepage]" target="_blank">$userinfo[homepage]</a>
</td>
</tr>
</if>
<tr>
<td>
$vbphrase[email]:<br />
<a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$userinfo[userid]"><phrase 1="$userinfo[username]">$vbphrase[send_message_via_email_to_x]</phrase></a>
</td>
</tr>
<if condition="$userinfo['pm']">
<tr>
<td>
$vbphrase[private_message]:<br />
<a href="private.php?$session[sessionurl]do=newpm&amp;u=$userinfo[userid]"><phrase 1="$userinfo[username]">$vbphrase[send_private_message_to_x]</phrase></a>
</td>
</tr>
</if>
</table>
</div>

<if condition="$show['hasimicons']">
<fieldset class="fieldset">
<legend>$vbphrase[instant_messaging]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<if condition="$userinfo['showicq']">
<tr>
<td>$userinfo[icqicon]</td>
<td><a href="#" onclick="return imwindow('icq', '$userinfo[userid]', 500, 450)">$userinfo[icq]</a></td>
</tr>
</if>
<if condition="$userinfo['showaim']">
<tr>
<td>$userinfo[aimicon]</td>
<td><a href="#" onclick="return imwindow('aim', '$userinfo[userid]', 400, 200)">$userinfo[aim]</a></td>
</tr>
</if>
<if condition="$userinfo['showmsn']">
<tr>
<td>$userinfo[msnicon]</td>
<td><a href="#" onclick="return imwindow('msn', '$userinfo[userid]', 400, 200)">$userinfo[msn]</a></td>
</tr>
</if>
<if condition="$userinfo['showyahoo']">
<tr>
<td>$userinfo[yahooicon]</td>
<td><a href="#" onclick="return imwindow('yahoo', '$userinfo[userid]', 400, 200)">$userinfo[yahoo]</a></td>
</tr>
</if>
</table>
</fieldset>
</if>

</div>
</div>
</td>

</tr>
<tr>
<td class="tcat" width="50%">$vbphrase[additional_information]</td>
<td class="tcat" width="50%">$vbphrase[group_memberships]</td>
</tr>
<tr valign="top">

<td class="panelsurround" align="center">
<div class="panel">
<div align="$stylevar[left]">

<div class="fieldset">
<if condition="$userinfo['birthday'] OR $customfields">
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<if condition="$userinfo['birthday']">
<tr>
<td>
<strong>$vbphrase[birthday]</strong>:<br />
$userinfo[birthday]
</td>
</tr>
</if>
$customfields
</table>
<else />
<em>$vbphrase[n_a]</em>
</if>
</div>

</div>
</div>
</td>

<td class="panelsurround" align="center">
<div class="panel">
<div align="$stylevar[left]">

<div class="fieldset">
<table cellpadding="0" cellspacing="$stylevar[formspacer]px" border="0">
<tr>
<if condition="$show['membergroups']">
<td><strong><phrase 1="$userinfo[username]">$vbphrase[x_is_a_member_of_the_following_groups]</phrase></strong>:</td>
<else />
<td><strong><phrase 1="$userinfo[username]">$vbphrase[x_is_not_a_member_of_any_public_groups]</phrase></strong></td>
</if>
</tr>
$membergroupbits
</table>
</div>

</div>
</div>
</td>

</tr>
</table>

$footer

</body>
</html>

nubian 12-14-2004 06:21 PM

i'm very new to vb.
i need something like this because i have quite a few +++++++s on my board.
i'm about to install it.
wish me luck! :nervous:

SamirDarji 12-14-2004 06:32 PM

Quote:

Originally Posted by sv1cec
You can certainly run some queries manually, but if you are not know what you are doing, it might be a problem. I suggest you uninstall and re-install from scratch. How many warnings did you have with Zero's hack?

Rgds

I didn't have any warnings at all with ZT's hack. I just installed it and was going to start modding it with your additions.

Logically, I can follow code quite well. It's kinda wierd that the last 2 queries didn't run since it was all in an array.

I'm pretty familiar with queries, but I don't know the exact format (especially when taking them out from php). If you could just let me know if this query is right, then I think I've got the query part down (I have no table prefix):
Code:

alter table warning_options
add `hierarchical` char(3),
add `automatic` char(3),
add `automatic_warner` int(10) unsigned,
add `warner` int(15),
add `troll_usergroup_id` varchar(10),
add `aprotected_usergroups` varchar(0),
add `restore_groupid` smallint(5) unsigned,
add `incr_ban_days` char(3),
add `max_no_bans` int(5),
add `viewoption` char(3),
add `multiple_per_post` char(3),
add `send_pm_warning` char(3),
add `send_em_warning` char(3),
add `historical` char(3),
add `allowoffpost` char(3),
add `warnings_per_page` int(3)";


sv1cec 12-14-2004 06:49 PM

Quote:

Originally Posted by SamirDarji
I didn't have any warnings at all with ZT's hack. I just installed it and was going to start modding it with your additions.

Logically, I can follow code quite well. It's kinda wierd that the last 2 queries didn't run since it was all in an array.

I'm pretty familiar with queries, but I don't know the exact format (especially when taking them out from php). If you could just let me know if this query is right, then I think I've got the query part down (I have no table prefix):
Code:

alter table warning_options
add `hierarchical` char(3),
add `automatic` char(3),
add `automatic_warner` int(10) unsigned,
add `warner` int(15),
add `troll_usergroup_id` varchar(10),
add `aprotected_usergroups` varchar(0),
add `restore_groupid` smallint(5) unsigned,
add `incr_ban_days` char(3),
add `max_no_bans` int(5),
add `viewoption` char(3),
add `multiple_per_post` char(3),
add `send_pm_warning` char(3),
add `send_em_warning` char(3),
add `historical` char(3),
add `allowoffpost` char(3),
add `warnings_per_page` int(3)";


My friend, if you had no warnings in ZT's hack, delete everything and start from scratch. Why bother?

The query above is the one which modifies ZT's table to mine, but it is an older version, it does not have the 'version' column, download the last zip and get it from the upgrade_warn.php file.

Rgds

SamirDarji 12-14-2004 06:57 PM

Quote:

Originally Posted by sv1cec
My friend, if you had no warnings in ZT's hack, delete everything and start from scratch. Why bother?

I guess I misunderstood the uinstaller the first time I read it. I thought I'd have to redo all the template mods. That would be a pain.

Quote:

Originally Posted by sv1cec
The query above is the one which modifies ZT's table to mine, but it is an older version, it does not have the 'version' column, download the last zip and get it from the upgrade_warn.php file.

Will do. I'll try run the query first, but if that doesn't work, I'll uninstall and install from scratch.

sv1cec 12-14-2004 07:32 PM

Quote:

Originally Posted by SamirDarji
I guess I misunderstood the uinstaller the first time I read it. I thought I'd have to redo all the template mods. That would be a pain.


Will do. I'll try run the query first, but if that doesn't work, I'll uninstall and install from scratch.

I double-checked (sometimes, you never know what YOU have done), and the uninstaller removes only the templates that the hack adds. Not the ones, which existed and you modified. And of course, it does not change the php files you changed.

Rgds

SamirDarji 12-14-2004 07:54 PM

Well, here's what I got back from the SQL Query:
Code:

Database forum - Table warning_options running on hsvtest.ods.org
Error

There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem

ERROR: Unclosed quote @ 527
STR: "
SQL: alter table warning_options
add `hierarchical` char(3),
add `automatic` char(3),
add `automatic_warner` int(10) unsigned,
add `warner` int(15),
add `troll_usergroup_id` varchar(10),
add `aprotected_usergroups` varchar(0),
add `restore_groupid` smallint(5) unsigned,
add `incr_ban_days` char(3),
add `max_no_bans` int(5),
add `viewoption` char(3),
add `multiple_per_post` char(3),
add `send_pm_warning` char(3),
add `send_em_warning` char(3),
add `historical` char(3),
add `allowoffpost` char(3),
add `warnings_per_page` int(3)";

SQL-query : 

alter table warning_options add `hierarchical` char(3), add `automatic` char(3), add `automatic_warner` int(10) unsigned, add `warner` int(15), add `troll_usergroup_id` varchar(10), add `aprotected_usergroups` varchar(0), add `restore_groupid` smallint(5) unsigned, add `incr_ban_days` char(3), add `max_no_bans` int(5), add `viewoption` char(3), add `multiple_per_post` char(3), add `send_pm_warning` char(3), add `send_em_warning` char(3), add `historical` char(3), add `allowoffpost` char(3), add `warnings_per_page` int(3)";

MySQL said:


Too big column length for column 'aprotected_usergroups' (max = 255). Use BLOB instead

I ran it in both phpmyadmin and through admincp. Anything else left to try before I just uninstall and reinstall?

sv1cec 12-14-2004 08:42 PM

Quote:

Originally Posted by SamirDarji
Well, here's what I got back from the SQL Query:
Code:

Database forum - Table warning_options running on hsvtest.ods.org
Error

There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem

ERROR: Unclosed quote @ 527
STR: "
SQL: alter table warning_options
add `hierarchical` char(3),
add `automatic` char(3),
add `automatic_warner` int(10) unsigned,
add `warner` int(15),
add `troll_usergroup_id` varchar(10),
add `aprotected_usergroups` varchar(0),
add `restore_groupid` smallint(5) unsigned,
add `incr_ban_days` char(3),
add `max_no_bans` int(5),
add `viewoption` char(3),
add `multiple_per_post` char(3),
add `send_pm_warning` char(3),
add `send_em_warning` char(3),
add `historical` char(3),
add `allowoffpost` char(3),
add `warnings_per_page` int(3)";

SQL-query : 

alter table warning_options add `hierarchical` char(3), add `automatic` char(3), add `automatic_warner` int(10) unsigned, add `warner` int(15), add `troll_usergroup_id` varchar(10), add `aprotected_usergroups` varchar(0), add `restore_groupid` smallint(5) unsigned, add `incr_ban_days` char(3), add `max_no_bans` int(5), add `viewoption` char(3), add `multiple_per_post` char(3), add `send_pm_warning` char(3), add `send_em_warning` char(3), add `historical` char(3), add `allowoffpost` char(3), add `warnings_per_page` int(3)";

MySQL said:


Too big column length for column 'aprotected_usergroups' (max = 255). Use BLOB instead

I ran it in both phpmyadmin and through admincp. Anything else left to try before I just uninstall and reinstall?

The query is NOT the one you should be running. I told you to download the zip file again and extract the upgrade_warn.php from the zip and look in that file for the query. The query you are running does not include the column 'version' and it has a mistake in the column `aprotected_usergroups', which has a length of 0.

You said you have no TABLE_PREFIX, so run this query here:

alter table warning_options
add `version` char(10),
add `hierarchical` char(3),
add `automatic` char(3),
add `automaticpm` char(3),
add `automatic_warner` int(10) unsigned,
add `warner` int(15),
add `troll_usergroup_id` varchar(10),
add `aprotected_usergroups` varchar(10),
add `restore_groupid` smallint(5) unsigned,
add `incr_ban_days` char(3),
add `max_no_bans` int(5),
add `viewoption` char(3),
add `multiple_per_post` char(3),
add `send_pm_warning` char(3),
add `send_em_warning` char(3),
add `historical` char(3),
add `allowoffpost` char(3),
add `warnings_per_page` int(3)

Rgds

SamirDarji 12-14-2004 09:08 PM

Quote:

Originally Posted by sv1cec
The query is NOT the one you should be running. I told you to download the zip file again and extract the upgrade_warn.php from the zip and look in that file for the query. The query you are running does not include the column 'version' and it has a mistake in the column `aprotected_usergroups', which has a length of 0.

You said you have no TABLE_PREFIX, so run this query here:

alter table warning_options
add `version` char(10),
add `hierarchical` char(3),
add `automatic` char(3),
add `automaticpm` char(3),
add `automatic_warner` int(10) unsigned,
add `warner` int(15),
add `troll_usergroup_id` varchar(10),
add `aprotected_usergroups` varchar(10),
add `restore_groupid` smallint(5) unsigned,
add `incr_ban_days` char(3),
add `max_no_bans` int(5),
add `viewoption` char(3),
add `multiple_per_post` char(3),
add `send_pm_warning` char(3),
add `send_em_warning` char(3),
add `historical` char(3),
add `allowoffpost` char(3),
add `warnings_per_page` int(3)

Rgds

Ooops!! I forgot to get the newest zip. It's been a crazy day. Trying to change headlights in my car and it was so cold that my frozen hands couldn't do anything for more than 15 mins. So I was going back and forth between this and the car.

SamirDarji 12-14-2004 09:11 PM

That worked. Should I go ahead and run the other query that put the default options in the tables or should I just go ahead and set the warning options through admincp?

nubian 12-15-2004 12:01 AM

can somebody please help me.
i cannot find this...

Code:

  $post[reputationdisplay]</if>
in my postbit.
the only thing that comes close to that is this:
Code:

  <div class="smallfont">
                                  <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']"><if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower] </if><div>$post[reputationdisplay]</div></if>
                                  <div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon]</div>
                                  </div>

do i just add it under this line of code?
Code:

<if condition="$show['reputation']"><if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower] </if><div>$post[reputationdisplay]</div></if>
i have a virgin postbit template from v 3.0.3
i'm very new to coding
thanks in advance

nubian 12-15-2004 01:34 AM

with my post above i've used my best guess.
looked like some of the lines were in that exact letter case.

i have another problem.
everythign seems to be okay but when i try to enter threads it looks like the image below.
i've re-enter the lines of codes neccesary for showthread.php and functions_showthread.php

can any of you tell me why it's doing this.
please help
thanks in advance

SamirDarji 12-15-2004 02:12 AM

Quote:

Originally Posted by nubian
with my post above i've used my best guess.
looked like some of the lines were in that exact letter case.

i have another problem.
everythign seems to be okay but when i try to enter threads it looks like the image below.
i've re-enter the lines of codes neccesary for showthread.php and functions_showthread.php

can any of you tell me why it's doing this.
please help
thanks in advance

Sounds like a template issue to me rather than a php one. Check over your template changes and make sure they are correct too.

TRStealth 12-15-2004 03:15 AM

Quote:

Originally Posted by TRStealth
I'm getting a problem:

Code:

Database error in vBulletin 3.0.3:

Invalid SQL: update warning_options set
hierarchical='No',
automatic='No',
automaticpm='No',
warner='1',
automatic_warner='1',
banned_limit='5',
points_before_banned='10',
banned_usergroup_id='8',
troll_usergroup_id='8',
protected_usergroups='5|6|7|11|14|5|6|9|13|15|12|10',
aprotected_usergroups='11|14|5|6|9|13|15|12|10',
restore_groupid='',
incr_ban_days='Yes',
max_no_bans='2',
viewoption='Mgm',
multiple_per_post='No',
send_pm_warning='Yes',
send_em_warning='No',
historical='Yes',
allowoffpost='Yes',
warnings_per_page='30'
 where oid='1'
mysql error: Unknown column 'automaticpm' in 'field list'

mysql error number: 1054

Date: Sunday 12th of December 2004 07:14:35 PM
Script: http://www.enclave1.net/forums/admincp/admin_warn.php
Referer: http://www.enclave1.net/forums/admincp/admin_warn.php?act=manageoptions
Username: Stealth
IP Address: xx.xx.xx.xx

Also, when I go to Warn.php?do=ViewMyWarnings , it just comes out as a blank page.

I fixed the view warnings thing, but can anyone tell me why I'm getting the SQL Error?

nubian 12-15-2004 03:16 AM

Quote:

Originally Posted by SamirDarji
Sounds like a template issue to me rather than a php one. Check over your template changes and make sure they are correct too.

thank you i fixed it.
hopefully NO PROBLEMS.
first time hacking my board.
:eek:

sv1cec 12-15-2004 04:03 AM

Quote:

Originally Posted by TRStealth
I fixed the view warnings thing, but can anyone tell me why I'm getting the SQL Error?

Because the database and the code are not of matching versions. In other words, your table hasn't all the columns required by the code. Go create the 'automaticpm' column in your table, by running the following query:

alter table `warning_options` add `automaticpm` char(3) after automatic

But, still you do not have all the columns in the table. What I see missing is the 'version` column.

Folks, please download and install always the latest version. Or, make sure you always upgrade to the latest version, or else it is very difficult for me to support you.

Rgds

Delphiprogrammi 12-15-2004 04:34 AM

all up and running ;)

SamirDarji 12-15-2004 05:08 AM

Well, I tried the query and ran it--worked fine. Set all the options--set fine. Went to see what it looked like on the board--had 2 copies of "Warn User" and "View Warnings"--no biggie, probably just a template error. Got a blank page when I tried to warn user or view warnings--probably just something was messed up.

I unstalled using the uninstaller.php and then tried to look at the forum--blank page. Now I can't get anything out of my board, but a blank page. I can't even get to admincp. What did I do wrong?

Delphiprogrammi 12-15-2004 09:07 AM

revert all the modified templates *.php files you do have a copy do you ? and what about a database backup BEFORE you try to install this hack ? always backup when something is "havy" modifying the original code

Goodspeed 12-15-2004 09:17 AM

I got just a little bug. Everything working fine, but this error allways appears when I'm adding a warning

Code:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/site/public_html/forum/Warn.php(310) : eval()'d code on line 23
Please help. Thank you!

sv1cec 12-15-2004 09:21 AM

You can't even get in your admincp??? That's odd. You must have messed something up, but I have no idea where. The uninstaller is only removing the templates added by the hack, the tables and the settings. It doesn't touch anything else.

Try reverting your admincp/index.php file to the original and see if that works.

Keep me posted. I'll try to check here often to see how I can help.

jluerken 12-15-2004 09:49 AM

Hi,

I have one small last error with this hack in version 2.3.1.

If I take a look in the threads I get an display error in the Internet Explorer.
Please take a look at the screenshot.

Can someone send me the correct modified template or post it here please?

sv1cec 12-15-2004 09:51 AM

Quote:

Originally Posted by Goodspeed
I got just a little bug. Everything working fine, but this error allways appears when I'm adding a warning

Code:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/site/public_html/forum/Warn.php(310) : eval()'d code on line 23
Please help. Thank you!

When does it happen? When you hit the "Warn XYZ" link? or after you warn someone? Some template must be wrong, but I can't reproduce it here.

Delphiprogrammi 12-15-2004 09:52 AM

Quote:

Originally Posted by Goodspeed
I got just a little bug. Everything working fine, but this error allways appears when I'm adding a warning

Code:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/site/public_html/forum/Warn.php(310) : eval()'d code on line 23
Please help. Thank you!

this is a typical PHP syntax error basicly it means you forgot a " or ' or } { etc for example

PHP Code:

<?php
$test
="this is a test"
echo $test;
?>

will generate a parse error because there is no ; at the end of the string $test you should look in the line number (or the lines above it)


All times are GMT. The time now is 06:29 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02390 seconds
  • Memory Usage 2,003KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (11)bbcode_code_printable
  • (3)bbcode_php_printable
  • (30)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete