Hi Andy,
Just gave it a try here and couldn’t get it to work but I am wondering looking at the documentation page on php.net for money_format and seeing these notes :
Note: The function money_format() is only defined if the system has strfmon capabilities. For example, Windows does not, so money_format() is undefined in Windows. Note: The LC_MONETARY category of the locale settings, affects the behavior of this function. Use setlocale() to set to the appropriate default locale before using this function.
Wonder if those have anything to do with it at all? There is at least one other function in this plugin which I couldn’t get to work some time back. Can’t quite remember which one it was now but overall this really is a fantastic plugin. I see the way it works so I am thinking that this is probably more a server issue than the plugin. I could be wrong on that though.
Don’t know if that helps at all?
Best wishes,
Mark
Will this work within a weblog tag? I’m able to get it to work on hard-coded text, but that seems kinda pointless, I need it to work on the fly for a weblog:entries tag, kinda like so:
{exp:weblog:entries weblog="default"}
{exp:phpstringfun function="ltrim" par1="status:"}{body}{/exp:phpstringfun}
{/exp:weblog:entries}
So basically, if I was pulling in a list of items from a weblog, any items that had the text “status:”, would have that part trimmed.
The above code works if I replace {body} with hard-coded text (i.e. “Status: blah blah”) and would return just the “blah blah” portion. As soon as I go back to the {body} tag it doesn’t work.
Any ideas? Thanks!
I figured it out! When I was trying to get {body} it had a tag by default at the start, so doing a ltrim failed since the first item was the tag. I created a custom field for this instance so that I could set it as an input field vs. a text area so that it wouldn’t be wrapped by a tag….that did the trick.
I see no obvious reason why this would not work:
{exp:magpie url="http://feeds2.feedburner.com/fitsugar" limit="1" refresh="720"}
{items}
{exp:phpstringfun function="html_entity_decode" par1="{description}"}
{description}{/exp:phpstringfun}
{/items}
{/exp:magpie}
unless the Magpie tags aren’t being parsed when they’re in the {exp:phpstringfun} tags. Any ideas? This particular blog’s RSS feed converts all of its < and > carrots to their respective HTML entities. It’s a pain in the butt.
Yeah, still no luck. With or without parse=”inward”, the plugin gives the following error:
Warning: html_entity_decode() expects parameter 2 to be long, string given in /home/indigo/public_html/new/admin/plugins/pi.phpstringfun.php on line 34.
Defining par2=”{description}” doesn’t help.
Hi,
I released a fork of PHPStringFun plugin, called String Mill.
The difference between these two plugins is the following: in order to have more power over parse order String Mill supports variable pair {string_mill_area}{/string_mill_area}
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.