Current time: 11-28-2024, 09:26 PM Hello There, Guest! (LoginRegister)


Announcement
We have the biggest collection of MyBB Plugins here on the Net. We have currently 175+ MyBB Exclusive Plugins, 80+ MyBB Compatible MyCodes and 16+ MyBB 1.4.x Themes (Some are still under construction...) Thus, we provide you the largest MyBB Stuff on the net including tutorials. Stay with us, you will find out some more to come.
Now you can easily create your own buttons set for MyBB! Click here to have a look...
*** You cannot do your registration behind any Proxies anymore! ***
Welcome Guest[3.146.178.81], connected from
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Username with drop down
12-08-2009, 10:51 PM
Post: #1
Username with drop down
How do I add a drop down menu that when the user click in the user name it will display a drop down menu with the options that I can set?

Thank you

skiilz's signature
[Image: signature.php]
Find all posts by this user
Quote this message in a reply
12-09-2009, 07:13 AM
Post: #2
RE: Username with drop down
I read your post at mybb and the code posted there looks about right.

Replace your postbit template with this and let me know. But before make a bckup of it.

{$ignore_bit}
<a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
    <tbody>
        <tr>
            <td class="tcat">
                <div class="float_left smalltext">
                    {$post['postdate']}, {$post['posttime']} <span id="edited_by_{$post['pid']}">{$post['editedmsg']}</span>
                </div>
                {$post['posturl']}
            </td>
        </tr>

        <tr>
            <td class="trow1 {$unapproved_shade}">
                <table cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
                    <tr>
                        <td class="post_avatar" width="1" style="{$post['avatar_padding']}">
                            {$post['useravatar']}
                        </td>
                        <td class="post_author">
                            <strong><span class="largetext"><a href="#"
id="profilelink_{$post['pid']}">{$post['username_formatted']}</span></strong></a>

<div id="profilelink_{$post['pid']}_popup" class="popup_menu" style="display: none;">

<div class="popup_item_container">

<a
href="{$mybb->settings['bburl']}/member.php?action=profile&amp;uid={$post['uid']}"
class="popup_item">view Profile</a>

</div>

<div class="popup_item_container">

<a
href="{$mybb->settings['bburl']}/search.php?action=finduser&amp;uid={$post['uid']}"
class="popup_item">find Users Posts</a>

</div>

<div class="popup_item_container">

<a
href="{$mybb->settings['bburl']}/search.php?action=finduserthreads&uid={$post['uid']}"
class="popup_item">find Users Threads</a>

</div>

<div class="popup_item_container">

<a href="{$post['website']}" target="_blank" " class="popup_item">visit Users Website</a>

</div>

<div class="popup_item_container">

<a
href="{$mybb->settings['bburl']}/private.php?action=send&amp;uid={$post['uid']}"
class="popup_item">PM User</a>

</div>

<div class="popup_item_container">

<a
href="{$mybb->settings['bburl']}/member.php?action=emailuser&amp;uid={$post['uid']}"
class="popup_item">E-Mail User</a>

</div>

</div><br />

<script language="javascript" type="text/javascript">

new PopupMenu("profilelink_{$post['pid']}");

</script> {$post['onlinestatus']}<br />
                            <span class="smalltext">
                                {$post['usertitle']}<br />
                                {$post['userstars']}
                                {$post['groupimage']}
                            </span>
                        </td>
                        <td class="smalltext post_author_info" width="165">
                            {$post['user_details']}
                        </td>
                                             </td>
                                        </tr>
                </table>
            </td>
        </tr>

        <tr>
            <td class="trow2 post_content {$unapproved_shade}">
                <span class="smalltext"><strong>{$post['icon']}{$post['subject']} {$post['subject_extra']}</strong></span>

                <div class="post_body" id="pid_{$post['pid']}">
                    {$post['message']}
                </div>
                {$post['attachments']}
                {$post['signature']}

                <div class="post_meta" id="post_meta_{$post['pid']}">
                {$post['iplogged']}
                </div>
            </td>
        </tr>

        <tr>
            <td class="trow1 post_buttons {$unapproved_shade}">
                <div class="author_buttons float_left">
                    {$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}
                </div>
                <div class="post_management_buttons float_right">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}
                </div>
            </td>
        </tr>
    </tbody>
