• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space

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