News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Adding a new action for the login screen

Started by unrelenting, July 10, 2006, 10:13:08 PM

Previous topic - Next topic

unrelenting

I'm trying to figure out how to change what it says in the Who's Online list for people who are on the login screen. Guests aren't allowed to browse. They have to login to see the board. Right now when they are looking at the login screen they show up in the Who's Online list as Viewing the board index of TheForum. This is also what it shows when someone is logged in and looking at the main index.

How and where do I differentiate between the two so that I can change the way it displays guests who are on the login screen?


vbgamer45

#2
I am going off my SMF 1.0.7 code right now.
But should be some what the same for SMF 1.1 RC2
Open Who.php in the sources folder

For SMF 1.0.7
Find
// Viewing/editing a profile.
if ($actions['action'] == 'profile' || $actions['action'] == 'profile2')
{
// Whose?  Their own?
if (empty($actions['u']))
$actions['u'] = $row['ID_MEMBER'];

$action = $txt['who_hidden'];
$profile_ids[(int) $actions['u']][] = array($row['session'], $actions['action'] == 'profile' ? $txt['who_viewprofile'] : $txt['who_profile']);
}

After it add

elseif (($actions['action'] == 'login'))
                        {
$action = 'Any text you want here. Example: Logging in';
}


Hope that helps

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

unrelenting

Thanks vbgamer but I get an error.

It doesn't like that there are an odd number of ('s and the } at the end doesn't have a { anywhere added?

vbgamer45

Oops Fixed it try it again. I haven't tried this myself but I think it will work.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

unrelenting

No, it wanted another ) so I added one like this:

elseif (($actions['action'] == 'login'))

But then it still goes with the default: Viewing the board index of TheForum:-\

vbgamer45

Hmm, What version do you need this for SMF 1.1 RC2? I will take a look at in the morning tommorrow and see what I can do.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

unrelenting

Yes, it is 1.1 RC2.

The part you said to look for was there exactly as you had it as well.

unrelenting

Still looking for this solution. I almost forgot all about it.

Advertisement: