News:

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

Main Menu

Ant's Mutant Curve

Started by Antechinus, February 26, 2020, 11:02:14 PM

Previous topic - Next topic

Sir Osis of Liver

#60
Works fine on test install.  Have to refresh page on client install to clear editor and see change.  Oddly, the button label is different, 'Edit' on my install, 'Modify Inline' on client install.  Both installed from same zip.

'Modify Inline' is from default index.english.php, 'Edit' is from ThemeStrings.english.php.  It's not loading theme language files.  Permissions were a mess, I've reset all dirs/files to 755/644, still doesn't work. >:(

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Antechinus

Meh. Sounds like not a theme problem then. If it's not loading the theme's language files that suggests something is borked in admin, or maybe the db.

How about with bog basic default Curve? Does the quick edit work normally with that?

Sir Osis of Liver

Hmm, well, looks like there are two separate problems.  Only mod installed is Suki's Simple Spoiler, it doesn't touch any theme or source files, but that's what causes the refresh glitch, same in Curve.  Uninstall the mod and quick edit works fine, but language file still isn't loading.

Just installed the mod on test install, what a mess.  In Curve or Mutant Curve it enlarges text fonts, picks up the language file, but quick edit doesn't load at all, just hangs with Loading... across the top.  Guess we'll have to dump it, but still not loading your language file on client forum, must have broken something in database.  Think I'll upload clean files and reinstall theme, see what happens.  The mod has it's own Subs- file, some language files, and an image.  Does a lot of damage for something so simple.

Also noticed in Mutant Curve that timestamps are missing in error log.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Antechinus

The missing timestamps is an odd one. It's fine on my tests site. Should be too, because it's calling all the default functionality including the timestamps. All I did was put the bits in different boxes and shuffle them around some. So that implies another glitch on your client's site.

It's unlike anything Suki codes to make a mess, and it would have been checked by the team before release anyway. Should give her a heads up about it. She might have an idea what the problem is.

Sir Osis of Liver

#64
It's an old mod, last updated 2012.  I'll post in her support topic.

Error timestamps are also missing in Curve.  Uploading clean files now ..........


Working now.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

shadav

could you maybe help me out for a second :)

trying to install this multi quote mod
https://custom.simplemachines.org/mods/?mod=2360
onto your theme

but the problem comes from index.template.php
find
echo '
</head>
<body>';

replace
echo '
</head>
<body '.((isset($context['current_action']) && ($context['current_action'] == 'post') && (isset($context['current_topic']))) ? 'onLoad="post_mquotes();"' : '').'>';


so how in the heck can i add that to your theme where the body is
<body', ($context['theme_variant'] != '') ? ' id="variant'. $context['theme_variant']. '"' : '', ' class="', implode(' ',$body_class), '">';

Antechinus

Lol. Ok, I should definitely let the caffeine circulate a bit more before messing with that one. :D It's first thing in the morning here.

However, if you're feeling adventurous, my instincts tell me it should be a simple addition after the existing stuff. So...


<body', ($context['theme_variant'] != '') ? ' id="variant'. $context['theme_variant']. '"' : '', ' class="', implode(' ',$body_class), '"'.((isset($context['current_action']) && ($context['current_action'] == 'post') && (isset($context['current_topic']))) ? ' onLoad="post_mquotes();"' : '').'>';


That should work. The first half of  the extra stuff in my version is just adding an id if there is a theme variant selected. This was because I wanted to build in solid support for multi-variant themes, and having the id there allows targeting by variant within a CSS file, which I can see being handy at times. If there are no variants, that code is just skipped. IOW, it's inactive in the current version of the theme.

The second half of my extra stuff sets a body class according to action or area, which allows styling by whatever. This was a styling option that was requested so often it ended up being core in 2.1, so I threw it in this beastie too. You might have noticed there are some additional options commented out in the array, if anyone ever wants even more detailed styling options.

Anyway, short version is that all of the above simply reduces to this in the markup:

<body id="variant_Name_of_variant" class="name_of_current_action" onLoad="post_mquotes();">';

Which looks a lot more palatable than the PHP behind it. :)


shadav

 :laugh: thank you

seems to have worked

Antechinus

Quote from: shadav on June 02, 2020, 04:24:45 AM
not really your theme issue but...though i'd give you a heads up
with the avaters on board and/or message index mod
it gets a bit wonky

Something just occurred to me about this. I used CSS to rearrange the board index and message index, but underneath that it's basically standard 2.0.x markup (give or take a smidgeon). The arrangement I used could be made to work with avatars on the index pages (almost anything can be made to work), but isn't really designed for it. However, just by changing the CSS to something closer to standard it would be easy to have a standard layout for those pages, which means the mod should work pretty well out of the box. Might need some CSS tweaks for avatar scaling or whatever, but nothing major.

This would also be an advantage for some of Sir Osis' users, who apparently can't find anything if it's on the same page it was always on but has moved to the left instead of remaining on the right. In the interest of being nice to those who have trouble finding their socks in the morning, I could give them the option of a standard index page arrangement.

So I'll take a look at these bits and see what I can come up with. :)

Antechinus

Just looking into the UserCP idea a bit too.

It's the sort of thing but would be good eye candy and UX for some average mugs, but not so good for admins. Average mugs wouldn't need that many boxes and icons (it would only need to cover the most commonly used areas) while admins and mods would most likely want full functionality all the time. That would get a bit over the top with a "UserCP" sort of layout, particularly on narrower screens, so IMO it would need the option of having the standard menu even on the Summary page.

Turns out this is not hard to do. When I ditched the drop menu system from admin/profile/etc, in favour of sidebar only, I had to include a redirect for users who had already selected the drop menus in their profile before this theme was installed.

// Redirects for deprecated drop menu system.
function template_generic_menu_dropdown_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
template_generic_menu_sidebar_above();
}
function template_generic_menu_dropdown_below()
{
global $context, $settings, $options;
template_generic_menu_sidebar_below();
}


So, all that would be needed is to hijack the old setting to make it do something else. Change the existing language string to something like "Use lotsa big boxes and chunky icons on my profile summary page eye candy FTW mwhahaha!", then ditch the redirects and use function template_generic_menu_dropdown_above() to hold the new menu for the UserCP arrangement. It'd basically just drop the cat and title bars, and throw all links into one ul regardless of section. That way all the boxes would stack neatly across sections and it'd be good to go. No mod needed. Just a minor template edit, and a bit of CSS and some icons.

Only catch is if people wanted to have a small blurb for each section. Those are easy to add in principle. You'd just throw yet more strings into ThemeStrings.wasp.php and the Anglos would be happy (apart from those funny ones who like using z all over the place) but anyone else would have to do their own translated strings. OTOH the existing menu doesn't have a blurb for every link and nobody seems to get lost, so maybe blurbs are superfluous to requirements.




Re avatars on index pages (for the daft trendy kids who are into them these days when I were a lad things were different): could add some sort of support for the existing mod, but frankly I can see that being trouble. I already have avatar sizing and index column widths sorted for responsive behaviour and any mod that wants to impose its own ideas is probably going to mess things up, because it won't have a clue what it's playing with.

The other catch is that I went and coded nifty fallback avs in any gruesome group colour you like, with the first letter of the username if the user has not selected an image av. The mod has no idea about this either, so would default to its standard backup gif instead. This means inconsistent UX across board/message/display, which is not so good.

This all means it would come down to recoding my templates and CSS to call all the spectacular smartarse shiznit I already put in there and make it work on everything from a desktop to a phone. It's possible, but it's not something I'm particularly interested in doing at the moment, so I'll throw that one on the back burner. Right now I want to play with dark theme variants, which is much more fun. :)

shadav

 :laugh: you are having way too much fun

