View Full Version : [SOLVED] User name options
Stratis
01-25-2017, 04:04 PM
Can some one please help me with this?
https://vborg.vbsupport.ru/attachment.php?attachmentid=155724&d=1485367101
When visitor clicks on the username in postbit... will see the three above options.
He cannot go further on because he must be register, but I want these three option not visible to visitors.
Where can I search for this, or how can I make it possible? Thanks in advanced
Kane@airrifle
01-25-2017, 05:20 PM
Maybe in style, postbit or postbit_legacy depending on which you use, find
<div class="username_container">
Under that is:
<vb:if condition="$post['userid']">
Change that to
<vb:if condition="$post['userid'] AND !$show['guest']">
That will have the effect of completely disabling the dropdown profile menu for guests
Caveat, have not tried this myself....
Stratis
01-26-2017, 06:28 AM
Kane
That's it. <vb:if condition="$post['userid']">
{vb:raw memberaction_dropdown}
I will try to find how to disable it, because I use there a <div class
so the above code you give changes take effect there to. Smaller letter show up to username and bold goes off
Thank you very much
Kane@airrifle
01-26-2017, 07:07 AM
Tested it now and see what you are saying about the CSS.
Also, there is one more place to hide the dropdown from guests and that is in threadbit, lastpostby...
More digging required I think.
Stratis
01-26-2017, 08:03 AM
Ok with postbit_legacy, I put some code required in mine postpit.css
and it is ok using your code above.
* Now as you say for threadbit, lastpostby I did not realize for that one, must find it :)
Thank you
Kane@airrifle
01-26-2017, 08:26 AM
Another more inelegant way would be to edit the memberaction_dropdown template
Replace default code with.
<div class="popupmenu memberaction<vb:if condition="$page_class"> {vb:raw page_class}</vb:if>">
<a class="username {vb:raw memberinfo.online} popupctrl" href="{vb:link member, {vb:raw memberinfo}}" title="{vb:rawphrase {vb:raw memberinfo['onlinestatusphrase']}, {vb:raw memberinfo.username}}"><strong><vb:if condition="$memberinfo['musername']">{vb:raw memberinfo.musername}<vb:else />{vb:raw memberinfo.username}</vb:if></strong></a>
<ul class="popupbody popuphover memberaction_body">
<vb:if condition="$show['member']">
<li class="left">
<a href="{vb:link member, {vb:raw memberinfo}}" class="siteicon_profile">
{vb:rawphrase view_profile}
</a>
</li>
<li class="right">
<a href="search.php?{vb:raw session.sessionurl}do=finduser&userid={vb:raw memberinfo.userid}&contenttype=vBForum_Post&showpo sts=1" class="siteicon_forum" rel="nofollow">
{vb:rawphrase view_forum_posts}
</a>
</li>
<vb:if condition="$show['pmlink']">
<li class="left">
<a href="private.php?{vb:raw session.sessionurl}do=newpm&u={vb:raw memberinfo.userid}" class="siteicon_message" rel="nofollow">
{vb:rawphrase private_message}
</a>
</li>
</vb:if>
<vb:if condition="$show['viewblog']">
<li class="right">
<a href="{vb:raw $vboptions.vbblog_url}{vb:if "$vboptions['vbblog_url']", '/', ''}blog.php?{vb:raw session.sessionurl}u={vb:raw memberinfo.userid}" class="siteicon_blog" rel="nofollow">
{vb:rawphrase view_blog_entries}
</a>
</li>
</vb:if>
<vb:if condition="$show['homepage']">
<li class="left">
<a href="{vb:raw memberinfo.homepage}" class="siteicon_homepage">
{vb:rawphrase visit_homepage}
</a>
</li>
</vb:if>
<vb:if condition="$show['viewarticles']">
<li class="right">
<a href="{vb:raw memberinfo.author_list_url}" class="siteicon_article" rel="nofollow">
{vb:rawphrase view_articles}
</a>
</li>
</vb:if>
<vb:if condition="$show['addfriend']">
<li class="left">
<a href="profile.php?{vb:raw session.sessionurl}do=addlist&userlist=buddy&u={vb :raw memberinfo.userid}" class="siteicon_add">
{vb:rawphrase add_as_contact}
</a>
</li>
</vb:if>
<vb:if condition="$show['emaillink']">
<li class="right">
<a href="sendmessage.php?{vb:raw session.sessionurl}do=mailmember&u={vb:raw memberinfo.userid}" class="siteicon_email">
{vb:rawphrase send_email}
</a>
</li>
</vb:if>
{vb:raw template_hook.memberaction_dropdown_items}
</ul></vb:if>
</div>
This will have the effect of blocking the whole UL to guests, everywhere.
Stratis
01-26-2017, 10:04 AM
This will have the effect of blocking the whole UL to guests, everywhere.
Yes, yes that has effect to all positions. The only problem for me with this is that username is clickable (without though showing something) but only I see a white line with border that I can not describe it well, its something with css.
You gave me a very good idea where to play around and fix this as my needs.
Thank you for you precious help for another time. :)
--------------- Added 1485433449 at 1485433449 ---------------
Found if I put code here above
<vb:if condition="$show['member']">
<ul class="popupbody popuphover memberaction_body">
I do not see that line I describe before, but still clickable. but ok...
Kane@airrifle
01-26-2017, 10:39 AM
We both learnt something :up:
Stratis
01-26-2017, 10:46 AM
We both learnt something :up:
I learned, you knew :)
Thanks
MarkFL
01-26-2017, 11:03 AM
Hey Stratis,
Try this simple product I have attached. If it works as you want, you can revert any changes made to your "memberaction_dropdown" template. :)
There are no settings, once you import it, it is active, and will only prevent guests from access to the dropdown. ;)
Stratis
01-26-2017, 03:51 PM
I just test it, it works with a basic css problem. it breaks some line and it shows a bigger space in forums, see images
This is what i see in central forum and at the right side with the last answer. Here i have mod installed. All horizontal line is bigger than it was.
155727
Here is without mod
155728
Thank you for this help
MarkFL
01-26-2017, 04:05 PM
It doesn't do that on my local dev site. The username beneath the thread title in the thread listing on the "forumdisplay" page doesn't (unless you have modded your style to do so) even use the "memberaction_dropdown" template. :)
Stratis
01-26-2017, 04:13 PM
(unless you have modded your style to do so) even use the "memberaction_dropdown" template. :)
I thing it is modded,
with the "memberaction_dropdown" template is ok but usernames are clickable.
Thank you Mark, for trying to help, sure to others will be ok.
* Google always gives me problems in webmasters tools, because I have Disallows in the robots.txt that's why I proceed to this :)
MarkFL
01-26-2017, 04:26 PM
I thing it is modded,
with the "memberaction_dropdown" template is ok but usernames are clickable.
Thank you Mark, for trying to help, sure to others will be ok.
* Google always gives me problems in webmasters tools, because I have Disallows in the robots.txt that's why I proceed to this :)
Okay, try this update...I have grouped the product template, but the main difference in function is the div element that wraps the username is set to display inline, rather than as a block. :)
Stratis
01-26-2017, 04:53 PM
1) This works, but breaks all posts that I will press to read, it shows all codes in side
/></div><br /><br /> <br /><br />
<br /><br /
even if I uninstall mod thread are broken, this time good for me I test it in my test forum first :)
the previous mod does not break post with that codes inside
MarkFL
01-26-2017, 05:02 PM
Hmmm...that makes absolutely no sense to me why that would happen, but I guess your site/style is just too different from mine for me to be able to provide help on this. :(
Stratis
01-26-2017, 05:59 PM
I understand, any way Mark thank you very very much :)
Stratis
01-28-2017, 09:41 AM
Uninstalled and installed again, seems it is all ok now.
Thank you very much
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.