Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   Blogs and Blogging (http://www.greenguysboard.com/board/forumdisplay.php?f=8)
-   -   Are embedded sponsor codes causing you RSS feed problems? (http://www.greenguysboard.com/board/showthread.php?t=34375)

Toby 2006-09-11 09:34 AM

Are embedded sponsor codes causing you RSS feed problems?
 
Since I use mostly aggregated feed from sponsors blogs, most of my posts contain permalinks, comment links, etc. that have affiliate codes at the end of the URL.

If you are using WordPress and these links contain an ampersand you may have validation issues with your own RSS feeds.

I have a solution for anyone that's interested. It involves inserting a little PHP coding in just the right place in several WP library functions.

If anyone is interested I'll type up a more detailed list of the files and functions to edit.

Special thanks to TPat for noticing that there even was a problem. |thumb

T Pat 2006-09-13 12:13 AM

Toby I was hoping The Walrus would weigh in on this thread
I found 3 more blogs that I can't aggregate for the same reason
here's the 3 links that are causing the problems
http://sammy4ublog.com/?p=746&A=true&nats=NzcwOjM6MQ
http://www.nubilesblog.com/?p=403&coupon=1237688
http://www.ravensdiary.com/wordpress...ts=MjU4NTozOjE
I have a feeling there are a bunch of blogers out there that have feeds that aren't validating and don't know it

Toby 2006-09-13 12:43 AM

I'm guessing the the source of the problem is the same, ampersands or other special characters that haven't been HTML encoded. I also aggregate Raven's feed, so I can definitely confirm that problem is the same there.

Here's what I had to do to make my feed validate.

I'm using the most recent version, WordPress 2.0.4 released July 29, 2006. If you're using an older version the file names and line numbers may not match up exactly.

The PHP function htmlentities($string) converts any characters within the specified $string to the matching html encoded equivalent. If the character is already encoded it leaves it as is.

file: wp-rss2.php line 49
PHP Code:

<wfw:commentRSS><?php echo htmlentities(comments_rss()); ?></wfw:commentRSS>

file: wp-includes\comment-functions.php line 263
PHP Code:

function comments_link$file ''$echo true ) {
    echo 
htmlentities(get_comments_link());


file: wp-includes\feed-functions.php line 62
PHP Code:

function permalink_single_rss($file '') {
    echo 
htmlentities(get_permalink());


file: wp-includes\template-functions-post.php line 44
PHP Code:

function get_the_guid$id ) {
    
$post = &get_post($id);
    return 
htmlentities(apply_filters('get_the_guid'$post->guid));



walrus 2006-09-13 01:10 AM

Quote:

Originally Posted by T Pat (Post 299314)
Toby I was hoping The Walrus would weigh in on this thread...

Wish I could...other than the new blogs I'm working on, I don't use sponsor feeds in my posts (only on pages) so this was pretty much news to me and I'm glad Toby came up with a hack for it.

Not to single any sponsor out here but I have noticed it's pretty easy for your aff ID to get lost with Nubiles.

cd34 2006-09-13 01:32 AM

be very very careful that you don't convert any urls that send traffic to ccbill. Their refer.cgi doesn't properly de-entify and while your page will validate, you won't get credit for the surfers.

Request sending & in the url
Code:

mcd@tsavo:~$ telnet refer.ccbill.com 80
Trying 64.38.240.20...
Connected to refer.ccbill.com.
Escape character is '^]'.
GET /cgi-bin/clicks.cgi?CA=xxxxxx-0000&PA=xxxxxx HTTP/1.0
Host: refer.ccbill.com

HTTP/1.1 302 Found
Date: Wed, 13 Sep 2006 05:25:21 GMT
Server: Apache
Location: http://www.xxxxxxxxxx.com
Content-Length: 212
Connection: close
Content-Type: text/html; charset=iso-8859-1



302 Found

Found


The document has moved here.



Connection closed by foreign host.

Result sending a url that doesn't validate:
Code:

mcd@tsavo:~$ telnet refer.ccbill.com 80
Trying 64.38.240.20...
Connected to refer.ccbill.com.
Escape character is '^]'.
GET /cgi-bin/clicks.cgi?CA=xxxxxx-0000&PA=xxxxxx HTTP/1.0
Host: refer.ccbill.com

HTTP/1.1 302 Found
Date: Wed, 13 Sep 2006 05:26:35 GMT
Server: Apache
Set-Cookie: xxxxxx=CLICKS2wRqJElQncJQ*; expires=Friday 15-Sep-06 22:26:39 GMT; path=/; domain=.ccbill.com
Location: http://www.xxxxxxxxxxx.com
Content-Length: 212
Connection: close
Content-Type: text/html; charset=iso-8859-1



302 Found

Found


The document has moved here.



Connection closed by foreign host.

Note that the second non-entified url properly sets the cookie, while the first gets you to where you are expecting, but, doesn't set the cookie or give you credit.

Toby 2006-09-13 02:42 AM

Quote:

Originally Posted by cd34 (Post 299319)
be very very careful that you don't convert any urls that send traffic to ccbill. Their refer.cgi doesn't properly de-entify and while your page will validate, you won't get credit for the surfers.

Thanks Chris, I wasn't aware of that. It could be rather costly too.

FiReC 2006-09-13 09:09 PM

Quote:

Originally Posted by walrus (Post 299318)
Not to single any sponsor out here but I have noticed it's pretty easy for your aff ID to get lost with Nubiles.

What are you noticing specifically, I'll get it fixed up right quick :) support@nubiles.net

jayeff 2006-09-13 09:40 PM

Currently I have 35 sponsors with RSS feeds listed on my resource site: only 7 validate fully and 10 don't validate at all.

I have been able to use Nubiles despite the feed validating with a warning, but one thing I have noticed is that when you include several feeds which don't validate fully, there seems to be a cumulative impact.

Which is why I suggest people should start by validating their own sites and feeds, then start by adding the sponsor feeds which do validate and only after that begin trying the rest: one at a time, testing your site (and feed validation, if it concerns you) after each addition.

walrus 2006-09-14 01:32 AM

Quote:

Originally Posted by FiReC (Post 299568)
What are you noticing specifically, I'll get it fixed up right quick :) support@nubiles.net

Click the link TPat gave, then add that RSS feed to a feed reader, no code. Or hit the home link from that page, his affiliate code is now gone.

Fonz 2006-09-14 04:28 AM

Quote:

Originally Posted by T Pat (Post 299314)
Toby I was hoping The Walrus would weigh in on this thread
I found 3 more blogs that I can't aggregate for the same reason
here's the 3 links that are causing the problems
http://sammy4ublog.com/?p=746&A=true&nats=NzcwOjM6MQ
http://www.nubilesblog.com/?p=403&coupon=1237688
http://www.ravensdiary.com/wordpress...ts=MjU4NTozOjE
I have a feeling there are a bunch of blogers out there that have feeds that aren't validating and don't know it

I'm using all 3 of those feeds on http://www.porndiner.com and they all do what they are supposed to do so they do seem to work with wordpress...

walrus 2006-09-14 08:06 AM

Quote:

Originally Posted by Fonz (Post 299605)
I'm using all 3 of those feeds on http://www.porndiner.com and they all do what they are supposed to do so they do seem to work with wordpress...

Try to verify your RSS feed, you get this error:

XML Parsing Error: not well-formed
Location: http://www.porndiner.com/feed/
Line Number 57, Column 59:

T Pat 2006-09-14 09:20 AM

Quote:

Originally Posted by Fonz (Post 299605)
I'm using all 3 of those feeds on http://www.porndiner.com and they all do what they are supposed to do so they do seem to work with wordpress...

Fonz I have verify feeds turned off on my aggregator and still can't parse http://www.porndiner.com/feed/
useing FireFox I get this error:
XML Parsing Error: not well-formed
Location: http://www.porndiner.com/feed/
Line Number 57, Column 59: http://www.mpbabes.com/?p=81&x=smilin

Fonz 2006-09-14 09:54 AM

Damn, missed the part of "your own RSS" feeds... that'll teach me.

FiReC 2006-09-14 01:36 PM

Quote:

Originally Posted by walrus (Post 299592)
Click the link TPat gave, then add that RSS feed to a feed reader, no code. Or hit the home link from that page, his affiliate code is now gone.

Made some changes and added the affiliate code to both the home and feed links on all pages. How does it look now?

Also changed those two things that were producing warnings when validating.

walrus 2006-09-14 03:07 PM

Quote:

Originally Posted by FiReC (Post 299731)
Made some changes and added the affiliate code to both the home and feed links on all pages. How does it look now?

Also changed those two things that were producing warnings when validating.

Yep, it seems fixed and just in time for me to release my new teen blog.

T Pat 2006-09-14 04:34 PM

Quote:

Originally Posted by FiReC (Post 299731)
Made some changes and added the affiliate code to both the home and feed links on all pages. How does it look now?

Also changed those two things that were producing warnings when validating.

It seems fine now FiRec and may I add, you Sir are a scholar and a gentleman

T Pat 2006-09-20 07:39 PM

Google has this thread listed #41 under "adult rss feeds"|thumb

Toby 2006-09-21 12:30 AM

Quote:

Originally Posted by T Pat (Post 301328)
Google has this thread listed #41 under "adult rss feeds"|thumb

#41 eh? I wonder how many searches per week use the keyphrase adult rss feeds.

T Pat 2006-09-21 01:16 AM

Quote:

Originally Posted by Toby (Post 301354)
#41 eh? I wonder how many searches per week use the keyphrase adult rss feeds.

Overture shows 150 in August
Wordtracker didn't show any (I think it's their adult filter on free version)
450 per 24 hour period for rss feeds on msn
Can't remember my adwords password so I didn't check google

double0 2006-09-21 04:19 AM

How about software like wordpress converting links in posts (not rss):

So in the source code...
Code:

&
becomes
& # 0 3 8 ;
(spaces added so vbulletin doesn't parse it)

and more importantly:

Code:

http://refer.ccbill.com/cgi-bin/clicks.cgi?CA=920029-0000&PA=1115150
becomes
http://refer.ccbill.com/cgi-bin/clicks.cgi?CA=920029-0000 & # 0 3 8 ; PA=1115150

Seems like a pretty big issue, haven't been able to find much on it |confused|

btw, hi |waves|


All times are GMT -4. The time now is 01:39 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc