vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Referrals In Postbit (https://vborg.vbsupport.ru/showthread.php?t=108558)

proxx 02-24-2006 02:33 AM

could someone tell me how to fix this error, i get many of these emailed to me:


Database error in vBulletin 3.5.2:

Invalid SQL:
SELECT COUNT(*) AS count FROM user WHERE referrerid =;

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 '' at line 1
Error Number : 1064
Date : Tuesday, February 21st 2006 @ 09:50:38 PM
Script : http://***/showthread.php?p=6720
Referrer :
IP Address : 65.54.111.69
Username : Unregistered
Classname : vb_database

Lea Verou 03-04-2006 09:31 AM

Doesn't this add one query to EACH post? :confused:

Scratz 03-04-2006 09:17 PM

Just thought i would let the developer know that when I applied the plugin and edited the templates that it was calling for the referrals vbphrase when in my 3.5.4 forum the phrase was referrers..

Don't know if it was due some change I did but putting it out there anyway.

trackpads 04-21-2006 09:19 PM

I am having this same issue, The cause is from the post being by a guest or user 0. Since I have some USENET posts these have no userid and the plugin crashes the thread.

Any idea if we can get an update that eliminates the referall call on guest posts?

Thanks!

-Jason

Developer 04-22-2006 02:03 AM

i'll update this hack soon

trackpads 04-22-2006 09:45 AM

Thanks! It is a great hack!!

trackpads 04-24-2006 07:08 PM

Any luck?

trackpads 04-25-2006 10:56 PM

Ok, had some other folks here help me on this and here is the patch:

Go into your Admincp, plugins and edit the plugin: Number Of Referrals in postbit-by Developer

Replace this:

Code:

if ($vbulletin->options['usereferrer'])
With this:

Code:

if ($this->post['userid'])
And it will work with USENET and Guest posts!

(Thanks to tnguy3n, Hambil, gio~logist and Zachery!)

Zachery 04-25-2006 11:12 PM

Still, a problem with this hack is it runs an addtional query for each post.

It would much better to do an update for each user and log their total user referals. Then log new referals from then on out.

Developer 04-26-2006 07:03 AM

Fixing It now i'll add a plugin in update counters so you have to run something after installing the hack so it counts referrals and then insert it in a field in user's table using datamanger.


All times are GMT. The time now is 01:46 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.01821 seconds
  • Memory Usage 1,727KB
  • 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
  • (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