Results 1 to 8 of 8
  1. #1
    baldidiot is offline Private Member
    Join Date
    January 2010
    Posts
    5,010
    Thanks
    427
    Thanked 2,287 Times in 1,522 Posts

    Default How to show message on mobile devices only

    In light of Betfred's new mobile only £10 no deposit free bet I want to somehow show a message or banner only to users that are using a mobile device (eg: phone/tablet).

    Any bright ideas? These would be to go on non-mobile sites that are either responsive or have no mobile version. Ideally not a pop-up as I've found they get dismissed pretty easily, so preferable a banner that sits at the bottom of the screen (or something that I can use to insert a 'message' module at the start/end of articles).

    Note: Typo in subject - I meant to say "How to show message on mobile devices only"
    onlinegamblingwebsites.com - Formally known as goodbonusguide.

    Gambling Domains: Small clear out of some of the domains we've been hoarding on Dan - see the list here. Prices negotiable, and willing to swap for decent links.

  2. #2
    Scampi's Avatar
    Scampi is offline Private Member
    Join Date
    August 2013
    Posts
    855
    Thanks
    371
    Thanked 304 Times in 180 Posts

    Default

    Hi,
    Interesting question. I had a quick look and found this site: http://thepluginfactory.co/community...-devices-only/

    I haven't had a proper look at the plugin yet, but it looks pretty good.

  3. #3
    baldidiot is offline Private Member
    Join Date
    January 2010
    Posts
    5,010
    Thanks
    427
    Thanked 2,287 Times in 1,522 Posts

    Default

    Quote Originally Posted by Gambling Joe View Post
    Hi,
    Interesting question. I had a quick look and found this site: http://thepluginfactory.co/community...-devices-only/

    I haven't had a proper look at the plugin yet, but it looks pretty good.
    Cheers Joe. Ideally I'd like to avoid plugins if possibly - especially as a lot of my sites don't use wordpress... appreciate the suggestion though.
    onlinegamblingwebsites.com - Formally known as goodbonusguide.

    Gambling Domains: Small clear out of some of the domains we've been hoarding on Dan - see the list here. Prices negotiable, and willing to swap for decent links.

  4. #4
    Renee's Avatar
    Renee is offline Sponsor Affiliate Program
    Join Date
    August 2005
    Posts
    9,071
    Blog Entries
    6
    Thanks
    6,642
    Thanked 3,539 Times in 2,205 Posts

    Default

    Can you not just detect the user-agent and show the banner at the bottom of the screen based on that?

    I'm sure you could implement just a plain old banner overlay using CSS or something.
    __________________
    Renee, Affiliate Program Manager
    http://www.RewardsAffiliates.com
    Affiliate Program for CasinoRewards.com
    Best Affiliate Manager - CAP Awards 2008
    Best Casino Affiliate Manager - CAP Awards 2009
    Best Casino Affiliate Manager - iGB Affiliate Awards 2010

  5. #5
    TheGooner's Avatar
    TheGooner is offline Private Member
    Join Date
    March 2007
    Location
    New Zealand
    Posts
    4,458
    Thanks
    2,058
    Thanked 4,440 Times in 2,116 Posts

    Default

    Yes - "detecting the user-agent" is the term used to describe what you are looking for. Do a google search and get 1000's of results.

    It's not rocket science - but it's not straight-forward HTML either. You will have to use some programming (PHP or javascript) to check the request that the browser sends to determine if it's a mobile device. Then vary your page according to the results.

  6. The Following 4 Users Say Thank You to TheGooner For This Useful Post:

    Anthony-Coral (19 February 2014), louie.wilson (20 February 2014), Renee (18 February 2014), universal4 (17 February 2014)

  7. #6
    baldidiot is offline Private Member
    Join Date
    January 2010
    Posts
    5,010
    Thanks
    427
    Thanked 2,287 Times in 1,522 Posts

    Default

    Ah, cheers guys - I knew there was a way to do it but I just couldn't think of the correct terminology.

    Happy to play with a bit of java/php so I'll see what I can dish up!
    onlinegamblingwebsites.com - Formally known as goodbonusguide.

    Gambling Domains: Small clear out of some of the domains we've been hoarding on Dan - see the list here. Prices negotiable, and willing to swap for decent links.

  8. #7
    casinoplanet's Avatar
    casinoplanet is offline Private Member
    Join Date
    August 2009
    Location
    LowLands
    Posts
    371
    Thanks
    103
    Thanked 125 Times in 83 Posts

    Default

    I would suggest a responsive solution, by using a media query in css.

    Example of a media query in the css file, using a class which will only show on screens smaller than 500px:
    @media screen and (min-width: 500px) {
    .mobile {display: none;}}

    Then add the class "mobile" to the website section or div which is intended for mobile visitors and you're done. The offer will only be visible for visitors on small screens. Of course you can adjust the width and also add more of these criteria for eg small phones, regular phones, tablets etc.
    "Depend on the rabbit's foot if you like, but remember it didn't work for the rabbit." R.E. Shay

  9. #8
    baldidiot is offline Private Member
    Join Date
    January 2010
    Posts
    5,010
    Thanks
    427
    Thanked 2,287 Times in 1,522 Posts

    Default

    Quote Originally Posted by casinoplanet View Post
    I would suggest a responsive solution, by using a media query in css.

    Example of a media query in the css file, using a class which will only show on screens smaller than 500px:
    @media screen and (min-width: 500px) {
    .mobile {display: none;}}

    Then add the class "mobile" to the website section or div which is intended for mobile visitors and you're done. The offer will only be visible for visitors on small screens. Of course you can adjust the width and also add more of these criteria for eg small phones, regular phones, tablets etc.
    Cheers, I'll give this a go also!
    onlinegamblingwebsites.com - Formally known as goodbonusguide.

    Gambling Domains: Small clear out of some of the domains we've been hoarding on Dan - see the list here. Prices negotiable, and willing to swap for decent links.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •