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)

infiniterb 07-28-2004 04:01 PM

I have 1.1 though, and am noticing that there isn't a log created for this file. Is there anyone else that is working with the scheduled tasks that is getting the logs to work properly for articlebot.php? Must I put this in the Includes/cron folder for it to work that way?

Rob Eh 07-28-2004 04:43 PM

I am seeing a problemn though when running articlebot.php from the scheduled task manager. It does not send the posts, just check and reteives. I have to click the "Run Now" button on the scheduled tasks for it to actually send the posts to the news server.

I've sent several messages and waited since yesterday for them to appear on the same news server that I sent them to - they never did. I just posted a message on my forum and manually click the run now button, and they sowed up on the news server perfectly.

Anyone else run into this?

Any suggestions?

SnowBot 07-29-2004 12:43 AM

Well i tried and tried, added lots of feeds but the bot will not post at all, no DB errors but it just will not post... Any ideas? I also had this with the other RSS feed hack :(

KW802 07-29-2004 03:35 PM

OK, I know, dumb question but I'm still learning. Where do I put the template? In my default style, all styles, or someplace else?


Problem #2: I get the following error message.....
Quote:

Fatal error: Call to undefined function: array_change_key_case() in /home/www/farpointstation/forums/articlebot/rss_parse.inc on line 203
.... but it should be /home/farpointstation/www/forums/articlebot/rss_parse.inc but I can not find any reference anywhere to "/home/www/...". Thoughts? Where might it be buried that I missed it?

Thanks,
Kevin

Velocd 07-29-2004 06:46 PM

KW802, add the template to your default style.

As for that error, check articlebot.php, and make sure you configured the absolute paths correctly.

Quote:

Well i tried and tried, added lots of feeds but the bot will not post at all, no DB errors but it just will not post... Any ideas? I also had this with the other RSS feed hack
Execute articlebot.php in your browser. No errors? There shouldn't be any if you configured the paths correctly.

For those using vB's scheduled tasks, I'll look into making Article Bot more integrated with it (the hack was not built for it).. although I can't guarantee it'll be anytime soon.

I do recommend you use a real cron setup anyway (if you're on a NIX server, via your cPanel or shell), instead of vbulletin's system.

KW802 07-29-2004 07:38 PM

Quote:

Originally Posted by Velocd
KW802, add the template to your default style.

As for that error, check articlebot.php, and make sure you configured the absolute paths correctly.

Cool, I guessed the template thing right at least. I added it to my default style thinking that since it was using global.php that it'd use whatever the default was.

I tried the directory name in articlebot.php first, even ended up hard-coding the full path and still get the same error.

Below is what the code at http://www.farpointstation.org/forum...articlebot.php currently is but is still producing the same error.
Code:

chdir('/home/farpointstation/www/forums/');
require_once '/home/farpointstation/www/forums/global.php';
include_once '/home/farpointstation/www/forums/articlebot/rss_fetch.inc';

I'm stumped. :ermm: I figured I'd try running it directly from the browser first to rule that it wasn't my cron job.

Any thoughts appreciated. :nervous:

Thanks,
Kevin

rinkrat 07-29-2004 08:48 PM

Mine's working great on Apache/Redhat. I just added it to the cron job that is getting the Usenet mail in the other hack :)

SnowBot 07-29-2004 10:10 PM

Quote:

Originally Posted by Velocd
KW802, add the template to your default style.

As for that error, check articlebot.php, and make sure you configured the absolute paths correctly.



Execute articlebot.php in your browser. No errors? There shouldn't be any if you configured the paths correctly.

For those using vB's scheduled tasks, I'll look into making Article Bot more integrated with it (the hack was not built for it).. although I can't guarantee it'll be anytime soon.

I do recommend you use a real cron setup anyway (if you're on a NIX server, via your cPanel or shell), instead of vbulletin's system.

I am on a dedicated server, will try your suggestion and get back to you via the thread :)

SnowBot 07-29-2004 10:14 PM

hhmmm got this error
Quote:

his error. what to do ? :)
Warning: main(./global.php): failed to open stream: No such file or directory in /home/synergy4/public_html/forum/articlebot/articlebot.php on line 43

Fatal error: main(): Failed opening required './global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/synergy4/public_html/forum/articlebot/articlebot.php on line 43
What to do ? :)

Line 43 to 45

PHP Code:

 chdir('/home/synergy4/public_html/forum/articlebot/');
require_once 
'./global.php';
include_once 
'./articlebot/rss_fetch.inc'


Velocd 07-30-2004 01:21 AM

Snowbot, chdir needs to be pointing to your forums, not the articlebot directory.

As printed in the code.

Code:

// Provide absolute server path to forums.
// e.g. /home/cjohn/public_html/forums/

chdir('/path/to/forums/');
require_once './global.php';


Natch 07-30-2004 02:59 AM

Any chance we can have a Thread prefix to each posted thread - with a Title for each Feed ? - it would involve a new field for each Feed with a Short Title, but I reckon it would be worth it :)

What do you reckon VeloCD ?

KW802 07-30-2004 04:45 AM

Quote:

Originally Posted by KW802
Cool, I guessed the template thing right at least. I added it to my default style thinking that since it was using global.php that it'd use whatever the default was.

I tried the directory name in articlebot.php first, even ended up hard-coding the full path and still get the same error.

Below is what the code at http://www.farpointstation.org/forum...articlebot.php currently is but is still producing the same error.
Code:

chdir('/home/farpointstation/www/forums/');
require_once '/home/farpointstation/www/forums/global.php';
include_once '/home/farpointstation/www/forums/articlebot/rss_fetch.inc';

I'm stumped. :ermm: I figured I'd try running it directly from the browser first to rule that it wasn't my cron job.

Any thoughts appreciated. :nervous:

Thanks,
Kevin

Well, I've installed a fresh copy of the articlebot files and have grep'ed all files in the /forums folder and I still get the error pointing to the relative directory; it's almost as if something is calculating the system path intead of using the hard-coded values.

The one hack that I really wanted to install and of, of course, Murphy's Law has to intervene. :tired:

rinkrat 07-30-2004 05:20 AM

I just changed the top one and left the other two the way they came.

rinkrat 07-30-2004 05:22 AM

Quote:

Originally Posted by Natch
Any chance we can have a Thread prefix to each posted thread - with a Title for each Feed ? - it would involve a new field for each Feed with a Short Title, but I reckon it would be worth it :)

What do you reckon VeloCD ?


The newest version does that already silly goose!

Natch 07-30-2004 06:42 AM

Quote:

Originally Posted by rinkrat
The newest version does that already silly goose!

I do feel a goose - anticipating my requests like that - nice work Velo! :D

SnowBot 07-30-2004 08:45 AM

Quote:

Originally Posted by Velocd
Snowbot, chdir needs to be pointing to your forums, not the articlebot directory.

As printed in the code.

Code:

// Provide absolute server path to forums.
// e.g. /home/cjohn/public_html/forums/
 
chdir('/path/to/forums/');
require_once './global.php';


Yes sorry i realised that this morning and changed it, i had just come back from the pub when i posted :) lol

BUT it still doesnt post :( No errors when i run the file, its set up on google RSS feed and has been set to post every 120m, its been active for 5h and still no post. Any suggestions?

Velocd 07-30-2004 01:28 PM

Snowbot, do you have a cron setup to execute the script every 120 minutes?

Even though each feed has a period in minutes at which it's posted, all feeds wont be posted if the articlebot.php script isn't executed every now and then.

What you should do is get an average in minutes from all your rss feeds, and then set a cron script to execute the articlebot.php at that average.

For me, most of my RSS feeds are at a period from 400 minutes to 600 minutes. So I have a cron script to execute articlebot.php every 500 minutes.

If this still doesn't work, try a more active RSS feed, like a Yahoo! news one. I don't recall Google updating it's RSS feeds very often (although, this shouldn't be a factor to why it isn't posting...)

KW802 07-30-2004 01:46 PM

Yes! Got it working....... I.... am... so... f'ing... happy! :banana:

This morning it struck me -- It wasn't the path that it wasn't liking but the actual PHP command it was issuing. Big item there. Did a little poking and found a few things....

The command "array_change_key_case" is only available as of PHP 4.2.0 and above. Well, turns out that my hosted provider is running 4.0.6! AAaaaaaggghhh!!!!! The same with "html_entity_decode" -- only available as of 4.3.0 and above. I commented out those two commands, ran the articlebot.php from my browser, and it worked.

Now I have to go harass my provider about updating their PHP. :ermm:

SnowBot 07-30-2004 01:53 PM

Quote:

Originally Posted by Velocd
Snowbot, do you have a cron setup to execute the script every 120 minutes?

Even though each feed has a period in minutes at which it's posted, all feeds wont be posted if the articlebot.php script isn't executed every now and then.

What you should do is get an average in minutes from all your rss feeds, and then set a cron script to execute the articlebot.php at that average.

For me, most of my RSS feeds are at a period from 400 minutes to 600 minutes. So I have a cron script to execute articlebot.php every 500 minutes.

If this still doesn't work, try a more active RSS feed, like a Yahoo! news one. I don't recall Google updating it's RSS feeds very often (although, this shouldn't be a factor to why it isn't posting...)

Well thats sorted it :) I had the cron set up for every 6 hours not 60minutes..LOL stupid me...

