Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-04-22 15:12:41
- Ruhh
- Member

- From: dakota dunes
- Registered: 2008-01-20
- Posts: 305
http and www
Sometimes I get URLs without the http:// in the website field of the comments. Is there a way to give in the http:// when there is none so I would not have to go edit the comment and put the http:// in the URL?
<txp:Ruhh />
Offline
Re: http and www
textpattern adds the http if not there so you do not have to worry about it.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#3 2008-04-22 16:42:08
- Ruhh
- Member

- From: dakota dunes
- Registered: 2008-01-20
- Posts: 305
Re: http and www
Really? It doesn’t for me. It adds the whole site URL then the commentator’s website when there is no http.
<txp:Ruhh />
Offline
Re: http and www
Sarah, can you provide an exact example of what a commenter submits (in the URL field) and how that looks on the comments tab and on the website in the list of comments?
Which version of TXP are you using?
Offline
#5 2008-04-22 17:03:39
- Ruhh
- Member

- From: dakota dunes
- Registered: 2008-01-20
- Posts: 305
Re: http and www
Example: www.domain.com
That is what I get from a commentator in the Comments tab and I am using the latest version, 4.0.6.
<txp:Ruhh />
Offline
Re: http and www
Yiannis, do you have a TXP version that automatically adds the http:// part if it’s missing?
Mine doesn’t. Should be easy to fix by automatically correcting the URLs when they are submitted.
Offline
Re: http and www
Mine doesn’t add it (the “http://”) to the database, but when the URL is output by a txp tag, it is done correctly.
In other words, in my installation, it doesnt care if commenters add the “http://” or not (and so, it’s saved with or without it). When the link is rendered on the comment, it works (that is, the “http://” part is added if missing).
Offline
Re: http and www
The txp:comment_name tag does that correctly when using the URL in the link, but the txp:comment_web tag simply outputs the URL as entered, which is not very consistent behaviour.
Last edited by ruud (2008-04-22 17:46:22)
Offline
#9 2008-04-22 17:47:20
- Ruhh
- Member

- From: dakota dunes
- Registered: 2008-01-20
- Posts: 305
Re: http and www
I am assuming the http:// is only added when it’s like domain.com but if it’s www.domain.com, the http:// won’t be added.
I am using the comment name tag with link=1 or without it, doesn’t matter because it’s on by default already.
Last edited by Ruhh (2008-04-22 17:48:51)
<txp:Ruhh />
Offline
Re: http and www
It doesn’t matter if the domain starts with www.
<txp:comment_name /> always makes sure that domain starts with http:// and if not, it’s added automatically.
Are you absolutely, 100% sure that you’re using comment_name and not comment_web? If this happens with comment_name, I’d like to see an URL that demonstrates the problem and a tag trace.
Offline
#11 2008-04-22 18:43:30
- Ruhh
- Member

- From: dakota dunes
- Registered: 2008-01-20
- Posts: 305
Re: http and www
I am positive. When a commentator enters www.domain.com, I get the whole site url plus the commentator’s url. For example: http://mydomain.com/www.commentatordomain.com
I have edited the commentator’s URL but if I get it again, I will provide you a screenshot.
<txp:Ruhh />
Offline
Re: http and www
Can you post a tag trace and the template/form used for displaying comments?
Offline
#13 2008-04-22 19:23:38
- Ruhh
- Member

- From: dakota dunes
- Registered: 2008-01-20
- Posts: 305
Re: http and www
tag trace? well, here is the form used for displaying comments:
<div class="<txp:sed_get_comment_class />">
<txp:comment_anchor />
<txp:glx_gravatar size="50" default="http://i253.photobucket.com/albums/hh62/withouts/stuff/gdefault.png" class="gravatar" />
<b><txp:sed_comment_time class="comment-time" format="%b %e" /></b><br />
<txp:comment_name link="1" /> commented <font color="#777777">(<txp:htn_comment_count_user /> times)</font><br />
<div class="article">
<txp:comment_message />
</div>
#<txp:sed_comment_number/> <txp:rah_commentquoting_js />
<br />
</div>
<br />
<txp:Ruhh />
Offline
#14 2008-04-22 20:14:45
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: http and www
Offline
#15 2008-04-22 21:13:40
- Ruhh
- Member

- From: dakota dunes
- Registered: 2008-01-20
- Posts: 305
Re: http and www
Oh ok. Well I don’t quite understand it but here is what I got:
<!-- txp tag trace:
[SQL (0.000903): select name, data from txp_lang where lang='en-us' AND ( event='public' OR event='common')]
[SQL (0.000579): select name, code, version from txp_plugin where status = 1]
[SQL (0.000091): select ID,Section from textpattern where url_title like 'tapping-keys' AND Section='post' and Status >= 4 limit 1]
[SQL (0.000253): select name from txp_section where `name` like 'post' limit 1]
[SQL (0.000057): select name from txp_category where `name` like 'tapping-keys' limit 1]
[SQL (0.000053): select name from txp_category where `name` like 'tapping-keys' limit 1]
[SQL (0.000054): select name from txp_section where `name` like 'post' limit 1]
[SQL (0.000406): select * from txp_section where name = 'post' limit 1]
[SQL (0.000459): select *, unix_timestamp(Posted) as uPosted from textpattern where ID=42 and Status in (4,5)]
[article 42]
[SQL (0.000228): select ID, Title, url_title, unix_timestamp(Posted) as uposted
from textpattern where Posted > '2008-04-20 19:13:50' and Section = 'post' and Status=4 and Posted < now() order by Posted asc limit 1]
[SQL (0.000490): select ID, Title, url_title, unix_timestamp(Posted) as uposted
from textpattern where Posted < '2008-04-20 19:13:50' and Section = 'post' and Status=4 and Posted < now() order by Posted desc limit 1]
[SQL (0.000050): select host from txp_log where ip='24.117.179.121' limit 1]
[SQL (0.000051): select user_html from txp_page where name='default']
-->
Last edited by Ruhh (2008-04-22 22:02:30)
<txp:Ruhh />
Offline