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)

Lionel 11-15-2004 02:17 PM

I am wondering, using the who's online hack I display "getting the articles..." for location instead of /var/www/etc../.../articlebot.php. Is there a way to make it display a name instead of "Guest" ?

venomx 11-15-2004 03:03 PM

Quote:

Originally Posted by Torqued
I have encountered an interesting post display order issue...

I have one of my articlebots retrieve 5 articles at a time, when it does that, the posts displayed @ forumdisplay are ordered like this:

http://www.mydomain.com/forums/showthread.php?t=101
http://www.mydomain.com/forums/showthread.php?t=102
http://www.mydomain.com/forums/showthread.php?t=103
http://www.mydomain.com/forums/showthread.php?t=104
http://www.mydomain.com/forums/showthread.php?t=105

The problem with that is that the 5th post down is really the most recent post. This is a little confusing because @ the index.php, the thread "t=105" is shown as the "Last Post", but once the user enters the forum (forumdisplay.php), the thread "t=101" appears to be the most recent/last posted thread.

Any ideas on how to get bot to enter the posts in the correct order?

I noticed this too a while back... noone offered a way to fix it. :(

Torqued 11-15-2004 10:33 PM

Quote:

Originally Posted by berberber
Hi, it is quite cool .... one thing i dont understand is why it does not work with the cron system of VB ? is there a way to do that ?

I have the articlebot running via a vB Scheduled Task. The thing you have to remember about the scheduled tasks is that it's not a "real" cron job - it depends on activity on your forum to kick it off.

Torqued 11-15-2004 10:50 PM

Quote:

Originally Posted by iKwak
Is that true? :(
I receive the google e-mails about the topic that I like and wanted to setup with the Article Bot hack.

I thought some other member in this thread (few pages earlier) mention that it does work. I should look back and post.

You may want to take a look at the NNTP Gateway for Usenet ( Newsgroups ) & Mailing Lists mod. I am using the gateway to import emails instead of newsgroups and it works great. I have created several different email addresses @ my domain for the different categories of news/information that I am receiving emails for.

bondjetta 11-17-2004 07:49 PM

I've found an interesting (and yet aggrevating) issue w/ Article Bot...

I'm pulling RSS from this URL:
Code:

www.zenguide.com/rss/generator.cfm?content=stories&category=10&code=XXXXXXXXX
which I have edited to remove my access code (sorry guys, register and you can have one too ;))

HOWEVER here is what Article Bot is storing (due in part possibly to storing it as rendered html?)
Code:

www.zenguide.com/rss/generator.cfm?content=stories&category=10&code=XXXXXXXXX
You might see the problem: namely the & instead of & as a result of this I cannot pull RSS from any of the feeds on this site (seeing as they require the category and code to access them.

Is there a quick way I can get around this? I'm going to try to investigate the storage of the RSS URL when I get home, but perhaps someone has some insight before I start? :)


EDIT: i used [code ] tags for the url's in hopes that they wont render as real links simply so you can see the & issue :)

bondjetta 11-17-2004 10:12 PM

and...i figured it out thanks to some input from Ianomed :D I have yet to find a URL that this has an adverse affect on, but if someone finds one please let me know :)

How To:
1) Open /admincp/articlebot_admin.php
2) Do a find for:
PHP Code:

    print_input_row('<b>RSS File Path</b><br />URL to the RSS XML feed.''rss_path'$rss_feed['rss_path']); 

And replace with:
PHP Code:

    print_input_row('<b>RSS File Path</b><br />URL to the RSS XML feed.''rss_path'html_entity_decode ($rss_feed['rss_path'])); 

Save and upload :) Pretty simple, it uses html_entity_decode to convert the html entities to their applicable characters. It's working for me so far and is rendering valid URL's now!

vfxtalk 11-18-2004 09:29 AM

Awesome work ...few questions...

Is there anyway to control the style of the text etc ?

Is there any possibility to have the ability to include images if they are available ?

Cheers

Paul

Neobud 11-20-2004 01:31 PM

Hello. Seemingly basic question (since nobody has asked it in 28 pages).

How do I add the articlebot_post template. Is it the 'vbulletin-style.xml' page that I alter? If so, what does the code look like?

Thanks. I'm very new to VB.

trackpads 11-21-2004 01:55 PM

Quote:

Originally Posted by Neobud
Hello. Seemingly basic question (since nobody has asked it in 28 pages).

How do I add the articlebot_post template. Is it the 'vbulletin-style.xml' page that I alter? If so, what does the code look like?

Thanks. I'm very new to VB.

No, just open the styles and templates and in the little pull down menu choose the "Add New Template".

-Jason

Torqued 11-23-2004 05:30 PM

I'm trying to import this XML feed:

http://news.biohealthmatics.com/feeds/rssnews.aspx

The link in the xml file looks lik this:

<link>http://biz.yahoo.com/prnews/041117/law061_1.html</link>

but I'm getting a malformed URL like this on import:

http://<br%20/>http://biz.yahoo.com/prnews/041117/law061_1.html<br%20/>

Any ideas as to what is going on here and how I can fix it? I have several other feeds that are importing just fine. :confused:

dorkus 11-25-2004 07:20 PM

When I run the articlebot.php file from the command line, I get this error:

PHP Fatal error: Only variables can be passed by reference in /var/www/htdocs/forum/articlebot/rss_parse.inc on line 399

PHP version 4.3.3

Any ideas as to why it's happening and how to fix it?

dnoyeb2002 11-28-2004 03:07 PM

Hello Everyone,

This is a great hack but for some reason I can't get it to pull the feeds (I've been manually running the articlebot.php file every hour). This time though, I finally got an error message of:

Fatal error: Call to undefined function: html_entity_decode() in /home/virtual/site7/fst/var/www/html/forums/articlebot/articlebot.php on line 242

Could someone possibly tell me what that is . . .

Thanks,

dorkus 11-29-2004 01:09 PM

I upgraded to PHP 4.3.10 RC, and I'm still getting the same error: PHP Fatal error: Only variables can be passed by reference in /var/www/htdocs/forum/articlebot/rss_parse.inc on line 399

I gave up. So I installed the other RSS feed article bot that was mentioned in this thread, and that works great so far. I'd recommend that if you are encountering this problem.

Velocd: thanks for the work you put into this hack. I wish it worked for me.

snake-boy 11-30-2004 05:10 PM

Just installed this now (Clicked Install), and am glad to say, it's working great. Excellent Hack! Thank you.

-snake

ragintajin 12-01-2004 01:28 AM

Quote:

Originally Posted by RS25com
I am still getting this error:



I believe this issue has not been fully addressed yet. Can anyone shed some light or should I just ditch this and find something else?

Yup, I'm getting the same "Error: There is no file located" response...funny thing is it worked perfectly before I changed servers.

I know the settings are right because when I run the articlebot.php directly the timestamp in the AdminCP says so.

