Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Gal Lachiany Posted October 22, 2015 Posted October 22, 2015 How use PHP in Templates (for example: gstats) I tried to make SQL execution and get some info from Database but <php> and {php} are not working. Let me know how can I use PHP tags and functions inside of your templates. Thanks You Guys.
Adriano Faria Posted October 22, 2015 Posted October 22, 2015 {{$var = 'something';}} But you're not supposed to run queries on templates in 4.0. You better extend any file and display the results, like this. <ips:template parameters="$comment" /> {{$date = \IPS\Member::loggedIn()->GetDateDifference( $comment->author()->joined );}} <span data-ipsTooltip data-ipsTooltip-label="{lang="ejd_joined"}"> <li class="ipsType_light{{if \IPS\Settings::i()->ejd_smallfonts}} ipsType_small{{endif}}"><i class="fa fa-sign-in fa-lg"></i> {{if \IPS\Settings::i()->ejd_format == 1}} {datetime="$comment->author()->joined"} {{else}} {$date} {{endif}} </li> </span> On this plugin I exteded the \IPS\Members ( GetDateDifference ).
Gal Lachiany Posted October 23, 2015 Author Posted October 23, 2015 On 22.10.2015, 16:17:35, Adriano Faria said: {{$var = 'something';}} But you're not supposed to run queries on templates in 4.0. You better extend any file and display the results, like this. <ips:template parameters="$comment" /> {{$date = \IPS\Member::loggedIn()->GetDateDifference( $comment->author()->joined );}} <span data-ipsTooltip data-ipsTooltip-label="{lang="ejd_joined"}"> <li class="ipsType_light{{if \IPS\Settings::i()->ejd_smallfonts}} ipsType_small{{endif}}"><i class="fa fa-sign-in fa-lg"></i> {{if \IPS\Settings::i()->ejd_format == 1}} {datetime="$comment->author()->joined"} {{else}} {$date} {{endif}} </li> </span> On this plugin I exteded the \IPS\Members ( GetDateDifference ). I have no idea how to do it, you'll make me pay you?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.