News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

I can't find in code where logo is

Started by TAB004, November 04, 2011, 04:00:45 PM

Previous topic - Next topic

TAB004

After I upgraded to 2.0.1, my link to logo link on the top left cannot be found. It is not where I expected it to be, in index.template.php. Any ideas?

kat

I'm not sure I'm with you, there, TAB.

What about Admin>Current theme>Logo image URL: ?

TAB004

Yes, that's where the image is, but I'm trying to find where it is in the code so I can make it a link to my website. Before I upgraded I had the code performing that function in the index template, but as of my upgrade I can't find any mention of the image in the code... and yet there it is on the forum.

kat

Well, I just inspected the ol' element. The line of code is this:

<img src="http://media.simplemachinesweb.com/smf/default/images/english/new.gif" class="new_posts" alt=""/>

Modified, obviously.

Just got to find the file that it's in, now...

kat

One is in BoardIndex.template.php.

$child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . ($child['new'] ? '</a> <a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><img src="' . $settings['lang_images_url'] . '/new.gif" class="new_posts" alt="" />' : '') . '</a>';

kat

This line:

newPostsHTML += \'<div class="windowbg\' + (++reply_counter % 2 == 0 ? \'2\' : \'\') + \' core_posts"><span class="topslice"><span></span></span><div class="content" id="msg\' + newPosts[i].getAttribute("id") + \'"><div class="floatleft"><h5>', $txt['posted_by'], ': \' + newPosts[i].getElementsByTagName("poster")[0].firstChild.nodeValue + \'</h5><span class="smalltext">&#171;&nbsp;<strong>', $txt['on'], ':</strong> \' + newPosts[i].getElementsByTagName("time")[0].firstChild.nodeValue + \'&nbsp;&#187;</span> <img src="\' + smf_images_url + \'/', $context['user']['language'], '/new.gif" alt="', $txt['preview_new'], '" id="image_new_\' + newPosts[i].getAttribute("id") + \'" /></div>\';';

in Post.template.php

and this line:

<a href="', $topic['new_href'], '" id="newicon', $topic['first_post']['id'], '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>


in Recent.template.php

I think that's about it. :)

TAB004

Thanks for your help K@, but I am only more confused. I'm not asking for anyone to go through the tedium of trying to find where in the code the image might be... I can do that. I am just wondering if anybody might happen to know where in the code the image in the top left corner (the ecoculturevillage.org logo) would be found since I upgraded from 1.1.15 to 2.0.1?
I know the smf logo on the right is coded in the index template, right near where the logo on the left used to be.

TAB004

Maybe a better way of asking is... how can I turn that logo into a link to my site in 2.0.1?

kat

Ah, right.

How did you get the logo there?

Using the  Admin>Current theme>Logo image URL: thing?

busterone

in /Themes/default/index.template.php  look for
<div id="wrapper" style="width: ' . $settings['forum_width'] . '">' : '', '
<div id="header"><div class="frame">
<div id="top_section">
<h1 class="forumtitle">
<a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a>
</h1>';

the logo part is
<h1 class="forumtitle">
<a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a>
</h1>';

Advertisement: