• GhostRider | FaceBox Popup Profile View
    June 14, 2012, 05:46:27 AM
    Hi I'm new here.

    I would like tomake a feature request. I need Facebox Popup Profile View.

    :)
  • Suki | Re: FaceBox Popup Profile View
    June 14, 2012, 08:42:09 AM
    Hi GhostRider, do you mean the thing this site has?

    It highly depends on the theme you are using, the exact same code I'm using here won't do much on any other theme.

    Please tell me what theme do you use and attach your theme's Display.template.php
  • GhostRider | Re: FaceBox Popup Profile View
    June 14, 2012, 09:32:07 AM
    Exactly, same feature.

    I'm using custom theme, Boardindex.template.php is attached.

    Here is my site link Link where you can see the theme.

    thanks  :)

    [attachment deleted by admin]
  • Suki | Re: FaceBox Popup Profile View
    June 14, 2012, 11:51:29 AM
    OK, but the actual file would be your theme's Display.template.php  :)

    And also, do you already use jQuery on your site?

    What kind of info do you want to appear on the facebox popup?  the same as this site?

    I just realize that large images broke the style in the pop up :P
  • GhostRider | Re: FaceBox Popup Profile View
    June 14, 2012, 12:04:32 PM
    Here is some idea image which I took from another website.

    I want like below image or may be as you site is ok just remove the signature.



    That would be more great if add image re-size code.

    jQuerry Login Sliding Bar.


    [attachment deleted by admin]
  • Suki | Re: FaceBox Popup Profile View
    June 15, 2012, 09:27:46 AM
    OK, let me search on my old installations to see if I still have the code for the default theme.
  • GhostRider | Re: FaceBox Popup Profile View
    June 15, 2012, 11:21:15 AM
    Thanks  :)
  • Suki | Re: FaceBox Popup Profile View
    June 16, 2012, 11:06:23 AM
    OK, first you need to include jquery and facebox files on your theme folder and call them on your theme's Index.template.php file.

    Assuming you already have all the necessary files, this code goes anywhere inside the $message while loop:

    Code: [Select]
    // Firma
    echo '<div id="firma_',$message['member']['id'],'" style="display:none;">';

    echo '<div class="firma_round">';

    echo '<div style="text-align:center;"><h5>',$message['member']['name'],'</h5></div>';

    // avatar firma
    echo '<div class="firma_avatar">';

    echo '<img src="',(empty($message['member']['avatar']['href']) ? ''. $settings['theme_url']. '/images/no_avatar.png' : $message['member']['avatar']['href']),'" />';

    // avatar firma fin
    echo '</div>';

    // data firma
    echo '<div class="firma_data">
    <ul class="firma_data_lista">';

    // Show the member's primary group (like 'Administrator') if they have one.
    if (!empty($message['member']['group']))
    echo '
    <li class="membergroup">', $message['member']['group'], '</li>';

    // Don't show these things for guests.
    if (!$message['member']['is_guest'])
    {
    // Show the post group if and only if they have no other group or the option is on, and they are in a post group.
    if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
    echo '
    <li class="postgroup">', $message['member']['post_group'], '</li>';
    echo '
    <li class="stars">', $message['member']['group_stars'], '</li>';

    // Show how many posts they have made.
    if (!isset($context['disabled_fields']['posts']))
    echo '
    <li class="postcount">', $txt['member_postcount'], ': ', $message['member']['posts'], '</li>';

    // Is karma display enabled?  Total or +/-?
    if ($modSettings['karmaMode'] == '1')
    echo '
    <li class="karma">', $modSettings['karmaLabel'], ' ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '</li>';
    elseif ($modSettings['karmaMode'] == '2')
    echo '
    <li class="karma">', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '</li>';

    // Is this user allowed to modify this member's karma?
    if ($message['member']['karma']['allow'])
    echo '
    <li class="karma_allow">
    <a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.' . $context['start'], ';m=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $modSettings['karmaApplaudLabel'], '</a>
    <a href="', $scripturl, '?action=modifykarma;sa=smite;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';m=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $modSettings['karmaSmiteLabel'], '</a>
    </li>';

    // Show the member's gender icon?
    if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '' && !isset($context['disabled_fields']['gender']))
    echo '
    <li class="gender">', $txt['gender'], ': ', $message['member']['gender']['image'], '</li>';

    // Show their personal text?
    if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '')
    echo '
    <li class="blurb">', $message['member']['blurb'], '</li>';

    // Any custom fields to show as icons?
    if (!empty($message['member']['custom_fields']))
    {
    $shown = false;
    foreach ($message['member']['custom_fields'] as $custom)
    {
    if ($custom['placement'] != 1 || empty($custom['value']))
    continue;
    if (empty($shown))
    {
    $shown = true;
    echo '
    <li class="im_icons">
    <ul>';
    }
    echo '
    <li>', $custom['value'], '</li>';
    }
    if ($shown)
    echo '
    </ul>
    </li>';
    }

    // This shows the popular messaging icons.
    if ($message['member']['has_messenger'] && $message['member']['can_view_profile'])
    echo '
    <li class="im_icons">
    <ul>
    ', !empty($message['member']['icq']['link']) ? '<li>' . $message['member']['icq']['link'] . '</li>' : '', '
    ', !empty($message['member']['msn']['link']) ? '<li>' . $message['member']['msn']['link'] . '</li>' : '', '
    ', !empty($message['member']['aim']['link']) ? '<li>' . $message['member']['aim']['link'] . '</li>' : '', '
    ', !empty($message['member']['yim']['link']) ? '<li>' . $message['member']['yim']['link'] . '</li>' : '', '
    </ul>
    </li>';

    // Show the profile, website, email address, and personal message buttons.
    if ($settings['show_profile_buttons'])
    {
    echo '
    <li class="profile">
    <ul>';
    // Don't show the profile button if you're not allowed to view the profile.
    if ($message['member']['can_view_profile'])
    echo '
    <li><a href="', $message['member']['href'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/icons/profile_sm.gif" alt="' . $txt['view_profile'] . '" title="' . $txt['view_profile'] . '" />' : $txt['view_profile']), '</a></li>';

    // Don't show an icon if they haven't specified a website.
    if ($message['member']['website']['url'] != '' && !isset($context['disabled_fields']['website']))
    echo '
    <li><a href="', $message['member']['website']['url'], '" title="' . $message['member']['website']['title'] . '" target="_blank" class="new_win">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/www_sm.gif" alt="' . $message['member']['website']['title'] . '" />' : $txt['www']), '</a></li>';

    // Don't show the email address if they want it hidden.
    if (in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum')))
    echo '
    <li><a href="', $scripturl, '?action=emailuser;sa=email;msg=', $message['id'], '" rel="nofollow">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt['email'] . '" title="' . $txt['email'] . '" />' : $txt['email']), '</a></li>';

    // Since we know this person isn't a guest, you *can* message them.
    if ($context['can_send_pm'])
    echo '
    <li><a href="', $scripturl, '?action=pm;sa=send;u=', $message['member']['id'], '" title="', $message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline'], '">', $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/im_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '.gif" alt="' . ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']) . '" />' : ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']), '</a></li>';

    echo '
    </ul>
    </li>';
    }

    // Any custom fields for standard placement?
    if (!empty($message['member']['custom_fields']))
    {
    foreach ($message['member']['custom_fields'] as $custom)
    if (empty($custom['placement']) || empty($custom['value']))
    echo '
    <li class="custom">', $custom['title'], ': ', $custom['value'], '</li>';
    }

    // Are we showing the warning status?
    if ($message['member']['can_see_warning'])
    echo '
    <li class="warning">', $context['can_issue_warning'] ? '<a href="' . $scripturl . '?action=profile;area=issuewarning;u=' . $message['member']['id'] . '">' : '', '<img src="', $settings['images_url'], '/warning_', $message['member']['warning_status'], '.gif" alt="', $txt['user_warn_' . $message['member']['warning_status']], '" />', $context['can_issue_warning'] ? '</a>' : '', '<span class="warn_', $message['member']['warning_status'], '">', $txt['warn_' . $message['member']['warning_status']], '</span></li>';
    }
    // Otherwise, show the guest's email.
    elseif (!empty($message['member']['email']) && in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum')))
    echo '
    <li class="email"><a href="', $scripturl, '?action=emailuser;sa=email;msg=', $message['id'], '" rel="nofollow">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt['email'] . '" title="' . $txt['email'] . '" />' : $txt['email']), '</a></li>';


    // data firma fin
    echo '</ul></div>';

    echo '<div class="clear"></div>';

    // signature firma
    echo '<div class="firma_signature">';


    // Are there any custom profile fields for above the signature?
    if (!empty($message['member']['custom_fields']))
    {
    $shown = false;
    foreach ($message['member']['custom_fields'] as $custom)
    {
    if ($custom['placement'] != 2 || empty($custom['value']))
    continue;
    if (empty($shown))
    {
    $shown = true;
    echo '
    <div class="custom_fields_above_signature">
    <ul class="reset nolist">';
    }
    echo '
    <li>', $custom['value'], '</li>';
    }
    if ($shown)
    echo '
    </ul>
    </div>';
    }

    // Show the member's signature?
    if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])
    echo '
    <div class="signature" id="msg_', $message['id'], '_signature">', $message['member']['signature'], '</div>';


    // signature firma fin
    echo '</div>';

    // fin de firma
    echo'</div></div>';


    Now the only thing left is to create the link for it:  <a href="#firma_',$message['member']['id'],'" rel="facebox">signature</a>  it has to be inside the $message while loop

    That is pretty much all you need to do.

    of course this code has harcoded css classes all over the place so you may have to change a lot of stuff.
  • GhostRider | Re: FaceBox Popup Profile View
    June 24, 2012, 10:55:34 AM
    thanks SUKI

    Actually I'm not a web developler so don't have much know about PHP. I need your little more help.

    Code: [Select]
    first you need to include jquery and facebox files on your theme folder and call them on your theme's Index.template.php fileThis is ok.

    Code: [Select]
    // Firma
    echo '<div id="firma_',$message['member']['id'],'" style="display:none;">';

    echo '<div class="firma_round">';

    echo '<div style="text-align:center;"><h5>',$message['member']['name'],'</h5></div>';

    // avatar firma
    echo '<div class="firma_avatar">';

    echo '<img src="',(empty($message['member']['avatar']['href']) ? ''. $settings['theme_url']. '/images/no_avatar.png' : $message['member']['avatar']['href']),'" />';

    // avatar firma fin
    echo '</div>';

    // data firma
    echo '<div class="firma_data">
    <ul class="firma_data_lista">';

    // Show the member's primary group (like 'Administrator') if they have one.
    if (!empty($message['member']['group']))
    echo '
    <li class="membergroup">', $message['member']['group'], '</li>';

    // Don't show these things for guests.
    if (!$message['member']['is_guest'])
    {
    // Show the post group if and only if they have no other group or the option is on, and they are in a post group.
    if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
    echo '
    <li class="postgroup">', $message['member']['post_group'], '</li>';
    echo '
    <li class="stars">', $message['member']['group_stars'], '</li>';

    // Show how many posts they have made.
    if (!isset($context['disabled_fields']['posts']))
    echo '
    <li class="postcount">', $txt['member_postcount'], ': ', $message['member']['posts'], '</li>';

    // Is karma display enabled?  Total or +/-?
    if ($modSettings['karmaMode'] == '1')
    echo '
    <li class="karma">', $modSettings['karmaLabel'], ' ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '</li>';
    elseif ($modSettings['karmaMode'] == '2')
    echo '
    <li class="karma">', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '</li>';

    // Is this user allowed to modify this member's karma?
    if ($message['member']['karma']['allow'])
    echo '
    <li class="karma_allow">
    <a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.' . $context['start'], ';m=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $modSettings['karmaApplaudLabel'], '</a>
    <a href="', $scripturl, '?action=modifykarma;sa=smite;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';m=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $modSettings['karmaSmiteLabel'], '</a>
    </li>';

    // Show the member's gender icon?
    if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '' && !isset($context['disabled_fields']['gender']))
    echo '
    <li class="gender">', $txt['gender'], ': ', $message['member']['gender']['image'], '</li>';

    // Show their personal text?
    if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '')
    echo '
    <li class="blurb">', $message['member']['blurb'], '</li>';

    // Any custom fields to show as icons?
    if (!empty($message['member']['custom_fields']))
    {
    $shown = false;
    foreach ($message['member']['custom_fields'] as $custom)
    {
    if ($custom['placement'] != 1 || empty($custom['value']))
    continue;
    if (empty($shown))
    {
    $shown = true;
    echo '
    <li class="im_icons">
    <ul>';
    }
    echo '
    <li>', $custom['value'], '</li>';
    }
    if ($shown)
    echo '
    </ul>
    </li>';
    }

    // This shows the popular messaging icons.
    if ($message['member']['has_messenger'] && $message['member']['can_view_profile'])
    echo '
    <li class="im_icons">
    <ul>
    ', !empty($message['member']['icq']['link']) ? '<li>' . $message['member']['icq']['link'] . '</li>' : '', '
    ', !empty($message['member']['msn']['link']) ? '<li>' . $message['member']['msn']['link'] . '</li>' : '', '
    ', !empty($message['member']['aim']['link']) ? '<li>' . $message['member']['aim']['link'] . '</li>' : '', '
    ', !empty($message['member']['yim']['link']) ? '<li>' . $message['member']['yim']['link'] . '</li>' : '', '
    </ul>
    </li>';

    // Show the profile, website, email address, and personal message buttons.
    if ($settings['show_profile_buttons'])
    {
    echo '
    <li class="profile">
    <ul>';
    // Don't show the profile button if you're not allowed to view the profile.
    if ($message['member']['can_view_profile'])
    echo '
    <li><a href="', $message['member']['href'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/icons/profile_sm.gif" alt="' . $txt['view_profile'] . '" title="' . $txt['view_profile'] . '" />' : $txt['view_profile']), '</a></li>';

    // Don't show an icon if they haven't specified a website.
    if ($message['member']['website']['url'] != '' && !isset($context['disabled_fields']['website']))
    echo '
    <li><a href="', $message['member']['website']['url'], '" title="' . $message['member']['website']['title'] . '" target="_blank" class="new_win">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/www_sm.gif" alt="' . $message['member']['website']['title'] . '" />' : $txt['www']), '</a></li>';

    // Don't show the email address if they want it hidden.
    if (in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum')))
    echo '
    <li><a href="', $scripturl, '?action=emailuser;sa=email;msg=', $message['id'], '" rel="nofollow">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt['email'] . '" title="' . $txt['email'] . '" />' : $txt['email']), '</a></li>';

    // Since we know this person isn't a guest, you *can* message them.
    if ($context['can_send_pm'])
    echo '
    <li><a href="', $scripturl, '?action=pm;sa=send;u=', $message['member']['id'], '" title="', $message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline'], '">', $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/im_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '.gif" alt="' . ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']) . '" />' : ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']), '</a></li>';

    echo '
    </ul>
    </li>';
    }

    // Any custom fields for standard placement?
    if (!empty($message['member']['custom_fields']))
    {
    foreach ($message['member']['custom_fields'] as $custom)
    if (empty($custom['placement']) || empty($custom['value']))
    echo '
    <li class="custom">', $custom['title'], ': ', $custom['value'], '</li>';
    }

    // Are we showing the warning status?
    if ($message['member']['can_see_warning'])
    echo '
    <li class="warning">', $context['can_issue_warning'] ? '<a href="' . $scripturl . '?action=profile;area=issuewarning;u=' . $message['member']['id'] . '">' : '', '<img src="', $settings['images_url'], '/warning_', $message['member']['warning_status'], '.gif" alt="', $txt['user_warn_' . $message['member']['warning_status']], '" />', $context['can_issue_warning'] ? '</a>' : '', '<span class="warn_', $message['member']['warning_status'], '">', $txt['warn_' . $message['member']['warning_status']], '</span></li>';
    }
    // Otherwise, show the guest's email.
    elseif (!empty($message['member']['email']) && in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum')))
    echo '
    <li class="email"><a href="', $scripturl, '?action=emailuser;sa=email;msg=', $message['id'], '" rel="nofollow">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt['email'] . '" title="' . $txt['email'] . '" />' : $txt['email']), '</a></li>';


    // data firma fin
    echo '</ul></div>';

    echo '<div class="clear"></div>';

    // signature firma
    echo '<div class="firma_signature">';


    // Are there any custom profile fields for above the signature?
    if (!empty($message['member']['custom_fields']))
    {
    $shown = false;
    foreach ($message['member']['custom_fields'] as $custom)
    {
    if ($custom['placement'] != 2 || empty($custom['value']))
    continue;
    if (empty($shown))
    {
    $shown = true;
    echo '
    <div class="custom_fields_above_signature">
    <ul class="reset nolist">';
    }
    echo '
    <li>', $custom['value'], '</li>';
    }
    if ($shown)
    echo '
    </ul>
    </div>';
    }

    // Show the member's signature?
    if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])
    echo '
    <div class="signature" id="msg_', $message['id'], '_signature">', $message['member']['signature'], '</div>';


    // signature firma fin
    echo '</div>';

    // fin de firma
    echo'</div></div>';
    Above code copy to which file and where exactly?

    Code: [Select]
    <a href="#firma_',$message['member']['id'],'" rel="facebox">signature</a>  it has to be inside the $message while loop Above code copy to which file and where exactly?

    CSS formating I will do.

    Sorry for trouble Yu!
  • Suki | Re: FaceBox Popup Profile View
    June 26, 2012, 09:48:40 AM
    This will go in your Theme's Display.templatephp file, it need to be inside the while loop otherwise it will not work, the while loop starts on this line on your Display.template.php file:

       // Get all the messages...
       while ($message = $context['get_message']())
       {

    just put your code right below that line.

    The link  can be anywhere inside the loop as well, on this forum the link is placed on the user's avatar but it an be anywhere.