External login function with avatar

thernztrom

Member
Hello!

On XF 1.1 we used the following php code to, whenever someone logged in externally at our portal, to show them "their username" "a logout button", then their avatar on the side.

However after moving the forums to a new host and updating to XF 1.2 (not sure which casued this) the avatar won't show from the external portal anymore. It looks like this now that it's broken:
7vqSm.png

1. A "> that shouldnt be there, and no picture displayed.
2. And when I hover over the picture, this link is showed: http://website.net/<? echo HTTP_FORUM. which is completely wrong, it should point to your forum profile page.​

The code we use for that part looks like this:
Code:
<div id="user_logged_in">
    <div class="user_avatar"><a href="<? echo HTTP_FORUM."index.php?members/".$isOnline['username'].".".$isOnline['user_id'].""; ?>"><img width="55" height="55" class="round-avatar" src="<? echo $avatarUrl; ?>" /></a></div>
    <div class="welcome">
    <p><a href="/forum/index.php?account"><?=$isOnline['username']?></a></p>
    <p class="logout">Logga Ut</p>
    </div>
</div>
<div id="error_box"></div>

As I'm not any good at this I havent been able to solve this myself, and would be glad if anyone might have a clue please give me a hint. :)
 
Last edited:
It seems like the php isn't being run on your front page, it's probably because your new server has php shorttags disabled, change
Code:
<?
to
Code:
<?php
 
It seems like the php isn't being run on your front page, it's probably because your new server has php shorttags disabled, change
Code:
<?
to
Code:
<?php
Thanks! :)

Another question. After updating XenForo and updating my style, two of our previous custom navigation tabs got weird. Their names are wrong, and they don't point anywhere anymore.
I've disabled all add-ons. Where do I get hold of these, I want to remove them..
7y6YP.png

I've taken over the forum recently, hence my lack of knowledge for our customized old stuff. o_O
 
Back
Top Bottom