</table>

This is very easy, basically wrapping up with a div the popup_item_container class each of the links that you want to make appear as drop downs. Let me know how it will go.

babjusi's signature
Find all posts by this user
Quote this message in a reply
12-09-2009, 08:01 AM
Post: #3
RE: Username with drop down
ERROR:
An authorization code mismatch occurred. Please confirm that you wish to perform the action below.

skiilz's signature
[Image: signature.php]
Find all posts by this user
Quote this message in a reply
12-09-2009, 08:06 AM
Post: #4
RE: Username with drop down
Can you please atatch here your postbit template? The above I posted was taken from the defaul theem and tested that it worked.

babjusi's signature
Find all posts by this user
Quote this message in a reply
12-09-2009, 08:13 AM (This post was last modified: 12-09-2009 08:16 AM by skiilz.)
Post: #5
RE: Username with drop down
Here you go:
{$ignore_bit}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
    <tr>
        <td class="{$altbg}" width="15%" valign="top" style="white-space: nowrap; text-align: center;"><a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
        <strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
        <span class="smalltext">
            {$post['usertitle']}<br />
            {$post['userstars']}
            {$post['groupimage']}
            {$post['useravatar']}<br />
            {$post['user_details']}{$post['newpoints_postbit']}
<br />{$post['awards']}
        </span>
    </td>
    <td class="{$altbg}" valign="top">
        <table width="100%">
            <tr><td>{$post['posturl']}<span class="smalltext"><strong>{$post['icon']}{$post['subject']} {$post['subject_extra']}</strong></span>
            <br />
            <div id="pid_{$post['pid']}" style="padding: 5px 0 5px 0;">
                {$post['message']}
            </div>
            {$post['attachments']}
<style type="text/css">

.signature img {

max-height: {$mybb->settings['max_sig_h']}px;

max-width: {$mybb->settings['max_sig_w']}px;

}

</style>

<div class="signature">

{$post['signature']}

</div>
            <div style="text-align: right; vertical-align: bottom;" id="post_meta_{$post['pid']}">
                <div id="edited_by_{$post['pid']}">{$post['editedmsg']}</div>
                {$post['iplogged']}
            </div>
        </td></tr>
    </table>
</td>
</tr>
<tr>
    <td class="{$altbg}" style="white-space: nowrap; text-align: center; vertical-align: middle;"><span class="smalltext">{$post['postdate']} {$post['posttime']}</span></td>
    <td class="{$altbg}" style="vertical-align: middle;">
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr valign="bottom">
                <td align="left" ><span class="smalltext">{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}</span></td>
                <td align="right">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['thanks']}{$post['button_multiquote']}{$post['button_report']}{$post['returntotop']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}</td>
            </tr>
        </table>{$post['thxdsp']}
    </td>
</tr>
</table>

Wait. You want the postbit or the postbit_classic?

skiilz's signature
[Image: signature.php]
Find all posts by this user
Quote this message in a reply
12-09-2009, 08:20 AM
Post: #6
RE: Username with drop down
Try this. I just tested it and it works like a charm. Let me know how it will go.

{$ignore_bit}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
    <tr>
        <td class="{$altbg}" width="15%" valign="top" style="white-space: nowrap; text-align: center;"><a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
        <strong><span class="largetext"><a href="#" id="profilelink_{$post['pid']}">{$post['username_formatted']}</span></strong></a>
