• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

Switch banner

kztmkz

Chevereto Member
I would like to switch banners after checking access from PC or smart phone.

Check mobile

functionis_mobile(){
$useragents=array(
'iPhone',// iPhone
'iPod',// iPod touch
'Android', // 1.5+ Android
'dream', // Pre 1.5 Android
'CUPCAKE', // 1.5+ Android
'blackberry9500',// Storm
'blackberry9530',// Storm
'blackberry9520',// Storm v2
'blackberry9550',// Storm v2
'blackberry9800',// Torch
'webOS', // Palm Pre Experimental
'incognito', // Other iPhone browser
'webmate'// Other iPhone browser
);
$pattern='/'.implode('|',$useragents).'/i';
returnpreg_match($pattern,$_SERVER['HTTP_USER_AGENT']);
}


Please create mobile banner field on dashboard and database.
And tweak display banner code on template.


Thank you.
 
You should use an ad server at your end that it will siwtch banners for you. Is not smart to switch banners in the display page itself.
 
Back
Top