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)

romeshomey 07-14-2004 02:41 AM

Also, any article that has a $ sign in it, the $ sign shows up as $

Example:
AP - A suspect swallowed nearly $50,000 in cash in a failed attempt to smuggle the funds out of Colombia, officials said Monday.

That is with any article having a $ in it.

Works fine in the Title, but not in the Description.

Any idea how to fix that?

Velocd 07-14-2004 03:04 AM

Quote:

Not that I need it too, but just pointing that out.
Yep, that's deliberate. I suppose I could make it configurable per RSS, but for a thread to have just a link and title would seem spammish.

Quote:

Also, any article that has a $ sign in it, the $ sign shows up as $
Not sure what you mean. Those two symbols look exactly the same. You have ascii code for it?

romeshomey 07-14-2004 03:07 AM

Quote:

Originally Posted by Velocd
Not sure what you mean. Those two symbols look exactly the same. You have ascii code for it?

It didnt show as I pasted it here, these forums converted it.

Here is what its showing on my forum http://www.insidersportszone.com/for...ead.php?t=6312

Its basically showing up as & # 36 ; with no spaces in between instead of the $ sign.

romeshomey 07-14-2004 03:37 AM

Yea its weird. In some articles its showing the $ fine, in others its showing in ascii....

In this post it works right http://www.insidersportszone.com/for...ead.php?t=6292 but in this one it doesn't http://www.insidersportszone.com/for...ead.php?t=6312 . Baffeling..

romeshomey 07-14-2004 03:51 AM

Someone told me to go into the PHP script for the parser (which is the articles.php right?) and change the &gt; with > and &lt; with < to make the <b> </b> HTML work. He says its being sent over from source code and its not being converted..

I'll try it here in a bit if I can find where to do it at..

romeshomey 07-14-2004 05:37 AM

I notice in your code you have
Code:

$article['description'] = strip_tags(htmlspecialchars($article['description']));
I changed it too
Code:

$article['description'] = $article['description'];
Seems to work fine now...... No more <b> </b> Shows up bold now.. Only problem now is there is no space between the bold words and the rest of the article.

Example here: http://www.insidersportszone.com/for...6497#post26497

I would also like to know how to get them to show up if they dont have a desription. Because I cant use NFL.com or alot of sports feeds because they dont have descritions in their feeds.

Thanks again..

romeshomey 07-14-2004 07:00 AM

Ok, so everything is working great now except the spacing between the Article and Descritpion.

Example:
http://www.insidersportszone.com/for...6508#post26508

Derek improves to .700 after 3-for-3 nightHOUSTON -- Add another impressive line to Derek Jeter's glittering resume: the most successful hitter in All-Star game history. Jeter went 3-for-3 Tuesday night, upping his career totals in the game to 7-for-10. That .700 batting average is the highest for anyone with at least 10 at-bats, topping the .600 of former Philadelphia Phillies star Richie Ashburn. "I don't know, it's not just good fortune," said Jeter, whose three hits all went to the opposite field against... (Associated Press)

So basically, what I need to know, is how to seperate:

Derek improves to .700 after 3-for-3 night

and

HOUSTON -- Add another impressive line to Derek Jeter's glittering resume: the most successful hitter in All-Star game history. Jeter went 3-for-3 Tuesday night, upping his career totals in the game to 7-for-10. That .700 batting average is the highest for anyone with at least 10 at-bats, topping the .600 of former Philadelphia Phillies star Richie Ashburn. "I don't know, it's not just good fortune," said Jeter, whose three hits all went to the opposite field against... (Associated Press)

by a space...

ranger2kxlt 07-14-2004 05:45 PM

Suggestion:
What about the bot having the ability to search the RSS before posting?

Since I run a Ford site and we deal with the new Thunderbirds, we would like to ONLY gather ford thunderbird information from this....Is there a way for the bot to pull keywords and only post threads with certain search words?

Velocd 07-14-2004 06:46 PM

Quote:

Ok, so everything is working great now except the spacing between the Article and Descritpion.
Normally the article title shouldn't be inside the description, unless you modified the articlebot_post template.

Quote:

Suggestion:
What about the bot having the ability to search the RSS before posting?
Yes, that would be possible. Look at that AnyRSS link mini2 posted first, to see if it is of help.

Quote:

If I set a forum as being not open to new posts, will this still post to that forum?
The articlebot can post in any forum, even those that are closed or not visible.

Frzzy 07-14-2004 07:03 PM

/me clicks install

A question, can the bot recognize and ignore already posted item?

Frzzy 07-14-2004 07:38 PM

Seem like the bot doesn't work with this RSS...

http://www.theinquirer.net/inquirer.rss

I know why, look like the bot won't do anything if the description tag is missing.

romeshomey 07-14-2004 07:41 PM

Quote:

Originally Posted by Velocd
Normally the article title shouldn't be inside the description, unless you modified the articlebot_post template.

Take a look and you'll see what I mean. You'll see how where the text in bold ends is where there needs to be a space before the rest of the desctiption is posted.

http://www.insidersportszone.com/for...6602#post26602

It keeps doing this:
Code:

Odom, Butler, Grant and pick go to LakersMIAMI -- It's official: The Shaquille O'Neal era in Los Angeles is over, and his new team is the Miami Heat.The Lakers and Heat finalized a trade Wednesday sending O'Neal to Miami. Los Angeles gets Caron Butler, Lamar Odom, Brian Grant and a first-round draft pick.The deal had been on the verge of completion since Saturday, when O'Neal met in Orlando with Heat president Pat Riley and agreed to the trade. NBA attorneys approved it on the same day the league's two-week moratorium... (Associated Press)
See how there is no space between the work Lakers and the word MIAMI. It does that in all of them and the space is there in the RSS feed itself.
Code:

<pubDate>Fri, 9 Jul 2004 20:48:37 CEST</pubDate>
  <guid isPermaLink="false">i,43741943</guid>
  </item>
- <item>
  <title>Shaq traded to Heat in blockbuster deal</title>
  <link>http://www.newsisfree.com/click/i,44177556,1851,rss/</link>
  <description><b>Odom, Butler, Grant and pick go to Lakers</b>MIAMI -- It's official: The Shaquille O'Neal era in Los Angeles is over, and his new team is the Miami Heat.The Lakers and Heat finalized a trade Wednesday sending O'Neal to Miami. Los Angeles gets Caron Butler, Lamar Odom, Brian Grant and a first-round draft pick.The deal had been on the verge of completion since Saturday, when O'Neal met in Orlando with Heat president Pat Riley and agreed to the trade. NBA attorneys approved it on the same day the league's two-week moratorium... (Associated Press)</description>


romeshomey 07-14-2004 07:43 PM

Quote:

Originally Posted by Frzzy
[high]* Frzzy clicks install
[/high]

A question, can the bot recognize and ignore already posted item?

I wonder the same thing as it keeps posting the same articles again and again, and if I remove it, itll post it as the next one again.

romeshomey 07-14-2004 08:12 PM

Quote:

Originally Posted by romeshomey
See how there is no space between the work Lakers and the word MIAMI. It does that in all of them and the space is there in the RSS feed itself.

My mistake, the RSS doesnt provide a space in the description which is why there is no space.

Theres no way to add one is there?

IM just glad I got the HTML to work. That was a big plus. If anyone else has the same problem with the HTML showing up as code and not being executed.

The fix for the HTML is:

In the forums/articlebot/articlebot.php change:
Code:

$article['description'] = strip_tags(htmlspecialchars($article['description']));

too

$article['description'] = $article['description'];

Then just make sure that HTML is enabled in that forum section.

ranger2kxlt 07-14-2004 08:24 PM

Thanks for the link, but not 100% how to use this?

Instead of making the bot link to a .rss or .xml file, i now link him to the one generated by that link? Because all the pages it shows me seem to show up as html....

Thanks

