Advertisement:

Author Topic: Clickable telephone number  (Read 1289 times)

Offline njtweb

  • Full Member
  • ***
  • Posts: 584
Clickable telephone number
« on: May 16, 2018, 03:06:45 PM »
I searched the mods and didn't see anything for this, unless there is one with a different name. Is there a bbcode to make a telephone number clickable from a mobile or tablet without using admin html tags?

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 57,367
  • Gender: Male
    • Kindred-999 on GitHub
Re: Clickable telephone number
« Reply #1 on: May 16, 2018, 05:00:59 PM »
no.


that would not be on the server side, anyway...  that would be on the client side of things (like, if you have Skype turned on and the number-recognizer active)
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 50,098
Re: Clickable telephone number
« Reply #2 on: May 16, 2018, 05:32:23 PM »
https://developers.google.com/web/fundamentals/native-hardware/click-to-call/

looks like you could possibly create a new bbc tag to support that.

Offline njtweb

  • Full Member
  • ***
  • Posts: 584
Re: Clickable telephone number
« Reply #3 on: May 16, 2018, 10:06:39 PM »
https://developers.google.com/web/fundamentals/native-hardware/click-to-call/

looks like you could possibly create a new bbc tag to support that.

Don't know anything about that but I'll try. I remember way back in 2007 I ran a vbulletin site and we made bbcodes in the in admin interface for everything like all of the various sports sites embedded media, podcasts and such. It was actually a part of vbulletin. I'll research how to do it in SMF.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,397
  • Riding the endless highway in the sky.
Re: Clickable telephone number
« Reply #4 on: May 16, 2018, 10:10:44 PM »
There's a mod you can use to create bbc tags, I'm using it on one of my forums.

https://custom.simplemachines.org/mods/index.php?mod=3864

Offline njtweb

  • Full Member
  • ***
  • Posts: 584
Re: Clickable telephone number
« Reply #5 on: May 17, 2018, 06:43:26 AM »
There's a mod you can use to create bbc tags, I'm using it on one of my forums.

https://custom.simplemachines.org/mods/index.php?mod=3864

Installed, we'll see how it goes. Do you have any tips especially somewhere where I can get instructions how to make configure my first one?

Offline njtweb

  • Full Member
  • ***
  • Posts: 584
Re: Clickable telephone number
« Reply #6 on: May 17, 2018, 07:55:59 AM »
Got it installed, configured the click to call bbc. Problem is I used used Illori's suggestion https://developers.google.com/web/fundamentals/native-hardware/click-to-call/ as an example. The example doesn't provide any kind of idea what to use as wildcards to format the phone number correctly. When you do a test it changes the phone number to the phone number in the example. I tried ?? ** as wildcards but that doesn't do anything either.

Online Gwenwyfar

  • Pirate valkyrie neko-chan
  • Lead Customizer
  • SMF Hero
  • *
  • Posts: 1,745
  • Gender: Female
    • Gwenwyfar on GitHub
Re: Clickable telephone number
« Reply #7 on: May 19, 2018, 07:31:01 PM »
What do you mean wildcards? Do you mean to ask variables? Your bbc should simply replace the phone number with the one used in the bbc.
No matter how lost you may become, you can always find your way back.                 
                                                                                                                                                                                                                                                                                                                      

Offline finnich

  • Newbie
  • *
  • Posts: 3
Re: Clickable telephone number
« Reply #8 on: May 19, 2018, 10:51:46 PM »
a wildcard is a symbol used to replace or represent one or more characters. Wildcards are typically either an asterisk (*), which represents one or more characters or question mark (?), which represents a single character.

Offline shawnb61

  • Support Specialist
  • Sophist Member
  • *
  • Posts: 1,008
    • sbulen on GitHub
Re: Clickable telephone number
« Reply #9 on: May 19, 2018, 11:32:28 PM »
Just as an FYI...  If basic html is enabled, this works in SMF2.1, but not in 2.0:
Code: [Select]
<a href="tel:14155555555">some text</a>
On cellphones, it dials.  On desktops, it will launch Skype or whatever your browser points those to. 


EDIT:  I think it's a pretty straightforward change to add support for tel: to 2.0...
« Last Edit: May 20, 2018, 12:40:41 AM by shawnb61 »
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline shawnb61

  • Support Specialist
  • Sophist Member
  • *
  • Posts: 1,008
    • sbulen on GitHub
Re: Clickable telephone number
« Reply #10 on: May 20, 2018, 12:36:57 AM »
I believe njtweb is wondering how to define a mask of sorts to define the phone # for substitution (I think we're talking more of a "mask" than a "wildcard" here). 

I don't think that mod is quite that detailed.  It appears to just use {option} & {content} as placeholders and do a simple substitution.

My guess is that you need to use a  type like:
Code: [Select]
[tag=option]content[/tag]
And html like:
Code: [Select]
<a href="tel:{content}">{option}</a>
And usage will look like:
Code: [Select]
[phone=georges number]4155555555[/phone]
Anything deeper than that, I think you'll need to go to the mod's support thread here:
https://www.simplemachines.org/community/index.php?topic=523396.0
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline njtweb

  • Full Member
  • ***
  • Posts: 584
Re: Clickable telephone number
« Reply #11 on: May 20, 2018, 11:44:35 AM »
Yes, a mask. Sorry not too versed in the lingo.

I tried adding <a href="tel:{content}">{option}</a> to the html field.


But this is all I get when I test{option}

Offline shawnb61

  • Support Specialist
  • Sophist Member
  • *
  • Posts: 1,008
    • sbulen on GitHub
Re: Clickable telephone number
« Reply #12 on: May 20, 2018, 11:51:16 AM »
Did the type you chose include content & option, as shown above?

The mod has a handy test link. 

Again - we're now deep into how to use the mod - further discussion on how to use the mod should take place on the mod support thread - so other users of the mod (who will be much more familiar with it...) can help:
https://www.simplemachines.org/community/index.php?topic=523396.0
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline njtweb

  • Full Member
  • ***
  • Posts: 584
Re: Clickable telephone number
« Reply #13 on: May 20, 2018, 01:13:57 PM »
I posted in that thread

Offline njtweb

  • Full Member
  • ***
  • Posts: 584
Re: Clickable telephone number
« Reply #14 on: May 20, 2018, 02:57:03 PM »