I know the feed I use (http://sports.yahoo.com/nba/rss.xml) is fine too.

leeman 12-01-2004 05:09 AM

Hey, this looks neat....

Yes I know I should have read the posts....
But I'm on short timeshedule (SP?) to day and is there a way of making this mod pull diffrent RSS feeds to diffrent forums????

Torqued 12-01-2004 12:24 PM

Quote:

Originally Posted by leeman
Hey, this looks neat....

Yes I know I should have read the posts....
But I'm on short timeshedule (SP?) to day and is there a way of making this mod pull diffrent RSS feeds to diffrent forums????

Yes. You can specify the forum for each RSS feed. And you can have multiple RSS feeds on a single bot, with each feed going to a separate forum.

leeman 12-01-2004 03:07 PM

Quote:

Originally Posted by Torqued
Yes. You can specify the forum for each RSS feed. And you can have multiple RSS feeds on a single bot, with each feed going to a separate forum.


Cute !!!! :d

*LeeMan downloads and installs.

leeman 12-01-2004 05:05 PM

Installed but i don't get it to post... :(

Is there a way to check that it's getting the feeds...???
And i'm not using Cron, I use VB scheduler....

Torqued 12-01-2004 05:32 PM

When you run it the first time, it won't import anything. Then you will have to wait for the next scheduled run time for it to import any *new* articles since it checked the first time.. Use a frequently updated RSS feed (i like to use slashdot.org), set the RSS Post Interval to something like 15 mins, and only retrieve 1-2 articles at a time. This will allow you to fairly quickly validate that your feeds are working.

akiy 12-01-2004 10:34 PM

Quote:

Originally Posted by Nordinho
I have this weird permission issue...the article bots post are always published...I've made a new usergroup for the bot, with limited permissions and 'always moderate posts', but the articlebot just ignores those settings and keeps on posting...any other ideas on moderating it's posts???

I just hacked the code so that all posts made by the Article Bot get put into the moderation queue.

In articlebot.php, find:
Code:

            $DB_site->query("                                                                                                                       
                INSERT INTO ".TABLE_PREFIX."thread                                                                                                   
                    (title, lastpost, forumid, open,                                                                                                   
                    replycount, postusername, postuserid, lastposter, dateline, iconid,                                                               
                    visible, attach, similar, is_rss)                                                                                               
                VALUES                                                                                                                               
                    ('".addslashes($article['title'])."', ".TIMENOW.", $articlebot[forumid],                                                           
                        1, 0, '".addslashes($articlebot['username']) . "', $articlebot[userid],                                                           
                        '".addslashes($articlebot['username']) . "', ".TIMENOW.", $articlebot[iconid], 1, 0,                                           
                        '".addslashes($similarthreads)."', 1)                                                                                           
                ");

... and replace with:
Code:

            $DB_site->query("                                                                                                                       
                INSERT INTO ".TABLE_PREFIX."thread                                                                                                   
                    (title, lastpost, forumid, open,                                                                                                   
                    replycount, postusername, postuserid, lastposter, dateline, iconid,                                                               
                    visible, attach, similar, is_rss)                                                                                               
                VALUES                                                                                                                               
                    ('".addslashes($article['title'])."', ".TIMENOW.", $articlebot[forumid],                                                           
                        1, 0, '".addslashes($articlebot['username']) . "', $articlebot[userid],                                                           
                        '".addslashes($articlebot['username']) . "', ".TIMENOW.", $articlebot[iconid], 0, 0,                                           
                        '".addslashes($similarthreads)."', 1)                                                                                           
                ");

The above is a one character change -- look for the colored "0" in the second code segment...

Also, after:
Code:

              /* +---------------------------------+                                                                                                   
                | Query: update thread        |                                                                                                   
                +---------------------------------+ */


            $DB_site->query("                                                                                                                       
                UPDATE ".TABLE_PREFIX."thread                                                                                                       
                SET firstpostid = $post_id                                                                                                           
                WHERE threadid = $thread_id                                                                                                           
                ");

... add:
Code:

            $p = $DB_site->query_first("SELECT firstpostid from ".TABLE_PREFIX."thread                                                               
                                        where threadid = $thread_id");

            $DB_site->query("                                                                                                                       
                INSERT INTO ".TABLE_PREFIX."moderation                                                                                               
                    (threadid, postid, type)                                                                                                           
                VALUES                                                                                                                               
                    ($thread_id, $p[firstpostid], \"thread\")");

Once again, this will cause all posts done by all article bots to be put into the moderation queue.

Let's hope that VeloCD can now use this in the future so that we can specify which bots get moderated and which ones do not...

ragintajin 12-04-2004 02:23 AM

Since there is no support for the "There is no file located" error...how do I go about uninstalling this hack? (Specifically, the database changes)

berberber 12-08-2004 05:24 PM

Quote:

I have the articlebot running via a vB Scheduled Task. The thing you have to remember about the scheduled tasks is that it's not a "real" cron job - it depends on activity on your forum to kick it off.
Thank you, i finally found how to set up a common cron task and I believe it is better (not to move a forum, but thats rare actually).

One other thing, after a server out time of a few hours, many articles were indexed a second time. (it is quite rare too, but perhaps that could be improved ?)
Thanks you for the hack.

jzewatsky 12-09-2004 09:42 PM

I have installed this hack and am loving it.

I could use some help writing the cron to run articlebot.php. This whole idea is new to me and I dont do that well with this type of stuff to begin with. My database management tool provided by my server is called phpMyAdmin (I believe) and I have downloaded PUttY. I unfortunately have no idea what to do with either of these to set up the cron. Any help (especially examples) would be great!

poolking 12-12-2004 10:43 PM

Are you actually running cron jobs to get the feed?

bishop93 12-12-2004 10:48 PM

Quote:

Originally Posted by poolking
Are you actually running cron jobs to get the feed?


Wait wait. I deleted my post because I *just* went back, changed to the use of the phpinclude_end option, and suddenly had incredible PHP errors at the top of the forums, hit refresh and *bing* there was slashdot.

That tells me that the cron job isn't doing it's job. Or so I would think.

But, the other RSS that I was really after still isn't working ... BUT, I don't think that is a problem of this mod. I think that's a problem of the source.

bishop93 12-12-2004 11:55 PM

Okay ... this is the error that keeps coming back. Is this the source or the mod?

Code:

Warning: MagpieRSS: Failed to parse RSS file. (not well-formed (invalid token) at line 3579, column 35) in /home/xxx/public_html/xxx/articlebot/rss_fetch.inc on line 230

Warning: array_reverse(): The argument should be an array in /home/xxx/public_html/xxx/articlebot/articlebot.php on line 137

Warning: Invalid argument supplied for foreach() in /home/xxx/public_html/xxx/articlebot/articlebot.php on line 141

It would appear to me that it's the source. However, using the same feed with other readers (we pick up the feed for our website), works just fine without error.

Any thoughts?

Thanks in advance.

Tenny 12-13-2004 04:47 AM

Quote:

Originally Posted by bishop93
Wait wait. I deleted my post because I *just* went back, changed to the use of the phpinclude_end option, and suddenly had incredible PHP errors at the top of the forums, hit refresh and *bing* there was slashdot.

That tells me that the cron job isn't doing it's job. Or so I would think.

But, the other RSS that I was really after still isn't working ... BUT, I don't think that is a problem of this mod. I think that's a problem of the source.

Very confused what you did? Can you explain it again/ What you deleted? Where is phpinclude_end?

Thanks, hit me up on AIM: Tendollaz, maybe I can figure it out and try to explain to everyone else...

bishop93 12-13-2004 01:54 PM

I did manage to get things worked out. Sorta. I finally got the cron job to function properly as well. (I didn't read carefully what I was inputing)

However, the cron job now kicks back the same exact error as the phpinclude_end option did when I tried that way.

Code:

Warning: MagpieRSS: Failed to parse RSS file. (not well-formed (invalid token) at line 3657, column 35) in /home/xxx/public_html/xxx/articlebot/rss_fetch.inc on line 230

Warning: array_reverse(): The argument should be an array in /home/xxx/public_html/xxx/articlebot/articlebot.php on line 137

Warning: Invalid argument supplied for foreach() in /home/xxx/public_html/xxx/articlebot/articlebot.php on line 141

I'm still thinking this could be the source issue since that parsing RSS file error looks familiar. But, if this returns an error, I'm not sure why my other newsfeed module (in Mambo CMS) is pulling the exact same feed without any errors.

(I'm at work and IMs are blocked, but I'd be more than willing to open things up and let you in to check around if you want to drop me an email. Currently the forums are in test mode anyway before we switch the main boards from SMF to vBulletin (a different headache, but oh well).)

Playboy69 12-13-2004 03:24 PM

I am not sure what I am doing wrong but I cant seem to get this to work. I set it all up and it even shows the control panel in my admincp but I cant seem to get this booger to post nothing. I even set up a cron job and still nothing. any possable clue on what i need to do please.

bishop93 12-15-2004 10:58 PM

Is there anyone that can tell me how to resolve this error that I posted above?

Thanks!

bishop93 12-16-2004 12:26 AM

Yet one more thing. Is this normal?

memobug 12-16-2004 12:30 AM

I suggest you both start with a feed that is known to work. There are quite a few variables and if you try to solve everything at once you might not succeed.

Here's one that works for me:

http://www.bonsai-today.com/rss/bonsai-today-rss.html

2. Nothing will happen unless the Article Bot is enabled and associated with a user. Did you create a user and assign the article bot to a user?

Advanced Settings - Leave all that regex stuff blank for now.

3. Did you configure the RSS Feed?

Mine for the feed listed above is

ID:1
http://www.bonsai-today.com/rss/bonsai-today-rss.html
Forum: General - choose your own forum
Icon ID: 1
RSS Label: [Bonsai-Today]
Post Interval: 1500 ***See note below***
Fetch Limit: 1
# Skip: 0
Build Similar Thread: Yes
Skip articles that don't contain descriptions: Yes
Enabled: Yes
Advanced Stuff: All Blank

***Nothing will happen until the 1500 minutes elapse, so set it to some low value for testing, like 60 minutes or 5 minutes if you're impatient

Set up your cron. I am using Cpanel X with Cron Jobs:

Click the Cron Jobs icon and choose Standard.

Command to run:
Quote:

php /home/~user/public_html/forum/articlebot/articlebot.php
You need your full, absolute path here. My path won't work for you.

Minutes: 0
Hour(s): Every Hour
Day(s): Every Day
Month(s): Every Month
Weekday(s) Every weekday

You won't get any posting if

*you use a bad feed
*mess up on the cron path or don't have any cron
*don't attach a feed to a robot
*don't attach a robot to a userid
*set too long a time period
*choose the wrong forum for posting

Summary: Get it working with a known good RSS first, then you can experiment with others.

Regards,

Matt

bishop93 12-16-2004 12:52 AM

Yup. Got it. I have a second feed (from the same source, I might add) that works. The first one continues to give the error that I posted above. Now, if it's a bad RSS feed, great. But if there is a way that I can work with what I have and figure out what's messing up the feed in one RSS that isn't messing it up in the other.

Here's the kick though. The same RSS feed that is messing up with this bot, works through different mod (for a CMS, not a forum) and pulls the feed just fine without error. So ... is there a way around this? I'm hoping. I'm watching this mod actually work with one feed.

bishop93 12-16-2004 01:07 AM

Okay. Also, in the RSS Admin, I'm see that the Post Total equals 93, but there's only 4 posts and I'm quite sure they are from the functioning RSS feed (since I can see those posted). That would leave 89 posts somwhere. Where? I got a different report this time when I changed my cron function from what was listed in the install.html to what you have above (with my own foum path, of course). Now I this:

Code:

X-Powered-By: PHP/4.3.9
Set-Cookie: emplastvisit=1103166001; expires=Fri, 16-Dec-05 03:00:01 GMT; path=/
Set-Cookie: emplastactivity=1103165101; expires=Fri, 16-Dec-05 03:00:01 GMT; path=/
Cache-Control: private
Content-Type: text/html; charset=ISO-8859-1

Different than the MagpieRSS error, but still not something that I understand. If it's not the Magpie error, where are the posts?


Edit: The second report just came in. Now it's back to both the above code AND the original code.

Code:

X-Powered-By: PHP/4.3.9
Set-Cookie: emplastvisit=1103166301; expires=Fri, 16-Dec-05 03:05:01 GMT; path=/
Set-Cookie: emplastactivity=1103166001; expires=Fri, 16-Dec-05 03:05:01 GMT; path=/
Cache-Control: private
Content-Type: text/html; charset=ISO-8859-1

<br />
<b>Warning</b>:  MagpieRSS: Failed to parse RSS file. (not well-formed (invalid token) at line 4524, column 35) in <b>/home/xxxn/public_html/xxx/articlebot/rss_fetch.inc</b> on line <b>230</b><br /> <br />
<b>Warning</b>:  array_reverse(): The argument should be an array in <b>/home/xxxn/public_html/xxx/articlebot/articlebot.php</b> on line <b>137</b><br /> <br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/xxx/public_html/xxx/articlebot/articlebot.php</b> on line <b>141</b><br />


memobug 12-16-2004 01:26 AM

Two ideas for you now

It sounds like it is incompatible with the importer for one reason or another. A couple things you might try

1. Validate the RSS feed and see if it passes validation
2. Post the url to the feed and ask someone else to try importing it using their vbArticle Bot
3. Be very careful with the board you select. The robot has the capability to post to any forum, including boards that are not "forums," boards that are permissions excluded to ordinary users, boards that don't accept posts and boards that are otherwise closed. Tell the robot to post and it will post, whatever the circumstances.

Regards,

Matt

bishop93 12-16-2004 01:50 AM

Okay. Let me ask this. The Advanced area that does replacements. I think I can see the problem. One feed validates but with "potential issues" -- therefore it posts. The other does not validate but because it doesn't like the & or \ in various places. Is the replacement aspect that I see there a way to replace these characters with something more "friendly"? Or am I way off here?

BTW, I want to add this in here as I start to actually simmer down. Thank you. You've been an incredible help in this process.

memobug 12-16-2004 06:34 AM

I think those regular expression fields are provided to "Clean up" various tags left in posts after they are imported and parsed. You could try making replacements, but I think that's after the fact. Maybe you should contact whomever is providing the feed and tell them that their feeds aren't validating.

Regards,

Matt

bishop93 12-16-2004 11:19 AM

The problem is that they don't care. Sad, but true. I'll try the replacement today and see what happens.

j_86 12-18-2004 02:19 PM

Any way to stop "Unknown Location" in the Who's Online list?

I've set it up, and got it working for Crontab.


All times are GMT. The time now is 01:37 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.01998 seconds
  • Memory Usage 1,916KB
  • 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
  • (10)bbcode_code_printable
  • (2)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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