eh the avatars on boards/ect i gave up on at the moment, if resized wayyyy down tiny small it's ok but meh....it's not really needed so eh, i gave up for now, eventually i'll get back around to it, but yeah like what you did with the custom "avatars" for default, that was nice....

liking the ideas of the usercp but it's ok, i may eventually play with it and try to redesign the entire profile, i liked the idea of the usercp mod the profile page needs a facelift....but maybe chunky menu icons isn't the way to go....i dunno yet....maybe collapsable divs or tabs or something to show/hide things...i have no idea other than just not really happy with the profile page at the moment....

i really need to learn css better, shoot i need to learn it all better, i know just enough to get myself into trouble and google is my friend  :laugh:

Antechinus

I'll probably do the basic UserCP thing just for ******z n giggles, because I'm currently in the mod to mess with CSS, and people used to like that mod back in the day. It wouldn't be hard to do, and I've never liked the default summary page much anyway. It always looks a bit half-arsed.

Antechinus

Got a bug fix list for this beastie, which I should sort out before I start playing with cool and nifty dark variants.

Ant's Mutant Curve 1.05 - bugfix list.
--------------------------------------

1/ index.css & rtl.css - Positioning of "New" indicators on message index (needs to be changed to right: 100%; plus suitable right margin).

2/ index.css & rtl.css - IIRC there was a bug with either unapproved topics or posts on message index (possibly RTL only - check).

3/ index.css & rtl.css - Post heading and dates are too in your face on small screens at the moment (ditch the bold and fade them a bit).

4/ Display/Recent/Personal/Moderation/index.css/rtl.css - Quickbuttons are also too IYF on small screens, and overwhelm short post content.

Possible solutions:

a/ Maybe move to text-only buttons, or
b/ opacity reduction off-hover, or
c/ could have icons only, with title text on anchors (and quickmod image).
d/ Fake select for "More options" could be made cleaner.

5/ index.css & rtl.css - Report post template could do with minor adjustment on smaller screens.

6/ Bugs in rtl.css. Lines 470, 473 and 476 call deprecated ID, so will not work in practice.

470: #variant_rtl #pick_theme img.padding {
473: #variant_rtl #pick_theme .reset li {
476: #variant_rtl #pick_theme .reset li:last-child {

Note: Beats me why these would even be there. Rtl.css should include the same presentation without an ID being necessary.
Go through the whole thing and re-check basic assumptions.

7/ index.template.php - Lines 612-614 may conflict with inline-block buttons. Check for RTL bug with buttonlists (including checking CSS files).

612: // List the buttons in reverse order for RTL languages.
613: if ($context['right_to_left'])
614: $button_strip = array_reverse($button_strip, true);

8/ Remove deprecated #top and #bot anchors from Display, MessageIndex and Recent templates.


I'll get onto that lot tonight, so I can start having fun once the serious stuffz is out of the way. That means a 1.06 will be along soon (can provide patch from earlier versions if anyone wants it). Will be a few CSS tweaks, but possibly one or two minor template edits. Nothing critical (as long as you're not using French).

I'll do the UserCP option just for fun. Won't attempt to support avs on index pages as that's not something that can be done just in the templates, AFAIK. However, will provide optional CSS for a more traditional board and message index once I do a variant or two, and the more traditional layout should be more friendly to avs. Although mod will probably still need tweaking to install, and won't pick up the custom solid-colour-with-first-letter fallback avs this theme has.

Antechinus

Just going through the bug list and checking things. Should have spotted this stuff before. :P

I use display: inline-block on menus and button lists because it makes more sense than the default floats. Menus strips set as inline-block don't need to have the float cleared on the parent element, so don't need gruesome "fixes", and they also switch button order nicely for RTL languages.

The default floats were only ever used because, back in the Dark Ages, 2.0.x was coded to support IE6 (may its originators burn in the fire of hell forever) and IE7 (while being nibbled on by hordes of piranha serves them right) and those "browsers" didn't support inline-block for HTML lists. Floats worked in all browsers (even the really bad ones) so floats were used for 2.0.x menus.

