Posted on: 02/02/07 12:02pm
By: webeddy
I am trying to put mailto: links in the stories, but when you click on them they always refer to the url.
For example if I put the email address in without using the link editor the link goes to:
http://www.seattlewcswing.org/site/Tickets@Seattlewcswing.com
If I use the built in link editor and choose the email option this shows in the story on the web page
mailto:debbiefloyd@seattlewcswing.org
BUT this is where the link goes.
http://www.seattlewcswing.org/site/debbiefloyed@seattlewcswing.org
I tried writing the mailto link in the code, but mailto: gets stripped out when you save the story and it doesn't work.
Is there a way to fix this so I can use mailto: in stories?
Re: mailto: links don't work in stories - mailto: tag gets stripped out
Posted on: 02/02/07 12:41pm
By: webeddy
Ok I figured it out myself. Just add mailto to this line.
// list of protocols that are allowed in links
$_CONF['allowed_protocols'] = array ('http', 'https', 'ftp','mailto'
;
Although that leads to another question. How can I allow PayPal buttons so I can put buy now buttons directly into a story?
Re: mailto: links don
Posted on: 02/02/07 01:46pm
By: Dirk
Quote by: webeddyHow can I allow PayPal buttons so I can put buy now buttons directly into a story?
Just use the HTML code that PayPal provides. You may have to allow a few more HTML tags and attributes, though. See
Why does Geeklog remove certain HTML tags?
bye, Dirk
Re: mailto: links don't work in stories - mailto: tag gets stripped out
Posted on: 02/02/07 01:56pm
By: webeddy
Ok I see where to do it. Would I just have to allow the form tag? Like this?
$_CONF['admin_html']['form'] = array ();
Or would you have to expand it to include all of the form inputs?
Re: mailto: links don
Posted on: 02/04/07 01:44pm
By: Dirk
Text Formatted Code
$_CONF['admin_html'] = array (
...
'form' => array ('action' => 1, 'method' => 1),
...
Similar for the input - list the tag on the left side, then all the attributes on the right. See the tags/attributes that are already there in config.php
bye, Dirk
Re: mailto: links don't work in stories - mailto: tag gets stripped out
Posted on: 02/04/07 03:23pm
By: Anonymous (webeddy)
thanks, I added the last line to this section and it works perfectly. Below I put a few notes for those who are not programmers (which I am not. I figure if I had the problem the next person to need this will find the same problems. Sorry if it's obvious to the highly trained among us.)
$_CONF['admin_html'] = array (
'p' => array('class' => 1, 'id' => 1, 'align' => 1),
'div' => array('class' => 1, 'id' => 1),
'span' => array('class' => 1, 'id' => 1),
'table' => array('class' => 1, 'id' => 1, 'width' => 1, 'border' => 1,
'cellspacing' => 1, 'cellpadding' => 1),
'tr' => array('class' => 1, 'id' => 1, 'align' => 1, 'valign' => 1),
'th' => array('class' => 1, 'id' => 1, 'align' => 1, 'valign' => 1,
'colspan' => 1, 'rowspan' => 1),
'td' => array('class' => 1, 'id' => 1, 'align' => 1, 'valign' => 1,
'colspan' => 1, 'rowspan' => 1),
'form' => array ('action' => 1, 'method' => 1, 'target' => 1, 'input ' => 1, 'type' => 1, 'name' => 1, 'value' => 1, 'image' => 1, 'src' => 1, 'border' => 1, 'alt' => 1)
);
1. Be sure everything that will appear between the form tags will be in included in the array - including image, even though it may be accounted for elsewhere..
2. Make sure the last line does not have a comma after it.
3. When you paste the paypal code do it in the text editor not the html window. (although that kind of works and someone could probably figure out how to allow it, I just don't know enough to say how.)
Thanks again for your help, and I hope this helps the next person with the same problem get a quick answer.
Re: mailto: links don
Posted on: 02/04/07 03:30pm
By: Dirk
Quote by: webeddy
'form' => array ('action' => 1, 'method' => 1, 'target' => 1, 'input ' => 1, 'type' => 1, 'name' => 1, 'value' => 1, 'image' => 1, 'src' => 1, 'border' => 1, 'alt' => 1)
);
I'm afraid that's wrong. <input> is a separate tag, so it needs its own entry:
Text Formatted Code
'form' => array ('action' => 1, 'method' => 1),
'input' => array ('type' => 1, 'name' => 1, 'value' => 1),
and so on (I didn't include all the attributes you may need).
bye, Dirk