Clickable Phone Number in Contacts
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
-
- Joomla! Apprentice
- Posts: 41
- Joined: Tue Mar 18, 2008 9:02 pm
Clickable Phone Number in Contacts
When using the standard contact component in 1.6, how can I make the phone numbers clickable when viewing via mobile browser?
Thanks
Thanks
-
- Joomla! Guru
- Posts: 869
- Joined: Sun Feb 14, 2010 2:47 am
- Contact:
-
- Joomla! Apprentice
- Posts: 41
- Joined: Tue Mar 18, 2008 9:02 pm
Re: Clickable Phone Number in Contacts
Maybe have a look at my original postkina wrote:Maybe have a look at : http://www.phonemashup.com/f476528/ifby ... la-drupal/
J1.5
I'm looking to edit the core component, not install a band-aid.1.6
-
- Joomla! Guru
- Posts: 869
- Joined: Sun Feb 14, 2010 2:47 am
- Contact:
Re: Clickable Phone Number in Contacts
I'll ignore the abuse. I said it was 1.5 - take a look. Hence I'm going no further with editing the core component. If you're so smart - do it yourself!
A better link for others who need this :
http://joomlatp.com/joomla-1.5-modules/ ... calls.html
Moderator Note: Please remember to keep discussions civil.
A better link for others who need this :
http://joomlatp.com/joomla-1.5-modules/ ... calls.html
Moderator Note: Please remember to keep discussions civil.
Last edited by Geoff on Sun Jun 19, 2011 12:31 am, edited 1 time in total.
Reason: Keep discussions civil.
Reason: Keep discussions civil.
-
- Joomla! Apprentice
- Posts: 41
- Joined: Tue Mar 18, 2008 9:02 pm
Re: Clickable Phone Number in Contacts
Hey guy stop spamming my thread, I'm running Joomla 1.6, hence why I'm in the J1.6 forum. Your links are for a module built for Joomla 1.5.kina wrote:I'll ignore the abuse. I said it was 1.5 - take a look. Hence I'm going no further with editing the core component. If you're so smart - do it yourself!
A better link for others who need this :
http://joomlatp.com/joomla-1.5-modules/ ... calls.html
Plus a module will not fix a core issue, maybe a plugin not a module.
As an edit, I just read the module description to the link above. That module adds a place for your customers to enter their phone number and have it auto call you.
This is not what I want to do. Maybe I was not clear in my first post. All I want is to have the phone numbers within a contact be clickable when viewing via a mobile web browser.
Doing google searches I find this code
Code: Select all
<a class="tel" href="tel:8001234567">(800) 123-4567</a>
If anyone has any ideas please reply.
FYI, this forum gets indexed fast. My post kept showing up in google when looking for the answer.
-
- Joomla! Apprentice
- Posts: 41
- Joined: Tue Mar 18, 2008 9:02 pm
Re: Clickable Phone Number in Contacts
In components/com_contact/views/contact/tmpl/default_address.php
I found this
I was hoping by modifying the few lines above, I could use
So I tried it, looks like this
But still not working. Any ideas?
I found this
Code: Select all
<span class="<?php echo $this->params->get('marker_class'); ?>" >
</span>
<span class="contact-webpage">
<a href="<?php echo $this->contact->webpage; ?>" target="_blank">
<?php echo $this->contact->webpage; ?></a>
</span>
Code: Select all
<a class="tel" href="tel:8001234567">(800) 123-4567</a>
Code: Select all
<?php if ($this->contact->mobile && $this->params->get('show_mobile')) :?>
<p>
<span class="<?php echo $this->params->get('marker_class'); ?>" >
<?php echo $this->params->get('marker_mobile'); ?>
</span>
<span class="contact-mobile">
<a href="tel:<?php echo $this->contact->mobile; ?>">
<?php echo $this->contact->mobile; ?></a>
</span>
</p>
-
- Joomla! Apprentice
- Posts: 41
- Joined: Tue Mar 18, 2008 9:02 pm
Re: Clickable Phone Number in Contacts
o Joomla and your awesome ability to have template overrides, I totally forgot about you.
By the way it does work above. I had to edit the override file. *facepalm* I'm a noob.
Anyways, if you are looking for this solution, here you go.
By the way it does work above. I had to edit the override file. *facepalm* I'm a noob.
Anyways, if you are looking for this solution, here you go.
- PhilD
- Joomla! Hero
- Posts: 2737
- Joined: Sat Oct 21, 2006 10:20 pm
- Location: Wisconsin USA
- Contact:
Re: Clickable Phone Number in Contacts
This works also:
but what purpose do you want it clickable? Firefox just pops up an error message saying I don't know what to do.
Code: Select all
<?php if ($this->contact->mobile && $this->params->get('show_mobile')) :?>
<p>
<span class="<?php echo $this->params->get('marker_class'); ?>" >
<?php echo $this->params->get('marker_mobile'); ?>
</span>
<span class="contact-mobile">
<a href="tel:<?php echo $this->contact->mobile; ?>">
<?php echo nl2br($this->contact->mobile); ?></a>
</span>
</p>
<?php endif; ?>
PhilD
-
- Joomla! Apprentice
- Posts: 41
- Joined: Tue Mar 18, 2008 9:02 pm
Re: Clickable Phone Number in Contacts
For viewing on a mobile device. Click the number to have it prop to call the number.