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)

Layne SMith 05-01-2005 04:28 AM

Quote:

Originally Posted by kyouens
Is anyone else having problems with their articlebot making duplicate posts? Mine performs correctly about 99% of the time, but the last 1% of posts are re-downloaded and re-posted every time that articlebot is run. I can't see any difference in the posts or titles (e.g. obvious areas of whitespace).

Has anyone either a) succesfully dealt with this problem from the articlebot end or b) found a script to delete identical posts (even if they're in the same forum--note that the remove doubleposts function in admincp only works across forums)?

Kenny, Did you ever solve this one? I'm having the same problem.


Thanks,
Layne

kyouens 05-01-2005 04:36 AM

Quote:

Originally Posted by kyouens
I just added that feed to my test installation, and it appears to work correctly on mine. I would recommend doing a fresh install of articlebot and using the updated MagpieRSS files (Which I linked to in a previous post.)
----------------------
Did this. No dice.
Well, at least once you get it fixed you'll be ready to go and have already done the upgrade.....

Quote:

Originally Posted by kyouens
take a look at your template (if it's customized for your articlebot) to make sure you haven't left something out.
------------------------------
Doublechecked, looked fine. Did a copy and replace right out of instructions to be sure. Still nada.
Well, it seems like the posts are getting where they need to be, but for some reason the descriptions in particular are being neglected, and the template still seems like the best lead. Here is the contents of my articlebot_post template:

HTML Code:

$article[description]

[b][url="$article[link]"]View Reference[/url][/b]

One possibility--make sure that you've placed the articlebot_post template into a style that you're actually using, i.e. your default style, or make sure that your style is a "child" style of the one with the articlebot_post template.
If your template was somehow not getting accessed, you would see exactly what you're describing--everything works except the post itself. Also, check the spelling of the template name and make sure you haven't botched that accidentally.

Quote:

Here's where we have a lead. When I use phpMyAdmin to check the contents of articlebot_rss_cache the last thing in the table says...

rsschacheid=91
title=...And We're Back
dateline=1114918800

That's it. I see no descriptions.

This looks fishy.
No dice on this one, because the purpose of the articlebot_rss_cache is, I think, to keep track of already-posted articles, i.e. to avoid doubleposts.

The database error you saw when you tried to reinstall occurred because your old articlebot tables were still on your database. I should have mentioned that you need to drop those tables before reinstalling. However, if you're not that familiar with phpyadmin or MYsql, I would be careful and be sure to make a backup of your DB before you "fix" it ;)

Anyway, I still think the best lead may be the template. Let me know if you get it.

Kenny

kyouens 05-01-2005 04:39 AM

Quote:

Originally Posted by Layne SMith
Kenny, Did you ever solve this one? I'm having the same problem.


Thanks,
Layne

No, I never fixed the double posting problem. I haven't given up, though. I am afraid it may be due to a problem with the feed itself, though. For example, if the feed puts a different spacing in the article title, it will be treated like a new article.

For the time being, I'm hand-deleting, which sucks big time. I'm looking for (At least) a piece of code that can delete identical posts, but ideally I'd like to work out this crappy doubleposting problem.

PS I checked out your page. Your work is outstanding.

Layne SMith 05-01-2005 04:59 AM

Quote:

Originally Posted by kyouens
Also, check the spelling of the template name and make sure you haven't botched that accidentally.

YOU'VE GOT TO BE KIDDING ME! You mean the template I called "article_post"? The one I should've called "articlebot_post"!!! Well double-damn!!!

Quote:

Originally Posted by kyouens
The database error you saw when you tried to reinstall occurred because your old articlebot tables were still on your database. I should have mentioned that you need to drop those tables before reinstalling. However, if you're not that familiar with phpyadmin or MYsql, I would be careful and be sure to make a backup of your DB before you "fix" it ;)

Okay, well since when I tried to reinsttall I may have done more harm than good, I need to rectify this table already exists stuff.

In phpMyAdmin, I see three tables clearly labeled articlebot.
  1. articlebot
  2. articlebot_rss
  3. articlebot_rss_cache

Are these the ones to delete?

I'm going to back up my databases now ...

Quote:

Originally Posted by kyouens
PS I checked out your page. Your work is outstanding.

Thanks fella. Appreciate that. But not half as much as I appreciate your help here!

kyouens 05-01-2005 05:04 AM

Quote:

Originally Posted by Layne SMith
YOU'VE GOT TO BE KIDDING ME! You mean the template I called "article_post"? The one I should've called "articlebot_post"!!! Well double-damn!!!



Okay, well since when I tried to reinsttall I may have done more harm than good, I need to rectify this table already exists stuff.

In phpMyAdmin, I see three tables clearly labeled articlebot.
  1. articlebot
  2. articlebot_rss
  3. articlebot_rss_cache

Are these the ones to delete?

I'm going to back up my databases now ...

Thanks fella. Appreciate that. But not half as much as I appreciate your help here!

I don't think you'll necessarily need to reinstall. From the SQL output you posted, it looks like it may have just barfed on the error and not changed your DB. But, if you want to delete them, the three called / prefixed with articlebot are the ones to amputate.

Glad to have been of help with the post trouble. Now, if I could only get one of these PHP geniuses around here to do some work for me . . . .

Layne SMith 05-01-2005 05:06 AM

Kenny! My man, Kenny!

Hot Damn! Look what just started working! My feeds are coming in loud and proud. Apparently the reinstall did enough without having to monkey with the database.

For you people having problems out there, MAKE SURE YOU NAME YOUR STUFF EXACTLY AS THE INSTRUCTIONS TELL YOU! That's right I yelled it.

Thanks again Kenny!

greenhybrid 05-01-2005 05:07 AM

I just want to check... does this work with 3.0.7? If so, I'll install. But, it hasn't been updated in months.

kyouens 05-01-2005 05:08 AM

Quote:

I just want to check... does this work with 3.0.7? If so, I'll install. But, it hasn't been updated in months.
Yep.

Layne SMith 05-01-2005 05:09 AM

Quote:

Originally Posted by greenhybrid
I just want to check... does this work with 3.0.7? If so, I'll install. But, it hasn't been updated in months.

I'm running 3.0.7 right now. Just got it up and running.

greenhybrid 05-01-2005 05:10 AM

Can I see? I don't see a demo anywhere. Thanks.

kyouens 05-01-2005 05:14 AM

Quote:

Originally Posted by greenhybrid
Can I see? I don't see a demo anywhere. Thanks.

Look at the front page of my site.

Boom.

The site is still being constructed (aren't they all . . .) but the articlebot is working. I am using a custom template for the articlebot forum, that's why you don't see all the reply buttons, post numbers, etc.

greenhybrid 05-01-2005 06:09 AM

Is there a reason why the vBullein scheduled tasks aren't working for this? I used ./articlebot/articlebot.php and tried to run it, but there were no results.

kyouens 05-01-2005 04:41 PM

Quote:

Originally Posted by greenhybrid
Is there a reason why the vBullein scheduled tasks aren't working for this? I used ./articlebot/articlebot.php and tried to run it, but there were no results.

If possible, it's best to run this using a regular server cron job (eg. /usr/local/bin/php /home/whatever/vbulletin/articlebot/articlebot.php). That's how I have mine set up and it works great. Also, if you do it this way, there are not the interspersed pauses whenever an unlucky user loads a page when it's time for a feed update.

greenhybrid 05-01-2005 04:48 PM

I'll look into that. It did start working, however.
I see there are like 15 scheduled tasts by other hacks. They haven't caused any load problems like you mention...?

kyouens 05-01-2005 06:28 PM

Quote:

Originally Posted by greenhybrid
I'll look into that. It did start working, however.
I see there are like 15 scheduled tasts by other hacks. They haven't caused any load problems like you mention...?

Hmm..actually I think you're right about not having the interspersed updates when you use the vbulletin cron. I know you DO get them if you have an include for articlebot.php on your forum home, for example, though.

One other drawback of having them in your vbulletin cron is that if your forum isn't very busy, it won't get updated often. Someone has to use your vbulletin for your vbulletin cron to work. I guess the upside is that it's easy to set up. . .

Layne SMith 05-02-2005 02:41 PM

I noticed one of my feeds wasn't working and when I sent it through Feed Validator I got this error ...

Code:

Your feed appears to be encoded as "UTF-8", but your server is reporting "US-ASCII"
Is this something Article Bot can account for?

Thanks,
Layne

greenhybrid 05-02-2005 02:55 PM

Can someone please explain the difference between the cron and the post interval? Right now I created a custom RSS for certain Google News terms and its results are both ever-changing and unpredictable. I've set the cron for every hour and the interval for every 5 minutes or so. Also, I set the amount to process at each time for 1, the default and recommendation. Does this mean that if there's duplicates, they won't be posted and only 1 can be posted every 5 minutes?

kyouens 05-02-2005 09:06 PM

Quote:

Originally Posted by greenhybrid
Can someone please explain the difference between the cron and the post interval? Right now I created a custom RSS for certain Google News terms and its results are both ever-changing and unpredictable. I've set the cron for every hour and the interval for every 5 minutes or so. Also, I set the amount to process at each time for 1, the default and recommendation. Does this mean that if there's duplicates, they won't be posted and only 1 can be posted every 5 minutes?

The cron and postinterval thing is kind of confusing. I have my articlebot.php set to run (via a server cron job) every five minutes. However, I have my post intervals set to anywhere between 120 minutes to 3600 minutes. So what happens is that the articlebot.php runs every 5 minutes, but I have my rss feeds "staggered". If the postinterval has elapsed for any of my given feeds THAT FEED gets updated while the others do not. Each time articlebot.php is run, maybe only 1-2 of my feeds' postinterval is up.

The amount to process I set to like 20 or something. For example, if your feed has 3 NEW posts and yours is set to 20, it will download only those 3 new posts. But if your amount is set to 1 and your feed gets 3 new ones, it will only grab one of them (each time it runs.)

Confusing.
Kenny

kyouens 05-02-2005 09:08 PM

Quote:

Originally Posted by Layne SMith
I noticed one of my feeds wasn't working and when I sent it through Feed Validator I got this error ...

Code:

Your feed appears to be encoded as "UTF-8", but your server is reporting "US-ASCII"
Is this something Article Bot can account for?

Thanks,
Layne

Are you talking about the feeds that articlebot enters into the forums (i.e. external feeds)? Or are you talking about a feed of YOUR page. If you're talking about an external feed, articlebot doesn't have anything to do with the content of the file it processes. I don't know whether it converts the "non-valid" (but still useable) feeds into valid XML.

greenhybrid 05-02-2005 09:11 PM

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?

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?

memobug 05-10-2005 07:31 AM

Quote:

Originally Posted by MarcoH64
Are you running PHP5?

I have PHP Version 4.3.11

Regards,

Matt

Marco van Herwaarden 05-10-2005 08:28 AM

memobug
I don't have this installed so it would be a bit difficult to bugfix. So could you please temporary do the follwoing edit.

Find:
PHP Code:

                $DB_site->query("
                    UPDATE "
.TABLE_PREFIX."user
                    SET posts = posts + 
$user_posts
                    WHERE userid = 
$userid
                "
); 

Add before:
PHP Code:

                                if ('debug' == 'debug')
                                {
                                    echo 
"<br />Users: <pre>";print_r($users);echo "</pre>";
                                    echo 
"<br />Userid: $userid - user_posts: <pre>";print_r($user_posts);echo "</pre>";
                                } 

Then let the bot make a post and check these debug echo's.
Remove these lines after you have the info and post it here.

KevinL 05-10-2005 10:42 AM

memobug,

I got that when I used the other option and not the server cron job. As soon as I set up a cron job I havent seen it again.

Dont know if that really helps though.

NewOrder 05-15-2005 12:46 PM

does it have to link to a .rss

or is linking it to http://blogs.msdn.com fine?

mine are linked to things like the above link but im getting no news displayed?

also when i goto articlebot.php i get the following

Warning: chdir(): No such file or directory (errno 2) in /home2/tek/public_html/articlebot.php on line 42

memobug 05-16-2005 01:44 AM

1. No it doesn't need to have an .rss extension. It could be .xml or .cgi or most anything but it needs to be a valid rss feed. Try a search on RSS FEED VALIDATOR on Google - then submit your feed

2. You apparently have a path problem as your server is trying to tell you. Did you make the required change in articlebot.php?

Regards,

Matt

kylek 05-17-2005 02:37 AM

Help please,

My host doesn't allow cpanel access for security reasons so I am running Article Bots with the include method and it works. Would like to find out how to set it up as a scheduled task and scanned the 43 pages but cannot see how to do it.

Could someone please explain in step by step instructions how to do this. much thanks in advance!!!

greenhybrid 05-17-2005 02:43 AM

In the vBulletin control panel, at the bottom you can set up a Scheduled Task. Just fill out the form and point to the correct script.

cPanel access for your own shared account doesn't pose a security issue.

kylek 05-17-2005 02:53 AM

Quote:

Originally Posted by greenhybrid
In the vBulletin control panel, at the bottom you can set up a Scheduled Task. Just fill out the form and point to the correct script.

cPanel access for your own shared account doesn't pose a security issue.

That is what they told me when I asked, oh well,
I know how to fill out the task except for the bottom box called file name. All my other various tasks have ./includes/cron/ and then whatever file you are pointing to, so would I need to have ./includes/cron/articlebot.php?

And what do I need to put in articlebot.php for the forum server path?

I appreciate the help as a newbie still but trying to learn.

NewOrder 05-17-2005 04:07 PM

Quote:

Originally Posted by memobug
1. No it doesn't need to have an .rss extension. It could be .xml or .cgi or most anything but it needs to be a valid rss feed. Try a search on RSS FEED VALIDATOR on Google - then submit your feed

2. You apparently have a path problem as your server is trying to tell you. Did you make the required change in articlebot.php?

Regards,

Matt

sorry what recriured change?

kylek 05-17-2005 04:54 PM

Quote:

Originally Posted by NewOrder
sorry what recriured change?

If you are using crontab check step 7 for required change to articlebot.php,
not using crontab check step 8 for required change to articlebot.php


All times are GMT. The time now is 10:14 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.02301 seconds
  • Memory Usage 1,883KB
  • 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)bbcode_html_printable
  • (3)bbcode_php_printable
  • (27)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
  • (40)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