Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-25-2017, 04:04 PM
Stratis's Avatar
Stratis Stratis is offline
 
Join Date: Jan 2010
Posts: 738
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default [SOLVED] User name options

Can some one please help me with this?





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
Attached Images
File Type: jpg Image111.jpg (10.9 KB, 0 views)
Reply With Quote
  #2  
Old 01-25-2017, 05:20 PM
Kane@airrifle's Avatar
Kane@airrifle Kane@airrifle is offline
 
Join Date: Jun 2011
Location: ZA
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Maybe in style, postbit or postbit_legacy depending on which you use, find
Code:
<div class="username_container">
Under that is:
Code:
<vb:if condition="$post['userid']">
Change that to
Code:
<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....
Reply With Quote
Благодарность от:
Stratis
  #3  
Old 01-26-2017, 06:28 AM
Stratis's Avatar
Stratis Stratis is offline
 
Join Date: Jan 2010
Posts: 738
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 01-26-2017, 07:07 AM
Kane@airrifle's Avatar
Kane@airrifle Kane@airrifle is offline
 
Join Date: Jun 2011
Location: ZA
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 01-26-2017, 08:03 AM
Stratis's Avatar
Stratis Stratis is offline
 
Join Date: Jan 2010
Posts: 738
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #6  
Old 01-26-2017, 08:26 AM
Kane@airrifle's Avatar
Kane@airrifle Kane@airrifle is offline
 
Join Date: Jun 2011
Location: ZA
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Another more inelegant way would be to edit the memberaction_dropdown template

Replace default code with.
Code:
<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&amp;userid={vb:raw memberinfo.userid}&amp;contenttype=vBForum_Post&amp;showposts=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&amp;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&amp;userlist=buddy&amp;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&amp;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.
Reply With Quote
  #7  
Old 01-26-2017, 10:04 AM
Stratis's Avatar
Stratis Stratis is offline
 
Join Date: Jan 2010
Posts: 738
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kane@airrifle View Post
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 [DATE]1485433449[/DATE] at [TIME]1485433449[/TIME] ---------------

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...
Reply With Quote
Благодарность от:
Kane@airrifle
  #8  
Old 01-26-2017, 10:39 AM
Kane@airrifle's Avatar
Kane@airrifle Kane@airrifle is offline
 
Join Date: Jun 2011
Location: ZA
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

We both learnt something :up:
Reply With Quote
  #9  
Old 01-26-2017, 10:46 AM
Stratis's Avatar
Stratis Stratis is offline
 
Join Date: Jan 2010
Posts: 738
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kane@airrifle View Post
We both learnt something :up:
I learned, you knew


Thanks
Reply With Quote
  #10  
Old 01-26-2017, 11:03 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Attached Files
File Type: xml product-markflnomemberaction.xml (1.4 KB, 4 views)
Reply With Quote
2 благодарности(ей) от:
Kane@airrifle, Stratis
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:50 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04576 seconds
  • Memory Usage 2,289KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (4)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete