GriefCode Posted September 2, 2015 Share Posted September 2, 2015 Hey,im struggeling the issue to display a json field, taken from cm_credits:{{$credits=$comment->author()->cm_credits|@json_decode}} {$credits->GPH}Thats what i tried in various ways, but it seems like its not working.(GPH is a currency that i added, its virtual)How do i manage getting this working?Regards Link to comment Share on other sites More sharing options...
GriefCode Posted September 2, 2015 Author Share Posted September 2, 2015 No one? Link to comment Share on other sites More sharing options...
Jim M Posted September 2, 2015 Share Posted September 2, 2015 Are you able to output $credits ? If you're also decoding the output of the JSON stream it will be an array and you will need access your element appropriately. Link to comment Share on other sites More sharing options...
GriefCode Posted September 2, 2015 Author Share Posted September 2, 2015 No i am not able, due an error: Whoops \ Exception \ ErrorException (E_PARSE) syntax error, unexpected '$return' (T_VARIABLE) I'm getting more and more in a confused state with smarty and IPB. I tried researching everything around that, and each solution on stackoverflow is simply not working.Has IPB some kind of his own implemention of smarty? What is actually the smarty version? As example a solution which is posted on any available question is this: {assign var=credit value=$comment->author()->cm_credits|@json_decode} Does it work? No: So what am i doing wrong? Link to comment Share on other sites More sharing options...
TSP Posted September 3, 2015 Share Posted September 3, 2015 IPS is not actually using Smarty, to my knowledge. The theme syntax is just pretty much the exact same. Link to comment Share on other sites More sharing options...
GriefCode Posted September 3, 2015 Author Share Posted September 3, 2015 IPS is not actually using Smarty, to my knowledge. The theme syntax is just pretty much the exact same.Is there somewhere a documentation for that? Link to comment Share on other sites More sharing options...
GriefCode Posted September 4, 2015 Author Share Posted September 4, 2015 Hmm...no one? I don't like to bump topics like that but I want to complete my plugin Link to comment Share on other sites More sharing options...
Daniel F Posted September 4, 2015 Share Posted September 4, 2015 Take a look at our documentation Link to comment Share on other sites More sharing options...
GriefCode Posted September 4, 2015 Author Share Posted September 4, 2015 Take a look at our documentation Thanks for that. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.