Replacing the Default Elgg Title With an Image

Written by Rodolfo Hernandez Saturday, 4 December 2010

So, you installed Elgg and now you want to place an image instead of  site name with letters. Well, here is a little guide that will explain how to replace letters for a good looking logo.

Ok, so our site name looks like this:

However, we want to change it with an image or custom logo. To do that we do the following:

1.  Choose an image. Any image that you want.

2.  Place that image in the folder “_graphics”, which is inside the Elgg folder.

3.  Open the file header_contents.php

Location: [mysite/views/default/page_elements/header_contents.php]

4.  Look for this line in that file:

<h1><a href=”<?php echo $vars['url']; ?>”><?php echo $vars['config']->sitename; ?></a></h1>

5. Replace it with this one:

<a href=”<?php echo $vars['url']; ?>”><img src=”<?php echo $vars['url'];>_graphics/logo.gif” alt=”<?php echo $vars['config']->sitename; ?>” title=”<?php echo $vars['config']->sitename; ?>” /></a>

(Replace the “logo.gif” in that line with the name of your image or logo)

6. After making those changes, the image is going to be display, instead of the letters.

I hope you find this information helpful.

For more info about Elgg hosting solutions please visit Arvixe-Elgg Hosting

Happy Hosting!

Rodolfo Hernandez

omo algo basico, para empezar a personalizar nuestro diseño, tenemos diferenciarlo con un logo.


2 Comments

  1. Robert Atchison Jr.   |  Thursday, 26 May 2011 at 11:24 am

    I did not have any luck with this one working but then again maybe I did something wrong. I get the following error {Parse error: syntax error, unexpected ‘>’ in /home/socially/public_html/views/default/page_elements/header_contents.php on line 18}

    I’ve tried replacing the text between the H1 tags and I’ve tried replacing everything H1 tags too. I’m sure it’s something too simple that I’m overlooking maybe a dash or slash who knows… I’m trying to make the image a header image so maybe that’s the problem it could be too big. Thought making it the size of the content area but that did not work, so I just copied <a href=””>sitename; ?> back in it’s place and back to square one.

    Anyway it’s still nice work and I hope to get my header image up and running, thanks keep up the good work.

  2. Rodolfo Hernandez   |  Saturday, 28 May 2011 at 6:03 pm

    @Robert Artchison Jr. Hello there! Here’s an updated post for newer Elgg Versions:

    http://blog.arvixe.com/how-to-replace-default-elgg-title-with-an-image/

    Rodolfo Hernandez
    Arvixe/Elgg Community Liaison

Leave a Reply






8 − five =