Elcan Software

Small software, big solutions.

Home arrow Support Forum
Support Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Google Feed Layout (1 viewing) (1) Guest
Support for feed2post
Go to bottom Post Reply Favoured: 0
TOPIC: Google Feed Layout
#780
Sept_de_Neuf (User)
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
Google Feed Layout 3 Months, 2 Weeks ago Karma: 1  
Hello,

I was able to fine tune the Google feeds fetched by Feed2Post. I have replaced the bottom of utilities.php in com_feedpost_25 and utilitiescron.php in conjob_feed2post_16 with the following:
Code:

function parselinks ($datatext) { $text = preg_replace("#<table border=0 width= valign=top cellpadding=2 cellspacing=7><tr><td valign=top><br><div><img alt=\"\" height=\"1\" width=\"1\"></div><div>(.*?)</nobr><br>#si", "", $datatext); $text = preg_replace("#<table border=0 width= valign=top cellpadding=2 cellspacing=7><tr><td width=80 align=center valign=top><a(.*?)\"><img src=#si", "<img style=\"margin: 0 10px 10px 0; float: left;\" src=", $text); $text = preg_replace("#border=\"1\" /><br>(.*?)</nobr><br>#si", "border=\"1\" />", $text); $text = preg_replace("#</div></td></tr></table>#si", "</div>", $text); $text=preg_replace("/<a\s+/","<a target=\"_blank\" rel=\"nofollow\" ",$text); return $text; }
This will remove the double title; since the title is already in the article it was redundant to have it again in the text. If there is an image in the feed, it will also float left. It will also change the tags into div tags. Also another problem I found with Google is that many times an apostrophy would show gibberish. To solve this I have added the following code into admin.feedpost.php at line 283, posthemall.php at line 80 and cronfunctions.php at line 163:
Code:

$title=preg_replace("|&#39;|","'",$title);
These changes shouldn't affect other types of feeds since the changes are very specific to the html that Google produces. You are welcome to use these modifications if you wish.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
      Topics Author Date
    thread link
Google Feed Layout
Sept_de_Neuf 2008/08/01 16:52
    thread link
thread linkthread link Re:Google Feed Layout
movilla 2008/08/05 13:02
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Sponsors

Your Ad Here
Joomla Templates by Joomlashack