Okay, I’m running into a very fringe issue and hoping that someone has solved this before.
It has to do with single vs double quoted strings and the way php “expands” variables in strings.
Here’s the basics…
I’m calling magpie in a template that parses php on output.
Everything is working great… UNLESS… an item in the feed has a dollar sign in it.
Then it breaks.
Here’s the relevant part of the code…
{exp:magpie url="{embed:tweet_feed_url}" limit="100" refresh="2" convert_entities="y"}
<ul id="tweet-feed" class="results-list nobullets">
{magpie:items}
<?php $tweet_title = "{magpie:title}"; ?>
<li><?php echo $tweet_title; ?></li>
{/magpie:items}
</ul>
{/exp:magpie}
Here’s something I’ve tried with no success…
$tweet_title = str_replace('$', '$', "{magpie:title}");
And this I know works…
$tweet_title = str_replace('$', '$', 'this is $test feed');
But it won’t let me do this…
$tweet_title = str_replace('$', '$', '{magpie:title}');... and gives me a “Parse error: syntax error, unexpected T_STRING”
Any help greatly appreciated!
TL
P.S. You can see it break here… http://phishtwit.com ...but you’ll have to page forward until you get to updates from around 3pm Central to see the one with the dollar sign ($) in it (though you won’t be able to see it b/c it breaks!).