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)

nubian 12-16-2004 09:08 PM

nothing major but in your 2.3.5 upgrade from 2.3.3 to 2.3.4

find:
Code:

  $DB_site->query("
              UPDATE " . TABLE_PREFIX . "userban SET
              adminid = $bbuserinfo[userid],
              bandate = " . TIMENOW . ",
              liftdate = $liftdate
              WHERE userid = $user[userid]
          ");


it doesn't find this because vb3 comes stock like this:
Code:

  $DB_site->query("
                          UPDATE " . TABLE_PREFIX . "userban SET
                          adminid = $bbuserinfo[userid],
                          bandate = " . TIMENOW . ",
                          liftdate = $liftdate,
                          adminid = $bbuserinfo[userid]
                          WHERE userid = $user[userid]
                  ");

which i believe to be unmodified from your previous 2.3.2.
again nothing major just in case somebody else who's trying to install this doesn't think something is wrong.....or is there? :ermm:

nubian 12-16-2004 10:11 PM

i updated to 2.3.5 and i still don't see the option under users profiles.
no one has been warned because i'm doing this under a test site before updatding my live site

SamirDarji 12-17-2004 12:52 AM

Quote:

Originally Posted by sv1cec
In order to see those links, you should have activate the "Allow Non-Post-related" warnings. If that is not set to "Yes", there are no links in the UserCP.

Please tell me if you have set that to yes, or not, so that I can see what your problem is.

Rgds

It's set to yes. That was one of the first things I checked and double checked. The only thing I can make of it is that for some reason the test in the template is failing, so it doesn't show the options. Which php file besides member.php has code relating to this and about where is it (beginning, middle, end)? I've been checking things as I think of them, but I don't know the exact structure of the hack, so I really don't know where to look besides the basics. :(

SamirDarji 12-17-2004 01:11 AM

Quote:

Originally Posted by sv1cec
One more question, if the user you are checking his CP has warning points, do you see his points?

I can see my user's warning points. I wonder one thing, if the user is banned, will the options to warn still be there? I loaded up this test user with points (hehe) and got him banned. I would think you should be still able to see the options.

nubian 12-17-2004 03:06 AM

Quote:

Originally Posted by sv1cec
One more question, if the user you are checking his CP has warning points, do you see his points?

i have warned one of my test users and i can see the points i've warned him with ...but again not able to see this option to warn him off post related.

sv1cec 12-17-2004 03:18 AM

Nubian,

You are right, when I was writing the patch instructions, I saw that and I thought I have made a mistake there, because the code is entering the same info in the same column twice. So I removed the last insert. I'll update the instructions, thanks.

sv1cec 12-17-2004 03:27 AM

Quote:

Originally Posted by nubian
i have warned one of my test users and i can see the points i've warned him with ...but again not able to see this option to warn him off post related.

OK gentlemen, for all those who can't see the Warn XYZ and View XYZ's Warnings in the UserCP.

1. Make sure that your member.php file has the following lines in the beginning:

PHP Code:

require_once('./global.php');
require_once(
'./includes/functions_showthread.php');
require_once(
'./includes/functions_user.php');
require_once(
'./includes/functions_warning.php'); 

What you need to have is the last one, with the functions_warning.php.

2. Make sure you have uploaded the latest realease of the functions_warning.php file in your includes directory. Check that the file has the following lines at the beginning:

PHP Code:

$warnopts = array();
global 
$warn_opts;

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

3. Make sure your MEMBERINFO template has the following code:

HTML Code:

<!-- checks for warning system -->
<td  class="thead" align="right">
<div class="smallfont" style="float:$stylevar[right]">
<if condition="THIS_SCRIPT=='member' AND $warn_opts[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 -->

In order for them to appear, you have to have the Allow off-post warnings equal to Yes, and have a Yes or No value in the hierarchical.

Make sure you try it as an admin, and let me know what your results are.

Rgds

sv1cec 12-17-2004 03:29 AM

Quote:

Originally Posted by SamirDarji
I can see my user's warning points. I wonder one thing, if the user is banned, will the options to warn still be there? I loaded up this test user with points (hehe) and got him banned. I would think you should be still able to see the options.

The Warn XYZ and View XYZ's links will still be there, because later, after you ban him, you may find that he has somewhere left another post, which should be warned again. And of course, because, you should be able to see his warrnings.

Rgds

SamirDarji 12-17-2004 06:40 AM

Quote:

Originally Posted by sv1cec
OK gentlemen, for all those who can't see the Warn XYZ and View XYZ's Warnings in the UserCP.

1. Make sure that your member.php file has the following lines in the beginning:

PHP Code:

require_once('./global.php');
require_once(
'./includes/functions_showthread.php');
require_once(
'./includes/functions_user.php');
require_once(
'./includes/functions_warning.php'); 

What you need to have is the last one, with the functions_warning.php.

2. Make sure you have uploaded the latest realease of the functions_warning.php file in your includes directory. Check that the file has the following lines at the beginning:

PHP Code:

$warnopts = array();
global 
$warn_opts;

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

3. Make sure your MEMBERINFO template has the following code:

HTML Code:

<!-- checks for warning system -->
<td  class="thead" align="right">
<div class="smallfont" style="float:$stylevar[right]">
<if condition="THIS_SCRIPT=='member' AND $warn_opts[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 -->

In order for them to appear, you have to have the Allow off-post warnings equal to Yes, and have a Yes or No value in the hierarchical.

Make sure you try it as an admin, and let me know what your results are.

Rgds

I got it! After checking everything, I decided to completely cut and paste the template code you posted and replace what came from the install file--that did it.

The only problem I ran across so far is when issueing a warning, it will go to a blank page after issueing it. It will actually issue the warning, but it doesn't return to any page.

sv1cec 12-17-2004 06:55 AM

Quote:

Originally Posted by SamirDarji
I got it! After checking everything, I decided to completely cut and paste the template code you posted and replace what came from the install file--that did it.

The only problem I ran across so far is when issueing a warning, it will go to a blank page after issueing it. It will actually issue the warning, but it doesn't return to any page.

Check that you have the warn_redirect template in your system. That's what should come up after you issue the warning.

I also changed the installation instructions for the MEMBERINFO template, so that it is easier to patch the original template. One replace operation and you are done.

Rgds


All times are GMT. The time now is 02:35 AM.

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.01843 seconds
  • Memory Usage 1,803KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_html_printable
  • (4)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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