Okay what we are going to do now is change a few things in the top bar at the top of the page.
First if you want to remove the top bar, and you should only do this if you have a replacement method for navigating around your ELGG site ( see a Replacing the Top Bar with a Widget/Plugin).
Go to your theme directory/folder > views > default > pageshells and open pageshell.php in your text editor.
Find the following line and delete it...
<?php echo elgg_view('page_elements/elgg_topbar', $vars); ?>
Now save the file, click on Administration > Tool Administration and adjust the position of one of the plugins (remember to make sure your theme is the bottom of the list) Then click on Dashboard and refresh your screen and the changes should be apparent.
Next up is changing the colour of the top bar to suit.
First go to _graphics and copy toptoolbar_background.gif elgg_toolbar_logout.gif toolbar_messages_icon.gif and elgg_toolbar_logo.gif to your theme directory/folder > graphics.
Next use your text editor to open your theme directory/folder > views > default > css.php.
Find the following...
#elgg_topbar {
background:#333333 url(<?php echo $vars['url']; ?>_graphics/toptoolbar_background.gif) repeat-x top left;
color:#eeeeee;
border-bottom:1px solid #000000;
min-width:998px;
position:relative;
width:100%;
height:24px;
z-index: 9000; /* if you have multiple position:relative elements, then IE sets up separate Z layer contexts for each one, which ignore each other */
}
Change _graphics/toptoolbar_background.gif to mod/(your theme folder or directory name)/graphics/toptoolbar_background.gif
Find the following
#elgg_topbar_container_right a {
color:#eeeeee;
margin:0 5px 0 0;
background:transparent url(<?php echo $vars['url']; ?>_graphics/elgg_toolbar_logout.gif) no-repeat top right;
padding:0 21px 0 0;
display:block;
height:20px;
}
Change _graphics/elgg_toolbar_logout.gif to mod/(your theme folder or directory name)/graphics/elgg_toolbar_logout.gif
Find the following
}
#elgg_topbar_container_left a.privatemessages {
background:transparent url(<?php echo $vars['url']; ?>_graphics/toolbar_messages_icon.gif) no-repeat left 2px;
padding:0 0 4px 16px;
margin:0 15px 0 5px;
cursor:pointer;
}
#elgg_topbar_container_left a.privatemessages:hover {
text-decoration: none;
background:transparent url(<?php echo $vars['url']; ?>_graphics/toolbar_messages_icon.gif) no-repeat left -36px;
}
#elgg_topbar_container_left a.privatemessages_new {
background:transparent url(<?php echo $vars['url']; ?>_graphics/toolbar_messages_icon.gif) no-repeat left -17px;
padding:0 0 0 18px;
margin:0 15px 0 5px;
color:white;
}
Change every instance of _graphics/toolbar_messages_icon.gif to mod/(your theme folder or directory name)/graphics/toolbar_messages_icon.gif
Save the file.
Next use your text editor to open your theme directory/folder > views > default > page_elements > elgg_topbar.php.
Find the following...
<div id="elgg_topbar_container_left">
<div class="toolbarimages"> <a href="http://www.elgg.org" target="_blank"><img src="<?php echo $vars['url'];?>_graphics/jed_elgg_toolbar_logo.gif" /></a>
<a href="<?php echo $_SESSION['user']->getURL(); ?>"><img class="user_mini_avatar" src="<?php echo
$_SESSION['user']->getIcon('topbar'); ?>"></a>
</div>
Change _graphics/elgg_toolbar_logo.gif to mod/(your theme folder or directory name)/graphics/elgg_toolbar_logo.gif
Now save the file, click on Administration > Tool Administration and adjust the position of one of the plugins (remember to make sure your theme is the bottom of the list) Then click on Dashboard and everything should look normal.
Next open up your graphics editor and load the following; theme directory/folder > mod > graphics > toptoolbar_background.gif
Change the colour to suit and then save the file. Now click on Administration > Tool Administration and adjust the position of one of the plugins (remember to make sure your theme is the bottom of the list) Then click on Dashboard and refresh your screen and the changes should be apparent.
Now you will notice that the ELGG logo at the extreme left of the top bar is still in the old top bar colour so open up elgg_toolbar_logo.gif in your graphics program and change the background to your selected color or better, if your capabilities are up to it, make the the background transparent.
Now save the file. Now click on Administration > Tool Administration and adjust the position of one of the plugins (remember to make sure your theme is the bottom of the list) Then click on Dashboard and refresh your screen and the changes should be apparent.
Looking good? Okay at the extreme right of the top bar you will notice that the logout logo still has a little bar of the old top bar colour running along the bottom so open elgg_toolbar_logout.gif in your graphics program and change the relevent colour to the same one as the others.
Now save the file. Now click on Administration > Tool Administration and adjust the position of one of the plugins (remember to make sure your theme is the bottom of the list) Then click on Dashboard and refresh your screen and the changes should be apparent.
Check the mail logo and if it needs changing open up your graphics editor and load the following; theme directory/folder > mod > graphics > toolbar_messages_icon.gif
Change the colour to suit and then save the file. Now click on Administration > Tool Administration and adjust the position of one of the plugins (remember to make sure your theme is the bottom of the list) Then click on Dashboard and refresh your screen and the changes should be apparent.
So while your admiring the changes you probably notice that the text may be a bit indistinct due to your choice of colours so use your text editor to open your theme directory/folder > views > default > css.php.
Find the following which changes the colour of things like settings/administration/chat etc.
#elgg_topbar_container_left a.usersettings {
margin:0 0 0 20px;
color:#999999;
padding:3px;
}
#elgg_topbar_container_left a.usersettings:hover {
color:#eeeeee;
}
Change to color settings to one that suits and then save the file. Now click on Administration > Tool Administration and adjust the position of one of the plugins (remember to make sure your theme is the bottom of the list) Then click on Dashboard and refresh your screen and the changes should be apparent.
Now sit back and admire your new topbar.
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.
Is it possible to remove the elgg_topbar_logo completely? If so, how is it done?
TIA :-)
Try http://community.elgg.org/pg/pages/view/91728/ and just delete that section of code it mentions.
How do totally get rid of the dashboard link?
Same as previous answer.
u need to go through the codes manually and just delete it.
u need to go through the path
elgg-1.7\views\default\page_elements\elgg_topbar.php and make the changes manually.
This discussion relates to 1.5 only...
its same for 1.5 also. u need to do the same for it also
I've read a lot of help posts referring to a theme directory (including this one).
I haven't downloaded anyone else's theme (and I can't find a default theme file) because well, I don't like any of them (sorry) and I want mine to look unique, as much as possible. So far I've used plugins to make changes to colors, etc. Which means, I don't have a theme directory (I don't think).
Is this the wrong way to approach it? Do I have to download someone else's theme to make sense of all the suggestions that say "go to your theme directory"? I can't find an "activity" or "river" directory either. Is it called something else?
What is the best way, in terms of procedure that will aid me in the future, of doing these things? Should I roll my own theme, not worry about a theme directory and hard-code things? Or load someone else's them and then drastically change it? Thanks.
In elgg themes are equivalent to plugins, they're not structurally separated like in Drupal or whatever else you might be used to. So when people talk about looking in the theme directory, it's not necessarily a directory called 'theme' it's the directory of the plugin that's being used as the theme - which may be named whatever the author chooses.
Ideally if you're looking for something unique, you'd roll your own theme. If you're not too familiar with elgg yet I'd suggest starting with a theme that's similar enough to build from and see how they're overwriting the default views/css etc.
'default theme' ? ==>
the parts of elgg's default theme -
are loosely spread over different folders,
mainly the /views/default/css -
where all the css that control the appearance lives.
and hmmm...
i thot i has prepared a 'defauult theme' plugin when 1.8 came out --
to collect all the components of the 'theme' into one plugin
so that it be easy to find, review, change.
don't know what happened to that code ;(
in elgg all the extras' modules are in the folder /mod
there is no distinction made between the type of the extras.
so both elgg 'plugins' and 'themes' will be in there.
the only way to know the difference
is if the developer named his plugin/theme to try to say what it is.
so on example below --
my_theme is a (non-plugin;) theme
and my_plugin is a (non-theme;) plugin..
because i say so (via the name) ;-)
(*could be a lie.. but unlikely)
Directory of C:\xampp\htdocs\Elgg1880_BASE
11/04/2012 11:12 AM <DIR> actions
11/04/2012 11:12 AM <DIR> _graphics
. . .
12/16/2012 10:10 AM <DIR> mod
11/04/2012 11:12 AM <DIR> languages
. . .
11/04/2012 11:21 AM <DIR> engine
07/11/2012 06:35 AM 4,879 htaccess_dist
07/11/2012 06:35 AM 735 index.php
. . .
Directory of C:\xampp\htdocs\Elgg1880_BASE\mod
12/15/2012 08:50 AM <DIR> adverts
11/04/2012 11:12 AM <DIR> blog
. . .
11/19/2012 10:52 PM <DIR> my_theme
11/19/2012 10:52 PM <DIR> custom_index
11/04/2012 11:12 AM <DIR> pages
11/19/2012 10:52 PM <DIR> my_plugin
. . .