vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Profile Enhancements - Lt - Ban Info (https://vborg.vbsupport.ru/showthread.php?t=290507)

acast 12-23-2012 09:30 PM

Quote:

Originally Posted by Leftenant (Post 2381031)
Temporary Workaround:
Goto AdminCp->plugin management->Lt - Ban Info - SQ
Replace All to:
PHP Code:

$cid htmlspecialchars($_GET["mode"]); 
if(
$cid != 'threaded' AND $cid != 'hybrid')
{
$hook_query_fields .= ", lt_userban.userid AS lt_ban_id";
$hook_query_joins .= " LEFT JOIN " TABLE_PREFIX "userban AS lt_userban ON ( lt_userban.userid = post.userid ) ";


Note: Hack only work on normal mode.

It doesn't work. Still the same error:

I disable the plugin, too.

Rhodium 07-03-2016 08:58 AM

The plugin works fine but i get db errors

Quote:

Database error in vBulletin 4.2.3:

Invalid SQL:

SELECT
post.*, post.username AS postusername, post.ipaddress AS ip, IF(post.visible = 2, 1, 0) AS isdeleted,
user.*, userfield.*, usertextfield.*,
icon.title as icontitle, icon.iconpath,
avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline,


editlog.userid AS edit_userid, editlog.username AS edit_username, editlog.dateline AS edit_dateline,
editlog.reason AS edit_reason, editlog.hashistory,
postparsed.pagetext_html, postparsed.hasimages,
sigparsed.signatureparsed, sigparsed.hasimages AS sighasimages,
sigpic.userid AS sigpic, sigpic.dateline AS sigpicdateline, sigpic.width AS sigpicwidth, sigpic.height AS sigpicheight,

IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupid

, lt_userban.userid AS lt_ban_id, IF(lt_userban.liftdate > 0, lt_userban.userid, NULL) as lt_ban_lift
FROM post AS post
LEFT JOIN user AS user ON(user.userid = post.userid)
LEFT JOIN userfield AS userfield ON(userfield.userid = user.userid)
LEFT JOIN usertextfield AS usertextfield ON(usertextfield.userid = user.userid)
LEFT JOIN icon AS icon ON(icon.iconid = post.iconid)
LEFT JOIN avatar AS avatar ON(avatar.avatarid = user.avatarid) LEFT JOIN customavatar AS customavatar ON(customavatar.userid = user.userid)


LEFT JOIN editlog AS editlog ON(editlog.postid = post.postid)
LEFT JOIN postparsed AS postparsed ON(postparsed.postid = post.postid AND postparsed.styleid = 10 AND postparsed.languageid = 3)
LEFT JOIN sigparsed AS sigparsed ON(sigparsed.userid = user.userid AND sigparsed.styleid = 10 AND sigparsed.languageid = 3)
LEFT JOIN sigpic AS sigpic ON(sigpic.userid = post.userid)

LEFT JOIN userban AS lt_userban ON ( lt_userban.userid = post.userid )
WHERE post.postid IN (4498063,4498064,4498068,4498088,4498288,4498324,4 498107,4499481,4499804,4499819,4499830,4500038,450 0045,4500050,4500056,4500227,4500243,4500500,45011 70,4500971,4500084);

MySQL Error : Column 'displaygroupid' in field list is ambiguous
Error Number : 1052
Request Date : Sunday, July 3rd 2016 @ 02:01:18 AM
Error Date : Sunday, July 3rd 2016 @ 02:01:18 AM
Script : http://xxx.xxx.com/forums/forums/thr...-de-fotografia
Referrer : http://xxx.xxx.com/forums/forums/200-Menorca
IP Address : xxxxxxxxxxxxxxxxxxxxxxxxxxx
Username : No registrado
Classname : vB_Database_MySQLi
MySQL Version :
Any one knows how to fix?

Elixar 11-13-2016 01:53 AM

I had DB errors but it now works. The following changes were made to the plugin called Lt - Ban Bilgileri - GS:

PHP Code:

$lt_ban_gruplar explode(',',$vbulletin->options['lt_ban_gorebilecek_gruplar']);
if ((
$vbulletin->options['lt_ban_etkin']) AND (is_member_of($vbulletin->userinfo,$lt_ban_gruplar)))
    {                
                    
$lt_sql_sorgu $vbulletin->db->query_first("
                    SELECT usergrp.usergroupid, usergrp.adminpermissions AS adminperforgroup, admins.adminpermissions
                    FROM " 
TABLE_PREFIX "user AS user
                    LEFT JOIN " 
TABLE_PREFIX "usergroup usergrp ON(user.usergroupid = usergrp.usergroupid)
                    LEFT JOIN " 
TABLE_PREFIX "administrator admins ON (user.userid = admins.userid)
                    WHERE user.userid = '"
.$vbulletin->userinfo['userid']."'
                    "
);
                    if((
$lt_sql_sorgu['adminperforgroup'] & 1) == 1)
                    {
                        
$lt_allow_per 1;
                    }
            
                    if(
$lt_allow_per != 1)
                    {
                        if((
$lt_sql_sorgu['adminpermissions'] & 256) == 256)
                        {
                            
$lt_allow_per 1;
                            
                        }
                        if(
$lt_allow_per != 1)
                        {
                                if (
in_array($vbulletin->userinfo['userid'], preg_split('#\s*,\s*#s'$vbulletin->
                                
config['SpecialUsers']['superadministrators'], -1PREG_SPLIT_NO_EMPTY)) ) 
                                {    
                                    
$lt_allow_per 1;
                                }
                        }
                    }

        
        
        if ((
THIS_SCRIPT == 'misc') && ($_REQUEST['do'] == 'lt_ban_bilgileri' || $_REQUEST['do'] == 'lt_lift_ban'))
            {
                
$vbulletin->input->clean_gpc('r''userid'TYPE_UINT);

                if (
$vbulletin->GPC['userid'] AND $post verify_id('user'$vbulletin->GPC['userid'], 01))
                {

                }
            }


    } 

Thanks to MarkFL for his help on this. :)

Alan_SP 11-22-2016 11:37 AM

Can you post fixed version of mod here as attachment? It would make things easier for the rest of us.


All times are GMT. The time now is 05:00 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.01041 seconds
  • Memory Usage 1,766KB
  • 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_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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