How can I call the News-Tag from User defined Tag
Posted: Mon Nov 10, 2014 8:54 am
I am trying to create a tamplate to distinguish between a mobile and a desktop user. For the mobile version I don't want to show the News, so I made a user defined tag to check on mobiles but from the tag I can't echo the {news} tag. It will only show the tag as text.
How can I use the {news} tag from another tag?
My version of CMSMS is 1.11.4 (Fernandia)
Thanks in advance
How can I use the {news} tag from another tag?
My version of CMSMS is 1.11.4 (Fernandia)
Thanks in advance
Code: Select all
$isMobile = (bool)preg_match('#\b(ip(hone|od)|android\b.+\bmobile|opera m(ob|in)i|windows (phone|ce)|blackberry'.
'|s(ymbian|eries60|amsung)|p(alm|rofile/midp|laystation portable)|nokia|fennec|htc[\-_]'.
'|up\.browser|[1-4][0-9]{2}x[1-4][0-9]{2})\b#i', $_SERVER['HTTP_USER_AGENT'] );
if($isMobile==false)
{
echo"<div id='right'></div>";
echo"<div id='right_2'></div> ";
echo"<h2 style='text-align: left; text-indent: 8px;'><a href = 'http://Mywebsite/index.php?page=news'> News</a></h2>";
echo"<p> </p>";
[color=#FF8000]echo"<div id='news'></div>{news number='4'}";[/color]
}