• This forum is for release discussion only. Discussions that do not relate specifically to the resource release should be discussed in another, more appropriate forum.
  • This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Convenient & clean user edit menu for thread view

Vincent

Well-known member
Can we pretend that even that confuses me?

Cause it does :(
To have the window with a scrollbar you just need to add
Code:
 target="_blank"
after the
Code:
<a
tag.

Example:
Code:
<a href="yoursite.com">
->

Code:
<a href="yoursite.com" target="_blank">
 
So in this:
Code:
<li><a style ="cursor: pointer" onClick="window.open('admin.php?users/{$user.user_id}/edit','edit','width=1000,height=850')"><b>Edit User</b></a></li>
<li><a style ="cursor: pointer" onClick="window.open('admin.php?users/{$user.user_id}/avatar','edit','width=1000,height=650')"><b>Edit Avatar</b></a></li>
<li><a style ="cursor: pointer" onClick="window.open('admin.php?banning/users/{$user.user_id}/add','ban','width=1000,height=650')"><b>Ban User</b></a></li>
do I put the
Code:
href="yoursite.com" target="_blank"
before, after, or instead of
Code:
 style ="cursor: pointer" onClick="window.open('admin.php?users/{$user.user_id}/edit','edit','width=1000,height=850')"><b>Edit User
 

James

Well-known member
Code:
<li><a href="admin.php?users/{$user.user_id}/edit" target="_blank"><b>Edit User</b></a></li>
Take the contents of the window.open (the link) and put into a href="", then remove the style and onClick attributes.
The above is how the first one should be.
 
Code:
<li><a href="admin.php?users/{$user.user_id}/edit" target="_blank"><b>Edit User</b></a></li>
Take the contents of the window.open (the link) and put into a href="", then remove the style and onClick attributes.
The above is how the first one should be.
When I replace my existing Edit user line with the one in your quote, I stop getting a new window, and in the new tab I just get a page not found error.
 
use {xen:link 'admin.php?users/{$user.user_id}/edit'} instead.
I tried:

Code:
<li><a href="xen:link 'admin.php?users/{$user.user_id}/edit" target="_blank"><b>Edit User</b></a></li>
and got
Firefox doesn't know how to open this address, because the protocol (xen) isn't associated with any program.
So I assume I'm still doing something wrong.
 

James

Well-known member
Try this:
Code:
<li><a href="{xen:link 'admin.php?users/{$user.user_id}/edit}" target="_blank"><b>Edit User</b></a></li>
 

James

Well-known member
Woops, forgot the closing single quote:
Code:
<li><a href="{xen:link 'admin.php?users/{$user.user_id}/edit'}" target="_blank"><b>Edit User</b></a></li>
 
Woops, forgot the closing single quote:
Code:
<li><a href="{xen:link 'admin.php?users/{$user.user_id}/edit'}" target="_blank"><b>Edit User</b></a></li>
Xenforo takes it, but back to requested page cannot be found.

Edit: appreciating all the help, btw.
 

dutchbb

Well-known member
This works for me:

Code:
<!-- Start Template Mod :: Edit User Menu by dutchbb -->
<xen:if is="{$visitor.is_admin}">
	<div class="Popup">
		<span style="display:inline" rel="Menu"><xen:username user="$user" itemprop="name" rich="true" style="display:inline" /></span>
		<div class="Menu JsOnly formPopup">
			<ul class="secondaryContent blockLinksList">
				<li><a href="admin.php?users/{$user.user_id}/edit" target="_blank"><b>Edit User</b></a></li>
				<li><a href="admin.php?users/{$user.user_id}/avatar" target="_blank"><b>Edit Avatar</b></a></li>
				<li><a href="admin.php?banning/users/{$user.user_id}/add" target="_blank"><b>Ban User</b></a></li>
			</ul>
		</div>
	</div>
<xen:else />
	<xen:username user="$user" itemprop="name" rich="true" />
</xen:if>
<!-- End Template Mod :: Edit User Menu by dutchbb -->
 
This works for me:

Code:
<!-- Start Template Mod :: Edit User Menu by dutchbb -->
<xen:if is="{$visitor.is_admin}">
<div class="Popup">
<span style="display:inline" rel="Menu"><xen:username user="$user" itemprop="name" rich="true" style="display:inline" /></span>
<div class="Menu JsOnly formPopup">
<ul class="secondaryContent blockLinksList">
<li><a href="admin.php?users/{$user.user_id}/edit" target="_blank"><b>Edit User</b></a></li>
<li><a href="admin.php?users/{$user.user_id}/avatar" target="_blank"><b>Edit Avatar</b></a></li>
<li><a href="admin.php?banning/users/{$user.user_id}/add" target="_blank"><b>Ban User</b></a></li>
</ul>
</div>
</div>
<xen:else />
<xen:username user="$user" itemprop="name" rich="true" />
</xen:if>
<!-- End Template Mod :: Edit User Menu by dutchbb -->
Works for me too, thanks!

Now to wait for the overlay :D Good luck!
 

Mutt

Well-known member
ok here's mine. it's a variation of what's here & the links have been update. the ones in this thread weren't working for me.

if it's your post you see.

Screenshot_2.jpg

if it's anyone else's post. the bold items are only shown to the admin. I was not able to <xen:if is="{$canStartConversation}"> to work here though the quote post addon was handling it. i thought about using that part of the addon to insert the convo lines if they had permission but that seemed like a whole lot to check the viewers permissions for every single post so I just commented out that whole section from the addon.

Screenshot_3.jpg

Quote Post in Conversation addon


Code:
            <!-- Start Template Mod :: Edit User Menu -->
                <xen:if is="{$visitor.user_id}">
                    <div class="Popup">
                        <span style="display:inline" rel="Menu"><xen:username user="$user" itemprop="name" rich="true" style="display:inline" /></span>
                        <div class="Menu JsOnly formPopup">
                            <ul class="secondaryContent blockLinksList">
                                <xen:if is="{$visitor.user_id} != {$user.user_id}">
                                    <xen:if is="{$visitor.is_admin}">
                                        <li><a target="_blank" href="{xen:adminlink 'users/edit', $user}"><b>{xen:phrase edit_user}</b></a></li>
                                        <li><a target="_blank" href="{xen:adminlink 'users/avatar', $user}"><b>{xen:phrase edit_avatar}</b></a></li>
                                        <xen:if is="!{$user.is_banned}">
                                            <li><a target="_blank" href="{xen:adminlink banning/users/add, $user}"><b>{xen:phrase ban_user}</b></a></li>
                                        <xen:else />
                                            <li><a target="_blank" href="{xen:adminlink banning/users/lift, $user}"><b>{xen:phrase lift_ban}</b></a></li>
                                        </xen:if>
                                    </xen:if>
 
                                    <xen:if is="{$post.canWarn}">
                                        <li><a href="{xen:link members/warn, $post, 'content_type=post', 'content_id={$post.post_id}'}" class="item control warn"><span></span><b>{xen:phrase warn}</b></a></li>
                                    <xen:elseif is="{$post.warning_id} && {$canViewWarnings}" />
                                        <li><a href="{xen:link warnings, $post}" class="OverlayTrigger item control viewWarning"><span></span>{xen:phrase view_warning}</a></li>
                                    </xen:if>
                                    <xen:if is="{$post.canReport}">
                                        <li><a href="{xen:link posts/report, $post}" class="OverlayTrigger item control report" data-cacheOverlay="false"><span></span>{xen:phrase report}</a></li>
                                    </xen:if>
                         
                                        <li><a href="{xen:link conversations/add, '', 'to={$user.username}'}">{xen:phrase start_new_conversation}</a></li>
                                        <li><a href="{xen:link postconversation, $post}">{xen:phrase ragtek_quote_in_conversation}</a></li>
 
                                    <li><xen:follow user="$user" /> </li>
                                    <xen:if is="{xen:helper isIgnored, $user.user_id}"><li><a href="{xen:link members/unignore, $user}" class="FollowLink">{xen:phrase CrazYimProfileLinks_unignore_member}</a><xen:elseif is="{$canIgnore}" /><a href="{xen:link members/ignore, $user}" class="FollowLink">{xen:phrase CrazYimProfileLinks_ignore_member}</a></li></xen:if>
                                </xen:if>
                         
                                <li><a href="{xen:link 'members/{$user.username}.{$user.user_id}/'}">View Profile</a></li>
                                <li><a href="{xen:link 'search/member?user_id={$user.user_id}'}">Find All Posts</a></li>
                                <li><a href="{xen:link 'search/member?user_id={$user.user_id}&content=thread'}">Find All Threads</a></li>
 
                            </ul>
                        </div>
                    </div>
                <xen:else />
                    <xen:username user="$user" itemprop="name" rich="true" />
                </xen:if>
            <!-- End Template Mod :: Edit User Menu -->
 

Mutt

Well-known member
UPDATE: my <xen:if is="{$canStartConversation}"> workaround was to use <xen:if is="{xen:helper ismemberof, $visitor, 3,4,20,12,9,5}"> & enter all the usergroups that have permission to start conversations. now it only shows to the correct people.
 
Top