News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Clickable telephone number

Started by njtweb, May 16, 2018, 03:06:45 PM

Previous topic - Next topic

njtweb

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?

Kindred

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)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Illori


njtweb

Quote from: Illori 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.

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.

Sir Osis of Liver

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
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

njtweb

Quote from: Sir Osis of Liver 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

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?

njtweb

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.

Gwenwyfar

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.
"It is impossible to communicate with one that does not wish to communicate"

finnich

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.

shawnb61

#9
Just as an FYI...  If basic html is enabled, this works in SMF2.1, but not in 2.0:
<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...
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

shawnb61

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:
[tag=option]content[/tag]

And html like:
<a href="tel:{content}">{option}</a>

And usage will look like:
[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

njtweb

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}

shawnb61

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

njtweb



Advertisement: