vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   User Thread Banning (Includes Time Banning Feature) (https://vborg.vbsupport.ru/showthread.php?t=50585)

Boofo 05-03-2003 03:05 AM

Quote:

Today at 08:27 PM Capt PPRuNe said this in Post #30
Problem fixed. I don't have avatars enabled on my forums and the sql code you wrote assumes that everyone has avatars enabled. No one else has reported this problem because I assume they all have avatars enabled.

If anyone needs the solution make a request on here.

It would be nice to have just in case, though. I'd like to see it. ;)

Hobbes 05-05-2003 03:38 AM

I WOULD LIKE THAT SOLUTION!!!!! lol....please?

i'm getting

PHP Code:

Database error in vBulletin 2.2.6:

Invalid SQL
SELECT
thread
.postuserid AS puserid,bans.active AS active,post.*,post.username AS postusername,post.ipaddress AS ip,user.*,userfield.*,icon.title as icontitle,icon.iconpathETC ETC

mysql error
You have an error in your SQL syntax near 'LEFT JOIN thread ON thread.threadid=post.threadid
LEFT JOIN bans ON bans.userid ' 
at line 8

mysql error number
1064

Date
Sunday 04th of May 2003 11:50:14 PM
Script
: [url]http://forums.squareultima.com/showthread.php?s=&postid=62609#post62609[/url]
Referer: [url]http://forums.squareultima.com/index.php?[/url] 

and i am also getting a blank page in the admin cp

John 05-12-2003 10:51 AM

Sorry everyone, I've been away for a while and I didn't have access to vb.org - now I'm back, what are the main issues with this hack? Is it installing well for most people? :\

Jacko 05-13-2003 08:01 AM

shaolyen.

EXCELLENT HACK, works great on my local board..

1 thing i would like to request though.

i am after this kind of hack is it possible to incorporate a users ban as a forum wide ban not just a specific Thread ban?? say have a second ban feature to ban a user for a timed amount to every thread on the forum.. alow them to read just not reply..

Boofo 05-13-2003 01:54 PM

Quote:

05-02-03 at 08:27 PM Capt PPRuNe said this in Post #30
Problem fixed. I don't have avatars enabled on my forums and the sql code you wrote assumes that everyone has avatars enabled. No one else has reported this problem because I assume they all have avatars enabled.

If anyone needs the solution make a request on here.

Still waiting for your fix. ;)

Boofo 05-13-2003 01:57 PM

Shaolyen, could this be coded to work for forums the same way, too?

Hobbes 06-03-2003 04:47 AM

I still have this error in the query

[sql]Database error in vBulletin 2.2.6:

Invalid SQL:
SELECT
thread.postuserid AS puserid,bans.active AS active,post.*,post.username AS postusername,post.ipaddress AS ip,user.*,userfield.*,icon.title as icontitle,icon.iconpath, ETC ETC

mysql error: You have an error in your SQL syntax near 'LEFT JOIN thread ON thread.threadid=post.threadid
LEFT JOIN bans ON bans.userid ' at line 8

mysql error number: 1064

Date: Sunday 04th of May 2003 11:50:14 PM
Script: <a href="http://forums.squareultima.com/showthread.php?s=&postid=62609#post62609" target="_blank">http://forums.squareultima.com/show...62609#post62609</a>
Referer: <a href="http://forums.squareultima.com/index.php?" target="_blank">http://forums.squareultima.com/index.php?</a>
[/sql]

and i tried installign this in a fresh 2.2.6 (jus shoot meh :p) and now the admin cp link is blank....

help? Everything else worked fine, I can ban users etc.....link is jus blank in admin cp...(note: this is on a fresh 2.2.6)....

help?


ditto that boofo....fix would be nice....*cries*....i really like this hack and would lovve it to work :(

Capt PPRuNe 06-25-2003 07:18 AM

Sorry for the delay in getting back to you but been away. Anyway, in the original hack under "2. FILE EDITS" the "Replace With" should be changed from:
PHP Code:

Replace with:
-----------------------------------------------------------------
$posts=$DB_site->query("
SELECT
thread.postuserid AS puserid,bans.active AS active,post.*,post.username AS postusername,post.ipaddress AS ip,user.*,userfield.*,"
.iif($forum[allowicons],'icon.title as icontitle,icon.iconpath,','')."
attachment.attachmentid,attachment.filename,attachment.visible AS attachmentvisible,attachment.counter
"
.iif($avatarenabled,",avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar,customavatar.dateline AS avatardateline","")."
FROM post
"
.iif($forum[allowicons],'LEFT JOIN icon ON icon.iconid=post.iconid','')."
LEFT JOIN user ON user.userid=post.userid
LEFT JOIN userfield ON userfield.userid=user.userid
"
.iif ($avatarenabled,"LEFT JOIN avatar ON avatar.avatarid=user.avatarid
LEFT JOIN thread ON thread.threadid=post.threadid
LEFT JOIN bans ON bans.userid = post.userid AND bans.threadid=post.threadid AND active=1
                       LEFT JOIN customavatar ON customavatar.userid=user.userid"
,"")."
LEFT JOIN attachment ON attachment.attachmentid=post.attachmentid
WHERE 
$postids
ORDER BY dateline 
$postorder
"
);
----------------------------------------------------------------- 

to
PHP Code:

Replace with:
-----------------------------------------------------------------
$posts=$DB_site->query("
SELECT
thread.postuserid AS puserid,bans.active AS active,post.*,post.username AS postusername, post.ipaddress AS ip,user.*,userfield.*,"
.iif($forum[allowicons],'icon.title as icontitle,icon.iconpath,','')."
attachment.attachmentid,attachment.filename,attachment.visible AS attachmentvisible,attachment.counter
"
.iif($avatarenabled,",avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar,customavatar.dateline AS avatardateline","")."
FROM post
"
.iif($forum[allowicons],'LEFT JOIN icon ON icon.iconid=post.iconid','')."
LEFT JOIN user ON user.userid=post.userid
LEFT JOIN userfield ON userfield.userid=user.userid
LEFT JOIN thread ON thread.threadid=post.threadid 
LEFT JOIN bans ON bans.userid = post.userid AND bans.threadid=post.threadid AND active=1 
"
.iif ($avatarenabled,"
LEFT JOIN avatar ON avatar.avatarid=user.avatarid
LEFT JOIN customavatar ON customavatar.userid=user.userid"
,"")."
LEFT JOIN attachment ON attachment.attachmentid=post.attachmentid
WHERE 
$postids
ORDER BY dateline 
$postorder
"
);
----------------------------------------------------------------- 

At least that's what fixed it for me. Been running this hack for a few months now and no problems at all with it. Only request would be an feature in the admin CP to prune some of the older bans from the log.

ImportPassion 07-06-2003 11:17 PM

there is 2 cpheader functions being called in threadbanadmin.php and it doesn't show the page. so just remove one of them.

D

ImportPassion 07-07-2003 03:48 PM

Quote:

04-04-03 at 05:44 AM Anarchnophobia said this in Post #27
any idea about the blank admin page meanwhile?

i fixed this in the above post.


All times are GMT. The time now is 07:22 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.01971 seconds
  • Memory Usage 1,768KB
  • 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
  • (3)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (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