Sorry for the messing around and thanks for pointing me in the right direction :) All works great.

rex_b 07-30-2004 06:00 PM

I installed the hack and set the bot timer to 1 min just to see if it will post something.

I am using this feed: http://www.religionnewsblog.com/b2rss.php

but
I didn't set any contrab thing b/c I have no idea what that is, I just want the bot to post every damn 120 min but it won't post even after 1 min.

What could I be doing wrong?

rex_b 07-30-2004 06:14 PM

when I run /articlebot/articlebot.php I get this :

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

Warning: main(./global.php): failed to open stream: No such file or directory in /home/rexb2/public_html/forum/articlebot/articlebot.php on line 43

Fatal error: main(): Failed opening required './global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/rexb2/public_html/forum/articlebot/articlebot.php on line 43

rex_b 07-30-2004 06:20 PM

fixed .. I'm an idiot.

rex_b 07-30-2004 06:43 PM

ok I ran the articlebot.php and it posted 1 article. So I changed the fetch in the admincp to 5 per interval and ran the articlbot.php again and nothing happend.

Any guesses?

rinkrat 07-30-2004 06:55 PM

Try changing the interval to less that it is. I have a special forum for the articles so I just cranked the fetch to 15 and the interval to 1 minute.

Speaking of this, is there a way I can just have it get ALL the articles and post them immediately?

rinkrat 07-30-2004 06:56 PM

I was checking out the posting times of the bot and realized that my cron isn't working but the scheduled task in VB admin is working. So I'll just go with the one in the control panel I guess.

rinkrat 07-30-2004 07:02 PM

Quote:

Originally Posted by Velocd
KW802, add the template to your default style.

As for that error, check articlebot.php, and make sure you configured the absolute paths correctly.



Execute articlebot.php in your browser. No errors? There shouldn't be any if you configured the paths correctly.

For those using vB's scheduled tasks, I'll look into making Article Bot more integrated with it (the hack was not built for it).. although I can't guarantee it'll be anytime soon.

I do recommend you use a real cron setup anyway (if you're on a NIX server, via your cPanel or shell), instead of vbulletin's system.


Since the adminCP works for me I'll be waiting for this. It's way easier for most people if you can do it from the admin menu. at least it works so that's what really matters.

klassicd 07-30-2004 08:25 PM

This is the greatest MOD ever made. I love you.

See mine in action here: www.thepokerpost.com

For anyone using PHP 4.3.0 are earlier add this function to the top of articlebot.php.

PHP Code:

 if (!function_exists('html_entity_decode')) {
  function 
html_entity_decode ($string$opt ENT_COMPAT) {
   
$trans_tbl get_html_translation_table (HTML_ENTITIES);
   
$trans_tbl array_flip ($trans_tbl);
   if (
$opt 1) { // Translating single quotes
     // Add single quote to translation table;
     // doesn't appear to be there by default
     
$trans_tbl["'"] = "'";
   }
   if (!(
$opt 2)) { // Not translating double quotes
     // Remove double quote from translation table
     
unset($trans_tbl["""]);
   }
   return 
strtr ($string$trans_tbl);
  }
}
// Just to be safe ;o)
if (!defined("ENT_COMPAT")) define("ENT_COMPAT"2);
if (!
defined("ENT_NOQUOTES")) define("ENT_NOQUOTES"0);
if (!
defined("ENT_QUOTES")) define("ENT_QUOTES"3); 


fonzerelli_79 08-01-2004 04:11 PM

installed this with no errors and on the surface everything seems to be ok

but no posts are being made by the blogs etc

ive used cron and the include in the php end template

the forum room isnt live - eg its display order is set to 0, but that shouldnt make a difference

what are the first things to check if posts arent being made

any help would be appreciated:)

Code Monkey 08-02-2004 12:38 AM

I installed this and it is fantastic. Thanks alot. I did have a problem with some code in the feed I am parsing. As well as keeping bold charecters intact. But I solved it by adding the following code.

I found
PHP Code:

$article['description'] = strip_tags(html_entity_decode(trim($article['description']))); 

and added above.

PHP Code:

$article['description'] = str_replace('<b>''[b]'$article['description']);
$article['description'] = str_replace('</b>''[/b]'$article['description']);
$article['description'] = str_replace('</b>''[/b]'$article['description']);
$article['description'] = str_replace('<b>''[b]'$article['description']);
$article['description'] = str_replace('<br />'"\n\r"$article['description']);
$article['description'] = str_replace('&lt;br /&gt;'"\n\r"$article['description']); 

And everything was fine. Thanks again for the great hack. :D

alexisbellido 08-02-2004 12:53 AM

Hi, I will give this hack a try in order to update my forum with the new entries in my blogs. I am not sure about the HTML support, most of my blog entries have links, will these still work?

alexisbellido 08-02-2004 03:02 AM

Hi, same problem as some of you in this thread, running articlebot.php manually does not give me any error, I followed exactly all the steps in the instructions but no post is being made by the bot. My feed is one generated by a Wordpress blog: http://www.ventanazul.com/weblog_en/feed/rss2/

Any ideas about what should I check?

Thanks!

Updated: It worked, just had to wait a few minutes, I did not understand the interval concept very well at first. Now it's working and it's great. My blog entries are being fed to my forum :) Thanks a lot for this. Nice work!

fonzerelli_79 08-02-2004 12:47 PM

alexis - everything is fine but unlike you i cant get the blogs to be imported to my forum

ive left the interval at the default of 120 - however, ive had articlebot up for a few days so im not sure how this can play any part in it?

weaver 08-02-2004 02:33 PM

Running /forums/articlebot/articlebot.php only brings up a white screen for me. Also, whenever I try to add an RSS feed I get an error:

Error: There is no file located at http://rss.news.yahoo.com/rss/topstories

KW802 08-02-2004 02:54 PM

Quote:

Originally Posted by snobbymom
Running /forums/articlebot/articlebot.php only brings up a white screen for me. Also, whenever I try to add an RSS feed I get an error:

Error: There is no file located at http://rss.news.yahoo.com/rss/topstories

You get the white screen because the PHP file has no output, it just updates your tables after it parses the feeds.

Can't help ya' on the Yahoo thing, appears to be a good link.

weaver 08-02-2004 03:47 PM

Thanks... So the white screen means it's working correctly? So now I just have to figure out why it's not accepting any RSS feeds as being legitimate. :(

alexisbellido 08-02-2004 03:53 PM

White screen is ok for articlebot.php, in fact is a good sign that main settings are ok.

It's always good to confirm if your feed is ok with a feed reader (I use www.bloglines.com).

I was not getting any post into my forums and I did this: Put the interval to 1 minute and the number of entries to be retrieved at 50 (I had like 28 entries in my blog but I read that articlepost.php can detect if there is less entries than you enter).

I run articlebot.php manually, got the white screen and after a few minutes my posts started to appear. You can refresh the bots manager page in your admincp and you will see when the next update will be.

After getting my blog entries I configured articlebot to 120 minutes interval and getting posts 1 by 1 again.

I hope it helps.

weaver 08-02-2004 04:13 PM

I keep getting an error saying there isn't a file at any of the links I put in.

Velocd 08-03-2004 06:56 PM

Quote:

Originally Posted by snobbymom
I keep getting an error saying there isn't a file at any of the links I put in.

I think those of you who are having issues with the bot not posting should read up on this post:

https://vborg.vbsupport.ru/showpost....&postcount=145

Make sure your cron script is set accordingly.

Quote:

Quote:

Originally Posted by JumpD
I installed this and it is fantastic. Thanks alot. I did have a problem with some code in the feed I am parsing. As well as keeping bold charecters intact. But I solved it by adding the following code.

I found
PHP Code:

$article['description'] = strip_tags(html_entity_decode(trim($article['description']))); 

and added above.

PHP Code:

$article['description'] = str_replace('&lt;b&gt;''[b]'$article['description']);
$article['description'] = str_replace('&lt;/b&gt;''[/b]'$article['description']);
$article['description'] = str_replace('</b>''[/b]'$article['description']);
$article['description'] = str_replace('<b>''[b]'$article['description']);
$article['description'] = str_replace('<br />'"\n\r"$article['description']);
$article['description'] = str_replace('&lt;br /&gt;'"\n\r"$article['description']); 

And everything was fine. Thanks again for the great hack. :D


Ah, cool, I'll have to update the hack with a preg_replace version of this. ;)
(although I think there is already vB3 code for it somewhere)

weaver 08-03-2004 07:16 PM

The problem I'm having is that it's not accepting any of the links I'm entering for feeds. It keeps saying there isn't a file there when they are good urls.

Velocd 08-04-2004 07:06 PM

Can you post a sample link?

Also, what version of PHP is installed on your server?


All times are GMT. The time now is 05:20 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.03233 seconds
  • Memory Usage 1,891KB
  • 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
  • (4)bbcode_code_printable
  • (6)bbcode_php_printable
  • (15)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