Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: adbydesigns on May 19, 2011, 04:47:16 AM

Title: Changing the title of the login screen
Post by: adbydesigns on May 19, 2011, 04:47:16 AM
hi all hoping you can helo would like to change the title of the login screen from login to something else
Title: Re: Changing the title of the login screen
Post by: CapadY on May 19, 2011, 05:10:51 AM
I think we need some more explanation about what you want.
At least I don't understand it.
Title: Re: Changing the title of the login screen
Post by: adbydesigns on May 19, 2011, 06:54:40 AM
Hi ok no issues i hope this helps do you know at the top of the browser where we currently see "posr replay" on the login page we see well "login" i would like to change this to something else
Title: Re: Changing the title of the login screen
Post by: Sir Osis of Liver on May 19, 2011, 03:59:17 PM

In Login.template.php find this -



// This is just the basic "login" form.
function template_login()
{
global $context, $settings, $options, $scripturl, $modSettings, $txt;

echo '
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/sha1.js"></script>

<form action="', $scripturl, '?action=login2" name="frmLogin" id="frmLogin" method="post" accept-charset="', $context['character_set'], '" ', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<div class="tborder login">
<div class="cat_bar">
<h3 class="catbg">
<span class="ie6_header floatleft"><img src="', $settings['images_url'], '/icons/login_sm.gif" alt="" class="icon" /> ', $txt['login'], '</span>




In the last line, replace ', $txt['login'], ' with your new text.

Or you can find $txt['login'] in /languages/index.english.php and change it there, bearing in mind it will also change anywhere else 'Login' is used.

Title: Re: Changing the title of the login screen
Post by: adbydesigns on May 20, 2011, 08:22:02 AM
ok mate thanks i have just triedthat and didnt seem to change a thing i am using fire fox and google crome and no  difference stil seeing LOGIN
Title: Re: Changing the title of the login screen
Post by: Storman™ on May 20, 2011, 12:24:00 PM
I'm still not fully sure what you are referring to ?

Please see attached image, is that what you mean ?
Title: Re: Changing the title of the login screen
Post by: aishaweb on May 20, 2011, 12:28:46 PM
Quote from: Storman on May 20, 2011, 12:24:00 PM
I'm still not fully sure what you are referring to ?

Please see attached image, is that what you mean ?

No, he means the title in the browser tab.

http://www.w3schools.com/tags/tag_title.asp
Title: Re: Changing the title of the login screen
Post by: adbydesigns on May 20, 2011, 09:58:35 PM
Yep thats what i mean how do i change this, please thanks



Quote from: aishaweb on May 20, 2011, 12:28:46 PM
Quote from: Storman on May 20, 2011, 12:24:00 PM
I'm still not fully sure what you are referring to ?

Please see attached image, is that what you mean ?

No, he means the title in the browser tab.

http://www.w3schools.com/tags/tag_title.asp
Title: Re: Changing the title of the login screen
Post by: Sir Osis of Liver on May 20, 2011, 11:12:20 PM
Ok, here's how to do it.

In /Sources/LogInOut.php find this -



// Get the template ready.... not really much else to do.
$context['page_title'] = $txt['login'];



You can replace $txt['login'] with 'New text' .

... or

Go to /languages/index.english.php , create a new variable $txt['login_title'] , and use the new variable in LogInOut.php .

Title: Re: Changing the title of the login screen
Post by: adbydesigns on May 21, 2011, 12:50:16 AM
This is what i changed and uploaded it and it doesnt seem to have done anything and also i have claered the cases and same

what can i try next
Title: Re: Changing the title of the login screen
Post by: Sir Osis of Liver on May 21, 2011, 12:55:30 AM

You did it wrong.  Just replace the $txt['login'] variable with the new text in single quotes; don't make a variable out of it -



   $context['page_title'] = 'Your new text';


Title: Re: Changing the title of the login screen
Post by: adbydesigns on May 21, 2011, 01:07:12 AM
ok done that mate thanks but still no go
Title: Re: Changing the title of the login screen
Post by: Sir Osis of Liver on May 21, 2011, 11:27:25 PM
Your code is correct (except you spelled 'always' wrong). Just tried it again in 2.0 RC5 default theme.  I don't use tab browsing, but the new text appears in the title bar at the top of IE8.   In FF3.5 with tab browsing enabled, the text appears on the tab.  Are you uploading LogInOut.php to /Sources/ ?

(http://www.thekrashsite.com/pics/ss1.jpg)

Title: Re: Changing the title of the login screen
Post by: adbydesigns on May 22, 2011, 01:57:12 AM
yea mate i am, thats where i am uploading it to, mmm not to sure what to try it is ok or me to upload the file to here for u to look at
Title: Re: Changing the title of the login screen
Post by: adbydesigns on May 22, 2011, 04:46:21 AM
i have tried ie 9 google crome and firebox all the same i am only seeing Login still
Title: Re: Changing the title of the login screen
Post by: adbydesigns on May 22, 2011, 05:19:42 AM
here is the attached file
Title: Re: Changing the title of the login screen
Post by: HunterP on May 22, 2011, 05:50:57 AM
Quote from: adbydesigns on May 22, 2011, 04:46:21 AM
i have tried ie 9 google crome and firebox all the same i am only seeing Login still

There are two lines which contain $context['page_title'], so find the second one :)
Title: Re: Changing the title of the login screen
Post by: adbydesigns on May 22, 2011, 06:02:58 AM
ok mate i changed that and i sitll get the same i have attached by file if u dont mind looking
Title: Re: Changing the title of the login screen
Post by: HunterP on May 22, 2011, 06:12:59 AM
Quote from: adbydesigns on May 22, 2011, 06:02:58 AM
ok mate i changed that and i sitll get the same i have attached by file if u dont mind looking

I've edited the same lines in my own file, and it works perfectly  ???
Title: Re: Changing the title of the login screen
Post by: CapadY on May 22, 2011, 06:42:10 AM
Did you empty your forumcache ?

Admin - Maintenance - Forum maintenance - Routine
Title: Re: Changing the title of the login screen
Post by: adbydesigns on May 22, 2011, 07:04:18 AM
Yep twice now and same thing
Title: Re: Changing the title of the login screen
Post by: HunterP on May 22, 2011, 07:13:16 AM
Quote from: adbydesigns on May 22, 2011, 07:04:18 AM
Yep twice now and same thing

Any chance of giving us a link to your forum?
Title: Re: Changing the title of the login screen
Post by: Ozzie on May 22, 2011, 07:15:05 AM
QuoteDid you empty your forumcache ?

try clearing your browser cache and history
Title: Re: Changing the title of the login screen
Post by: adbydesigns on May 22, 2011, 07:17:08 AM
yea guys i did both the address is lostorfound.com.au
Title: Re: Changing the title of the login screen
Post by: HunterP on May 22, 2011, 07:25:53 AM
Quote from: adbydesigns on May 22, 2011, 07:17:08 AM
yea guys i did both the address is lostorfound.com.au

When I go to http://www.lostorfound.com.au/index.php?action=login I get to see your modified text.
Title: Re: Changing the title of the login screen
Post by: adbydesigns on May 22, 2011, 07:33:52 AM
mate for some reason i dont see if cn you please take a screen shooot
Title: Re: Changing the title of the login screen
Post by: HunterP on May 22, 2011, 07:42:21 AM
Quote from: adbydesigns on May 22, 2011, 07:33:52 AM
mate for some reason i dont see if cn you please take a screen shooot

See attachment
Title: Re: Changing the title of the login screen
Post by: adbydesigns on May 22, 2011, 07:44:35 AM
Thanks all so much for ur help