Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Topic started by: CheeseHead05 on June 24, 2013, 10:07:47 AM

Title: How do you replace big red X's?
Post by: CheeseHead05 on June 24, 2013, 10:07:47 AM
I have two big red X's on my template..I attempted to remove SMF at top right, now there is a big X and also in some browser on the top left there is a big red X that is supposed to read my forum's title. Is there like a transparent code that I can use to cover that up and also why does the title show up on some browsers and not all?

Thanks in advance!
Title: Re: How do you replace big red X's?
Post by: Chalky on June 24, 2013, 11:42:02 AM
That's because you have just removed the image and your browser is throwing a hissy fit because it can't find it.  You need to either replace the images you removed with other images of the same name OR  remove the piece of code in the template where the image is being called.  If you show us a screenshot we might be able to tell you which file you need to edit, then you can search the file for yourself.   Alternatively if you show us a link to your site someone might be able to tell you exactly which code to remove, though if you removed theme images and you're using a custom theme you might be better asking the theme author what you need to edit  :)
Title: Re: How do you replace big red X's?
Post by: CheeseHead05 on June 24, 2013, 01:48:08 PM
Heres ya go Chalk,

The two x's at top..
Title: Re: How do you replace big red X's?
Post by: Chalky on June 24, 2013, 01:57:47 PM
I know you're funny about sharing your URL so you might want to edit that picture  ;)

It looks like you need to edit index.template.php within your custom theme.  Easiest way to find the relevant sections is probably to search the file for the name of the image you removed, eg. searching "smflogo", then maybe try removing this line:

<img id="smflogo" src="http://forums.*********.com/*********/Themes/greengrass1/images/smflogo.png" alt="Simple Machines Forum" title="Simple Machines Forum">

As always, keep a copy of the original file in case an edit gives you a parse error, you can just revert back to the original and start again  :)
Title: Re: How do you replace big red X's?
Post by: Illori on June 24, 2013, 02:01:41 PM
which then makes this thread a dup of http://www.simplemachines.org/community/index.php?topic=505795
Title: Re: How do you replace big red X's?
Post by: Chalky on June 24, 2013, 02:03:53 PM
Well spotted Illori!  What's more we have a soothsayer in our midst  ;)

Quote from: shadow82x on June 14, 2013, 01:01:33 AM
Additionally, it's never a good idea to just remove an image in your file system. If it's being used on your site it will display a big red X on most web browsers.
Title: Re: How do you replace big red X's?
Post by: CheeseHead05 on June 24, 2013, 03:23:19 PM
Cool beans,

So with that being said is there a code for a transparant blank to place there?

@ Illori, the code K@ gave me led to a parse error..What are those exactly by the way?

And PS

Im not understanding y there is still an X if I do remove that line. "The browser is searching for an image" but if that line is not present in the file, the browser should not be looking for it because it is non-existent right?
Title: Re: How do you replace big red X's?
Post by: Chalky on June 24, 2013, 05:30:29 PM
But that line is there, I can see it.  Viewing the page source on your site still shows me this:

<div id="top_section">
<h1 class="forumtitle">
<a href="http://forums.solematesxoxo.com/nikeadidas/index.php"><img src=" " alt="Nike/Adidas" /></a>
</h1>
<img id="upshrink" src="http://forums.solematesxoxo.com/nikeadidas/Themes/greengrass1/images/upshrink.png" alt="*" title="Shrink or expand the header." style="display: none;" />
<img id="smflogo" src="http://forums.solematesxoxo.com/nikeadidas/Themes/greengrass1/images/smflogo.png" alt="Simple Machines Forum" title="Simple Machines Forum" />
</div>


See the <img id="smflogo" src="http://forums.solematesxoxo.com/nikeadidas/Themes/greengrass1/images/smflogo.png" alt="Simple Machines Forum" title="Simple Machines Forum" />?  That's where index.template.php tells your browser to display the image smflogo.png, but because you have just deleted the image, your browser goes "smflogo.png?  Can't find it - eek!  I'll just show a red cross instead".  You could just ask all your users to use Firefox instead and then they won't see the red crosses because Firefox just says "Can't find the image, hey-ho" and carries on regardless  :)

A parse error usually means you've made an error in the syntax; maybe not closed a div properly, removed a ' a , or a ; you shouldn't have or added one where SMF wasn't expecting it.  You should check that you really are using K@'s code correctly as it's very easy to get those funny php punctuation marks in the wrong place when you're making manual edits  ;)
Title: Re: How do you replace big red X's?
Post by: CheeseHead05 on June 25, 2013, 09:42:49 AM
Ka@,

So if I go into the index.template and remove this code, it will remove the big x where the smf logo once was? And what code was that that K@ gave?
Title: Re: How do you replace big red X's?
Post by: Chalky on June 25, 2013, 11:22:30 AM
K@ told you exactly the same as I did, but I just told you to remove the line.  K@ told you to replace the section of code that includes that line with the same section of code with that line removed, because the find/replace method often seems easier to follow.  The result is the same.  And K@ was thorough in directing you to remove some CSS as well, which wouldn't have occurred to me.

And yes, if you do it correctly it will prevent the X from showing because the image will no longer be called.  Therefore your browser will no longer complain about it.
Title: Re: How do you replace big red X's?
Post by: CheeseHead05 on July 01, 2013, 09:38:14 AM
Chalk,

The oddest thing is that on my notepad++, it says it couldnt find that line starting with...weird 0_o
Title: Re: How do you replace big red X's?
Post by: CheeseHead05 on July 13, 2013, 10:38:00 PM
Quote from: ChalkCat on June 24, 2013, 05:30:29 PM
But that line is there, I can see it.  Viewing the page source on your site still shows me this:

<div id="top_section">
<h1 class="forumtitle">
<a href="http://forums.solematesxoxo.com/nikeadidas/index.php"><img src=" " alt="Nike/Adidas" /></a>
</h1>
<img id="upshrink" src="http://forums.solematesxoxo.com/nikeadidas/Themes/greengrass1/images/upshrink.png" alt="*" title="Shrink or expand the header." style="display: none;" />
<img id="smflogo" src="http://forums.solematesxoxo.com/nikeadidas/Themes/greengrass1/images/smflogo.png" alt="Simple Machines Forum" title="Simple Machines Forum" />
</div>


See the <img id="smflogo" src="http://forums.solematesxoxo.com/nikeadidas/Themes/greengrass1/images/smflogo.png" alt="Simple Machines Forum" title="Simple Machines Forum" />?  That's where index.template.php tells your browser to display the image smflogo.png, but because you have just deleted the image, your browser goes "smflogo.png?  Can't find it - eek!  I'll just show a red cross instead".  You could just ask all your users to use Firefox instead and then they won't see the red crosses because Firefox just says "Can't find the image, hey-ho" and carries on regardless  :)

A parse error usually means you've made an error in the syntax; maybe not closed a div properly, removed a ' a , or a ; you shouldn't have or added one where SMF wasn't expecting it.  You should check that you really are using K@'s code correctly as it's very easy to get those funny php punctuation marks in the wrong place when you're making manual edits  ;)


ChalkCat,

In my display.template, Im not finding those lines, instead its only finding a very small portion and that's it..Can I attach my file so u can take a look?
Title: Re: How do you replace big red X's?
Post by: Chalky on July 13, 2013, 11:20:45 PM
Sure, go ahead.  I won't be able to look at it until tomorrow because I'm about to go to bed, but somebody else may look at it sooner  :)
Title: Re: How do you replace big red X's?
Post by: CheeseHead05 on July 14, 2013, 01:34:43 AM
Quote from: ChalkCat on July 13, 2013, 11:20:45 PM
Sure, go ahead.  I won't be able to look at it until tomorrow because I'm about to go to bed, but somebody else may look at it sooner  :)

Title: Re: How do you replace big red X's?
Post by: Chalky on July 14, 2013, 04:57:14 AM
Here try this  :)
Title: Re: How do you replace big red X's?
Post by: CheeseHead05 on July 14, 2013, 01:36:16 PM
So which lines did you add/replace as I have 3 more forums with this same theme..I took your version and just copied and paste.
Title: Re: How do you replace big red X's?
Post by: Chalky on July 14, 2013, 03:21:13 PM
I removed this line:

', empty($settings['site_slogan']) ? '<img id="smflogo" src="' . $settings['images_url'] . '/smflogo.png" alt="Simple Machines Forum" title="Simple Machines Forum" />' : '<div id="siteslogan" class="floatright">' . $settings['site_slogan'] . '</div>', '