<div id="profilelink_{$post['pid']}_popup" class="popup_menu" style="display: none;">
<div class="popup_item_container">
<a href="{$mybb->settings['bburl']}/member.php?action=profile&amp;uid={$post['uid']}" class="popup_item">view Profile</a>
</div>
<div class="popup_item_container">
<a href="{$mybb->settings['bburl']}/search.php?action=finduser&amp;uid={$post['uid']}" class="popup_item">find Users Posts</a>
</div>
<div class="popup_item_container">
<a href="{$mybb->settings['bburl']}/search.php?action=finduserthreads&uid={$post['uid']}" class="popup_item">find Users Threads</a>
</div>
<div class="popup_item_container">
<a href="{$post['website']}" target="_blank" " class="popup_item">visit Users Website</a>
</div>
<div class="popup_item_container">
<a href="{$mybb->settings['bburl']}/private.php?action=send&amp;uid={$post['uid']}" class="popup_item">PM User</a>
</div>
<div class="popup_item_container">
<a href="{$mybb->settings['bburl']}/member.php?action=emailuser&amp;uid={$post['uid']}" class="popup_item">E-Mail User</a>
</div>
</div><br />
<script language="javascript" type="text/javascript">
new PopupMenu("profilelink_{$post['pid']}");
</script>
[Image: mybbsig.php]
{$post['onlinestatus']}<br />
        <span class="smalltext">
            {$post['usertitle']}<br />
            {$post['userstars']}
            {$post['groupimage']}
            {$post['useravatar']}<br />
            {$post['user_details']}{$post['newpoints_postbit']}
<br />{$post['awards']}
        </span>
    </td>
    <td class="{$altbg}" valign="top">
        <table width="100%">
            <tr><td>{$post['posturl']}<span class="smalltext"><strong>{$post['icon']}{$post['subject']} {$post['subject_extra']}</strong></span>
            <br />
            <div id="pid_{$post['pid']}" style="padding: 5px 0 5px 0;">
                {$post['message']}
            </div>
            {$post['attachments']}
<style type="text/css">

.signature img {

max-height: {$mybb->settings['max_sig_h']}px;

max-width: {$mybb->settings['max_sig_w']}px;

}

</style>

<div class="signature">

{$post['signature']}

</div>
            <div style="text-align: right; vertical-align: bottom;" id="post_meta_{$post['pid']}">
                <div id="edited_by_{$post['pid']}">{$post['editedmsg']}</div>
                {$post['iplogged']}
            </div>
        </td></tr>
    </table>
</td>
</tr>
<tr>
    <td class="{$altbg}" style="white-space: nowrap; text-align: center; vertical-align: middle;"><span class="smalltext">{$post['postdate']} {$post['posttime']}</span></td>
    <td class="{$altbg}" style="vertical-align: middle;">
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr valign="bottom">
                <td align="left" ><span class="smalltext">{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}</span></td>
                <td align="right">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['thanks']}{$post['button_multiquote']}{$post['button_report']}{$post['returntotop']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}</td>
            </tr>
        </table>{$post['thxdsp']}
    </td>
</tr>
</table>

babjusi's signature
Find all posts by this user
Quote this message in a reply
12-09-2009, 08:24 AM
Post: #7
RE: Username with drop down
Thank you!
It worked like a charm here too.

skiilz's signature
[Image: signature.php]
Find all posts by this user
Quote this message in a reply
12-09-2009, 08:25 AM
Post: #8
RE: Username with drop down
Glad to have been of help Smile

babjusi's signature
Find all posts by this user
Quote this message in a reply
12-09-2009, 05:34 PM
Post: #9
RE: Username with drop down
Another cool request from light33.
Find all posts by this user
Quote this message in a reply
0 member(s) viewed this thread in the last 365 days :
Post Reply 


Was This Thread Useful ?
Please Link To Us
URL
BBCode
HTML

Forum Jump:

 
New To Site ?
Some Useful Links
  • Help

  • You Might Need To Register

  • Forum Statistics

  • Mark All Forums Read

  • Forum Staff

  • Log Out
  • Contact Us

  • Mybbcodes

  • Return to Top

  • Return to Content

  • Lite (Archive) Mode

  • RSS Syndication
  • Powered By MyBB, © 2002-2024 MyBB Group.
    Golden Crown - Designed and Published by ghazal & exdiogene of MyBBCodes.
    Hosting provided by WWWHostingServer.com