PDA

View Full Version : adding an option to username menu


btappan
05-07-2004, 08:29 PM
i am looking for a way to modify the dropdown menu in posts that appears when you click on the user's username next to thier post. the menu that says "send email to user", "send private message", "view profile" ect, ect.

what i am trying to do is add an option that says "send user a fax". it would work just like the "send user email" link, but with an email address that is different from their standard address and works through a fax server. an address like 1-555-555-1212@faxserver.com i would have these numbers for each user stored in a custom profile field. anyone know how to accomplish both email and faxing capabilities from this menu?

Zachery
05-07-2004, 08:53 PM
Its a simple edit to the postbit(_legacy) template.

msimplay
05-07-2004, 09:03 PM
just guessing but i think it would be something like
not sure yet lets wait for some other members to post their opinion :P

<if condition="$post[fieldx]">
<tr><td class="vbmenu_option">
<a href="mailto:$post[fieldx]">Fax $post[musername]</a></td></tr>
</if>

Zachery
05-07-2004, 09:09 PM
just guessing but i think it would be something like
not sure yet lets wait for some other members to post their opinion :P

<if condition="$post[fieldx]">
<tr><td class="vbmenu_option">
<a href="http://mailto:$post[fieldx]">Fax $username</a></td></tr>
</if>
psst no http:// ;)

btappan
05-10-2004, 04:31 PM
sorry, i am slowly learning my commands
this is what that section looks like:

<if condition="$show['profile']">
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]userid=$post[userid]">$vbphrase[view_public_profile]</a></td></tr>
</if>
<if condition="$show['pmlink']">
<tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&amp;userid=$post[userid]"><phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['emaillink']">
<tr><td class="vbmenu_option"><a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[send_email_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['homepage']">
<tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>
</if>
<if condition="$show['search']">
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=finduser&amp;userid=$post[userid]"><phrase 1="$post[username]">$vbphrase[find_more_posts_by_x]</phrase></a></td></tr>
</if>
<if condition="$post['userid']">
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr>
</if>

and this is how i modded it:

<if condition="$show['profile']">
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]userid=$post[userid]">$vbphrase[view_public_profile]</a></td></tr>
</if>
<if condition="$show['pmlink']">
<tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&amp;userid=$post[userid]"><phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['emaillink']">
<tr><td class="vbmenu_option"><a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[send_email_to_x]</phrase></a></td></tr>
</if>
<if condition="$post[field2]">
<tr><td class="vbmenu_option">
<a href="mailto:$post[field2]">Fax $post[musername]</a></td></tr>
</if>
<if condition="$show['homepage']">
<tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>
</if>
<if condition="$show['search']">
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=finduser&amp;userid=$post[userid]"><phrase 1="$post[username]">$vbphrase[find_more_posts_by_x]</phrase></a></td></tr>
</if>
<if condition="$post['userid']">
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr>
</if>

it does'nt seem to change anything at all. any suggestions?

msimplay
05-10-2004, 05:01 PM
looks about right to me
u just need to make the profile field that matches the field is all

make sure u fill in the profile field in usercp once u've added the field
because it will only show when u have filled it
due to the if condition

which is best way in my opinion

btappan
05-10-2004, 05:16 PM
okay, i found the problem: i had "field2" when it needed to be "field6"
next problem is that when the "Fax to [user]" option is clicked. it opens outlook express because it is opening an email link. I'd like it to use the same type of window that it brings up when you click the "email to [user]" link, which is the vbulletin internal email form window, anyone know if this is possible?

msimplay
05-10-2004, 05:18 PM
not sure yet will have to get back to ya on it

btappan
05-10-2004, 05:32 PM
I'd like to maybe duplicate form that vbulletin uses to send email or edit it so it says "via email" for an email and "via fax" for a fax.

i' dont know which template this is to even look at editing it or duplicating. do you happen to know which template this email form is?

btappan
05-10-2004, 05:36 PM
i'm talking about the form that shows up like when you click on my name in this post and click on "send email to btappan"

btappan
05-11-2004, 01:23 AM
anybody?

msimplay
05-11-2004, 07:47 AM
bare with us we'll figure something out :P

btappan
05-12-2004, 02:16 PM
it is the sendmessage.php file i beleive that needs edited:


Edited by Boofo: Please see my message below.


i need this file to use the info from "field6" rather than their registered email address. should i just replace the "$email = $bbuserinfo['email'];" with "$email = $bbuserinfo['field6'];" throughout the page?

Boofo
05-12-2004, 04:20 PM
You need to take the code out of that message for that file. vBulletin files are not allowed to be posted here in a message or a link. Thank you.

btappan
05-13-2004, 07:00 PM
sorry. anybody know how to modify the sendmessage.php file to pull the email from custom profile field instead of registered email address?