TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 287
  • Total: 287

Replace blocks TPcollapse/TPexpand buttons

Started by whoesa, April 12, 2008, 01:03:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

IchBin

If you place that code in your index.template.php file, then you also need to copy ALL of the tinyportal images from the default theme to your theme. You're probably missing the images, which is why its displaying the text instead.

rand12om


confuzed

Quote from: Jpgâ,,¢ on April 15, 2008, 02:55:45 AM
Okay I decided to take 5 minutes to fix this.

Here's the code needed to fix the bug forever-

In TPblocks.template.php:

Find-
document.getElementById( blockimage ).src = smf_images_url + (state ? "/collapse.gif" : "/expand.gif");

Replace with-

                  document.getElementById( blockimage ).src = "' .$settings['tp_images_url']. '" + (state ? "/TPcollapse.gif" : "/TPexpand.gif");


----

I guess all you have to do is add this code to your themes now Bikken for customization-
$settings['tp_images_url'] = $settings['images_url'] . '/tinyportal';


ah I just found this solution :)

does it matter whereabouts in the index.template file you add the code above?

IchBin


confuzed

// Initialize the template... mainly little settings.
function template_init()
{
global $context, $settings, $options, $txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '1.1';

/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;

/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = true;

/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = true;
}


here is my template_init() function, where specifically should it go?

Thanks

IchBin

Anywhere in there. Don't be afraid to try things or you'll never learn mate.

Riryoku


This website is proudly hosted on Crocweb Cloud Website Hosting.