News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Signature Glitch

Started by shanksta13, February 25, 2009, 09:53:54 AM

Previous topic - Next topic

shanksta13

I have a glitch with my signatures on my SMF Forum (2.0 RC 1).

First off, there is no line seperating the signatures from the post (there used to be).  Secondly, when a user edits a post, it pushes his signature off the side of the page.  I've attached a screenshot as an example, I could use some help fixing this.


Angelotus

You did something in your display.template.php i guess.

shanksta13

Can someone post a working copy of the section of code from the display.template.php that looks like this?

// Now for the attachments, signature, ip logged, etc...
echo '
<div id="msg_', $message['id'], '_footer" class="attachments smalltext">';

// Assuming there are attachments...
if (!empty($message['attachment']))
{
echo '
<hr width="100%" size="1" class="hrcolor" />
<div style="overflow: ', $context['browser']['is_firefox'] ? 'visible' : 'auto', '; width: 100%;">';
$last_approved_state = 1;
foreach ($message['attachment'] as $attachment)
{
// Show a special box for unapproved attachments...
if ($attachment['is_approved'] != $last_approved_state)
{
$last_approved_state = 0;
echo '
<fieldset>
<legend>', $txt['attach_awaiting_approve'], '&nbsp;[<a href="', $scripturl, '?action=attachapprove;sa=all;mid=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve_all'], '</a>]</legend>';
}

if ($attachment['is_image'])
{
if ($attachment['thumbnail']['has_thumb'])
echo '
<a href="', $attachment['href'], ';image" id="link_', $attachment['id'], '" onclick="', $attachment['thumbnail']['javascript'], '"><img src="', $attachment['thumbnail']['href'], '" alt="" id="thumb_', $attachment['id'], '" border="0" /></a><br />';
else
echo '
<img src="' . $attachment['href'] . ';image" alt="" width="' . $attachment['width'] . '" height="' . $attachment['height'] . '" border="0" /><br />';
}
echo '
<a href="' . $attachment['href'] . '"><img src="' . $settings['images_url'] . '/icons/clip.gif" align="middle" alt="*" border="0" />&nbsp;' . $attachment['name'] . '</a> ';

if (!$attachment['is_approved'])
echo '
[<a href="', $scripturl, '?action=attachapprove;sa=approve;aid=', $attachment['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve'], '</a>]&nbsp;|&nbsp;[<a href="', $scripturl, '?action=attachapprove;sa=reject;aid=', $attachment['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['delete'], '</a>] ';
echo '
(', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['real_width'] . 'x' . $attachment['real_height'] . ' - ' . $txt['attach_viewed'] : ' - ' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '.)<br />';
}

// If we had unapproved attachments clean up.
if ($last_approved_state == 0)
echo '
</fieldset>';

echo '
</div>';
}

echo '
</div>
</div>
<div class="moderatorbar">
<div class="smalltext floatleft" id="modified_', $message['id'], '">';

// Show "&#171; Last Edit: Time by Person &#187;" if this post was edited.
if ($settings['show_modify'] && !empty($message['modified']['name']))
echo '
&#171; <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], '</em> &#187;';

echo '
</div>
<div class="smalltext largepadding floatright">';

// Maybe they want to report this post to the moderator(s)?
if ($context['can_report_moderator'])
echo '
<a href="', $scripturl, '?action=reporttm;topic=', $context['current_topic'], '.', $message['counter'], ';msg=', $message['id'], '">', $txt['report_to_mod'], '</a> &nbsp;';

// Can we issue a warning because of this post?  Remember, we can't give guests warnings.
if ($context['can_issue_warning'] && !$message['is_message_author'] && !$message['member']['is_guest'])
echo '
<a href="', $scripturl, '?action=profile;area=issuewarning;u=', $message['member']['id'], ';msg=', $message['id'], '"><img src="', $settings['images_url'], '/warn.gif" alt="', $txt['issue_warning_post'], '" title="', $txt['issue_warning_post'], '" border="0" /></a>';
echo '
<img src="', $settings['images_url'], '/ip.gif" alt="" border="0" />';

// Show the IP to this user for this post - because you can moderate?
if ($context['can_moderate_forum'] && !empty($message['member']['ip']))
echo '
<a href="', $scripturl, '?action=trackip;searchip=', $message['member']['ip'], '">', $message['member']['ip'], '</a> <a href="', $scripturl, '?action=helpadmin;help=see_admin_ip" onclick="return reqWin(this.href);" class="help">(?)</a>';
// Or, should we show it because this is you?
elseif ($message['can_see_ip'])
echo '
<a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqWin(this.href);" class="help">', $message['member']['ip'], '</a>';
// Okay, are you at least logged in?  Then we can show something about why IPs are logged...
elseif (!$context['user']['is_guest'])
echo '
<a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqWin(this.href);" class="help">', $txt['logged'], '</a>';
// Otherwise, you see NOTHING!
else
echo '
', $txt['logged'];

echo '
</div>';

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

echo '
</div>
</div>
</div>';



shadow82x

From the default display.template.php (RC1)

        // Now for the attachments, signature, ip logged, etc...
        echo '
                    <div id="msg_', $message['id'], '_footer" class="attachments smalltext">';

        // Assuming there are attachments...
        if (!empty($message['attachment']))
        {
            echo '
                        <hr width="100%" size="1" class="hrcolor" />
                        <div style="overflow: ', $context['browser']['is_firefox'] ? 'visible' : 'auto', '; width: 100%;">';
            $last_approved_state = 1;
            foreach ($message['attachment'] as $attachment)
            {
                // Show a special box for unapproved attachments...
                if ($attachment['is_approved'] != $last_approved_state)
                {
                    $last_approved_state = 0;
                    echo '
                            <fieldset>
                                <legend>', $txt['attach_awaiting_approve'], '&nbsp;[<a href="', $scripturl, '?action=attachapprove;sa=all;mid=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve_all'], '</a>]</legend>';
                }

                if ($attachment['is_image'])
                {
                    if ($attachment['thumbnail']['has_thumb'])
                        echo '
                                <a href="', $attachment['href'], ';image" id="link_', $attachment['id'], '" onclick="', $attachment['thumbnail']['javascript'], '"><img src="', $attachment['thumbnail']['href'], '" alt="" id="thumb_', $attachment['id'], '" border="0" /></a><br />';
                    else
                        echo '
                                <img src="' . $attachment['href'] . ';image" alt="" width="' . $attachment['width'] . '" height="' . $attachment['height'] . '" border="0" /><br />';
                }
                echo '
                                <a href="' . $attachment['href'] . '"><img src="' . $settings['images_url'] . '/icons/clip.gif" align="middle" alt="*" border="0" />&nbsp;' . $attachment['name'] . '</a> ';

                if (!$attachment['is_approved'])
                    echo '
                                [<a href="', $scripturl, '?action=attachapprove;sa=approve;aid=', $attachment['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve'], '</a>]&nbsp;|&nbsp;[<a href="', $scripturl, '?action=attachapprove;sa=reject;aid=', $attachment['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['delete'], '</a>] ';
                echo '
                                        (', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['real_width'] . 'x' . $attachment['real_height'] . ' - ' . $txt['attach_viewed'] : ' - ' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '.)<br />';
            }

            // If we had unapproved attachments clean up.
            if ($last_approved_state == 0)
                echo '
                            </fieldset>';

            echo '
                        </div>';
        }

        echo '
                    </div>
                </div>
                <div class="moderatorbar">
                    <div class="smalltext floatleft" id="modified_', $message['id'], '">';

        // Show "« Last Edit: Time by Person »" if this post was edited.
        if ($settings['show_modify'] && !empty($message['modified']['name']))
            echo '
                        « <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], '</em> »';

        echo '
                    </div>
                    <div class="smalltext largepadding floatright">';

        // Maybe they want to report this post to the moderator(s)?
        if ($context['can_report_moderator'])
            echo '
                        <a href="', $scripturl, '?action=reporttm;topic=', $context['current_topic'], '.', $message['counter'], ';msg=', $message['id'], '">', $txt['report_to_mod'], '</a> &nbsp;';

        // Can we issue a warning because of this post?  Remember, we can't give guests warnings.
        if ($context['can_issue_warning'] && !$message['is_message_author'] && !$message['member']['is_guest'])
            echo '
                        <a href="', $scripturl, '?action=profile;area=issuewarning;u=', $message['member']['id'], ';msg=', $message['id'], '"><img src="', $settings['images_url'], '/warn.gif" alt="', $txt['issue_warning_post'], '" title="', $txt['issue_warning_post'], '" border="0" /></a>';
        echo '
                        <img src="', $settings['images_url'], '/ip.gif" alt="" border="0" />';

        // Show the IP to this user for this post - because you can moderate?
        if ($context['can_moderate_forum'] && !empty($message['member']['ip']))
            echo '
                        <a href="', $scripturl, '?action=trackip;searchip=', $message['member']['ip'], '">', $message['member']['ip'], '</a> <a href="', $scripturl, '?action=helpadmin;help=see_admin_ip" onclick="return reqWin(this.href);" class="help">(?)</a>';
        // Or, should we show it because this is you?
        elseif ($message['can_see_ip'])
            echo '
                        <a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqWin(this.href);" class="help">', $message['member']['ip'], '</a>';
        // Okay, are you at least logged in?  Then we can show something about why IPs are logged...
        elseif (!$context['user']['is_guest'])
            echo '
                        <a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqWin(this.href);" class="help">', $txt['logged'], '</a>';
        // Otherwise, you see NOTHING!
        else
            echo '
                        ', $txt['logged'];

        echo '
                    </div>';

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

        echo '
                </div>
            </div>
        </div>';
    }


See Attached. This may also look wacky if your using a custom theme so be sure to backup. :)
Colin B
Former Spammer, Customize, & Support Team Member

shanksta13

Well, I completely replaced that part of the coding and it didn't have any effect.  Maybe I should look in the index.template.php?

shanksta13

This actually might be a glitch in the coding.  I entered two line breaks in the first echo statement under the "// Show the member's signature?" line and it worked fine, pushing the signature past the IP address and edit lines.  I wonder if anyone else has had this issue, and if not why not?

shadow82x

Could be a potential bug, if you can confirm this on the default (CORE) theme. Or else it may have been an issue with your custom theme.

What browser were you using?
The SMF2.0 RC1 templates are a bit buggy indeed.
Colin B
Former Spammer, Customize, & Support Team Member

shanksta13

Quote from: Shadow82x on February 25, 2009, 03:49:55 PM
Could be a potential bug, if you can confirm this on the default (CORE) theme. Or else it may have been an issue with your custom theme.

What browser were you using?
The SMF2.0 RC1 templates are a bit buggy indeed.

The latest version of Mozilla Firefox.  Also, this is the default theme, with different color variations basically.  Everything still pulls from the display.template.php file in the default theme folder.

Tyrsson

Does this happen with all sig images no matter the size?

Does it happen with plain text as well?
PM at your own risk, some I answer, if they are interesting, some I ignore.

shanksta13

Quote from: Tyrsson on February 26, 2009, 02:21:40 AM
Does this happen with all sig images no matter the size?

Does it happen with plain text as well?

If I had to guess, yes.  The smaller images in people's signatures didn't create any problems, but they were in the same line as the "last edited" and "report to moderator" lines.  So, essentially it was the bigger signature images that covered the "report" link.  Also, I think all signature images were showing up in the same line as the "last edited" line.

shadow82x

I am unable to reproduce this still. It may be an issue with your themes width (judging by the screenshot)

Colin B
Former Spammer, Customize, & Support Team Member

shanksta13

Quote from: Shadow82x on February 26, 2009, 05:38:58 PM
I am unable to reproduce this still. It may be an issue with your themes width (judging by the screenshot)

Could be.  I'm also using a Joomla - SMF bridge, I'll report it over there.  I'm not exactly sure that would cause this type of problem, though.  It would be easily recognizable if it was system-wide, so it's likely just a problem with my board.  In any case, it was as easy to fix as adding two line break segments.

bigguy_132

I am having this issue and do not know how to fix it. I have added the breaks so that the Report to moderator is not covered. But the line is misisng just like in the screenshot above. Ideas?

I have tried replacing the code and that did not work. Thanks for any help.

GazOutEast

#13
How did you guys get a signature image to show in RC1 in the first place?  I can't even get admin signature images to show, let alone users' images

Really pulling my hair on this one.

Gaz
edit to add - it's 2.0 RC1 using default theme shipped with download.  No manual edits to anything.  Still cannot get images (on server or external) to show in signatures for users (post-based, membergroup-based, or admins)

Would really appreciate some pointers on this - my users are "bugging" me now, and is stopping further mods until I know what is causing this and get it fixed.[/]
I have 20:20 vision - I can see anything bigger than 20" x 20"

daveaite

I am also experiencing this issue. Frustrating :/
The BuyPoe Network!


http://vbsocial.com: Forum Styles for vBulletin and SMF

ɔɔɔɔɔɔuɥoɾ

well i managed to fix this problem with my theme, using CSS not PHP

download and open your style.css

find: (something like)


/* All the signatures used in the forum.  If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */
.signature
{
    overflow: auto;
}


Replace with


/* All the signatures used in the forum.  If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */
.signature
{
    clear: right;
    overflow: auto;
}


your basically adding

clear: right;

to the signature class

This fixed the issue for me, hope it works for you too.


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

daveaite

Quote from: johncccccc on April 20, 2009, 06:30:24 PM
well i managed to fix this problem with my theme, using CSS not PHP

download and open your style.css

find: (something like)


/* All the signatures used in the forum.  If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */
.signature
{
    overflow: auto;
}


Replace with


/* All the signatures used in the forum.  If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */
.signature
{
    clear: right;
    overflow: auto;
}


your basically adding

clear: right;

to the signature class

This fixed the issue for me, hope it works for you too.



Thanks!!! I think this worked! Awesome job
The BuyPoe Network!


http://vbsocial.com: Forum Styles for vBulletin and SMF

ɔɔɔɔɔɔuɥoɾ

Your Welcome,
Im not nowhere near an expert and no how it is to have problems you otherwise cannot fix, i stumbled on this one after noticing it on another style.css and added it and it worked, like i said, Im not an expert so this may not be the best fix there may be better fixes for this (although it works anyway).

:)


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Advertisement: