Hi Justin Ryan, thanks for your reply.

Here is the code I am trying to hack...

I just need to place the image somewhere here.

function HelloMemberSection() {

    global $logged;
    global $site;

    ob_start();

    if( $logged['member'] )
    {
            $memberID = (int)$_COOKIE['memberID'];
            $iLet = getNewLettersNum($memberID);
            $sNewLet = $iLet > 0 ? '<b>('.$iLet.')</b>' : '' ;
            ?>
            <div class="topMemberBlock">
                    <?= get_member_icon( $memberID, 'right' ) ?>
                    <div class="hello_member"><?= _t( '_Hello member', getNickName( $memberID ) ) ?></div>

                    <div class="hello_actions">
                            <span><a href="<?= $site['url'] ?>member.php"><?= _t('_My account') ?></a></span>
                            <span><a href="<?= $site['url'] ?>mail.php?mode=inbox"><?= _t('_My Mail') ?></a><?=' '.$sNewLet;?></span>
                            <span><a href="<? echo getProfileLink( $memberID ) ?>"><?= _t('_My Profile') ?></a></span>
                            <span><a href="javascript:void(0);"
                              onclick="window.open( '<?= $site['url'] ?>presence_pop.php' , 'Presence', 'width=224,height=600,toolbar=0,directories=0,menubar=0,status=0,location=0,scrollbars=0,resizable=1');"
                              ><?= _t('_RayPresence') ?></a></span>
                            <span><a href="<?= $site['url'] ?>logout.php?action=member_logout"><?= _t('_Log Out2') ?></a></span>
                    </div>
            </div>
            <?
    }
    elseif( $logged['admin'] )
    {
            ?>
            <div class="topMemberBlock">
                    <div class="thumbnail_block" style="float:right;position:relative;">
                        <img style="width: 45px; height: 45px; background-image: url(<?= getTemplateIcon( 'man_small.gif' ) ?>);"
                          src="<?= getTemplateIcon( 'spacer.gif' ) ?>" alt="" />
                    </div>
                    <div class="hello_member"><?= _t( '_Hello member', 'admin' ) ?></div>

                    <div class="hello_actions">
                            <span><a href="<?= $site['url_admin'] ?>index.php"><?= _t('_Admin Panel') ?></a></span>
                            <span><a href="<?= $site['url'] ?>logout.php?action=admin_logout"><?= _t('_Log Out2') ?></a></span>
                    </div>
            </div>
            <?
    }
    else
    {
            //<a href="<_?= $site['url'] ?_>member.php"><_?= _t( '_Member Login' ) ?_></a>
            ?>
            <div class="topMemberBlock">
                    <div class="no_hello_actions">
                            <a href="<?= $site['url'] ?>join.php"><?= _t( '_Join Now Top' ) ?></a>
                            <a href="<?= $site['url'] ?>member.php" onclick="showItemEditForm('login_div'); $( '#login_div' ).show().load( '<?= $site['url'] ?>member.php?action=show_login_form&relocate=' + encodeURIComponent( window.location )  );return false;"><?= _t( '_Member Login' ) ?></a>
                    </div>
            </div>
            <?

thanks

1 answer

0
points

It depends on where you want the image to appear, but you need to put it somewhere in the bottom else block, between the final ?> and <? that's the html that should be displaying to your logged out memers.

Answered almost 7 years ago by sprugman
  • I agree. Your final "else" block is the content which appears if the user is NOT logged in AND NOT an admin, so this is the appropriate place. Simply put the HTML for your image wherever you think it would fit best among the existing HTML you have. Justin Ryan almost 7 years ago