Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > SUPPORT / INFORMATION > Pixelpost Help

Post Reply
 
Thread Tools
  #1  
Old 08-30-2006, 02:44 PM
iphimeda Offline
pp regular
 
Join Date: Jan 2006
Location: Belgium
Posts: 32
Send a message via MSN to iphimeda
Pixelpost RSS-feed not showing links: possible solution

I had the problem that my RSS feed wasn't showing any clickable links (as seen through Feedreader) and that - if I used html for the make up - there was no structure/make-up whatsoever in the text you give in in the 'image description/text' box.

Now I did the following (and that seems to solve the no clickable links and the disappeard html make-up problems)

In the index.php file I changed

Code:
$body = pullout($body);
$body = stripslashes($body);
$body = ereg_replace("\n","\n<br />",$body);
$body = strip_tags( $body );
$body = htmlspecialchars($body,ENT_QUOTES);
to
Code:
$body = pullout($body);
$body = ereg_replace("\n","\n<br />",$body);
$body = htmlspecialchars($body,ENT_QUOTES);
Is there any reason why I shouldn't do that and why those two statements/whatever they are called were included in the first place?

The two 'statements' I removed are:
Code:
$body = stripslashes($body);
$body = strip_tags( $body );
__________________
http://www.iphimeda.be
Reply With Quote
  #2  
Old 08-30-2006, 03:20 PM
Connie
Guest
 
Posts: n/a
this is an interesting approach and on fast hand I see 3 points:

1) you replaced some characters by ereg_replace, but stripslashes() could strip also slashes which you don't think of in the moment

2) strip_tags() is used to remove any HTML-tags (you want to keep the links)

3) did you validate your result with any feedvalidator?
did you check all possible combinations?

the RSS-format has strict rules, so we tried to keep as conform as possible, the result is that our feeds validate

if you want other things, why not?
there is always more than one way to happiness
but our aim is also to stay strictly validating and rules-compliant
Reply With Quote
  #3  
Old 08-30-2006, 03:58 PM
iphimeda Offline
pp regular
 
Join Date: Jan 2006
Location: Belgium
Posts: 32
Send a message via MSN to iphimeda
As for point 3, feedvalidator.org says it's a valid RSS feed
__________________
http://www.iphimeda.be
Reply With Quote
  #4  
Old 08-30-2006, 08:49 PM
GeoS's Avatar
GeoS+ Offline
Team Pixelpost
 
Join Date: Apr 2005
Location: Warsaw, Poland
Posts: 3,613
Send a message via ICQ to GeoS Send a message via Skype™ to GeoS
It should be enough to change:
PHP Code:
$body stripslashes($body);
$body strip_tags$body ); 
to:
PHP Code:
$body stripslashes($body);
$body strip_tags$body'<a>' ); 
__________________
photoblog | portfolio | addons | Donate
Reply With Quote
  #5  
Old 08-30-2006, 09:22 PM
iphimeda Offline
pp regular
 
Join Date: Jan 2006
Location: Belgium
Posts: 32
Send a message via MSN to iphimeda
It would continue stripping the
Code:
<br></br>
and
Code:
<p></p>
, etc. tags, no?
__________________
http://www.iphimeda.be
Reply With Quote
  #6  
Old 08-31-2006, 05:43 AM
Connie
Guest
 
Posts: n/a
yes, the parameter "a" tells not to unstrip the anchor-tags but to strip all of the other tags

there is the chance to add more "allowed parameters" to this step

what will be stripped might depend on the PHP-version
Reply With Quote
  #7  
Old 04-22-2007, 05:25 AM
Ariel Offline
pp regular
 
Join Date: Dec 2005
Posts: 32
This is an old thread, but is there a way to do this with PP 1.6 as well? It looks like index.php doesn't have those same lines anymore.
__________________
Photoblog
Reply With Quote
  #8  
Old 04-22-2007, 11:40 PM
GeoS's Avatar
GeoS+ Offline
Team Pixelpost
 
Join Date: Apr 2005
Location: Warsaw, Poland
Posts: 3,613
Send a message via ICQ to GeoS Send a message via Skype™ to GeoS
/includes/functions_feeds.php @ line 48
__________________
photoblog | portfolio | addons | Donate
Reply With Quote
  #9  
Old 04-23-2007, 07:30 AM
Ariel Offline
pp regular
 
Join Date: Dec 2005
Posts: 32
Quote:
Originally Posted by GeoS View Post
/includes/functions_feeds.php @ line 48
aha! Thank you GeoS!
__________________
Photoblog
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 10:31 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs