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)
-   -   Article Bot (https://vborg.vbsupport.ru/showthread.php?t=67078)

kyouens 05-02-2005 09:29 PM

Quote:

Originally Posted by greenhybrid
So, the postintervals tell the cron whether to process the threads at that time, correct?

Earlier today, my bot posted the same article 3 times. How can this be prevented?

That's correct about the postintervals. And the doubleposting--I am having the same problem, and it's pissing me off to no end. I'm trying to pin down why it's happening, and if I do, I'll let you know.

greenhybrid 05-02-2005 09:31 PM

In my case, it's because there is more than one instance of the article in the RSS :) The bot should be able to check if the title would be a duplicate; if so, don't post.

kyouens 05-02-2005 11:38 PM

Quote:

Originally Posted by greenhybrid
In my case, it's because there is more than one instance of the article in the RSS :) The bot should be able to check if the title would be a duplicate; if so, don't post.

That's what it does, in theory. Here's the relevant code, I think:

PHP Code:

        $result_threads $DB_site->query("
            SELECT title
            FROM articlebot_rss_cache
            WHERE dateline >= 
$timecut
        "
);


        while (
$thread $DB_site->fetch_array($result_threads))
        {
            
$threads[] = trim($thread['title']);
        } 

By any chance, are the articles that are being duplicated in your installation only those that have a long title (at least longer than the others?) I'm trying to see what the duplicated threads have in common. On mine, it seems to be only the articles with the longest titles.

kyouens 05-03-2005 09:12 PM

Quote:

By any chance, are the articles that are being duplicated in your installation only those that have a long title (at least longer than the others?) I'm trying to see what the duplicated threads have in common. On mine, it seems to be only the articles with the longest titles.
Check this out: In my forum, the longest threads have names like this:

Immunohistochemical Stains for p63 and alpha-Methylacyl-CoA Racemase, Versus a Cocktail Comprising Both, in the Diagnosis of Prostatic Carcinoma: A Comparison of the Immunohistochemical Staining of 430 Foci in Radical Prostatectomy and Needle Biopsy

However, the feed itself gives the title as this (ignore the html characters):

Immunohistochemical%20Stains%20for%20p63%20and%20
alpha-Methylacyl-CoA%20Racemase%2C%20Versus%20a%20
Cocktail%20Comprising%20Both%2C%20in%20the%20Diagn osis%20
of%20Prostatic%20Carcinoma%3A%20A%20Comparison%20o f%20
the%20Immunohistochemical%20Staining%20of%20430%20 Foci
%20in%20Radical%20Prostatectomy%20and%20Needle%20
Biopsy%20Tissues.


These are not identical. If you look, the last part of the feed's title has a few extra words. For some reason, the title is getting truncated as it is being written into the forum, which is why the script, which I believe uses the title and postdate to determine identical-ness, fails to see these as identical.

Now to find the responsible code and drop a major load of hurt on this stupid bug.

Update: The problem is that the title row in the post table (of vbulletin) is of type varchar(250), and some of the full titles are >250 characters. To include the full titles, I may need to change the column type to TEXT. I wonder if this will wreck my vbulletin due to unforeseen badness...I will ask around before I try it and will update the thread.

Update: Fixed the doubleposting of articles with long titles issue. Go into PHPmyadmin and change the column type of the "title" row of the articlebot_rss_cache table from Varchar(255) to "text". That eliminates the 255 character limit for titles in the feed cache and stops the doubleposting. Note that the thread title ON THE POST will still be limited to 254 characters, but this shouldn't be a problem at all for most people.

|Jordan| 05-04-2005 12:15 AM

I'm using running the article bot in a cron tab. I receive this error when it runs:

/bin/sh: line 1: /usr/local/lib/php: is a directory

The instructions state the php dir, well that is the php dir (i checked with my host). Any ideas what's wrong?

kyouens 05-04-2005 01:24 AM

Quote:

Originally Posted by MyIS_Jordan
I'm using running the article bot in a cron tab. I receive this error when it runs:

/bin/sh: line 1: /usr/local/lib/php: is a directory

The instructions state the php dir, well that is the php dir (i checked with my host). Any ideas what's wrong?

that is the php directory, but you need to run the php executable binary file. On many servers, it's at the address /usr/local/bin/php

Give that a shot.

memobug 05-04-2005 05:16 AM

Quote:

Originally Posted by kyouens
Check this out: In my forum, the longest threads have names like this:

Immunohistochemical Stains for p63 and alpha-Methylacyl-CoA Racemase, Versus a Cocktail Comprising Both, in the Diagnosis of Prostatic Carcinoma: A Comparison of the Immunohistochemical Staining of 430 Foci in Radical Prostatectomy and Needle Biopsy


There would appear to be a limit of 250-255 characters or so in the forum titles. Maybe it's a limit set in the hack but probably it's a database limitation, too.

Regards,

Matt

kyouens 05-04-2005 05:18 AM

Yeah, it's a databse limitation. From my above post :)

Quote:

Update: Fixed the doubleposting of articles with long titles issue. Go into PHPmyadmin and change the column type of the "title" row of the articlebot_rss_cache table from Varchar(255) to "text". That eliminates the 255 character limit for titles in the feed cache and stops the doubleposting. Note that the thread title ON THE POST will still be limited to 254 characters, but this shouldn't be a problem at all for most people.
Thanks for the help though.
Kenny

memobug 05-09-2005 09:36 AM

I am not sure my article bot is 100% up-to-date - I installed 10/15/04 and article bot has a comment in it dated articlebot.php, v1.1, 07/25/04

However each time the bot makes a post I get emailed the following error. I am 98% sure it is coming from my friend the 'bot.

Q1: Does anyone else get these ( I mean obviously it is trying to add an array to a scalar - but why?)
Q2: Any idea what could be the actual cause?
Quote:


Invalid SQL:
UPDATE user
SET posts = posts + Array
WHERE userid = 0

mysql error: Unknown column 'Array' in 'field list'

mysql error number: 1054

Date: Thursday 17th of March 2005 12:00:14 AM
Script: http://
Referer:
Username: Unregistered
IP Address

Marco van Herwaarden 05-09-2005 12:07 PM

Are you running PHP5?


All times are GMT. The time now is 07:40 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.01961 seconds
  • Memory Usage 1,757KB
  • 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
  • (1)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