Floats suck for menus though, because they don't auto-reverse for RTL languages, so you have to do things to make them reverse. Ergo this crud in the default index.template.php:

// List the buttons in reverse order for RTL languages.
if ($context['right_to_left'])
$button_strip = array_reverse($button_strip, true);


My buttons, set as inline-block, already switched themselves for RTL. Or would have, if that code hadn't been there. I noticed they weren't behaving like they should, so came up with a clever CSS dodge to make them do what they ought to, namely:

.pagelinks_inline + .buttonlist.floatright,
#quickModForm + .buttonlist.floatright,
#lastPost + .buttonlist.floatright {
transform: scaleX(-1);
}
.pagelinks_inline + .buttonlist.floatright li,
#quickModForm + .buttonlist.floatright li,
#lastPost + .buttonlist.floatright li {
transform: scaleX(-1);
}


Which really is quite cool, in that it mirrors the parent ul right to left and then mirrors each button back the other way within itself, with the result that the list order is reversed for RTL but the text stays the right way around. Only catch is if I'd remembered the code hiding at the end of bloody index.template.php I wouldn't have needed the nifty CSS dodge, because all it ever really needed was to remove the forced array reverse in the PHP. Get rid of that, and the button lists behave perfectly in LTR or RTL.

Moral of the story: before getting clever, look for simple things. :P
Other moral of the story: if anyone else is using inline-block for their buttonlists (which would be smart) get rid of that array reverse. It'll make things easier if anyone wants to use RTL.


So that's one bit pf superfluous muppetry sorted. I found another one, which wasn't even on my bug list. Theme thumbnails. Somehow, this thing got through all my testing and all the theme approval process without anyone noticing that the thumbnail doesn't work. It's traditional to put the path to your thumbnail in languages/Settings.english.php so I did:

$txt['theme_thumbnail_href'] = $settings['images_url'] . '/thumbnail.jpg';
It's a really cool path. Points right at the thumbnail, it does. Doesn't work though. Why not? Because over in Sources, Themes.php will only look for gif's, and will insist that whatever path you put in Settings.english.php be ignored, and will force a call for images/thumbnail.gif in the markup.

$context['available_themes'][$id_theme]['variants'] = array();
foreach ($settings['theme_variants'] as $variant)
$context['available_themes'][$id_theme]['variants'][$variant] = array(
'label' => isset($txt['variant_' . $variant]) ? $txt['variant_' . $variant] : $variant,
'thumbnail' => !file_exists($theme_data['theme_dir'] . '/images/thumbnail.gif') || file_exists($theme_data['theme_dir'] . '/images/thumbnail_' . $variant . '.gif') ? $theme_data['images_url'] . '/thumbnail_' . $variant . '.gif' : ($theme_data['images_url'] . '/thumbnail.gif'),
);


Now at this point you might be wondering why the fornicating excuse for a donkey's left nut called Settings.english.php expects you to put in a path to your thumbnail if the 2.0.x donkey's rear end called Themes.php is going to insist on ignoring whatever you put in. Why not just forget wanting a path in languages, since it's no damned use anyway, and just call thumbnail.gif and be done with it?

But no, that would be logical, so we can't have that. :P So, I'll have to change the jpg (which has a lower byte count than a gif and looks just as good) to a gif (which is pointless because even back in IE6 days theme thumbnails had no alpha channel, so no need for a file format that was only ever developed to allow for binary alpha).

SMF coding. For those who want to learn the true meaning of "FFS".


Antechinus

