Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: Koby on December 07, 2006, 12:52:51 AM

Title: Post Images... Not showing!
Post by: Koby on December 07, 2006, 12:52:51 AM
The settings for skins aren't working or something. Because no matter what I set the settings to it still uses text for the post new thread, new poll, edit, modify, etc.. I want it to use images though. How do I fix this and make it use the images in the image folder? O.o
Title: Re: Post Images... Not showing!
Post by: Koby on December 07, 2006, 10:58:08 PM
It's been almost 24 hours with no replies and this is now on page 6. O.o
Come on someone help me. The admin settings aren't changing it to images.
Title: Re: Post Images... Not showing!
Post by: Dannii on December 07, 2006, 11:13:01 PM
Can you provide a link to your forum please.
Title: Re: Post Images... Not showing!
Post by: Koby on December 08, 2006, 01:43:34 AM
http://forums.forgottenmem.net
Title: Re: Post Images... Not showing!
Post by: Dannii on December 08, 2006, 01:47:49 AM
Exactly which buttons do you want to use images? Can you take a screenshot of them for me? Because from what I can see there it looks fine.
Title: Re: Post Images... Not showing!
Post by: Koby on December 11, 2006, 06:15:13 PM
For another skin (not default). All the links like on the same page as all the posts, etc.. are all text.. I have it set to be images and want them to be Images. I think its kind of retarded to even have the option of text instead of the images. O.o You should just edit the skin if you wanted text.. >_< So how do you get the settings to actually work and make everything use the images?
Title: Re: Post Images... Not showing!
Post by: Koby on December 13, 2006, 04:06:52 AM
Over 36 hours no reply.. Page 9. Can't anyone tell me why it wont show images when set to and instead continues to use text? Gosh..
Title: Re: Post Images... Not showing!
Post by: Dannii on December 13, 2006, 04:12:12 AM
Well, can you provide a link to that theme?
Title: Re: Post Images... Not showing!
Post by: Koby on December 13, 2006, 05:48:13 AM
Every single theme is that way, including the default.
Title: Re: Post Images... Not showing!
Post by: Dannii on December 13, 2006, 06:16:36 AM
Quote from: eldʌkaː on December 08, 2006, 01:47:49 AMCan you take a screenshot of them for me? Because from what I can see there it looks fine.
Draw a box around the text links that you want to be images please. :)
Title: Re: Post Images... Not showing!
Post by: Koby on December 19, 2006, 10:11:37 PM
Why? I've told you what images..

   Reply  |  Notify  |  Mark unread  |  Send this topic  |  Print

etc..
Title: Re: Post Images... Not showing!
Post by: Dannii on December 19, 2006, 10:13:22 PM
They don't use images in Core. If you want images for those, then use another theme.
Title: Re: Post Images... Not showing!
Post by: Koby on December 19, 2006, 10:28:09 PM
Then whats the option to use images in the themes section of the admin cp do then?

And how come some themes I downloaded to use is using text instead of the buttons like it has in the image folder? O.o
Title: Re: Post Images... Not showing!
Post by: Dannii on December 19, 2006, 10:28:54 PM
It's for other themes. For Core, it's redundant. Same with the 'show linktree as a tree' option.
Title: Re: Post Images... Not showing!
Post by: Koby on December 19, 2006, 10:55:07 PM
Okay.. so which skin file would be for that page so that I can recode it then?
Title: Re: Post Images... Not showing!
Post by: SleePy on December 20, 2006, 12:49:08 AM
Are you wanting to change the text of
    Reply  |  Notify  |  Mark unread  |  Send this topic  |  Print

You will find that in the languages folder. I think in index.<language>.php in /Themes/default/languages

or do you want to change the order they appear?
You will find that in Display.template.php in /Themes/<theme>
If your custom theme doesn't have a Display.template.php it will be in the default theme folder

If you want to remove some of them Check
Admin -> Permissions to remove permissions to use those.

Or is there something else you wish to do with them?
Title: Re: Post Images... Not showing!
Post by: Koby on December 20, 2006, 02:36:20 AM
I'm wanting to change them to images.
Title: Re: Post Images... Not showing!
Post by: SleePy on December 20, 2006, 10:38:50 AM
Some modifications need to be done then..

Upload

reply.gif
notify.gif
markunread.gif
sendtopic.gif
print.gif

to your /Themes/default/images folder


Then Open index.template.php
Find:
// Generate a strip of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
global $settings, $buttons, $context, $txt, $scripturl;

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' . $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' . $txt[$value['text']] . '</a>';

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '<td>&nbsp;</td>';

echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '">&nbsp;</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' &nbsp;|&nbsp; ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '">&nbsp;</td>';
}


Replace:

// Generate a strip of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '', $use_images = false)
{
global $settings, $buttons, $context, $txt, $scripturl;

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif ((!isset($buttons[$key]) || $force_reset) && $use_images)
$buttons[$key] = '<a href="' . $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '><img src="' . $settings['images_url'] . '/' . $value['image'] . '" /></a>';
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' . $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' . $txt[$value['text']] . '</a>';

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '<td>&nbsp;</td>';

echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '">&nbsp;</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' &nbsp;|&nbsp; ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '">&nbsp;</td>';
}



Open Display.template.php
Find:

', template_button_strip($normal_buttons, 'bottom'), '


Replace:

', template_button_strip($normal_buttons, 'bottom', false, '', true), '



Title: Re: Post Images... Not showing!
Post by: Koby on December 30, 2006, 02:49:29 AM
Oh okay, thanks. How do I go about adding a button for new poll and new thread on the same page though?
Title: Re: Post Images... Not showing!
Post by: SleePy on December 30, 2006, 02:54:34 PM
Well as long as you Replaced that function up there this is all you need to do..

Upload these to that same Directory:
markread.gif
notify.gif
new_topic.gif
new_poll.gif

Then Open MessageIndex.template.php

Find:
', template_button_strip($normal_buttons, 'bottom'), '

Replace:
', template_button_strip($normal_buttons, 'bottom', false, '', true), '