Prevent content theft
foxhound |
|
---|---|
I have found many people use the RSS feed of my Genoa website. I am of course very happy with that however, this has a downside.
This way even if those sites keep streaming my RSS feed to their social sites their readers will soon be annoyed enough to have to go from site to site to read the fulll article they will instead follow/register on my own social sites, right? <img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
|
Kingsley |
|
---|---|
maybe take a look at the RSS in Siena? That one can be limited to a certain amount of characters, so maybe you can copy/extract it from there.. |
Trustmaster |
|
---|---|
In rss.php line 400 find return $text; and replace it with return mb_substr($text, 0, 60)."<br /><span class=\"readmore\"><a href=\"".$pag_pageurl."\">".$L['ReadMore']."</a></span>"; May the Source be with you!
|
foxhound |
|
---|---|
@Kingsley
@Trustmaster <img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
|
Kingsley |
|
---|---|
As usual, trustmaster beats me with his knowledge :P (like that was difficult :D) |
Trustmaster |
|
---|---|
@Kingsley I don't really exprect everyone to be a PHP coder here, so nevermind. @foxhound You can check how it's doing immediately by browsing http://example.com/rss.php May the Source be with you!
|
Kingsley |
|
---|---|
I know, just kidding around :) |
foxhound |
|
---|---|
#34394 Trustmaster: @foxhound
Yes, I understood that and I did view my changes there. I was just interest to see what would happen on those sites. // custom function to remove pics from the RSS function remove_images( $text ) { $postOutput = preg_replace('/<img[^>]+./','', $text); return $postOutput; } add_filter( 'sed_parse', 'remove_images', 100 );
<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
|
Trustmaster |
|
---|---|
The most radical solution would be stripping all tags and then limiting the output to 60 characters: return mb_substr(strip_tags($text), 0, 60)."<br /><span class=\"readmore\"><a href=\"".$pag_pageurl."\">".$L['ReadMore']."</a></span>"; May the Source be with you!
|
foxhound |
|
---|---|
Thanks for that code Trustmaster! return mb_substr(strip_tags($text, '<strong><a><i><ul><ol><center><br><img>'), 0, 700)." ........... <br /><br /><span class=\"readmore\"><a href=\"".$pag_pageurl."\">".'Read the full article on Armaholic'."</a></span><hr style=\"size:5px;\">";
<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
|
Kingsley |
|
---|---|
No shit, Armaholic is ur site? Cooolll.. :) Me play too.. |