I am a php novice, but have setup a site with 97 members running Elgg 2.2.23. I have changed the default title on the login screen from saying "Login" to the name of our site by adding this code into two directories in the custom_index plugin:
<p align="center" style="style="font-size: 1.8rem; font-weight: 700; color: navy; line-height: .7em; text-align: center; left-margin: auto; right-margin: auto; text-shadow: 1px 1px 3px rgba(0, 0, 0, .3);"><span align="center" style="font-size: 1.8rem; font-weight: 700; color: #2a5f99; line-height: .7em; text-align: center; left-margin: auto; right-margin: auto; text-shadow: 1px 1px 3px rgba(0, 0, 0, .3);">Olsen Park </br>Members Section</span></p>
These are the directories and files I have added to the custom_index plugin:
views/default/resources/walled_garden.php
views/default/resources/account/login.php
I pasted the above code in place of 'login' in the first file here:
'title' => elgg_echo('login'),
And also in place of 'login' pin the second file here:
echo elgg_view_page(elgg_echo('login'),
This makes the desired changes on both pages, but whenever the login page is called up by either index.php or login.php in the page title on a browser it lists the html code and not just the title of the site. How can I fix this? Thanks for any help.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
- Kyle Pope@kmpope
Kyle Pope - 0 likes
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
- Kyle Pope@kmpope
Kyle Pope - 0 likes
- Kyle Pope@kmpope
Kyle Pope - 0 likes
You must log in to post replies.Do I understand correctly that you changed the string 'login' => 'Log in' in the language/en.php file to the code you mentioned?
Don't do that.
You can create the separated code for title and header.
For example:
You can add your own string to language file instead of the hard coded 'login':
then use:
Also, look at this awesome plugin.
Learn more on the Elgg docs.
Updates:
Don't forget about customizing CSS instead of HTML into PHP
Nikolai,
You asked:
No, I placed these directories and files in the custom_index plugin:
I then pasted my html code in place of 'login' in both of these files. If I changed "login" in the language file it also changed it in the login button. I also placed these folders and file in the custom_index plugin:
And omitted the lines:
I didn't change any core files.
I will try the translation plugin, but where would I paste the code you suggested? How can I just change the title (with my css) on the login page without using a header or footer? Thanks for your help!
Sincerely
Kyle Pope
kmpope@att.net
Well, let's say that $header appears on the page and $title appears in the page title on a browser.
Then you should pass $header in the layout:
And $title in the page view:
Learn more.
Thank you. I have so much I still need to learn :)
Nikolai, you're right! Translation Editor (https://elgg.org/plugins/385116) is a great plugin!! Thanks and thank you Jerome Bakker.