Velocd 07-15-2004 12:46 AM

Quote:

The fix for the HTML is:

In the forums/articlebot/articlebot.php change:
romeshomey, it's working for you because you have HTML enabled for your posts (which is not a good idea). For anyone else, they will only get HTML tags, so it's good to have the strip_tags() normally in there.

Quote:

I know why, look like the bot won't do anything if the description tag is missing.
Yes, as I said not too earlier here, RSS feeds without descriptions will be skipped.

Quote:

My mistake, the RSS doesnt provide a space in the description which is why there is no space.

Theres no way to add one is there?
Not really. It's the mistake of the RSS provider to forget the space, but there isn't really a way to add it, given the arbitrary data.

Quote:

I wonder the same thing as it keeps posting the same articles again and again, and if I remove it, itll post it as the next one again.
As said, the bot starts at the end of the file (oldest articles) and counts its way up. It makes sense that if you remove a thread, the bot (which does check for existing threads) will re-create it. Instead of removing the thread from the database, if you wish to get rid of it, "soft" delete it.

Also note there is a "initial article trim" to skip a number of articles when first starting on an RSS feed.

romeshomey 07-15-2004 03:44 AM

Thanks Velocd. Very useful script...

sjau 07-15-2004 02:38 PM

Can someone test out this feed? I can't get it to work with either bot:

http://www.swissinfo.org/sde/swissin...?siteSect=1111

romeshomey 07-15-2004 03:09 PM

Quote:

Originally Posted by sjau
Can someone test out this feed? I can't get it to work with either bot:

http://www.swissinfo.org/sde/swissin...?siteSect=1111

It might only work with feeds with date tags. Not sure though, but I notice your feed has no dates in it..

ranger2kxlt 07-15-2004 03:18 PM

Ok, got my search query going good....but! it seems to pull the same info from different sources, and i have repeat posts.....is there a way to moderate the bot? so all i have to do is look at the threads and take out the dups.?

Its an extra step, but at least i don't have to find the news!

Thanks

Bobby S 07-15-2004 03:46 PM

Quote:

Originally Posted by ranger2kxlt
Ok, got my search query going good....but! it seems to pull the same info from different sources, and i have repeat posts.....is there a way to moderate the bot? so all i have to do is look at the threads and take out the dups.?

Its an extra step, but at least i don't have to find the news!

Thanks

See the cron job malarkey.

Is there any reason why you cannae set the cron as a scheduled task in the vbulletin admin panel or am I missing something really obvious?

ranger2kxlt 07-15-2004 03:59 PM

I think i got it....i had mutliple listings to post from the search engine they gave me....but it would pull the same data, just from a different source each time it updated....so i would have multiple posts stating the same thing, the only difference was the source.

But i managed a way around it.

Thanks for the help

Sanjiyan 07-16-2004 05:16 AM

Hiya I was wondering if you can help me..

I installed and then removed this hack, but now it seems that none of my users can make new threads on any sections within the forum, it just comes up with this error message:

No Thread specified. If you followed a valid link, please notify the webmaster

Users have no problems with replying to current posts made.

I removed the files, and removed the relevent tables it made in the database, but something is very wrong here.

vBulletin 3.0.3
http://f7.sanjiyan.co.uk

lazytown 07-16-2004 09:39 AM

Why can't ArticleBot process the following news feed, for example. Yahoo has a GREAT tool for searching/filtering news and outputting it as RSS.. However it is useless if I can't get to work. For comparison, I've provided a yahoo feed that does work.

Doesn't Work:
http://search.news.yahoo.com/usns/yn....html?vo=happy

Works:
http://rss.news.yahoo.com/rss/us

Both work in several Windows RSS readers.

Thanks for any help!
-Victor

Sanjiyan 07-16-2004 11:44 AM

Quote:

Originally Posted by Sanjiyan
Hiya I was wondering if you can help me..

I installed and then removed this hack, but now it seems that none of my users can make new threads on any sections within the forum, it just comes up with this error message:

No Thread specified. If you followed a valid link, please notify the webmaster

Users have no problems with replying to current posts made.

I removed the files, and removed the relevent tables it made in the database, but something is very wrong here.

vBulletin 3.0.3
http://f7.sanjiyan.co.uk

Sorted this problem out now, so can you please ignore this 'help' request.

Frito 07-16-2004 10:12 PM

Hello I'm installing your Hack and am stuck at step #3. I gues I'm too literal but can you elaborate?

"Create a template called articlebot_post"

where do we put this Template?

Thanks

Frito 07-16-2004 11:04 PM

Velocd here is update from a little while ago-

I made a text file and called it "articlebot_post" and put it in /path/to/forums/admincp/

Is this correct? (it doesn't say in step #3 where to put template)

Anyway after I uploaded all the files and went into admin panel I see the article bot stuff on left,however

I'm getting this error inside admin when trying to add bot-

==============================
Database error in vBulletin 3.0.3:

Invalid SQL:
SELECT userid
FROM user
WHERE userid = 0

mysql error: Table 'CreditForum.user' doesn't exist

mysql error number: 1146

Date: Friday 16th of July 2004 04:40:33 PM
Script: http://www.creditscorebooster.com/Cr...ebot_admin.php
Referer:
http://www.creditscorebooster.com/Cr...min.php?do=add

===============================================

When I log into phpmyadmin for access to database I see this error;

Error
The additional Features for working with linked Tables have been deactivated. To find out why click here.

PMA Database ... not OK[ Documentation ]
General relation features Disabled

=================================================

Do you suppose that this means I can't use your hack on my server the site is hosted on?

Can you help trouble shoot this?

Thank you
Looks like a really good hack once it gets going.

R.C

Chris-FH 07-17-2004 12:31 AM

Please help me, I'm getting this error:

Quote:

Warning: main(./global.php) [function.main]: failed to create stream: No such file or directory in /xxx/html/board/articlebot/articlebot.php on line 43

Fatal error: main() [function.main]: Failed opening required './global.php' (include_path='.:/usr/lib/php') in /xxx/html/board/articlebot/articlebot.php on line 43
@romeshomey:

What was your solution?

C.

lazytown 07-17-2004 07:57 AM

Strangely enough, if I save the RSS html file to my server and have Articlebot read it off the file (as html), it works fine.. But if it tries to get the feed directly from the feed server it doesn't work. Guess I'll have to write a cron that saves the feeds to my server!

-Victor


Quote:

Originally Posted by vissa
Why can't ArticleBot process the following news feed, for example. Yahoo has a GREAT tool for searching/filtering news and outputting it as RSS.. However it is useless if I can't get to work. For comparison, I've provided a yahoo feed that does work.

Doesn't Work:
http://search.news.yahoo.com/usns/yn....html?vo=happy

Works:
http://rss.news.yahoo.com/rss/us

Both work in several Windows RSS readers.


lazytown 07-17-2004 11:43 AM

This fixed the articlebot HTML encoding problem for me :

In the articlebot/articlebot.php change:


Code:

$article['description'] = strip_tags(htmlspecialchars($article['description']));

to

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


HTML now doesn't need to be enabled (which is a security risk).

gmtalk 07-17-2004 02:52 PM

Quote:

Originally Posted by Velocd
As said, the bot starts at the end of the file (oldest articles) and counts its way up. It makes sense that if you remove a thread, the bot (which does check for existing threads) will re-create it. Instead of removing the thread from the database, if you wish to get rid of it, "soft" delete it.

Also note there is a "initial article trim" to skip a number of articles when first starting on an RSS feed.

Well I have been testing this one out and it is going nuts on me. The feeds I have are from Racing sites and they come in every few hours. Bad thing is that it is grabbing even the old stories over and over. 8 stories have been repeated on the site 12 times now.

This is nuts. Is there a better way to have it check for dupes? I know in the other RSS feed hack they have sorted that out. I would like to see that in this one. :\

scotty 07-19-2004 09:55 AM

i had the problem of reoccuring threads by my bot too...

the reason was an additional space in the "title-tag"!

instead of <title>here the headline</title> there was <title>here the headline </title> in the rss-feed.

so the bot couldn't recognize, that the thread (without the whitespace) still exists.

my sollution:

find:
Code:

if (!$articlebot['lastpost'] && (--$articlebot['initialtrim'] > 0))
and just add above:
Code:

$article['title'] = trim($article['title']);
now it is working fine again! :)

Floris 07-19-2004 10:19 AM

now it is working fine again! :)[/QUOTE]The .php file is ready for cron, to save a query could we setup this through the scheduler from vbulletin?

Bobby S 07-19-2004 11:20 AM

Quote:

Originally Posted by floris
The .php file is ready for cron, to save a query could we setup this through the scheduler from vbulletin?

I set it up as a scheduled task and it appears to work fine: except some feeds duplicating. I'm not sure why but the post two up may hold the answer...

Velocd 07-20-2004 01:32 PM

I've been meaning to make an update fixing the bugs discussed so far, but just haven't had the time.

Probably at the weekend I will do so.

Do the trimming of the thread title mentioned here, and hopefully that erases some duplicate threads that are only off by whitespace.

This hack checks for threads of the same title that already exist, and if they do, it wont post them again. Unless there is a bug. ;)

Chris-FH 07-20-2004 01:59 PM

Quote:

Originally Posted by Chris-FH
Please help me, I'm getting this error:

Code:

Warning: main(./global.php) [function.main]: failed to create stream: No such file or directory in /xxx/html/board/articlebot/articlebot.php on line 43

Fatal error: main() [function.main]: Failed opening required './global.php' (include_path='.:/usr/lib/php') in /xxx/html/board/articlebot/articlebot.php on line 43

@romeshomey:

What was your solution?

C.

Nobody??? :ermm:

C.

scotty 07-20-2004 02:07 PM

Quote:

Originally Posted by Chris-FH
Nobody??? :ermm:

C.

do you have changed that:
Code:

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

(step8 installation)

Chris-FH 07-20-2004 02:21 PM

Yes I have...

If this path (chdir) is incorrect, the error is in line 42...

But it is correct...

If I set the full path to the global.php , I get this error:

Code:

Warning: main(./includes/init.php) [function.main]: failed to create stream: No such file or directory in /xxx/html/board/global.php on line 18

Fatal error: main() [function.main]: Failed opening required './includes/init.php' (include_path='.:/usr/lib/php') in /xxx/html/board/global.php on line 18

C.

Kru 07-20-2004 06:15 PM

Well I installed it. I went on add bot and entered the user ID 1.

After it I got following message:

Database error in vBulletin 3.0.3:

Invalid SQL:
SELECT articlebot.userid,
articlebot.articlebotid, user.username
FROM articlebot
LEFT JOIN user
USING (userid)
WHERE articlebot.userid = 0

mysql error: Table 'help.articlebot' doesn't exist

mysql error number: 1146

Date: Tuesday 20th of July 2004 12:12:16 PM
Script: http://www.spiritual-connections.com...ebot_admin.php
Referer: http://www.spiritual-connections.com...min.php?do=add
Username: xxx
IP Address: xxxx

every time if I am trying to open my forum this appears.

Can anybody help me, please

scotty 07-20-2004 10:15 PM

Quote:

Originally Posted by Chris-FH
Yes I have...
If this path (chdir) is incorrect, the error is in line 42...
But it is correct...

it can't be, sorry.

please provide:
- where is your forum located? (full path!) you can xxx some chars to mask your path
- where is your articlebot.php located? (full path!)
- how do you call articlebot.php? cron? direct?

Quote:

If I set the full path to the global.php , I get this error:
you can't edit line 43 - the only line to edit is 42!


All times are GMT. The time now is 04:20 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.02823 seconds
  • Memory Usage 1,872KB
  • 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
  • (11)bbcode_code_printable
  • (24)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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