It does look a bit different to the code I'd pasted earlier, but then there is a difference between viewing the page source and seeing the actual file  ;)

You could just search for "smflogo" and remove the whole line it sits on.
Title: Re: How do you replace big red X's?
Post by: CheeseHead05 on July 14, 2013, 10:25:19 PM
ChalkCat,

Thanks pal! U r a lifesaver!

Yet one more question.

I have a total of 4 forums. In my top left on 2, my title shows which it should but on the other 2, Im getting an X where the title should be.

Take a look at the attachments in reply 2:
http://www.simplemachines.org/community/index.php?topic=507421.0
Title: Re: How do you replace big red X's?
Post by: Chalky on July 15, 2013, 11:38:26 AM
Try removing this bit:

<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>


I've made the edit to the same file we removed the logo from yesterday, attached  :)
Title: Re: How do you replace big red X's?
Post by: CheeseHead05 on July 15, 2013, 01:39:48 PM
Do you think my title will reappear? (will attempt once I get home).
Title: Re: How do you replace big red X's?
Post by: Chalky on July 15, 2013, 02:09:42 PM
No because I've removed it  :o

Here's how the file I've attached above looks on one of my test sites  http://www.parsleymonster.net/whitetest
Title: Re: How do you replace big red X's?
Post by: CheeseHead05 on July 15, 2013, 02:44:38 PM
ohhhhhh, i c. but i dont want to remove my title just make it appear normal and not with the big X. im reallly glad that smf the logo is gone tho.
Title: Re: How do you replace big red X's?
Post by: Chalky on July 15, 2013, 02:49:18 PM
Ah sorry I misunderstood you.  What did you do to make the X appear there in the first place?  The presence of the X suggests you removed an image from somewhere... If you right-click on that X do you get the option to copy image location?  What does that show?
Title: Re: How do you replace big red X's?
Post by: Illori on July 15, 2013, 02:53:46 PM
sounds like the op put a path in current themes logo image url that does not exist and as a result the x shows over the forum name.
Title: Re: How do you replace big red X's?
Post by: CheeseHead05 on July 15, 2013, 02:59:45 PM
@Chalk,

No when I right click on the x it doesnt give the "copy image loc" option yet "sopy shortcut"

@Illori,

I think that is what might of what happened, any suggestions?
Title: Re: How do you replace big red X's?
Post by: Illori on July 15, 2013, 03:01:58 PM
go in admin -> current theme and remove the path to the image that does not exist.
Title: Re: How do you replace big red X's?
Post by: Chalky on July 15, 2013, 03:03:24 PM
Current Theme > Theme Settings.   "Logo image URL"  ;)
Title: Re: How do you replace big red X's?
Post by: CheeseHead05 on July 15, 2013, 06:16:14 PM
Illori,

I am unclear as to you request. In my current theme all I c are URLs..
Title: Re: How do you replace big red X's?
Post by: Illori on July 16, 2013, 07:33:35 AM
we told you already above what to look for and remove.
Title: Re: How do you replace big red X's?
Post by: CheeseHead05 on July 16, 2013, 10:10:38 AM
ok, no need to get fussy!
Title: Re: How do you replace big red X's?
Post by: Illori on July 16, 2013, 10:24:47 AM
i am not getting fussy, the answer was just given to you a few posts up.
Title: Re: How do you replace big red X's?
Post by: CheeseHead05 on July 17, 2013, 08:26:51 PM
Wow!

Chalk and Illori,

For the life of me, I tend to make the simplest things harder. I fixed the problem and it worked for one. I made the same exact edits to my other that was displaying the same issue but nothing happened, still there. All I did was go to current theme > sight slogan, just typed in something simple and the X is now gone for that particular forum.

Title: Re: How do you replace big red X's?
Post by: CheeseHead05 on July 26, 2013, 09:44:18 PM
Chalk,

I switched my theme and have another big X. Could you help me out again?
Title: Re: How do you replace big red X's?
Post by: Fog on July 27, 2013, 09:02:32 PM
It looks like you just need to copy a image file from a theme that doesn't have the RED X's to the ones that do have RED X's.

Title: Re: How do you replace big red X's?
Post by: Chalky on July 28, 2013, 04:01:27 AM
Sorry I've only just seen this!  Sure, attach the file  ;)