View Full Version : Comment author link - target _blank?
fauxtog
05-12-2005, 02:29 AM
I don't know why anyone would want the link on a commentors name to open in the same little window as the comments, but for some reason a lot of templates do this. It's just weird, and wrong.
So, can someone tell me how to add a target=_blank tag to this link? I don't see the obvious way in the comments template because it's a form.
Here's my blog. Please take a look at my comments and let me know what you think.
http://fauxtoblog.com
I love visiting the blogs of my commentors, but it would be nice not to have to right click to open in a new window or tab.
Oh, and one other tiny thing. When it saves the user info in the comments box, it doesn't save the email address, it just shows the <VINFO_EMAIL> tag.
Connie
05-12-2005, 05:50 AM
1) you can add the following code to your comment-page:
<base target="_blank" />
and all links will go to an empty window
2)
which version of PixelPost
which template
we have no magic cristall ball :lol:
fauxtog
05-12-2005, 06:25 AM
All that info is right on the front page, but I forgot to turn off my crystal ball viewing plug-in. :-) I'll put it here though if you can't see my blog.
Pixelpost 1.3
Visual Experience template, changed quite a bit by me, but I didn't change the comments template other than colors.
Where would I put that tag in the source code?
Connie
05-12-2005, 08:50 AM
you must not change the source-code at all
place this info <base target="_blank"> into the comment_template.html before </head>
like this:
<head>
<meta .....>
<meta ....>
<base target="_blank">
</head>
tell me if it helps!
add target=_blank in (includes/functions.php) line 20 (ver. 1.4.1)
like this
$comment_name = "<a href='$comment_url' title='$lang_visit_homepage' target='_blank'>$comment_name</a>";
Connie
05-12-2005, 09:34 AM
no, includes/function.php does not exist in Version 1.3
it is something in the main index.php, but the <base--> in the header should be enought
fauxtog
05-12-2005, 03:14 PM
Thanks Connie. That did the trick.
Could you leave me a comment and see if upon return your email address is saved? I'm still having that problem.
fauxtog
05-12-2005, 04:01 PM
I think the solution with the blank target might be confusing to some people. The problem now is that the submit button opens a new window and when you close it, it appears that your comment was not saved. I'm afraid people will click submit again and again and again...
Joe[y]
05-12-2005, 04:03 PM
also, as PP was made into valid xHTML the target=_blank is not valid xHTML.
Connie
05-12-2005, 04:15 PM
@Jspurling,
here we talk about PixelPost 1.3
at that time not everything was XHTML
@fauxtog,
the commentator's email is not existent in PP 1.3, so nothing will be saved and the tag will not be interpreted
I think, you should upgrade maybe
Joe[y]
05-12-2005, 04:21 PM
fuaxtog: in reply to your email name. perhaps you installed the addon for commenters e-mail addy at some point? check that it is still in your directory!
fauxtog
05-12-2005, 04:33 PM
I just started this photoblog two months ago and it seems that I'm way behind already. I didn't even realize that there was a newer version. How hard is it to upgrade?
Also. I keep hearing this same thing about XHTML and the target=_blank, but I've never heard anyone say what it's been replaced with. I mean surely there's a way for a link to open in a new window in XHTML. Right?
Joe[y]
05-12-2005, 04:51 PM
there are ways through javascript but it defeats the point of using xHTML. W3C implemented this new rule because of the huge influx of smaller portable browsers that can't handle more than one window at a time...
fauxtog
05-12-2005, 07:06 PM
OK, I understand. So why is a photoblog software using xHTML then, if I would imagine it's rarely viewed on these smaller browsers? I mean, removing the ability to open links in another browser (without right clicking or special keystrokes) seems like a major con for people using regular browsers. Why don't the smaller browsers just ignore the target blank tag?
I realize this is getting way off subject so it would be cool if someone chimed in on my questions above if they could.
Joe[y]
05-12-2005, 07:13 PM
using target_blank is an effective method. xHTML standards are not a matter of pixelpost but of the template.
fauxtog
05-12-2005, 07:29 PM
I'm sorry. I'm just misunderstanding all of this then. I took your statements, "...as PP was made into valid xHTML the target=_blank is not valid xHTML" and "there are ways through javascript but it defeats the point of using xHTML" as you saying that we shouldn't be using the blank tag because it's not valid and defeats the purpose. I guess I'm taking you too literally.
So, that being said. What do you feel would be the best method of getting my author links to open in a new window and my "Submit comment" button to NOT open in a new window?
Also, I thought the last template I was using saved the email address of commentors, but maybe I'm wrong about that. Is there a way for me to get that to work too?
Joe[y]
05-12-2005, 07:41 PM
add target=_blank in (includes/functions.php) line 20 (ver. 1.4.1)
like this
$comment_name = "<a href='$comment_url' title='$lang_visit_homepage' target='_blank'>$comment_name</a>";
as 'she' said - i agree this is the best way but i obviously aren't meant to be encouraging you edit the index.php file!
www.chromasia.com uses a good systen that opens the commenters homepages in the original window where your site was.. i think this uses javascript.
as i said before in response to your email field - either update to 1.41 (i recommend this!) or check for your addon for email comments in your addons directory.
fauxtog
05-12-2005, 07:58 PM
Thanks JSpurling. The index.php fix did the trick perfectly. I really appreciate your help. One down, one to go.
You're correct. the email comments add on is not in the addons folder. I noticed that I can't get to the old add ons page as the site is under maintenance right now. Do you have a direct link to this addon I can get?
Joe[y]
05-12-2005, 08:07 PM
i'm afraid not. but as I said - upgrading your PP version would be a more sensible idea. I know it seems like a hassle and a waste of time but there are a lot of bug fixes in the new version and just as importantly a lot more intergrated features including comment email addresses ! :-P
if you don't want to upgrade then i'm afraid you'll have to wait until Blinking8s gets the site back up.
fauxtog
05-12-2005, 08:56 PM
I will indeed upgrade, but I just need to find the time to mess with it. I figured I go for the quick fix until then.
Thanks for all your help everyone.
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.