News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Default Theme Quirks 1.0

Started by Kirby, October 14, 2007, 04:13:21 PM

Previous topic - Next topic

Kirby

Link to Mod

Default Theme Quirks 1.0
Author: Kirby (simplemachines.org member)

SUMMARY: This mod makes the following changes to the default theme:
   * There is no longer a 12px restriction on the poll bar image size (Display.php)
   * The Who's online page shows a better icon for personal messaging thats lined up properly (Who.template.php)
   * Personal Message Options in the profile page now looks like the other pages (Profile.template.php)

COMPATIBILITY: Tested only with 1.1.4. If you think it can work with an older version, you may edit the package-info.xml and try it.

VERSIONS:
   1.0- Initial release

MinasC


shadow82x

Quote from: MinasC on October 14, 2007, 06:19:36 PM
any preview images ?
Heres one of the index.template.php with custom who.template.php. I also think he took away the online icon and replaced it with the PM icon.

Colin B
Former Spammer, Customize, & Support Team Member

MinasC


Kirby

Exactly what shadow said :) Do you want more images?

ES23

Hi!

previously,I've installed who voted what mod and my Display.php has already been modified.So test failed for Display.php.

Display1.php is my Display.php file before installation of this default theme quirks.
Display2.php is my Display.php file after I manually edited the modifications needed but I got this error in my forum error log after that.

8: Undefined variable: i
File: /var/www/html/forums/Sources/Display.php
Line: 1000

Both Display1.php and Display2.php are attached to this post.

Can someone advised please?Thanks.

MinasC

Quote from: Kirby on October 14, 2007, 10:06:13 PM
Exactly what shadow said :) Do you want more images?

actually yeah , if not much to ask ! thnx !

Simplemachines Cowboy

My SMF forum: The Open Range

Kirby

ES23, Unfortunately I cannot find any explanation from the files provided. Can you please refer me to the other mod?

Here are some screenshots :)
The first one shows how the user online icon in Who's Online is aligned properly and replaced with one that simply links users to personal messaging. Obviously, if the user is on the who's online list, they are online! (The icon in the screenshot is not the one used, its whatever your im_on.gif is set to.

The second one shows how poll_middle.gif can be higher than the 12px limit set by Display.php

The third one shows how the personal message options area fits the bordering of the other profile options.

ES23

Quote from: Kirby on October 17, 2007, 08:56:25 PM
ES23, Unfortunately I cannot find any explanation from the files provided. Can you please refer me to the other mod?

Sure ... :) I just found out my Display.php is primarily modified by SMF Poll Mod(NOT who voted what mod) which is downloaded here: http://custom.simplemachines.org/mods/index.php?mod=765

In Display.php,

the code:
'bar' => '<span style="white-space: nowrap;"><img src="' . $settings['images_url'] . '/poll_left.gif" alt="" /><img src="' . $settings['images_url'] . '/poll_middle.gif" width="' . $barWide . '" height="12" alt="-" /><img src="' . $settings['images_url'] . '/poll_right.gif" alt="" /></span>',

is already changed to

'bar' => '<span style="white-space: nowrap;"><img src="' . $settings['images_url'] . '/poll/poll_left_c'. $i%10 . '.gif" alt="" /><img src="' . $settings['images_url'] . '/poll/poll_middle_c' . $i%10 . '.gif" width="' . $barWide . '" height="12" alt="-" /><img src="' . $settings['images_url'] . '/poll/poll_right_c' . $i%10 . '.gif" alt="" /></span>',

How do I go about modifying my Display.php then?

Kirby

You would replace

'bar' => '<span style="white-space: nowrap;"><img src="' . $settings['images_url'] . '/poll/poll_left_c'. $i%10 . '.gif" alt="" /><img src="' . $settings['images_url'] . '/poll/poll_middle_c' . $i%10 . '.gif" width="' . $barWide . '" height="12" alt="-" /><img src="' . $settings['images_url'] . '/poll/poll_right_c' . $i%10 . '.gif" alt="" /></span>',


with

'bar' => '<span style="white-space: nowrap;"><img src="' . $settings['images_url'] . '/poll/poll_left_c'. $i%10 . '.gif" alt="" /><img src="' . $settings['images_url'] . '/poll/poll_middle_c' . $i%10 . '.gif" width="' . $barWide . '" height="' . $middle_img_height . '" alt="-" /><img src="' . $settings['images_url'] . '/poll/poll_right_c' . $i%10 . '.gif" alt="" /></span>',

Sorry about the belated reply :-[

ES23

It's alright :) Thanks for the reply ...

How about the other portion of modification to be made to Display.php?

The addition of the code:

// Get the height of the middle poll image...
$middle_img_height = url_image_size($settings['images_url'] . '/poll_middle.gif');
$middle_img_height = $middle_img_height[1];


cannot seem to work anymore since my variable,poll_middle.gif is already modified by SMF Poll mod.So how do I go about modifying that portion so it will go along perfectly with the code you have suggested for modification in your above post?

Kirby

Quote from: ES23 on November 01, 2007, 01:47:40 AM
It's alright :) Thanks for the reply ...

How about the other portion of modification to be made to Display.php?

The addition of the code:

// Get the height of the middle poll image...
$middle_img_height = url_image_size($settings['images_url'] . '/poll_middle.gif');
$middle_img_height = $middle_img_height[1];


cannot seem to work anymore since my variable,poll_middle.gif is already modified by SMF Poll mod.So how do I go about modifying that portion so it will go along perfectly with the code you have suggested for modification in your above post?
Totally missed this-sorry.
You would have to add that code after this line:

// Determine if a decimal point is needed in order for the options to add to 100%.
$precision = $realtotal == 100 ? 0 : 1;

Advertisement: