News:

Wondering if this will always be free?  See why free is better.

Main Menu

Post Images... Not showing!

Started by Koby, December 07, 2006, 12:52:51 AM

Previous topic - Next topic

Koby

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

Koby

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.

Dannii

Can you provide a link to your forum please.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."


Dannii

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.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Koby

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?

Koby

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

Dannii

Well, can you provide a link to that theme?
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Koby

Every single theme is that way, including the default.

Dannii

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. :)
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Koby

Why? I've told you what images..

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

etc..

Dannii

They don't use images in Core. If you want images for those, then use another theme.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Koby

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

Dannii

It's for other themes. For Core, it's redundant. Same with the 'show linktree as a tree' option.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Koby

Okay.. so which skin file would be for that page so that I can recode it then?

SleePy

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?
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Koby

I'm wanting to change them to images.

SleePy

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), '



Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Koby

Oh okay, thanks. How do I go about adding a button for new poll and new thread on the same page though?

SleePy

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), '
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Advertisement: