The Elders' House of Pain
Public Forum => Pc Help/Tweak Page => Topic started by: wonder. on October 19, 2007, 10:42:54 PM
-
How do u put a logo at the top of your page for SMF? can't figure it out...
~Wonder.
-
Look for the index.template.php file in the particular theme folder you use in the themes folder. Its under this area in the index.template.php // The logo and the three info boxes.
-
Well I found the Logo part, but i can't seem to figure out how to imput the URL... I have put in the url in some various spots, but it still doesn't come up... Here is the code:
if (empty($settings['header_logo_url']))
echo '
<span style="font-family: Verdana, sans-serif; font-size: 140%; ">', $context['forum_name'], '</span>';
else
echo '
<img src="', $settings['header_logo_url'], '" style="margin: 4px;" alt="', $context['forum_name'], '" />';
echo '
</td>
<td align="right" class="catbg">
<img src="', $settings['images_url'], '/smflogo.gif" style="margin: 2px;" alt="" />
</td>
</tr>
</table>';
-
This is the default file:
// This part is the logo and forum name. You should be able to change this to whatever you want...
echo '
<img src="', $settings['images_url'], '/smflogo.gif" style="width: 250px; float: ', !$context['right_to_left'] ? 'right' : 'left', ';" alt="" />';
if (empty($settings['header_logo_url']))
echo '
<span style="font-family: Georgia, sans-serif; font-size: xx-large;">', $context['forum_name'], '</span>';
else
echo '
<img src="', $settings['header_logo_url'], '" alt="', $context['forum_name'], '" border="0" />';
The file in red is what you would need to change. That is in the images directory.
Ours looks like this:
// This part is the logo and forum name. You should be able to change this to whatever you want...
echo '
<img src="../images/header.jpg" width="753" height="119" valign="top" style="float: center;" alt="Playing Source Since the Beginning of Time" />
<span style="font-family: Georgia, sans-serif; font-size: xx-large;"> </span>';[\quote]
-
Thanks hong, but is there any way to upload an image to the image files without going through the ftp database.. Cause i look in my database but it says the forum isn't installed... don't know, but it still works so i don't want to mess with it. So is there any way i could do that through the site?
-
scratch that, i was able to upload the pic... just trying to put it into the code now..
Ok, I tried doing it, but it still won't work... I copied the code u had, and just tried to edit it, because what i was doing wasn't working. This is what i have now... The picture isn't comming up... Any Ideas?
echo '
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' : '', '>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="catbg" height="32">';
if (empty($settings['header_logo_url']))
echo '
<img src="../images/logo_phpBB_med.gif" width="753" height="119" valign="top" style="float: center;" alt="Where Home Chefs Share Their Ideas" />
<span style="font-family: Georgia, sans-serif; font-size: xx-large;"> </span>';
echo '
The image is logo_phpBB_med.gif ... I have it uploaded to the image files too... Any ideas on what to do?
Here is my site.
www.ShareHomeRecipes.com
Thanks.
~Wonder.
-
Are you sure you have it in the right images folder? There are more than 1 images folder (default, plus each theme). It should go in the default images folder not the theme images folder.
-
Well i uploaded the pic to the defualt place i guess. Its where i saw the default logo... but i custimized my theme and i don't see it in the themes template. So where else could i upload the the pic to my theme?
-
Should be in this folder http://sharehomerecipes.com/smf/Themes/default/images/
ours is here http://theelders.net/forum/Themes/default/images/header.jpg
-
this is what i get when i click on that...
You don't have permission to access /smf/Themes/default/images/ on this server.
You may need to create an index.html page or enable the directory browsing by creating an .htaccess file containing "Options +Indexes".
-
Also our images folder is outside the forum directory, that is why we have the ../ in front of our images. You have to link all images with the intent you are coming from the same folder as the index.php file is at. so if your images folder is in the same directory as the index.php file, you would need to link it like
<img src="images/logo_phpBB_med.gif">
Remember, all links work by the current location of th open file. If you look at the address bar you can see our forum is in a folder called forum, even though the index template is the actual file being used, the index.php file is running everything. so all links need to be done from where the index.php file is and not the template file.
Widow
-
Is there any way to upload images directly to the template so i know what folder it is in?