Changing the title of the login screen

Started by adbydesigns, May 19, 2011, 04:47:16 AM

Previous topic - Next topic

adbydesigns

hi all hoping you can helo would like to change the title of the login screen from login to something else

CapadY

I think we need some more explanation about what you want.
At least I don't understand it.
Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

adbydesigns

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

Sir Osis of Liver


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.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

adbydesigns

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

Storman™

I'm still not fully sure what you are referring to ?

Please see attached image, is that what you mean ?

aishaweb

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

adbydesigns

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

Sir Osis of Liver

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 .

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

adbydesigns

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

Sir Osis of Liver


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';


Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

adbydesigns

ok done that mate thanks but still no go

Sir Osis of Liver

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/ ?



Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

adbydesigns

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

adbydesigns

i have tried ie 9 google crome and firebox all the same i am only seeing Login still

adbydesigns


HunterP

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 :)

adbydesigns

ok mate i changed that and i sitll get the same i have attached by file if u dont mind looking

HunterP

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  ???

CapadY

Did you empty your forumcache ?

Admin - Maintenance - Forum maintenance - Routine
Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

Advertisement: