• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

RM 1.0 A way to make external link open in a new window

rexxxy

Active member
#9
Where do you add it target="_blank" ?

Code:
<xen:title>{$resource.title}</xen:title>
 
<div class="updateContainer">
    <ol>
        <xen:include template="resource_update">
            <xen:set var="$showLimitedNotice">{xen:if $isLimited, 1}</xen:set>
        </xen:include>
    </ol>
</div>
 
<xen:if is="{$updates}">
    <div class="section updates">
        <h3 class="textHeading">{xen:phrase recent_updates}</h3>
        <ol>
        <xen:foreach loop="$updates" value="$update">
            <li><a href="{xen:link resources/update, $resource, 'update={$update.resource_update_id}'}">{$update.title}</a> <span class="postDate"><xen:datetime time="{$update.post_date}" /></li>
        </xen:foreach>
        </ol>
        <xen:if is="{$showReadAllUpdates}">
            <div class="moreLink"><a href="{xen:link resources/updates, $resource}">{xen:phrase read_all_x_updates, 'count={xen:number $resource.update_count}'}...</a></div>
        </xen:if>
    </div>
</xen:if>
 
<xen:if is="{$reviews}">
    <div class="section reviews">
        <h3 class="textHeading">{xen:phrase recent_reviews}</h3>
        <ol>
        <xen:foreach loop="$reviews" value="$review">
            <xen:include template="resource_review" />
        </xen:foreach>
        </ol>
        <xen:if is="{$showMoreReviews}">
            <div class="moreLink"><a href="{xen:link resources/reviews, $resource}">{xen:phrase read_all_x_reviews, 'count={xen:number $resource.review_count}'}...</a></div>
        </xen:if>
    </div>
</xen:if>
 

Jeremy

Well-known member
#10
template: resource_view_header
Code:
<xen:require css="resource_view_header.css" />
 
<div class="resourceInfo">
<xen:hook name="resource_view_header_info">
<a class="avatar Av{$resource.user_id}l" href="{xen:link members, $resource}">
<xen:avatar user="$resource" size="s" img="true" />
</a>
 
<xen:if hascontent="true">
<ul class="primaryLinks {xen:if '{$resource.is_fileless} AND !{$resource.external_purchase_url}', noButton}">
<xen:contentcheck>
<xen:if is="{$resource.external_purchase_url}">
<li><label class="downloadButton purchase">
<a href="{$resource.external_purchase_url}" target="_blank" class="inner">
{xen:phrase buy_now_for_x, 'cost={$resource.cost}'}
</a>
</label></li>
<xen:elseif is="!{$resource.is_fileless}" />
<li><label class="downloadButton {xen:if '!{$resource.canDownload}', downloadDisabled}">
<a href="{xen:link resources/download, $resource, 'version={$resource.current_version_id}'}" class="inner">
<xen:if is="{$resource.canDownload}">{xen:phrase download_now}<xen:else />{xen:phrase download_not_available}</xen:if>
<xen:if is="{$resource.download_url}">
<small class="minorText">{xen:phrase via_external_site}</small>
<xen:else />
<small class="minorText">{xen:number $resource.attachment.file_size, 'size'} .{$resource.attachment.extension}</small>
</xen:if>
</a>
</label></li>
</xen:if>
 
<xen:hook name="resource_view_header_after_resource_buttons" />
 
<xen:if is="{$resource.canWatch}">
<li><a href="{xen:link resources/watch, $resource}" class="OverlayTrigger" data-cacheoverlay="false"><xen:if is="{$resource.is_watched}">{xen:phrase unwatch_this_resource}<xen:else />{xen:phrase watch_this_resource}</xen:if></a></li>
</xen:if>
</xen:contentcheck>
</ul>
</xen:if>
 
<h1><xen:if is="{$titleHtml}">{xen:raw $titleHtml}<xen:else />{$resource.title}</xen:if> <xen:if is="!{$resource.isFilelessNoExternal}"><span class="muted">{$resource.version_string}</span></xen:if></h1>
<xen:if is="{$resource.tag_line} OR {$extraDescriptionHtml}"><p class="tagLine muted">{$resource.tag_line}<xen:if is="{$resource.tag_line} AND {$extraDescriptionHtml}"><br /></xen:if>{xen:raw $extraDescriptionHtml}</p></xen:if>
</xen:hook>
</div>
 
<xen:hook name="resource_view_header_after_info" />
 
<xen:if is="{$resource.resource_state} != 'visible'">
<ul class="secondaryContent resourceAlerts">
<xen:if is="{$resource.resource_state} == 'deleted'">
<li class="deletedAlert">
<span class="icon"></span>
{xen:phrase this_resource_has_been_deleted}
<xen:if is="{$resource.delete_user_id}">
{xen:phrase deleted_by_x, 'name={xen:helper username, {xen:array "user_id={$resource.delete_user_id}", "username={$resource.delete_username}"}}'}, <xen:datetime time="{$resource.delete_date}" /><xen:if is="{$resource.delete_reason}">, {xen:phrase reason}: {$resource.delete_reason}</xen:if>.
</xen:if>
</li>
</xen:if>
<xen:if is="{$resource.resource_state} == 'moderated'">
<li class="moderatedAlert">
<span class="icon"></span>
{xen:phrase this_resource_is_currently_awaiting_approval}
</li>
</xen:if>
</ul>
</xen:if>
Added in there...
 

Jeremy

Well-known member
#12
This is why you moderate and I program things. :whistle: I swear I've seen Jake post code where additions are colored, but I can't seem to get that to work. *oh well, back to eCommerce sites*
 

Brogan

XenForo moderator
Staff member
#13
Code:
<xen:require css="resource_view_header.css" />
 
<div class="resourceInfo">
<xen:hook name="resource_view_header_info">
<a class="avatar Av{$resource.user_id}l" href="{xen:link members, $resource}">
<xen:avatar user="$resource" size="s" img="true" />
</a>
Like that?

;)

[code=rich]