Advertisement:

Author Topic: Change location of gif files  (Read 3636 times)

Offline colorpinpoint

  • Semi-Newbie
  • *
  • Posts: 10
Change location of gif files
« on: May 24, 2012, 03:50:05 PM »
I have been looking through the index.css files and i can't find where to change the location Ex:collapse.gif

Offline NanoSector

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,500
  • Gender: Male
  • VC321xb47@aperture:~#
    • Yoshi2889 on GitHub
Re: Change location of gif files
« Reply #1 on: May 24, 2012, 03:58:53 PM »
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

  • Guest
Re: Change location of gif files
« Reply #2 on: May 24, 2012, 04:34:28 PM »
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.

Offline colorpinpoint

  • Semi-Newbie
  • *
  • Posts: 10
Re: Change location of gif files
« Reply #3 on: May 24, 2012, 05:00:17 PM »
Which php file would it be in?

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,837
    • StoryBB/StoryBB on GitHub
Re: Change location of gif files
« Reply #4 on: May 24, 2012, 05:23:28 PM »
It's in a lot of places. So again, can you please tell us what you're thinking of doing?
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline colorpinpoint

  • Semi-Newbie
  • *
  • Posts: 10
Re: Change location of gif files
« Reply #5 on: May 24, 2012, 05:45:08 PM »
I want to change the location of the file.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,837
    • StoryBB/StoryBB on GitHub
Re: Change location of gif files
« Reply #6 on: May 24, 2012, 06:12:08 PM »
Why?

Are you hoping to replace it with a different image or what?
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

MrPhil

  • Guest
Re: Change location of gif files
« Reply #7 on: May 24, 2012, 06:32:20 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.

Offline Colin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,879
  • Gender: Male
  • SMF Developer
    • colinschoen on GitHub
Re: Change location of gif files
« Reply #8 on: May 24, 2012, 06:42:57 PM »
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

Offline colorpinpoint

  • Semi-Newbie
  • *
  • Posts: 10
Re: Change location of gif files
« Reply #9 on: May 24, 2012, 06:53:25 PM »
I don't wanna replace the file i just wan't to know where the url for it would be? Thats all

Offline Storman™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,027
Re: Change location of gif files
« Reply #10 on: May 25, 2012, 07:33:30 AM »
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.
Any Backup method is bettter than no Backup method....

Offline Roph

  • Jr. Member
  • **
  • Posts: 377
  • Gender: Male
Re: Change location of gif files
« Reply #11 on: May 25, 2012, 09:23:04 AM »
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

  • Guest
Re: Change location of gif files
« Reply #12 on: May 25, 2012, 11:10:59 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.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,837
    • StoryBB/StoryBB on GitHub
Re: Change location of gif files
« Reply #13 on: May 25, 2012, 12:10:02 PM »
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)
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline colorpinpoint

  • Semi-Newbie
  • *
  • Posts: 10
Re: Change location of gif files
« Reply #14 on: May 25, 2012, 07:11:24 PM »
Ive searched all my php files and could not find where it specifies the gif file

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,837
    • StoryBB/StoryBB on GitHub
Re: Change location of gif files
« Reply #15 on: May 25, 2012, 07:14:11 PM »
Search the files in Themes/default/ for collapse.gif, I guarantee you'll find them.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline colorpinpoint

  • Semi-Newbie
  • *
  • Posts: 10
Re: Change location of gif files
« Reply #16 on: May 25, 2012, 07:24:43 PM »
Searched all files in Themes/default/ for collapse.gif and found not a single word of .gif or collapse

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,837
    • StoryBB/StoryBB on GitHub
Re: Change location of gif files
« Reply #17 on: May 25, 2012, 08:14:51 PM »
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:

Code: [Select]
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)
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Texan78

  • Full Member
  • ***
  • Posts: 509
  • Gender: Male
    • WeatherConnectionForum on Facebook
    • @WxConnection on Twitter
    • Weather Connection
Re: Change location of gif files
« Reply #18 on: May 25, 2012, 08:18:34 PM »
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.

Offline colorpinpoint

  • Semi-Newbie
  • *
  • Posts: 10
Re: Change location of gif files
« Reply #19 on: May 25, 2012, 09:22:59 PM »
@Arantor what program did u use to search the files