[SOLVED] -weird question marks showing on my RSS2HTML module
- fearmydesign
- Power Poster
- Posts: 363
- Joined: Sun Feb 28, 2010 10:54 pm
[SOLVED] -weird question marks showing on my RSS2HTML module
I am getting these weird question marks when bringing in content using the RSS2HTML - I have tried the different settings for it like the 'Sync with CMSMS encoding' and also changed the utf-8 - but nothing is working. Can someone take a look at what I mean and maybe provide suggestions? Thank you
Please take a look at the lower-left hand box:
http://unmejorperu.com/index.php
Thank you
Please take a look at the lower-left hand box:
http://unmejorperu.com/index.php
Thank you
Last edited by fearmydesign on Mon Jun 06, 2011 10:54 pm, edited 1 time in total.
Rod
"Be careful who you step on your way up; because you never know who you'll meet on your way down!" - or something like that.
"Be careful who you step on your way up; because you never know who you'll meet on your way down!" - or something like that.
Re: weird question marks showing on my RSS2HTML module :-/
Hi,
You are right.
It's due to the encoding of apostrophes. The Question marks appear as the rss encoder doesn't know how to disaplay them.
You could use 'escape' on your smarty tag to replace them with the correct html entities:
Or replace them using str_replace in a User Defined Tag.
Just some suggestions.
/m
You are right.
It's due to the encoding of apostrophes. The Question marks appear as the rss encoder doesn't know how to disaplay them.
You could use 'escape' on your smarty tag to replace them with the correct html entities:
Code: Select all
{$rssItem|escape:'htmlall'}
Just some suggestions.
/m
- fearmydesign
- Power Poster
- Posts: 363
- Joined: Sun Feb 28, 2010 10:54 pm
Re: weird question marks showing on my RSS2HTML module :-/
Thank you for your suggestions. Could you tell me how to implement either of your suggestions... I am not much of a programmer and I'm not sure where to place the Smarty tag you showed me. Thank youmyshko wrote: You could use 'escape' on your smarty tag to replace them with the correct html entities:
Or replace them using str_replace in a User Defined Tag.Code: Select all
{$rssItem|escape:'htmlall'}
Rod
"Be careful who you step on your way up; because you never know who you'll meet on your way down!" - or something like that.
"Be careful who you step on your way up; because you never know who you'll meet on your way down!" - or something like that.
Re: weird question marks showing on my RSS2HTML module :-/
Hi fmd,
I'll try, but I can't install the module RSS2HTML (XMLMadeSimple is a newer alternative) so I have to guess how your module is implemented.
The 'escape' method involves adding the smarty modifier at the end of a smarty tag called in your template.
When you call the RSS feed into your webpage, a template somewhere in the admin of that module is used to display each part.
Within this template, there will be a tag which displays the 'description' or body of the RSS.
It will be something like this:
To escape the tag and convert characters to entities, add |escape:'html' to the end, like this:
This will work on any smarty tag that outputs a string of text.
If you are still stuck, post the template you use from RSS2HTML and I can give more specific suggestions.
Hope that makes more sense.
/m
I'll try, but I can't install the module RSS2HTML (XMLMadeSimple is a newer alternative) so I have to guess how your module is implemented.
The 'escape' method involves adding the smarty modifier at the end of a smarty tag called in your template.
When you call the RSS feed into your webpage, a template somewhere in the admin of that module is used to display each part.
Within this template, there will be a tag which displays the 'description' or body of the RSS.
It will be something like this:
Code: Select all
{$xml->channel->item[0]->description}
Code: Select all
{$xml->channel->item[0]->description|escape:'html'}
If you are still stuck, post the template you use from RSS2HTML and I can give more specific suggestions.
Hope that makes more sense.
/m
- fearmydesign
- Power Poster
- Posts: 363
- Joined: Sun Feb 28, 2010 10:54 pm
Re: weird question marks showing on my RSS2HTML module :-/
Thanks for the response, I actually removed it and went with your suggestion of the XMMadeSimple - it works, but my only problem now is creating a template for it... I see that the default template has nothing on it, it's blank so the data is not showing up correctly on my site, please take a look at the lower left hand column: http://www.unmejorperu.com/index.phpmyshko wrote:Hi fmd,
I'll try, but I can't install the module RSS2HTML (XMLMadeSimple is a newer alternative) so I have to guess how your module is implemented.
The 'escape' method involves adding the smarty modifier at the end of a smarty tag called in your template.
When you call the RSS feed into your webpage, a template somewhere in the admin of that module is used to display each part.
Within this template, there will be a tag which displays the 'description' or body of the RSS.
It will be something like this:To escape the tag and convert characters to entities, add |escape:'html' to the end, like this:Code: Select all
{$xml->channel->item[0]->description}
This will work on any smarty tag that outputs a string of text.Code: Select all
{$xml->channel->item[0]->description|escape:'html'}
If you are still stuck, post the template you use from RSS2HTML and I can give more specific suggestions.
Hope that makes more sense.
/m
Thank you
Rod
"Be careful who you step on your way up; because you never know who you'll meet on your way down!" - or something like that.
"Be careful who you step on your way up; because you never know who you'll meet on your way down!" - or something like that.
Re: weird question marks showing on my RSS2HTML module :-/
Hi Rod,
Ok, well depending on how you want it to display your template will be different. But this is a start:
To explain:
You can change the above to display however you like.
Regards,
/myshko
Ok, well depending on how you want it to display your template will be different. But this is a start:
Code: Select all
{* RSS Feed List Template *}
<ul class="feed">
{foreach from=$xml->channel->item item=item name=post}
{if $smarty.foreach.post.iteration <= 3}
<li>
<h4><a rel="external" href="{$item->link}" title="Click to read {$item->title}">{$item->title}</a></h4>
<p class="desc">{$item->description|truncate:120:"...":false}</p>
<span class="date">~ {$item->pubDate|date_format:"%d/%m/%y"}</span>
<a rel="external" class="more" href="{$item->link}" title="Click to read {$item->title}">read more~</a>
</li>
{/if}
{/foreach}
</ul>
- {foreach from=$xml->channel->item item=item name=post} ~ Goes through the list of feeds and assigns each one as $item, we also set a name so we can limit how many posts we show.
- {if $smarty.foreach.post.iteration <= 3} ~ Says only display the first 3 items, change this if you want more or less items.
- {$item->link} ~ Displays item link
- {$item->title} ~ Displays title
- {$item->description|truncate:120:"...":false} ~ This outputs the description but limits (truncates) the characters displayed to 120.
- {$item->pubDate|date_format:"%d/%m/%y"} ~ Displays the date but rewrites the format as date/month/year.
You can change the above to display however you like.
Regards,
/myshko
- fearmydesign
- Power Poster
- Posts: 363
- Joined: Sun Feb 28, 2010 10:54 pm
Re: weird question marks showing on my RSS2HTML module :-/
Hi Myshko, that was very helpful and I finally got it to work perfectly! thanks and i appreciate your help on this.
Rod
"Be careful who you step on your way up; because you never know who you'll meet on your way down!" - or something like that.
"Be careful who you step on your way up; because you never know who you'll meet on your way down!" - or something like that.
Re: [SOLVED] -weird question marks showing on my RSS2HTML mo
Excellent,
You're welcome Rod and all the best finishing your site.
/m
You're welcome Rod and all the best finishing your site.
/m
-
- Forum Members
- Posts: 18
- Joined: Wed May 09, 2007 9:44 am
Re: [SOLVED] -weird question marks showing on my RSS2HTML mo
+1 on the thanks Myshko.
This advice just got me out of an upgrade hole.
In my template I just replaced:
with
and all was right in my world again. Thanks!
This advice just got me out of an upgrade hole.
In my template I just replaced:
Code: Select all
{$item.title}
Code: Select all
{$item.title|escape:'htmlall'}