Got the User CP thang running on local with (mostly) proper markup and CSS (and a bunch of handy icons thrown at it for testing). Works quite well.  User CP thang only displays on your own summary page. Normal sidebar menu is hidden on your own summary page, but comes back on any other page (your posts, your stats, someone else's summary, admin, etc).

Only catch is that having deleted the setting I was going to hijack from Mutant's Settings.template.php I can't just drop it back in, because SMF apparently won't recognise it, even though it is a user setting rather than a theme setting and is therefore in the db anyway.

Which seems odd, until you remember it's SMF, so there you go. :P I assume there will be some way of patching it back in. Or, if a new copy of the updated theme was installed with that setting already back in Settings.template.php, then obviously that would work too.

(Also fixed everything else on the bugz list, plus a couple of others I found while fixing the ones I knew about).

If anyone else wants to try something similar, the code looks like this:

Code (GenericMenu.template.php) Select
// This contains the html for the sidebar menu, which is used for all admin pages.
function template_generic_menu_sidebar_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings, $user_info;

// This is the main div. We need it so we can keep the content to the right of it.
echo '
<div id="main_container"><a href="#to_content" id="menu_skip">', $txt['menu_skip'], '</a>
<input type="checkbox" id="sidebar_checkbox" class="togglebox" />
<div id="sidebar"', (empty($options['use_sidebar_menu']) && ($context['current_action'] == 'profile') && ($context['sub_template'] == 'summary') && ($context['user']['is_owner'])) ? ' style="display: none;"':'', '>
<label for="sidebar_checkbox" class="hamburger">', $txt[$context['current_action']. '_menu'], '</label>';

// Which one are we rendering?
$context['cur_menu_id'] = isset($context['cur_menu_id']) ? $context['cur_menu_id'] + 1 : 1;
$menu_context = &$context['menu_data_' . $context['cur_menu_id']];

// For every section that appears on the sidebar...
$firstSection = true;
foreach ($menu_context['sections'] as $section)
{
// Show the section header.
echo '
<div class="adm_section">';

if ($firstSection)
{
echo '
<div class="cat_bar">
<h4 class="catbg">
', $section['title'],'
</h4>
</div>';
}
else
{
echo '
<div class="title_bar">
<h4 class="titlebg">
', $section['title'], '
</h4>
</div>';
}

echo '
<ul class="left_admmenu">';

// For every area of this section show a link to that area (bold if it's currently selected.)
foreach ($section['areas'] as $i => $area)
{
// Not supposed to be printed?
if (empty($area['label']))
continue;

echo '
<li>';

// Is this the current area, or just some area?
if ($i == $menu_context['current_area'])
{
echo '
<a href="', isset($area['url']) ? $area['url'] : $menu_context['base_url'] . ';area=' . $i, $menu_context['extra_parameters'], '" class="active firstlevel">', $area['icon'], $area['label'], '', !empty($area['subsections']) ? '...' : '','</a>';

if (empty($context['tabs']))
$context['tabs'] = isset($area['subsections']) ? $area['subsections'] : array();
}
else
echo '
<a href="', isset($area['url']) ? $area['url'] : $menu_context['base_url'] . ';area=' . $i, $menu_context['extra_parameters'], '" class="firstlevel">', $area['icon'], $area['label'], '', !empty($area['subsections']) ? '...' : '','</a>';
// Are there any subsections?
if (!empty($area['subsections']))
{
echo '
<ul class="submenu">';

foreach ($area['subsections'] as $sa => $sub)
{
if (!empty($sub['disabled']))
continue;

$url = isset($sub['url']) ? $sub['url'] : (isset($area['url']) ? $area['url'] : $menu_context['base_url'] . ';area=' . $i) . ';sa=' . $sa;

echo '
<li>
<a ', !empty($sub['selected']) ? 'class="active" ' : '', 'href="', $url, $menu_context['extra_parameters'], '">', $sub['label'], '</a>
</li>';
}

echo '
</ul>';
}
echo '
</li>';
}

echo '
</ul>
</div>';

$firstSection = false;
}

// This is where the actual "main content" area for the admin section starts.
echo '
</div>
<div id="main_admsection"><a id="to_content"></a>';

if (empty($options['use_sidebar_menu']) && ($menu_context['current_area'] == 'summary') && ($context['user']['is_owner']))
{
echo '
<div class="cat_bar">
<h3 class="catbg centertext">
User Control Panel
</h3>
</div>
<ul id="usercp" class="reset">';

// For every section that appears on the nifty new user panel...
$firstSection = true;
foreach ($menu_context['sections'] as $section)
{
// For every area of this section show a link to that area (bold if it's currently selected.)
foreach ($section['areas'] as $i => $area)
{
// Not supposed to be printed?
if (empty($area['label']))
continue;

echo '
<li id="usercp_', $i, '">';

// Is this the current area, or just some area?
if ($i == $menu_context['current_area'])
{
echo '
<a href="', isset($area['url']) ? $area['url'] : $menu_context['base_url'] . ';area=' . $i, $menu_context['extra_parameters'], '">', $area['icon'], $area['label'], '</a>';
}
else
echo '
<a href="', isset($area['url']) ? $area['url'] : $menu_context['base_url'] . ';area=' . $i, $menu_context['extra_parameters'], '">', $area['icon'], $area['label'], '</a>';

echo '
</li>';
}

$firstSection = false;
}

echo '
</ul>';
}

// If there are any "tabs" setup, this is the place to shown them.
if (!empty($context['tabs']) && empty($context['force_disable_tabs']))
template_generic_menu_tabs($menu_context);
}

// Part of the sidebar layer - closes off the main bit.
function template_generic_menu_sidebar_below()
{
global $context, $settings, $options;

echo '
</div>
<br class="clear" />
</div>';
}


Code (index.css) Select
/* Testing UserCP stuffz. :P */
#usercp {
display: flex;
flex-direction: row;
flex-wrap: wrap;
margin-bottom: 1em;
background-color: #ebeff3;
border-radius: 5px;
}
#usercp li {
width: 23%;
margin: 1em 1%;
}
#usercp a {
display: block;
padding: 84px 0 4px;
background-color: #f4f4f4;
background-position: center 4px;
background-repeat: no-repeat;
text-align: center;
border: 1px solid #ccc;
}
#usercp a:hover, #usercp a:focus {
background-color: #fff;
text-decoration: none;
border-color: #738599;
}
#usercp_summary {
display: none;
}
#usercp_statistics a {
background-image: url(../images/theme/blocks-gnome-netstatus-75-100.png);
}
#usercp_showposts a {
background-image: url(../images/theme/emblem-library.png);
}
#usercp_permissions a {
background-image: url(../images/theme/stock_print-setup.png);
}
#usercp_tracking a {
background-image: url(../images/admin/feature_sp.png);
}
#usercp_account a {
background-image: url(../images/admin/feature_cp.png);
}
#usercp_forumprofile a {
background-image: url(../images/theme/user-info.png);
}
#usercp_theme a {
background-image: url(../images/theme/gtk-color-picker.png);
}
#usercp_authentication a {
background-image: url(../images/theme/dialog-password.png);
}
#usercp_notification a {
background-image: url(../images/theme/cowbell.png);
}
#usercp_pmprefs a {
background-image: url(../images/theme/emblem-mail.png);
}
#usercp_ignoreboards a {
background-image: url(../images/admin/feature_pm.png);
}
#usercp_lists a {
background-image: url(../images/theme/user-group-new.png);
}
#usercp_groupmembership a {
background-image: url(../images/admin/feature_ml.png);
}
#usercp_issuewarning a {
background-image: url(../images/theme/konversation.png);
}
#usercp_subscriptions a {
background-image: url(../images/admin/feature_ps.png);
}
#usercp_getprofiledata a {
background-image: url(../images/admin/feature_gdpr.png);
}
#usercp_deleteaccount a {
background-image: url(../images/theme/button_cancel.png);
}
/* 896px at standard browser settings. */
@media screen and (max-width: 56em) {
#usercp li {
width: 31.3%;
}
}
/* 640px at standard browser settings. */
@media screen and (max-width: 40em) {
#usercp li {
width: 48%;
margin: .5em 1%;
}
}

Antechinus

Just playing with this idea some more, and it's rather intriguing. It has more scope than I originally thought. With the "User CP" presentation being done as one list for all areas, with flex on the parent ul and flex-wrap set to wrap, the child li's can be set to any order you like in the CSS. This has the potential to be quite handy. Examples:

Code (css) Select
#usercp_statistics {
order: 4;
}
#usercp_statistics a {
background-image: url(../images/theme/blocks-gnome-netstatus-75-100.png);
}
#usercp_showposts {
order: 4;
}
#usercp_showposts a {
background-image: url(../images/theme/emblem-library.png);
}
#usercp_permissions {
order: 0;
}
#usercp_permissions a {
background-image: url(../images/theme/stock_print-setup.png);
}
#usercp_tracking {
order: 0;
}
#usercp_tracking a {
background-image: url(../images/admin/feature_sp.png);
}
#usercp_account {
order: 1;
}
#usercp_account a {
background-image: url(../images/admin/feature_cp.png);
}
#usercp_forumprofile {
order: 1;
}
#usercp_forumprofile a {
background-image: url(../images/theme/user-info.png);
}


For example, it's easy to stack the four main functions an admin is likely to want to use (Show Permissions, Track User, Issue a Warning, Ban This User) together in one row right at the top of the panel. This has to be more convenient for admin work than the standard menu arrangement, which distributes these functions through different areas. See first screenshot. It shows how it can be made to look when viewing a normal member's profile on an admin account. You're not going to want to download any other member's profile data, and the summary link is useless because you're already there, so those two can be hidden.

Then on your own profile the link to download your profile data can be shown via a basic conditional which assigns an extra class to the parent ul, allowing that class to be used to change the display of any area.

Code (template) Select
<div class="windowbg">
<ul id="usercp" class="reset',($context['user']['is_owner']) ? ' own_profile':'', '">';


So you can also ditch "Issue a Warning" on your own profile, for the obvious reason that you'll never issue a warning to yourself, and hide the "getprofiledata" area by default:

Code (css) Select
#usercp_summary, .own_profile #usercp_issuewarning, #usercp_getprofiledata {
display: none;
}


Then on your own profile you call the profile data link:

Code (css) Select
.own_profile #usercp_getprofiledata {
display: block;
order: 4;
}


Second shot shows how it can be made to look when viewing your own profile on an admin account. Both shots are running the same code live on my local test site. IOW, it's a workable arrangement for any accounts, as far as I can tell. I had thought this presentation was just an amusing but fairly useless bit of eye candy to play with, but it's potentially a lot more practical  than that.

shadav

looks nice....i'll have to try this

Antechinus

I'm currently thinking I might do this as a mod for this theme. That way I can say "Yeah mods install on this theme. No worries." :D

I have basic bugfixes for a 1.0.6 Mutant sorted, so should finalise that. Then I can deal with fancy profile menu presentation as a separate thing, which will give me more time and scope for thinking through the possibilities. Obviously it could also be done as a mod for the default SMF theme.

Antechinus

Ok, I now have avatars working on the board and mess index pages, including the no-image fallbacks in group colours. The B no-image fallback av for Bruce Bandicoot shows his default post group colour on the board index, and his board moderator colour on New Board 4.

Code still needs to be applied to Recent.template.php, and CSS needs some cleaning up. Conditionals might get tweaked a bit (it could probably do with an option to disable it completely). Might also be able to make the code a bit less verbose, and will see what Ranty says about performance aspects (he'll probably hate it). It works though. :)

Antechinus

Had a bit more of a play with the User CP idea. Something like this could work. I think it scans better than the original "large icons above text" formatting of the links. I found that when you have large icons above the text, your eye tends to get caught by the eye candy and miss the actual information. :P

Having a smaller icon before the text is much better for usability. It's all responsive, of course. Still needs a bit more thought here and there, but I think it's generally in the ballpark.

Advertisement: