Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
  #1  
Old 08-18-2012, 10:44 AM
PyroChixRock PyroChixRock is offline
 
Join Date: Jun 2005
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Add "post user note" to drop down on member name

When you click on a users name in a thread, it gives you a drop down menu with some options like "view profile" etc. I'd like to add the option to post a user note in that menu but I'm not sure how. Anyone have a snazzy trick up their sleeve to share?

the closest I could find on here was this thread...https://vborg.vbsupport.ru/showthread.php?t=232654
Reply With Quote
  #2  
Old 08-18-2012, 11:00 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, you can edit the memberaction_dropdown template and add choices to that menu (you'll have to study it a little to see the html used for each choice, but it's not that complicated). If you wanted to make it a product, you could also create a plugin that adds the code to the memberaction_dropdown_items template hook.
Reply With Quote
  #3  
Old 08-19-2012, 12:54 AM
PyroChixRock PyroChixRock is offline
 
Join Date: Jun 2005
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think (hope) I have the code all sorted, but I'm getting this error.

Quote:
The following error occurred when attempting to evaluate this template:

Parse error: syntax error, unexpected ')' in /htdocs/www/testforum/includes/adminfunctions_template.php(5432) : eval()'d code on line 96

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
Line 96 of adminfunctions_templates.php says:
Quote:
* @param string The name of the product this template is associated with
Code I'm trying to add
Code:
    <vb:if condition="is_member_of($bbuserinfo, 5, 6,)">
               <li class="left">
                   <a href="usernote.php?do=newnote&amp;userid={vb:raw memberinfo.userid}">
                {vb:rawphrase post_user_note}
            </a>
        </li>
Any ideas?
Reply With Quote
  #4  
Old 08-19-2012, 12:58 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd have to see the whole thing to know what was wrong, but if you're trying to insert some js code, try surrounding it with <vb:literal>...</vb:literal> tags.
Reply With Quote
  #5  
Old 08-19-2012, 01:08 AM
PyroChixRock PyroChixRock is offline
 
Join Date: Jun 2005
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the whole thing is that template you mentioned...here it is. I'm trying to add to the bottom the option for mods and admin (user groups 5,6) to "post user note"

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">
		<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:if condition="is_member_of($bbuserinfo, 5, 6,)">
               <li class="left">
                   <a href="usernote.php?do=newnote&amp;userid={vb:raw memberinfo.userid}">
                {vb:rawphrase post_user_note}
            </a>
        </li>
</vb:if> 
		{vb:raw template_hook.memberaction_dropdown_items}
	</ul>
</div>
--------------- Added [DATE]1345342367[/DATE] at [TIME]1345342367[/TIME] ---------------

thanks again for the help
Reply With Quote
  #6  
Old 08-19-2012, 01:26 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think it might be this line:

Code:
<vb:if condition="is_member_of($bbuserinfo, 5, 6,)">

you need to delete the comma after the 6.
Reply With Quote
  #7  
Old 08-19-2012, 01:27 AM
PyroChixRock PyroChixRock is offline
 
Join Date: Jun 2005
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wow...sorry i missed that! thanks, it worked.
Reply With Quote
Reply

Thread Tools
Display Modes

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 07:37 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03805 seconds
  • Memory Usage 2,222KB
  • Queries Executed 13 (?)
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
  • (3)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete