Time2Dine.co.nz is Online Restaurant Booking
 
Elusion Electronic Cigarette
 New Zealand Restaurants Forum
Restaurant Forum | Contact Time2Dine | Book Online & Save | About Time2Dine

Go Back   New Zealand Restaurants & Food Forum > Search Engine Optimisation > SEO vBulletin
Register

Reply
 
LinkBack Thread Tools
  #1  
Old 2nd Apr 06, 05:16 PM
T2DMan's Avatar
Administrator
 
Join Date: Apr 2004
Location: Auckland, New Zealand
Posts: 7,839
T2DMan is on a distinguished road
Default Articlebot RSS Feed

I have used Articlebot RSS Feed on a clients site, and love how it is so easy and well written.

I have found a couple of issues specific to that clients installation:

A client wanted to use the $foruminfo[title] in the template. But although the variable was used in the articlebot_core.php file, it was not being parsed for the template.

So I globalised the $foruminfo variable in the class_replace.php file

find:
[PHP]function getTemplate($standard, $articlebot, $article, $article_description = '', $enclosure = '')
{
global $vbphrase, $vbulletin
[/PHP]

Add the $foruminfo:
[PHP]function getTemplate($standard, $articlebot, $article, $article_description = '', $enclosure = '')
{
global $vbphrase, $vbulletin,$foruminfo;
[/PHP]
Reply With Quote
  #2  
Old 2nd Apr 06, 05:26 PM
T2DMan's Avatar
Administrator
 
Join Date: Apr 2004
Location: Auckland, New Zealand
Posts: 7,839
T2DMan is on a distinguished road
Default Order of taking information from the RSS

Fab extension. Installed in double quick time.

The bot takes news from the oldest first, and we wanted to take it from the newest first. While there is a config option for taking of rss the first time that rss is taken, for subsequent times, it restarts from the oldest.

We only want to take one item from google news say every 12 hrs, and so its likely that the next time we look there will be a new news item on the top. Taking the 10th item this way will otherwise always be getting rather old news.

in the articlebot_core.php
find
Code:
$articles	 = @array_reverse($feed->items);
replace with
Code:
//$articles	 = @array_reverse($feed->items);
$articles     = $feed->items;
This does create a problem in that if there is no new news, the second item grabbed from the rss will be older than the one first posted. But for the clients purposes this was unlikely.
Reply With Quote
  #3  
Old 2nd Apr 06, 05:45 PM
T2DMan's Avatar
Administrator
 
Join Date: Apr 2004
Location: Auckland, New Zealand
Posts: 7,839
T2DMan is on a distinguished road
Default Further hacks

When there are quote marks in the titles of the news feeds, they come across as "

ie rss title= Falcons add "bruisemakers"
comes across as Falcons add "bruisemakers"

Fix:

in the articlebot_core.php file
find
[PHP]$article['title'] = $replacer->doReplace($article['title']);[/PHP]

replace with
[PHP]$article['title'] = html_entity_decode($replacer->doReplace($article['title']));[/PHP]

Note - this allows the quote " characters to appear in the titles of your threads, and through your threads where-ever the title is mentioned. In the html, " is used, so the quote marks do not break your script.

Images in the $article_description - FIXED see below

When there is an image in a Google newsfeed with a link on it, the image text link comes across with no space between that and the normal title of the feed. Firstly, we dont need that image link, but more importantly, need that space added.

http://news.google.com/news?hl=en&ne...nG=Search+News


We have manually updated the created thread, but the result had been:

Note the two links, and no space.

NOW FIXED: (keeping the double link, adding a space)

Search for the following in articlebot_description_class
[html] $this->_replacer->setReplacement(//links
'#<a[^>]+href=(\'|")(.*)(\\1).*>(.*)</a>#siU',
'\4'
);
$this->_replacer->setReplacement(//email
'#<a[^>]+href=(\'|")mailto.*)(\\1).*>(.*)</a>#siU',
'\4'
[/html]

add spaces after the [/url] and [email] and before the '

[html] $this->_replacer->setReplacement(//links
'#<a[^>]+href=(\'|")(.*)(\\1).*>(.*)</a>#siU',
'\4 '
);
$this->_replacer->setReplacement(//email
'#<a[^>]+href=(\'|")mailto.*)(\\1).*>(.*)</a>#siU',
'\4 '
[/html]
Reply With Quote
  #4  
Old 1st May 06, 04:40 PM
T2DMan's Avatar
Administrator
 
Join Date: Apr 2004
Location: Auckland, New Zealand
Posts: 7,839
T2DMan is on a distinguished road
Default Regex for titles

At the end of many article feeds are the place that the information has come from - like Google News takes the information from the New York Times, so that will be added to the end of the article title.

Use the following regex to take the comment off:
Regex Search & Replace for Titles
Specify a regex search pattern for RSS titles.
- ([^-]+)$
Specify a regex replace pattern for RSS titles.
blank-dont put anything here
Reply With Quote
  #5  
Old 1st May 06, 04:42 PM
T2DMan's Avatar
Administrator
 
Join Date: Apr 2004
Location: Auckland, New Zealand
Posts: 7,839
T2DMan is on a distinguished road
Default Add a custom template for this feed

I have used the following for a client:


[PHP]Up to the minute news about the $foruminfo[title] from Forum name. We'll find the latest $foruminfo[title] news so you can chat about here.

Quote:
$article_description

$article[pubdate]\
Post your comments about this story here.
[/php]
Reply With Quote
  #6  
Old 5th Sep 06, 08:47 PM
Junior Reviewer
 
Join Date: Sep 2006
Posts: 2
datarecall is on a distinguished road
Default

Looks like I don't have access to that page I am running 3.6.0 Gold will it work for this version I would like to see how this works.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Powered by: vBulletin Copyright ©2000 -2012, Jelsoft Enterprises Limited.
Search Engine Friendly URLs by vBSEO 3.2.0
© 2010 Time2Dine