Change location of gif files

Started by colorpinpoint, May 24, 2012, 03:50:05 PM

Previous topic - Next topic

colorpinpoint

I have been looking through the index.css files and i can't find where to change the location Ex:collapse.gif

NanoSector

Why do you want to change the location of the file?
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

MrPhil

The collapse.gif file is a foreground image (in PHP code, not CSS) used in many places in Themes/. Can you tell us what you're thinking of doing? If you want to replace the icon with another collapse.gif of the same size, that would not be difficult (save the old one Just In Case). If you want to change all collapse.gif to collapse.png, you have to go through the PHP code and find all uses of it. I count two-dozen or so uses of this one file. I don't know why you would want to change where the file is kept, but that would be a similar change to a name change. And keep in mind that your default and core themes will no longer be "stock", and may be difficult to update. You might want to create a new theme with your changed graphics.

colorpinpoint


Arantor

It's in a lot of places. So again, can you please tell us what you're thinking of doing?

colorpinpoint

I want to change the location of the file.

Arantor

Why?

Are you hoping to replace it with a different image or what?

MrPhil

Quote from: colorpinpoint on May 24, 2012, 05:45:08 PM
I want to change the location of the file.

Please give an example of what you want to do. We don't understand what you're asking for, or why you want to do it.

Colin

If you are attempting to modify the image simply replace it with an image with the same name and extension.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

colorpinpoint

I don't wanna replace the file i just wan't to know where the url for it would be? Thats all

Storman™

Reread the questions above and provide the answers, this is just going round in circles.

Essentially this has been answwered as Arantor says "It's in a lot of places" and I doubt anyone here is going to check every php file to find out where it exists when that's something you can do yourself.

Also, reread the advice from MrPhil.

Roph

I use PNGs in place of gifs for some of my theme stuff, you can simply save the PNG with a .gif extension, the browsers handle it fine. No more 1-bit transparency :)

MrPhil

Quote from: Roph on May 25, 2012, 09:23:04 AM
you can simply save the PNG with a .gif extension, the browsers handle it fine. No more 1-bit transparency

Eh? If you're in an image editor such as GIMP or Photoshop, loading a PNG image and saving it as GIF will change its internal format to GIF. You then are reduced to 1-bit transparency. If you're suggesting that they rename .png to .gif, I'm sure there are many browsers out there that will not display it correctly.

Either way, bad advice.

Arantor

Especially the one browser that has been known to crash when giving a PNG with a .gif extension (because it's told that it's a GIF image by the server)

colorpinpoint

Ive searched all my php files and could not find where it specifies the gif file

Arantor

Search the files in Themes/default/ for collapse.gif, I guarantee you'll find them.

colorpinpoint

Searched all files in Themes/default/ for collapse.gif and found not a single word of .gif or collapse

Arantor

I don't know how you searched, but I guarantee you it didn't work.

I just fired it up on Notepad++ to search the PHP files, and on my lightly modified test site:


Search "collapse.gif" (30 hits in 13 files)
  C:\wamp\www\smf202\Sources\Subs-BoardIndex.php (1 hits)
Line 98: 'collapse_image' => isset($row_board['can_collapse']) ? '<img src="' . $settings['images_url'] . '/' . $context['theme_variant_url'] . ($row_board['is_collapsed'] > 0 ? 'expand.gif" alt="+"' : 'collapse.gif" alt="-"') . ' />' : '',
  C:\wamp\www\smf202\Themes\core\BoardIndex.template.php (4 hits)
Line 31: <img id="newsupshrink" src="', $settings['images_url'], '/collapse.gif" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="display: none;" />
Line 63: srcExpanded: smf_images_url + \'/collapse.gif\',
Line 251: <img id="upshrink_ic" src="', $settings['images_url'], '/collapse.gif" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />
Line 490: srcExpanded: smf_images_url + \'/collapse.gif\',
  C:\wamp\www\smf202\Themes\core\Display.template.php (1 hits)
Line 720: sImageCollapsed: "collapse.gif",
  C:\wamp\www\smf202\Themes\core\PersonalMessage.template.php (1 hits)
Line 648: document.getElementById("expandLabelsIcon").src = smf_images_url + (current ? "/expand.gif" : "/collapse.gif");
  C:\wamp\www\smf202\Themes\core\Stats.template.php (4 hits)
Line 209: <img id="year_img_', $id, '" src="', $settings['images_url'], '/collapse.gif" alt="*" /> <a href="#year_', $id, '" id="year_link_', $id, '">', $year['year'], '</a>
Line 226: <img src="', $settings['images_url'], '/', $month['expanded'] ? 'collapse.gif' : 'expand.gif', '" alt="" id="img_', $month['id'], '" /> <a id="m', $month['id'], '" href="', $month['href'], '" onclick="return doingExpandCollapse;">', $month['month'], ' ', $month['year'], '</a>
Line 270: sYearImageExpanded: \'collapse.gif\',
Line 276: sMonthImageExpanded: \'collapse.gif\',
  C:\wamp\www\smf202\Themes\default\BoardIndex.template.php (4 hits)
Line 44: <img id="newsupshrink" src="', $settings['images_url'], '/collapse.gif" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="display: none;" />
Line 78: srcExpanded: smf_images_url + \'/collapse.gif\',
Line 311: <img class="icon" id="upshrink_ic" src="', $settings['images_url'], '/collapse.gif" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />
Line 515: srcExpanded: smf_images_url + \'/collapse.gif\',
  C:\wamp\www\smf202\Themes\default\Display.template.php (1 hits)
Line 980: sImageCollapsed: "collapse.gif",
  C:\wamp\www\smf202\Themes\default\ManageMaintenance.template.php (2 hits)
Line 228: document.getElementById("membersIcon").src = smf_images_url + (membersSwap ? "/collapse.gif" : "/expand.gif");
Line 382: document.getElementById("rotIcon").src = smf_images_url + (rotSwap ? "/collapse.gif" : "/expand.gif");
  C:\wamp\www\smf202\Themes\default\PersonalMessage.template.php (1 hits)
Line 653: document.getElementById("expandLabelsIcon").src = smf_images_url + (current ? "/expand.gif" : "/collapse.gif");
  C:\wamp\www\smf202\Themes\default\Post.template.php (2 hits)
Line 418: <img src="', $settings['images_url'], '/collapse.gif" alt="-" id="postMoreExpand" style="display: none;" /> <strong><a href="#" id="postMoreExpandLink">', $txt['post_additionalopt'], '</a></strong>
Line 761: srcExpanded: smf_images_url + \'/collapse.gif\',
  C:\wamp\www\smf202\Themes\default\Search.template.php (1 hits)
Line 222: document.getElementById("expandBoardsIcon").src = smf_images_url + (current ? "/expand.gif" : "/collapse.gif");
  C:\wamp\www\smf202\Themes\default\Stats.template.php (4 hits)
Line 367: <img id="year_img_', $id, '" src="', $settings['images_url'], '/collapse.gif" alt="*" /> <a href="#year_', $id, '" id="year_link_', $id, '">', $year['year'], '</a>
Line 386: <img src="', $settings['images_url'], '/', $month['expanded'] ? 'collapse.gif' : 'expand.gif', '" alt="" id="img_', $month['id'], '" /> <a id="m', $month['id'], '" href="', $month['href'], '" onclick="return doingExpandCollapse;">', $month['month'], ' ', $month['year'], '</a>
Line 435: sYearImageExpanded: \'collapse.gif\',
Line 441: sMonthImageExpanded: \'collapse.gif\',
  C:\wamp\www\smf202\Themes\zone99_20\BoardIndex.template.php (4 hits)
Line 32: <img id="newsupshrink" src="', $settings['images_url'], '/collapse.gif" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="display: none;" />
Line 66: srcExpanded: smf_images_url + \'/collapse.gif\',
Line 294: <img class="icon" id="upshrink_ic" src="', $settings['images_url'], '/collapse.gif" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />
Line 498: srcExpanded: smf_images_url + \'/collapse.gif\',


So, yes, it does find some cases (I have 3 themes installed but as you see, it's in the default theme)

Texan78

It doesn't exist, it's a figment of your imagination.

Can you please explain why you want to change the location? As in you want to move it to a different directory? If so please see the first question as please explain why you are wanting to do this so other can help you better. There may be a better solution for what you are trying to accomplish.

colorpinpoint

@Arantor what program did u use to search the files

Advertisement: