Page 1 of 1
User Link to open in new window?
Posted: Wed Mar 15, 2006 2:10 pm
by Brian1969
I don't know if I've changed something (I recently messed around with my comments.tpl file), but it used to be that a link given by someone in the comments form would open in a new window. Now, it opens in the same window.
This isn't a problem if a user is viewing comments on a specific post's URL, but if it's in the pop-up window, then you can see the problem.
What I want is for all user-links to open in a new window. I hope I'm explaining this enough, but what I mean is like this:
#2 User XXX (Link) on 2006-03-12 20:55
Where the bold Link opens in a new window.
Thanks!
Re: User Link to open in new window?
Posted: Wed Mar 15, 2006 2:26 pm
by garvinhicking
Hi!
You could edit your comments.tpl file and replace this:
Code: Select all
(<a class="comment_source_url" href="{$comment.url}" title="{$comment.url|@escape}">Link</a>)
with this:
Code: Select all
(<a target=_blank class="comment_source_url" href="{$comment.url}" title="{$comment.url|@escape}">Link</a>)
HTH,
Garvin
Not seeing it
Posted: Wed Mar 15, 2006 2:33 pm
by Brian1969
This is the code that is currently in my comments.tpl file:
{foreach from=$comments item=comment}
<a id="c{$comment.id}"></a>
<div id="serendipity_comment_{$comment.id}" class="serendipity_comment serendipity_comment_author_{$comment.author|@makeFilename} {if $entry.author == $comment.author}serendipity_comment_author_self{/if}" style="padding-left: {$comment.depth*20}px">
<div class="serendipity_commentBody">{$comment.body}</div>
<div class="serendipity_comment_source">
<a href="#c{$comment.id}" title="Link to comment #{$comment.trace}">#{$comment.trace}</a>
{if $comment.email}
<a href="mailto:{$comment.email}">{$comment.author|@default:$CONST.ANONYMOUS}</a>
{else}
{$comment.author|@default:$CONST.ANONYMOUS}
{/if}
{if $comment.url}
(<a href="{$comment.url}" title="{$comment.url|@escape}">Link</a>)
{/if}
{$CONST.ON}
{$comment.timestamp|@formatTime:$CONST.DATE_FORMAT_SHORT}
{if $entry.is_entry_owner}
(<a href="{$comment.link_delete}" onclick="return confirm('{$CONST.COMMENT_DELETE_CONFIRM|@sprintf:$comment.id:$comment.author}');">delete</a>)
{/if}
{if $entry.allow_comments}
(<a href="#serendipity_CommentForm" id="serendipity_reply_{$comment.id}" onclick="document.getElementById('serendipity_replyTo').value='{$comment.id}'; {$comment_onchange}">{$CONST.REPLY}</a>)
<div id="serendipity_replyform_{$comment.id}"></div>
{/if}
</div>
</div>
{foreachelse}
<div class="serendipity_center">{$CONST.NO_COMMENTS}</div>
{/foreach}
I don't see where I'm supposed to modify. =D
Posted: Wed Mar 15, 2006 2:50 pm
by Brian1969
Nevermind. I figured it out. Thanks!
Re: Not seeing it
Posted: Wed Mar 15, 2006 3:52 pm
by garvinhicking
Modify this:
Code: Select all
(<a href="{$comment.url}" title="{$comment.url|@escape}">Link</a>)
Regards,
Garvin