vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Moderators Functions - One-touch Spam Ban and Cleanup (https://vborg.vbsupport.ru/showthread.php?t=156444)

Symmetrical? 08-29-2007 10:37 AM

installed 44 well done :)

hobbystoresearc 08-29-2007 11:59 AM

this is a database error I get when clicking on the link to remove spam

Code:

Database error in vBulletin 3.6.8:

Invalid SQL:

                SELECT COUNT(0) FROM thread
                WHERE postuserid = 3
                AND threadid NOT IN
                        (SELECT primaryid FROM deletionlog
                        WHERE type = 'thread');

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 'SELECT primaryid FROM deletionlog
                        WHERE type = 'thread')'
Error Number : 1064
Date        : Wednesday, August 29th 2007 @ 09:56:39 AM
Script      : http://www.*****/forums/misc.php?do=spamcleanconfirm&u=3
Referrer    : http://www.*****.com/forums/member.php?u=3
IP Address  : *****
Username    : munsonfan15
Classname    : vB_Database


mfyvie 08-29-2007 03:10 PM

That database syntax should be correct. What version of mysql are you running?

Alibass 08-29-2007 05:50 PM

Quote:

Originally Posted by mfyvie (Post 1327892)
See my answer above, you probably don't have the correct hooks in your custom skins, add them and the problem will be resolved.

In my other custom skins I see your postbit_onetouchban template installed. I did not have $template_hook[postbit_user_popup] in my custom skins postbit templates so I added it in the location you suggested and reinstalled your mod, but I still cannot get the One-touch Ban & Clean option in the postbit drop down menu of my custom skins to work.

Alibass 08-29-2007 05:57 PM

Never mind I found where to add postbit_onetouchban code in postbit to make it work.

Thanks again, great mod. :)

FreshFroot 08-29-2007 06:06 PM

Wow.. this should be a MOTM, great stuff mate :D

hobbystoresearc 08-29-2007 06:47 PM

Quote:

Originally Posted by mfyvie (Post 1328191)
That database syntax should be correct. What version of mysql are you running?

mysql 4.0.27

Apophis 08-29-2007 07:17 PM

The product installed okay, but I do have a rather strange result:

In the postbit pull-down (I use the legacy postbit) I see the "One Touch Ban & Clean" option for the FIRST post in the thread. On the SECOND post in the thread I see that option twice in the pull-down, for the THIRD post I see it three times. etc. etc. etc.

Any ideas?

Apophis 08-29-2007 07:20 PM

Upon further inspection I also see that even though it displays multiple times, each iteration retains the userid of the respective poster based on the post order.

IE: On a situation where it is displayed 5 times (on the 5th post). The first occurance lists the first posters ID, the second occurance lists the second posters ID, etc. etc.

mfyvie 08-30-2007 06:00 AM

Quote:

Originally Posted by Alibass (Post 1328265)
In my other custom skins I see your postbit_onetouchban template installed. I did not have $template_hook[postbit_user_popup] in my custom skins postbit templates so I added it in the location you suggested and reinstalled your mod, but I still cannot get the One-touch Ban & Clean option in the postbit drop down menu of my custom skins to work.

Hmm, strange. I don't know enough about the template hook system to comment, but I would have thought that just adding the hook would be enough, but maybe there's more to it than that. Well at least you've resolved the problem manually in any case.

Quote:

Originally Posted by hobbystoresearc (Post 1328298)
mysql 4.0.27

Ok, that is a problem. I just checked and 4.0 doesn't support sub queries. I strongly suggest you upgrade to mysql 4.1 or later (or encourage your host to do so). I may change the product pre-requisites so that it won't install if you have mysql 4.0.

Quote:

Originally Posted by Apophis (Post 1328318)
The product installed okay, but I do have a rather strange result:

In the postbit pull-down (I use the legacy postbit) I see the "One Touch Ban & Clean" option for the FIRST post in the thread. On the SECOND post in the thread I see that option twice in the pull-down, for the THIRD post I see it three times. etc. etc. etc.

Any ideas?

This is most strange. The relevant code can be found in the plugin called "Insert into templates" at postbit_display_start:

Code:

eval('$template_hook[postbit_user_popup] .= " ' . fetch_template('postbit_onetouchban') . '";');
The php concatenation operator ".=" is used there. This means, append the contents, rather than replace them. This seems to work correctly on other systems, but I've no idea why it isn't working on yours. Basically what is happening is that something else should resetting that hook on each iteration, but that isn't happening, so this hook keeps growing and growing as you proceed down the page. Are you running an older version of vbulletin (bug maybe?) or perhaps another hack is causing this behaviour?

You can work around it by changing the ".=" to just "=" but this will kill any other mods that might be using this template hook (though you probably don't have any).


All times are GMT. The time now is 09:43 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.02737 seconds
  • Memory Usage 1,744KB
  • 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
  • (5)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
  • (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