Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Theme Site Themes => Topic started by: Antechinus on February 26, 2020, 11:02:14 PM

Title: Ant's Mutant Curve
Post by: Antechinus on February 26, 2020, 11:02:14 PM
Link to the theme (https://custom.simplemachines.org/index.php?theme=2941)
This is the monster that evolved from an apparently simple question:
   
Has anyone improved /main_block.png to have transparent rounded edges? (https://www.simplemachines.org/community/index.php?topic=569433.0)

The short version is that it's Curve, but substantially revamped to be responsive everywhere, without relying on any frameworks or libraries that SMF 2.0.x does not call by default.

Like the original Curve it comes with full support for RTL languages. It also has some custom functionality, and minimal use of images.

Do note that the reworking required for this result may mean that not all mods will install without manual editing.



Note: The 1.0.7 version of this theme implements changes that are necessary to support SMF 2.0.18.

If you are running an earlier version of this theme with SMF 2.0.18, it is recommended that you update the theme to version 1.0.7

If anyone cannot upgrade for some reason (customisations, etc) and would like me to write a 1.0.6 to 1.0.7 patch for them, that can be done.

The edits required for supporting 2.0.18 are not difficult, and only affect script.js and Search.template.php. They are highly unlikely to affect any customisations that anyone might have done.

If you have not modified either of these files, you could implement the changes by simply copying the 1.0.7 versions to your earlier version of the theme.



04/02/2021 - New 1.0.7 zip uploaded. Implements required changes for 2.0.18.
30/10/2020 - New 1.0.6 zip uploaded. Fix for bug with login button.
01/03/2020 - New 1.0.5 zip uploaded. Fix for minor 2.0.x bug (only relevant if registration is disabled).
27/02/2020 - New 1.0.4 zip uploaded. Gremlins critically endangered. WWF Concerned.
26/02/2020 - New 1.0.3 zip uploaded, now with hardly any gremlins!
24/02/2020 - New 1.0.2 zip uploaded, now with fewer gremlins!
23/02/2020 - New 1.0.1 zip uploaded, hopefully sans gremlins.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on February 26, 2020, 11:25:22 PM
All righty then. Now I can go and sort the 1.04 version. :D
Which is ready to rumble, and just needs to be sorted out and zipped for upload.
Title: Re: Ant's Mutant Curve
Post by: Sir Osis of Liver on February 26, 2020, 11:37:22 PM
Running in production here (https://mlcforum.theherosspouse.com/index.php), earlier version with some modifications.  Don't use a phone, but looked at in in my e-reader (7" tab), mobile view is nice.  Getting mixed reviews here (https://mlcforum.theherosspouse.com/index.php?topic=11391.0).  You can't please everyone. :(
Title: Re: Ant's Mutant Curve
Post by: Antechinus on February 26, 2020, 11:42:09 PM
There are some weird reviews there, which don't seem to be related to anything actually in the theme. Hey ho.

Like this:

QuoteNow all threads are stacked partially on top of each other.

I can't see who the last poster was.

I can't go directly to the last post but have to page through.

1/ All the threads have always been stacked on top of each other.

2/ It has the standard last poster links on the board index, message index and unread pages.

3/ It has the standard last post links the board index, message index and unread pages.

Beats me what this person is going on about.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on March 01, 2020, 05:33:48 AM
Have just uploaded a 1.0.5. Don't panic. If you are already using 1.0.4 you can keep using it.

Quote from the theme download page:

QuoteNote: The following information is provided for anyone who is already using 1.0.4.

The only difference between 1.0.4 and 1.0.5 is that the latter hides the registration button and greeting if registration is disabled.
This fixes a minor bug with the default code in 2.0.x (default code will show register button and register link even if registration is disabled).

If your forum does not have registration disabled, 1.0.4 will be just as good as 1.0.5.
If your forum does have registration disabled, 1.0.5 will prevent some error messages being shown to guests, and in the error log.

If anyone needs a 1.0.4 to 1.0.5 patch, that can be arranged.
Title: Re: Ant's Mutant Curve
Post by: -Rock Lee- on March 01, 2020, 10:02:33 AM
Oh it looks good, I'm going to prove how it is, good job!


Regards!
Title: Re: Ant's Mutant Curve
Post by: Antechinus on March 05, 2020, 02:09:35 AM
Ok, re this:

Quote from: Sir Osis of Liver on March 04, 2020, 09:14:29 PM
This throws an undefined index error for post_group -

PersonalMessage.template.php



// Show the member's avatar?
echo '
<a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '" class="poster_avatar">';

if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
{
echo '
', $message['member']['avatar']['image'], '</a>';
}
elseif (!empty($message['member']['group']))
{
echo '
<span class="no_avatar ', $message['member']['group'], '">', (substr($message['member']['name'], 0, 1)), '</span></a>';
}
elseif ($message['member']['post_group'] != '')
{
echo '
<span class="no_avatar ', $message['member']['post_group'], '">', (substr($message['member']['name'], 0, 1)), '</span></a>';
}
else
{
echo '
<span class="no_avatar">', (substr($message['member']['name'], 0, 1)), '</span></a>';
}




Can't reproduce an error there. All seems ok, as far as I can tell at the moment.  $message['member']['post_group'] is bog standard 2.0.x code that is used in the default template.

Obvious questions are:

1/ Which version of this beast are you using?
2/ Can you give any more information on this error? What you did to get it. Exact message. Etc.
Title: Re: Ant's Mutant Curve
Post by: Sir Osis of Liver on March 05, 2020, 04:13:00 PM
It's running here (https://mlcforum.theherosspouse.com/index.php) in 2.0.17, I think it's the most recent theme d/l.  Fudged it out so no longer getting the error, believe it was caused by pm post.  I'll unfudge it and post the error when it happens.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on March 05, 2020, 04:46:40 PM
That's one of the old versions from before it was approved (I can tell by the first bits of markup) but I checked the changelog, and there haven't been any changes to that template since then anyway.

What's pm post? Is that a mod of some sort?
Title: Re: Ant's Mutant Curve
Post by: AirBourbon on March 29, 2020, 11:51:06 AM
Hi there,

I just installed your new Theme on my SMF forum 2.0.17.
Everything works well except something with the "New" topic icon.
It's showing on top of the topic's subject.
I would like to know how to align this icon, ideally to the left just like on this post : https://www.simplemachines.org/community/index.php?topic=545837.0

Right now it's showing like this :

(https://zupimages.net/up/20/13/g33g.png)

Tried everything... couldn't work it out.

Thanks !

Regards,
8)
Title: Re: Ant's Mutant Curve
Post by: Antechinus on March 29, 2020, 07:16:30 PM
I'll sort out a solution for that later today. :)
Title: Re: Ant's Mutant Curve
Post by: AirBourbon on March 30, 2020, 02:53:17 AM
Thank you very much Antechinus !
You are the best. 8)

Have a great day ;)
Title: Re: Ant's Mutant Curve
Post by: Antechinus on March 30, 2020, 04:30:37 AM
Ok, easy when you know what you're looking for. :)

TBH I should have though of this before. I did test with German, on the theory that Germans have really long words for everything, so if it fits in German it's probably bulletproof. :D

On the other hand, as a fan of Art Nouveau from way back I was well aware of the French word for "new", so total Homer moment there.

If you want them like the screenshot you linked to...

Code (Find) Select
.subject .new_posts:link, .subject .new_posts:visited {
position: absolute;
top: 2px;
left: -47px;
padding: 0 9px;
font-size: 1rem;
border-radius: 0 8px;
box-shadow: 1px 2px #000a;


Code (Replace) Select
.subject .new_posts:link, .subject .new_posts:visited {
position: relative;
top: -6px;
padding: 0 9px;
font-size: 1rem;
border-radius: 2px;
box-shadow: 1px 2px 0 rgba(0,0,0,.6);
}


Obviously you can weak this to suit yourself, but I thought the smaller border radius looked better with this layout. Also note that I'm testing this on desktop, and your shot appears to be taken on mobile, so the top positioning might need adjustment.

Anyway, if anyone else is using French (since there are millions of people who do and all that) and they want the "Nouveau" thingies where they were supposed to be if I hadn't forgotten about French, then...

Code (Find) Select
.subject .new_posts:link, .subject .new_posts:visited {
position: absolute;
top: 2px;
left: -47px;
padding: 0 9px;
font-size: 1rem;
border-radius: 0 8px;
box-shadow: 1px 2px #000a;


Code (Replace) Select
.subject .new_posts:link, .subject .new_posts:visited {
position: absolute;
top: 2px;
right: calc(100% + 3px);
padding: 0 9px;
font-size: 1rem;
border-radius: 0 8px;
box-shadow: 1px 2px 0 rgba(0,0,0,.6);
}
Title: Re: Ant's Mutant Curve
Post by: AirBourbon on March 30, 2020, 05:55:17 AM
Aren't you the best? ;D
It works like a charm, thank you very much!

By the way; is there any way I could remove the small "underline" (grey) below pictures posted on my forum?
I didn't find any way for that in the index.css

Thanks again!

Regards
Title: Re: Ant's Mutant Curve
Post by: Antechinus on March 30, 2020, 06:04:37 AM
Those are set in these blocks:

/* @WIP: Styling for BBC tags */
div.content p a:link, div.content p a:visited,
#helpmain a:link, #helpmain a:visited,
.bbc_link:link, .bbc_link:visited {
text-decoration: none;
box-shadow: inset 0 -1px 0 #999;
}
.content p a:hover, .content p a:focus,
#helpmain a:hover, #helpmain a:focus,
.bbc_link:hover, .bbc_link:focus {
box-shadow: inset 0 -2px 0;
}


IOW, it's using a box-shadow rather than text-decoration. The reason being that I find the default text-decoration: underline; makes text difficult to read (it cuts through things, and looks cluttered).

However, I just found out that there is now good browser support for text-underline-position (https://developer.mozilla.org/en-US/docs/Web/CSS/text-underline-position): under; which should do the same thing but, since it's a text attribute, should not apply to linked images. So I'll try that out and see how it goes. Off the top of my head, this could be the go:

/* @WIP: Styling for BBC tags */
div.content p a:link, div.content p a:visited,
#helpmain a:link, #helpmain a:visited,
.bbc_link:link, .bbc_link:visited {
text-decoration: underline #999;
text-underline-position: under;
}
.content p a:hover, .content p a:focus,
#helpmain a:hover, #helpmain a:focus,
.bbc_link:hover, .bbc_link:focus {
text-decoration: underline #999 2px;
}


Which I'll test later. Too lazy at the moment. ;)
Title: Re: Ant's Mutant Curve
Post by: AirBourbon on March 30, 2020, 06:20:24 AM
Just wonderful !
Works perfectly. ;D

And the very last question: which font-size should I change if I just want to reduce the font size inside my post? (and nothing else).

Thanks again!
Title: Re: Ant's Mutant Curve
Post by: Antechinus on March 30, 2020, 06:46:45 AM
QuoteAnd the very last question...

I don't believe you. :D

Anyway, posts just inherit the standard body text size. There's no specific code for them. However, you can add some yourself if you want to.

.post {
font-size: ****;
}


You might want to tweak line-height there too. Just be aware that there are different sizes set for hd/mobile displays and standard desktop monitors, with the standard monitors getting 1.4rem due to their generally bigger pixel size, and the mobiles getting 1.6rem to compensate for tiny pixels. This seems to suit most people, but if you want to change things:

html {
background: #e9eef2;
/* Reset to 10px base for easy font sizing. */
font-size: 62.5%;
}
/* Set Retina font-size to browser default. */
@media screen and (min-resolution: 160dpi) {
html {
font-size: 71.43%;
}
}
@supports (-webkit-overflow-scrolling: touch) {
html {
font-size: 71.43%;
}
}


The first (62.5%) handles standard monitors, with the media queries handling the HD stuff. So play with it all you like, but keep an eye on where you're up to and check on desktop and mobile if you can. For example, if you wanted smaller text only in posts, and only on mobile, you could use:

html {
background: #e9eef2;
/* Reset to 10px base for easy font sizing. */
font-size: 62.5%;
}
/* Set Retina font-size to browser default. */
@media screen and (min-resolution: 160dpi) {
html {
font-size: 71.43%;
}
.post {
font-size: 67%; /* As an example */
}
}
@supports (-webkit-overflow-scrolling: touch) {
html {
font-size: 71.43%;
}
.post {
font-size: 67%; /* As an example */
}
}
Title: Re: Ant's Mutant Curve
Post by: AirBourbon on March 30, 2020, 07:56:32 AM
Quote from: Antechinus on March 30, 2020, 06:46:45 AM
QuoteAnd the very last question...

I don't believe you. :D

You shouldn't ;D.
Wonderful, thank you so much for your support. Everything's perfect now!
Title: Re: Ant's Mutant Curve
Post by: Instand on March 31, 2020, 05:55:45 AM
Thank you for this beatiful theme "Ant's Mutant Curve". I use it since a few days and it works fine. However: There are no searchengine-friendly URLs. Its an apache server and the option for searchengine-friendly URLs is tickmarked in the General section. You can see it here: https://www.camcorder-reparatur.de/forum/ (I hope it is okay to post the URL here.)
Title: Re: Ant's Mutant Curve
Post by: Antechinus on March 31, 2020, 07:31:38 AM
That's something you'll have to take up with your host, or with the SMF team. I didn't touch any code related to that.

Although I do vaguely recall some team members saying that option was outdated, and should probably be removed. But its not something I've ever bothered using, so I can't recall all the details.
Title: Re: Ant's Mutant Curve
Post by: MathiasBurbach on April 10, 2020, 03:22:50 AM
Hello Folks!

We are running Ant's Mutant Curve theme too. We have set our SMF to German. Everything translates fine except for the the link "Unread posts since last visit." and the link "New replies to my posts." on the top (see attached screenshot).

Where can I correct this?

Salut,
  Mathias
Title: Re: Ant's Mutant Curve
Post by: Antechinus on April 10, 2020, 08:46:12 AM
languages/ThemeStrings.english.php holds all the custom language strings. Just make a copy of that and rename it to ThemeStrings.german.php - then you can translate whatever you like.

Regarding those two strings: I thought the default English was too verbose, so trimmed it down a bit.
Title: Re: Ant's Mutant Curve
Post by: Kindred on April 10, 2020, 09:31:09 AM
those "SEF" urls have nothing to do with the theme at all.

Uncheck that box. It is useless.

That is a hold-over from 1.0 that we never got rid of.
Back (10 years ago) Search Engines did not like the php urls with arguments...   so, that option created a "psuedo-html" url which the search engines would not skip.
Search engines now can deal with the arguments....   and that .html junk is junk...

Also, the term "search engine friendly" is a misnomer...   Search engines don't care any more. You get no benefit form having one url versus another.
HUMAN friendly is another thing... and there are a few mods that do make the URLs "pretty" for humans.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on April 10, 2020, 06:28:09 PM
Just out of curiosity: is that redundant option being dropped from 2.1 before Final?
Title: Re: Ant's Mutant Curve
Post by: MathiasBurbach on April 10, 2020, 08:23:48 PM
Quote from: Antechinus on April 10, 2020, 08:46:12 AM
languages/ThemeStrings.english.php holds all the custom language strings.
Thanks Antechinus,
I commented out the original two entries and replaced them with German expressions.
Unfortunately it did not pick up on changes in a new ThemeStrings.german.php.
Salut,
Mathias
Title: Re: Ant's Mutant Curve
Post by: Antechinus on April 10, 2020, 08:55:22 PM
If you want to fall back to the default SMF German and English strings, you can just delete those two from ThemeStrings.english. They're really only there because of my personal preferences.

Do note that to pick up any changes in languages files you have to clear the forum cache (under Routine Maintenance).

ETA: Oh yeah, while I think of it. If you're using the UTF-8 version of German then you'd have to name the ThemeStrings file to match that. Basically it should use the same language name as your other languages files.
Title: Re: Ant's Mutant Curve
Post by: Mick. on April 11, 2020, 02:03:37 PM
Yo Ant, I'm digging this theme. Good job bruh!
Title: Re: Ant's Mutant Curve
Post by: Antechinus on April 11, 2020, 05:23:13 PM
Handy boilerplate? If it is, good. That was the whole idea. :)
I'm tempted to whip up a few variations on it myself, but so far only have them on a test site.

ETA: I should do another bugfix patch soon. When I was messing around with the positioning of the "New" indicators I found another small bug. And the "New" indicators really should have the positioning set by right instead of left. Makes much more sense (it keeps them in the same position relative to the thread title, regardless of language). 
Title: Re: Ant's Mutant Curve
Post by: Plus on April 25, 2020, 12:44:13 PM
how can i make width %80 ?
Title: Re: Ant's Mutant Curve
Post by: Antechinus on April 25, 2020, 08:54:16 PM
/* Optional max-width on large screens. */
#wrapper, .footer {
max-width: 88em;
margin: 0 auto;
}


Remove the max-width.
Title: Re: Ant's Mutant Curve
Post by: Plus on April 25, 2020, 10:12:48 PM
Quote from: Antechinus on April 25, 2020, 08:54:16 PM
/* Optional max-width on large screens. */
#wrapper, .footer {
max-width: 88em;
margin: 0 auto;
}


i did but not work

Remove the max-width.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on April 26, 2020, 02:57:33 AM
Did you also set the width in admin?
Title: Re: Ant's Mutant Curve
Post by: Plus on April 26, 2020, 03:56:18 PM
Quote from: Antechinus on April 26, 2020, 02:57:33 AM
Did you also set the width in admin?

thanks :D
Title: Re: Ant's Mutant Curve
Post by: Raumschiff on May 02, 2020, 06:18:15 PM
Hello everyone.

I am using 2.0.17.

I have installed this theme. It is wonderfull and works fine!
But there is one thing, which is curious to me.
The main menu isn't visible if the browser is wide.
When I narrow the width of my browser, then the burger button appears.
When I click onto the burger button, then the menu pops up, but it lies under the info-center.
I don't know what the reason is, but I found out, that
<div id="header"> has z-index:2,
and <div id="main_menu"> z-index:auto.

I don't know where to fix it, and how, and why it appears.

I have searched and I couldn't find "#main_menu", if that is the right place to correct it.

Could someone give me an advice please?

Thank you.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on May 02, 2020, 07:07:34 PM
Which browser and device is this occurring with?
Do you have any mods installed?
Have you made any changes to the CSS?
Can you provide a live link to the problem?
Title: Re: Ant's Mutant Curve
Post by: Raumschiff on May 02, 2020, 07:14:48 PM
Hello.

Google 81, Firefox 75,
at my pc and my samsung galaxy s3,
I haven't installed any mods.
I don't remember having changed any css. Perhaps it could be, that i tested changing to put a link into the main menu??
Title: Re: Ant's Mutant Curve
Post by: Raumschiff on May 02, 2020, 07:19:40 PM
I have sent you the link to my forum via PM.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on May 02, 2020, 07:39:45 PM
Ok. The problem is that you are missing a closing tag on the markup for the log in button.

<input type="submit" value="Einloggen" class="button_submit"

It should be:

<input type="submit" value="Einloggen" class="button_submit" />
Title: Re: Ant's Mutant Curve
Post by: Raumschiff on May 02, 2020, 07:46:37 PM
Could you please tell me in which file I have to add the missing the closing tag?

I don't find it.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on May 02, 2020, 07:51:29 PM
index.template.php

elseif (!empty($context['show_login_bar']))
{
echo '
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/sha1.js"></script>
<form id="guest_form" action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" ', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<label for="user">
', $txt['username'], '
<input type="text" id="user" name="user" size="12" class="input_text" />
</label>
<label for="passwrd">
', $txt['password'], '
<input type="password" id="passwrd" name="passwrd" size="12" class="input_password" />
</label>
<input type="hidden" id="cookielength" name="cookielength" value="-1" />
<input type="submit" value="', $txt['login'], '" class="button_submit" />


The last line.
Title: Re: Ant's Mutant Curve
Post by: Raumschiff on May 02, 2020, 07:56:50 PM
In Subs.php I made these changes:

         'login' => array(
            'title' => $txt['login'],
            'href' => $scripturl . '?action=login',
            'show' => $user_info['is_guest'],
            'sub_buttons' => array(
            ),
         ),
         'liebetroepfchen' => array(
            'title' => 'Liebetr&ouml;pfchen',
            'href' => 'http://www.lebensrat-gottes.de/botschaftzeitlich.htm',
            'target' => '_blank',
            'show' => true,
            'sub_buttons' => array(
            ),
         ),
         'register' => array(
            'title' => $txt['register'],
            'href' => $scripturl . '?action=register',
            'show' => $user_info['is_guest'],
            'sub_buttons' => array(
            ),
            'is_last' => !$context['right_to_left'],
         ),

Could that be the reason?

Ok, i will make the changes.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on May 02, 2020, 08:03:16 PM
Start by checking for the missing /> in the template. If that's not it, then we can look at Subs.php.
Title: Re: Ant's Mutant Curve
Post by: Raumschiff on May 02, 2020, 08:07:25 PM
I can't find that block of code.

Neither in the index.template.php file of your Theme, nor in the index.template.php file of the default Theme.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on May 02, 2020, 08:09:25 PM
Well it's definitely there, otherwise you wouldn't have a log in form at all.

Ok, attach a copy of your template (for Mutant, not default) and I'll take a look. :)
Title: Re: Ant's Mutant Curve
Post by: Raumschiff on May 02, 2020, 08:13:44 PM
Ok. Here is it.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on May 02, 2020, 08:15:47 PM
Line 323. Your template has:

<input type="submit" value="', $txt['login'], '" class="button_submit"

It should be:

<input type="submit" value="', $txt['login'], '" class="button_submit" />
Title: Re: Ant's Mutant Curve
Post by: Raumschiff on May 02, 2020, 08:20:01 PM
WOW! What the heck?

How could that happen?!?

It works now! Thank you very much!

But ... I am really curious ...  :o :o

Thanks again!  :D

PS: Now it really looks harmonic!
Title: Re: Ant's Mutant Curve
Post by: Antechinus on May 02, 2020, 08:26:12 PM
Funny things can happen when you start editing code. It's easy to miss a bit. ;)
Title: Re: Ant's Mutant Curve
Post by: Raumschiff on May 02, 2020, 08:37:16 PM
Oh yes! I love programming, (am a newbie), but if I don't know the source, (SMF is new for me), then it means searching and searching and searching!  :laugh:

If it is no effort for you,
could I ask you a second thing?

If I click onto "answer", then the "full editor" gets activated.
If I edit a written article, the small version of the editor gets activated.

But I often need/use the extra BBC-Buttons (were they called so?) and the smileys.

If I change to the full editor after I have written something, all the changes I made are gone.

I don't know, it was a bit more of "intuitive usability" to click onto the visible "edit" button.

??
Title: Re: Ant's Mutant Curve
Post by: Antechinus on May 02, 2020, 08:51:32 PM
I hid some buttons under the "More options" button. This was to save space on small screens, because having all of them visible can chew up a hell of a lot of space.

The visible one is the old "quick edit" that only has an icon by default. I restyled it to match the other buttons and sit in the same line.

The link to the full editor is in the "More options" drop menu, labelled "Full edit page" in English.
Title: Re: Ant's Mutant Curve
Post by: Raumschiff on May 02, 2020, 08:59:30 PM
Yes, I know it.
But to be honest, if a user changes his own article, writes half an hour, and then decides to make formattings, bold or whatever and switches and all his changes are gone ...

I would like to switch those buttons. Not for me (because I know where to find that button) but for the users.

How can I do that? ;D
Title: Re: Ant's Mutant Curve
Post by: Antechinus on May 02, 2020, 09:11:11 PM
I'll have to test it to make sure it doesn't look funny, and I suspect it will need some CSS tweaking when they are swapped. I can test it tonight my time, but I'll be spending the rest of the day working outside (Australian east coast time zone).

The basics are you'd find these two li's in Display.template.php, and swap them.

// Can the user modify the contents of this post?
if ($message['can_modify'])
echo '
<li class="quick_modify_button"><img src="', $settings['images_url'], '/theme/quick_edit_hd.png" alt="', $txt['modify_msg'], '" title="', $txt['modify_msg'], '" class="modifybutton" id="modify_button_', $message['id'], '" style="cursor: pointer; display: none;" onclick="oQuickModify.modifyMsg(\'', $message['id'], '\')" />', $txt['quick_modify'], '</li>';

// Can the user modify the contents of this post?
if ($message['can_modify'])
echo '
<li class="modify_button"><a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], '">', $txt['modify'], '</a></li>';
Title: Re: Ant's Mutant Curve
Post by: Antechinus on May 04, 2020, 04:40:19 AM
Righty o. Only took me an extra day to get around to it. :P

You swap the li's as shown in the previous post, then for the CSS tweaks you find this:

.quickbuttons .quick_modify_button {
position: relative;
margin: 6px;
padding: 0 2.8rem 0 .8rem;
overflow: hidden;
color: #414f72;
line-height: 2.2rem;
}
.quick_modify_button img {
position: absolute;
top: 0;
right: -3.2rem;
height: 2rem;
padding: .1rem 3em;
}


And replace it with this:

.quickbuttons .quick_modify_button {
position: relative;
overflow: hidden;
width: 8.4rem;
padding: 6px 2.8rem 6px .8rem;
background: #f3f6f9;
color: #414f72;
text-align: start;
border: solid #0000;
border-width: 1px 0;
}
.quick_modify_button:hover {
background: #fff;
border-color: #aaa;
}
.quick_modify_button img {
position: absolute;
top: 0;
right: 0;
height: 2rem;
padding: 6px .3rem 6px 11rem;
}


You might want to change the text strings as well, but you can mess with those to suit yourself.
Title: Re: Ant's Mutant Curve
Post by: shadav on June 01, 2020, 04:48:19 PM
i haven't kept up with this but wow....
just saw it in the theme download so of course I had to try it....
great work
looks good on both pc and mobile

off to go play with it now  ;D
Title: Re: Ant's Mutant Curve
Post by: Antechinus on June 01, 2020, 05:00:55 PM
Bonzer. I'm sure there's a bug or two I missed. :)
Title: Re: Ant's Mutant Curve
Post by: 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
Title: Re: Ant's Mutant Curve
Post by: Antechinus on June 02, 2020, 07:08:00 PM
That doesn't surprise me. I thought it would, but that mod's not something that interests me. I prefer the cleaner look, so I figured anyone who wanted that mod could sort out their own presentation. :D
Title: Re: Ant's Mutant Curve
Post by: Sir Osis of Liver on June 10, 2020, 10:45:09 PM
Having a problem with modify inline, editor opens and you can edit text, but it doesn't save, I brieflly get the Loading... thingy across the top, but the text box just sits there and doesn't save.  I vaguely recall seeing a similar glitch on an earlier version, believe I fixed it by removing inline edit and replacing with full edit from dropmenu (moved it over), but don't remember what caused it.  I'm using the current download.

Actually, it does save it, but you have to go somewhere else and come back to see it.

Title: Re: Ant's Mutant Curve
Post by: Antechinus on June 10, 2020, 11:09:20 PM
Ok, I'll take a look. AFAIK it was fine on local last I checked, but I may have missed something.

ETA: Just gave it a quick test on local. Works perfectly there. That's running the 1.04/1.05 version of the theme (same in terms of this functionality) on 2.0.17. But IIRC I haven't changed the quick edit code since before this theme was officially released.

Just in case it's relevant, my local is also running Apache 2.4.37 with PHP 7.1.24 and MySQL 5.7.24.

The local site also has no mods installed apart from my page index mod. It's possible one of your site's mods could be the issue.
Title: Re: Ant's Mutant Curve
Post by: Sir Osis of Liver on June 10, 2020, 11:38:14 PM
Theme version is 1.0.5.

Forum version: SMF 2.0.17 (more detailed)
Current SMF version: SMF 2.0.17
GD version: bundled (2.1.0 compatible)
Database Server: MySQL
MySQL version: 5.6.19-67.0-log
PHP: 7.2.23
Server version: Apache/2.4.41

Not a mod problem.  Will see if I can replicate it on test install.
Title: Re: Ant's Mutant Curve
Post by: Sir Osis of Liver on June 10, 2020, 11:47:08 PM
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. >:(

Title: Re: Ant's Mutant Curve
Post by: Antechinus on June 11, 2020, 12:11:50 AM
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?
Title: Re: Ant's Mutant Curve
Post by: Sir Osis of Liver on June 11, 2020, 05:56:00 PM
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.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on June 11, 2020, 06:09:51 PM
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.
Title: Re: Ant's Mutant Curve
Post by: Sir Osis of Liver on June 11, 2020, 06:25:02 PM
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.
Title: Re: Ant's Mutant Curve
Post by: shadav on June 16, 2020, 02:28:28 PM
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), '">';
Title: Re: Ant's Mutant Curve
Post by: Antechinus on June 16, 2020, 06:11:24 PM
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. :)

Title: Re: Ant's Mutant Curve
Post by: shadav on June 16, 2020, 06:27:06 PM
 :laugh: thank you

seems to have worked
Title: Re: Ant's Mutant Curve
Post by: Antechinus on June 18, 2020, 09:09:57 PM
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. :)
Title: Re: Ant's Mutant Curve
Post by: Antechinus on June 19, 2020, 12:00:23 AM
Just looking into the UserCP idea (https://www.simplemachines.org/community/index.php?topic=167975.msg4061014#msg4061014) 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. :)
Title: Re: Ant's Mutant Curve
Post by: shadav on June 19, 2020, 03:47:31 AM
 :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:
Title: Re: Ant's Mutant Curve
Post by: Antechinus on June 19, 2020, 04:47:09 AM
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.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on June 23, 2020, 08:09:52 PM
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.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on June 24, 2020, 07:32:46 AM
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".

Title: Re: Ant's Mutant Curve
Post by: Antechinus on June 24, 2020, 10:02:18 PM
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%;
}
}
Title: Re: Ant's Mutant Curve
Post by: Antechinus on June 25, 2020, 08:42:36 AM
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.
Title: Re: Ant's Mutant Curve
Post by: shadav on June 25, 2020, 12:33:21 PM
looks nice....i'll have to try this
Title: Re: Ant's Mutant Curve
Post by: Antechinus on June 25, 2020, 05:50:26 PM
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.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on September 08, 2020, 05:14:43 AM
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. :)
Title: Re: Ant's Mutant Curve
Post by: Antechinus on September 11, 2020, 05:47:21 AM
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.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on September 12, 2020, 01:27:25 AM
Refined it a bit. I think this works better.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on September 13, 2020, 05:52:37 AM
Event better. I Edited the ul in GenericMenu.template.php so that it assigns a extra class to the cat and title bars, depending on which  section they are the header for:

foreach ($menu_context['sections'] as $section)
{
if ($firstSection)
{
echo '
<li class="cat_bar ', $section['id'], '">
<h4 class="catbg">
', $section['title'],'
</h4>
</li>';
}
else
{
echo '
<li class="title_bar ', $section['id'], '">
<h4 class="titlebg">
', $section['title'], '
</h4>
</li>';
}


This gives handy class names that don't need translating (.info, profile_action, edit_profile) and can be used for display and positioning. The ul is also now not closed in GenericMenu, and instead is closed after the member summary (ie: before the .settings dl's at the bottom).

This means every piece in the menu, member avatar, send pm, add buddies, etc, etc is now all in the same ul and can all be placed anywhere on the grid. The cat_bar that says "Profile Info" is the bog standard sidebar header bar, re-positioned to suit this presentation.

Combine that with a few tricks for ordering individual buttons, and it all stays quite tidy under any combination of member group or screen width. Currently has basic Curve-compatible colouring while I sorted the mesh out, but can be eye-candied any way that suits. :)
Title: Re: Ant's Mutant Curve
Post by: Antechinus on September 13, 2020, 05:33:58 PM
Oh, the other thing I was looking at yesterday was improving an idea for custom icons by board id, while maintaining good a11y and best performance. This had been roughed out in css/funny_bizness.css, which is a stashed file in this theme, that keeps track of several things and includes some ideas for various custom tweaks.

I came up with this, which is so clean that I think I'll make it the default. It uses minimal code for the standard icons, and allows handling custom icons by board and/or icons by variant with no extra changes to the PHP or HTML. The whole lot can be managed in the CSS, using any arrangement of files and folders you prefer.

Code (BoardIndex.template.php) Select
<?php

foreach (
$category['boards'] as $board)
{
echo '
<tr id="board_'
$board['id'], '" class="windowbg2">
<td class="icon windowbg">'
;

// If the board is new, or children are new, show a linked indicator.
if ($context['user']['is_logged'] && ($board['new'] || $board['children_new']))
echo '
<a href="'
$scripturl '?action=unread;board=' $board['id'] . '.0;children'), '" class="'$board['new'] ? 'board' 'child''_new" title="'$txt['new_posts'], '">
'
$txt['new_posts'], '
</a>
</td>'
;

// Or is it a redirection board? Or a board with no new posts?
else
echo '
<span class="'
$board['is_redirect'] ? 'board_redirect">'$txt['redirect_board'] : 'board_old">'$txt['old_posts'], '</span>
</td>'
;

// On to next td, etc....

}

?>


Code (index.css and/or _variant.css) Select
/*
Scene 1 - Take 2: The cleanest way is to use a CSS background sprite,
with images double-sized for HD screens (384 x 96) and the parent anchor set as:
*/
.icon > a, .icon > span {
display: block;
height: 48px;
width: 48px;
margin: 0 auto;
overflow: hidden;
background-image: url(../images/relevant_path/sprite.png);
background-repeat: no-repeat;
background-size: auto 48px;
white-space: nowrap;
text-indent: 100%;
}
/*
Title attribute could stay for sighted users (but probably unnecessary).
Alt attribute deprecated, in favour of language string as anchor content.
Anchor class and background-position set according to desired icon state:
*/
.board_new {
background-position: 0 0;
}
.child_new {
background-position: 48px 0;
}
.board_redirect {
background-position: 96px 0;
}
.board_old {
background-position: 144px 0;
}
/*
Then custom icons by board and/or variant can be handled any way you like...
*/


Since this theme already assigns body tag ID by variant, it would be possible to include code for all variant icons inside index.css. That might be useful if doing a basic multicolour version, which only changes a few colours and doesn't really warrant a bunch of extra files. Ditto for custom icons by board. They could simply be:

#board_1 .icon > a, #board_1  .icon > span {
background-image: url(../images/relevant_path/board_1_sprite.png);
}
#board_2 .icon > a ,#board_2  .icon > span {
background-image: url(../images/relevant_path/board_2_sprite.png);
}
#board_3 .icon > a, #board_3  .icon > span {
background-image: url(../images/relevant_path/board_3_sprite.png);
}
#board_4 .icon > a, #board_4  .icon > span {
background-image: url(../images/relevant_path/board_4_sprite.png);
}


With no other code changes required.
Title: Re: Ant's Mutant Curve
Post by: Kindred on October 29, 2020, 06:39:35 PM
Hey Ant!

I just downloaded and installed the one on the theme site here, today...


Logged in, it works like a charm.

Not logged in, it looks different and I get no menu....
https://test.turtleshellprod.com/index.php

I suspect there's something not closed properly in the header/menu....
Title: Re: Ant's Mutant Curve
Post by: Antechinus on October 29, 2020, 06:50:48 PM
ROFL. :D OK, I'd better do that 1.06 I've been meaning to do.
Shows how much attention people pay to these things. It's been up for yonks and nobody mentioned it before.

Temporary fix:

Code (Find) Select
<input type="submit" value="', $txt['login'], '" class="button_submit"
', ($modSettings['registration_method'] != 3) ? '<div class="info">'. $txt['welcome_guest']. '</div>' : '<br />';


Code (Replace) Select
<input type="submit" value="', $txt['login'], '" class="button_submit" />
', ($modSettings['registration_method'] != 3) ? '<div class="info">'. $txt['welcome_guest']. '</div>' : '<br />';
Title: Re: Ant's Mutant Curve
Post by: Antechinus on October 30, 2020, 04:21:23 AM
Ok, sorted. New zip is up.
Title: Re: Ant's Mutant Curve
Post by: Kindred on October 30, 2020, 12:01:10 PM
:D


All fixed up now and a nice demo of your theme
Title: Re: Ant's Mutant Curve - language localization
Post by: pepf on November 26, 2020, 12:38:15 AM
Not sure if I should post this elsewhere or if it is right here, it is related to this mod... This does not happen with the standard curve version.

Installed version 1.0.5 on 2.0.17 and localized it to Traditional Chinese UTF-8,  for use in Taiwan. Now testing. 

Works fine, however I discovered a minor problem.
If a post is modified by using the 'Edit' button, as soon as the modification is saved the whole post, including title and other responses, are garbled. Other topics are not affected.
If the 'Full Page' option is used instead for the editing, no garbling occurs when saving.

Is it possible to either resolve the Edit button problem or have the 'Full Page' edit method as the only way to do it?

The button text is not localized too, not sure if this is related to the problem. Is there a way to change this? Does it concern the language file?

TIA, Peter



Title: Re: Ant's Mutant Curve
Post by: Antechinus on November 27, 2020, 05:47:30 PM
Interesting. I'll play with it on a test site and see if I can spot anything (no guarantees). Anyway yes, you can disable the quick edit if you want to. Someone else wanted to do the same thing. Instructions are in this post (https://www.simplemachines.org/community/index.php?topic=572053.msg4054730#msg4054730) and the following post. If you run into problems, feel free to get back to me.

Re the language file: make a duplicate of ThemeStrings.english.php (in the languages folder) and rename it to ThemeStrings.chinese_traditional-utf8.php. You will then be able to edit any of the custom strings to whatever you want. Be sure to save it as utf-8 encoding in your code editor.

Incidentally, which version of PHP are you running? May not matter, but I might as well test on the same version if I can.
Title: Re: Ant's Mutant Curve
Post by: pepf on November 28, 2020, 12:51:04 AM
Thanks for the instructions. I will try that.
The PHP version is 7.2

If you need some Chinese words for testing, just tell me. BTW, the garbling is alphabetic, not Chinese garbling. That looks different.
Title: Re: Ant's Mutant Curve
Post by: pepf on December 01, 2020, 04:03:31 AM
My apology, here is another question in the matter. I just removed the text for "Edit" so that users cannot use it. Changed the text in "More" too but cannot find the term for "Split topic". Neither the English nor the Chinese is in that file. May I ask where that is hidden? I would like to change it to a more common term.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on December 01, 2020, 07:24:17 AM
That's a standard SMF language string. It will be in default/languages/index.english.php (or whatever language name is in use).
Title: Re: Ant's Mutant Curve
Post by: pepf on December 01, 2020, 08:38:52 AM
Found it. Thank you!
Title: Logo resizing?
Post by: rcane on January 20, 2021, 06:45:45 PM
I installed (successfully it appears) Ant's Mutant Curve theme to make things responsive as most of the users will be on a mobile device.

The LOGO url is there, and if I load the page there is no logo (as it was on core/curve/etc). 

If inspect where it should be (which just has the forum name) I can see the full url that goes to my /newLogo.png file. 

Is there a place to find the size limitations on the logo?  I'm guessing that's it to make it compatible with mobile devices.


Title: Re: Logo resizing?
Post by: Illori on January 20, 2021, 07:50:08 PM
you would be best to post in the support topic for that theme so that the author has a better chance at seeing your question.
Title: Re: Logo resizing?
Post by: Sir Osis of Liver on January 20, 2021, 09:17:55 PM
Don't believe there's any size limit on logo.  This (http://www.thekrashsite.com/smf20/) is a 14.4 mb png.
Title: Re: Logo resizing?
Post by: Antechinus on January 23, 2021, 01:28:28 AM
Can someone merge this into the theme's support thread (https://www.simplemachines.org/community/index.php?topic=572053.0)?

Short answer to the OP's question is that there are several possibilities for defining logo size, but by default it will just use whatever the native size of the image is. If this is greater than the forum wrapper width, the image will automatically be scaled to fit.

If you want some other behaviour it can be done, but I'd need to know exactly what you want to do.
Title: Re: Logo resizing?
Post by: Herman's Mixen on January 23, 2021, 02:16:15 AM
Graphics wise there is no limitation... maybe you want altered the code and goes into that dirrection so hang over into the support threat wich can be found... look the post before me :P
Title: Re: Logo resizing?
Post by: shadav on January 23, 2021, 02:26:58 AM
Quote from: Antechinus on January 23, 2021, 01:28:28 AM
Can someone merge this into the theme's support thread (https://www.simplemachines.org/community/index.php?topic=572053.0)?

Short answer to the OP's question is that there are several possibilities for defining logo size, but by default it will just use whatever the native size of the image is. If this is greater than the forum wrapper width, the image will automatically be scaled to fit.

If you want some other behaviour it can be done, but I'd need to know exactly what you want to do.
I was going to but I don't think that I can since I don't have permissions to that board....
Title: Re: Logo resizing?
Post by: Illori on January 23, 2021, 05:52:29 AM
Quote from: Antechinus on January 23, 2021, 01:28:28 AM
Can someone merge this into the theme's support thread (https://www.simplemachines.org/community/index.php?topic=572053.0)?

we usually dont merge outside topics into a support thread as sometimes it will mix up the replies depending on if there are any made while this topic existed.
Title: Re: Logo resizing?
Post by: Steve on January 23, 2021, 11:18:51 AM
My boss is right of course, but I've checked the dates and no responses will get mixed up. So, at the risk of getting yelled at (and she did say 'usually'), I'm going to go ahead and merge the two.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on January 23, 2021, 07:38:29 PM
Lol. I think it's safe in this case. :)
Title: Re: Ant's Mutant Curve
Post by: temuco on January 31, 2021, 06:08:00 AM
Hello and thank you for the great work!

I have two questions:

1) The specifications for the size of the IMG tag have no effect. How can this be fixed?

2) The Info Centre shows the new posts in two columns on the PC. How can I change this view to only one column?

Thanks again!
Title: Re: Ant's Mutant Curve
Post by: Antechinus on January 31, 2021, 07:21:38 AM
1) Not sure what you mean here. Are you referring to the maximum image size for images inside BBC tags? I added a restriction so that images would not be larger than post width, so that the entire image would always be visible. If you want a large image to display at its full size (ie: overflowing post width) that's not hard to do, but I'm about to go to sleep for the night so I'll sort it tomorrow.

2) It should be showing in four columns on a large enough screen. Anyway, same deal as 1). Easy to change, but manana. ;)
Title: Re: Ant's Mutant Curve
Post by: temuco on January 31, 2021, 07:37:54 AM
For 1) I mean the specifications "width" and "height" such as e.g.

[img width=640 height=480]https://myhomespace.examlple/myimage.jpg[/img]

No matter what I enter, it has no effect.

Regarding 2) I would like to have only one column, no matter how wide the monitor is.

Thank you very much and good night!

¡Hasta mañana!
Title: Re: Ant's Mutant Curve
Post by: Antechinus on February 01, 2021, 03:30:27 AM
1) For the images in posts, find this in index.css:

/* Auto resizing of images in posts, pm's, etc. */
/* Change max-heights to suit your preference. */
.bbc_img {
height: auto;
width: auto;
max-width: 100%;
max-height: 640px;
}
.signature .bbc_img {
max-height: 150px;
}


What is probably screwing you up is the max-width and max-height. The former won't allow an image wider than the post content area. The latter obviously restricts height to less than 641px.

If you remove the max-width and max-height you should be able to set any size on the image's BBC tag. You'll then need to allow large images to overflow the post content area, so find this:

.inner, .ignored_prompt {
    overflow: hidden;
    margin-top: 4px;
    padding-top: 9px;
    border-top: 1px solid #99a;
}


And change the overflow from hidden to auto. That should fix it.



2) For the recent posts columns, find this:


.recent_posts {
display: flex;
flex-wrap: wrap;
margin: -5px 2px 0;
}
.recent_posts p {
flex: 1 1 auto;
box-sizing: border-box;
width: 49%;
margin: 0 .5%;
padding: 6px 0;
overflow: hidden;
font-size: 1.2rem;
text-overflow: ellipsis;
border-bottom: 1px solid #ddd;
}


Change it to this:

.recent_posts {
margin: -5px 2px 0;
}
.recent_posts p {
box-sizing: border-box;
margin: 0 .5%;
padding: 6px 0;
overflow: hidden;
font-size: 1.2rem;
text-overflow: ellipsis;
border-bottom: 1px solid #ddd;
}


Title: Re: Ant's Mutant Curve
Post by: temuco on February 01, 2021, 03:55:51 AM
Thank you very much! After work I will try it out immediately and report the result here. Have a nice day!
Title: Re: Ant's Mutant Curve
Post by: temuco on February 01, 2021, 04:34:24 PM
In order for the size information of images to work again, I only had to remove the following two lines from ".bbc_img" in index.css:

height: auto;
width: auto;


Accordingly, the instruction looks like this:

Quote/* Auto resizing of images in posts, pm's, etc. */
/* Change max-heights to suit your preference. */
.bbc_img {
   max-width: 100%;
   max-height: 640px;
}
.signature .bbc_img {
   max-height: 150px;
}

This means that the images must not be wider than the display width or higher than 640px, which is a good idea.

Now the latest posts are single-column due to your tip (2). That is almost perfect. The only remaining wish is the right alignment of the text from the position of the date. Maybe you could put the board name in before the date.

Title: Re: Ant's Mutant Curve
Post by: Antechinus on February 01, 2021, 04:46:43 PM
Ok. That's odd. The height and width in a BBC image tag are inline in the markup, and that usually overrides anything that's in a CSS file. So I would have expected the auto to be overridden if you specified your own height and width in the BBC tag. Offhand I'm not sure why it wouldn't override the file's code. I'm curious now, so might do some testing.

With the recent posts: you could change the markup (not a big deal) or you could change the CSS to put the date last. There are a few ways you could do it. I'm not sure what you mean by "the right alignment of the text from the position of the date". Do you want the date to be sitting at the right side of each paragraph?

If you can chop and paste a screenshot of exactly what result you want I can tell you how to get it.
Title: Re: Ant's Mutant Curve
Post by: temuco on February 01, 2021, 05:03:50 PM
I have already changed the order and the appearance so far that this corresponds to my preferences. I only want the dates and times to be right-aligned, as the picture shows.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on February 01, 2021, 05:13:00 PM
Ok. Simplest way of doing it is to leave the markup alone, and just add this to the CSS:

.recent_posts p span:nth-child(3) {
float: right;
}


If you have already changed the markup to put the date last, you will actually need more complex CSS. :D
This should do it:
.recent_posts p {
display: flex;
flex-wrap: wrap;
}
.recent_posts p span:last-child {
margin-left: auto;
}


Haven't tested that, so if it doesn't work I'll fire up local and try a few things. But really, once you are into using flex anyway you might as well leave the markup standard, since any required positioning trickery can be done on the standard markup with flex.
Title: Re: Ant's Mutant Curve
Post by: temuco on February 01, 2021, 05:26:42 PM
We have overlapped...

From line no. 320 of "BoardIndex.template.php" I have made the following changes:


/* Each post in latest_posts has:
            board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
            subject, short_subject (shortened with...), time, link, and href. */
foreach ($context['latest_posts'] as $post)
echo '
    <p>
        <strong>', $post['link'], '</strong>
        <span>', $txt['by'], ' ', $post['poster']['link'], '</span>
        <span>', ' (', $post['board']['link'], ')</span>
        <span style="float: right; display: block; width: auto;">', $post['time'], '</span>
    </p>';


Admittedly, ugly in the middle of PHP, but it works exactly as I wanted it to on both desktop and mobile devices.

You can see the result here:

https://gez-boykott.de/Forum/index.php

Thank you very much for the great work and best regards!

René
Title: Re: Ant's Mutant Curve
Post by: Antechinus on February 01, 2021, 05:32:49 PM
Ok. You can do that in index.css if you like:

.recent_posts p span:last-child {
float: right;
}


That way you don't need the inline code.
Just be aware that with some browsers, using float: right; on the last child element will cause it to break to a new line.
Title: Re: Ant's Mutant Curve
Post by: temuco on February 01, 2021, 05:49:05 PM
That's great. Although I still had to change the order and appearance inline, the formatting (right-aligned in this case) via CSS is a nice thing. I learned something again thanks to your support.

Thanks again!

René
Title: Re: Ant's Mutant Curve
Post by: Antechinus on February 01, 2021, 05:57:30 PM
That's the thing: you don't have to change the order in the markup. That last code snippet was for the way you have the template now (ie: order changed so the date is last). But if you had left the markup the way it was originally, this would have given the same result:

.recent_posts p span:nth-child(3) {
float: right;
}


Also note that any floated element is automatically set to display: block; so there's no need to declare it. This is something a lot of people don't seem to know, but it's been part of CSS forever. You'll see code all over the web that says "float: whatever; display: block;" but it's not necessary. Just having the float does the same thing. :)

width: auto; is the same. It's the default on any floated or block element.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on February 03, 2021, 06:07:59 PM
This theme has just been updated to version 1.0.7, to implement changes required to support SMF 2.0.18.

It is strongly recommended that you update the theme if you are running an earlier version.

If anyone cannot upgrade for some reason (customisations, etc) and would like me to write a 1.0.6 to 1.0.7 patch for them, that can be done.

The edits required for supporting 2.0.18 are not difficult, and only affect script.js and Search.template.php. They are highly unlikely to affect any customisations that anyone might have done.

If you have not modified either of these files, you could implement the changes by simply copying the 1.0.7 versions to your earlier version of the theme. :)
Title: Re: Ant's Mutant Curve
Post by: alniks on March 10, 2021, 04:25:42 AM
Hi.

Quite nice theme, looks nice on mobile gadgets and with adequate avatar size.
Have a problem though...
Guest user (not logged in) can't view any topics.
"index.php?topic=" page is just blank, just empty "body" tag.
SMF ver 2.0.18, no mods, any browser (Chrome, Firefox, Safari).
Switching to other theme fixes the problem (default Curve, Redsy etc), so the problem is in theme.
Pls help...
Title: Re: Ant's Mutant Curve
Post by: Kindred on March 10, 2021, 12:28:26 PM
can't replicate the issue.

It sounds like your have a badly installed mod.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on March 10, 2021, 04:40:10 PM
Would need a direct link to see what the problem is.
Example test site, running the latest version of the theme with SMF 2.0.18, is here: http://smftest.hawkdawg.com/index.php
No issues with viewing topics when logged out,
Title: Re: Ant's Mutant Curve
Post by: Kindred on March 10, 2021, 04:46:16 PM
Also in use at My Test Site (https://test.turtleshellprod.com)
Title: Re: Ant's Mutant Curve
Post by: Ninja ZX-10RR on March 21, 2021, 08:07:14 PM
Quote from: Antechinus on March 10, 2021, 04:40:10 PM
Example test site, running the latest version of the theme with SMF 2.0.18, is here: http://smftest.hawkdawg.com/index.php
You're missing a max-width: 55% (or thereabouts) on div.user at the top, as the search bar overflows at certain resolutions (body ~650px width, so you don't have to play Sherlock Holmes around) during the transition from desktop to mobile view :P However, with that, it gets bad on mobile and both div.user and div.news will need 100% to stretch back again.
The "Page X of Y" buttons in #messageindex got way too big font or they're too small (whichever), but I guess you're still working on that one, it's too evident.
Holy cow I love the go up/down buttons, I may steal that bit of code for some things!
You also re-did all of the image backgrounds with linear-gradients, that's good effort by itself and very well done, I'm not the biggest fan of working with those color-changing backgrounds but you did it properly right there.
Pretty solid thingy you did there :) Inspirational as usual in some areas, thanks for sharing.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on April 14, 2021, 07:22:37 PM
Just spotted this. I've been preoccupied with non-SMF things for a while (****** hitting the fan, and all that). Will take a closer look over the next week. :)
Title: Re: Ant's Mutant Curve
Post by: dan4ever on July 09, 2021, 08:49:33 AM
Hello

Where in the code for this theme (or SMF), can I find the problem when a mod does not work with each other?

I have a problem with "Multimedia" from NIBOGO and he says it is a css problem.
It takes a whole day to get an answer to a question because I live in Europe and you in America. I sleep when you are awake and vice versa.

This is a submenu that is not visible on the mobile and the drop-down menu is not displayed on the computer.
https://www.guldforum.se/forum/index.php?action=multimedia
Can you see this? the second menu!

I can not find info about others with the same problem.
Have been looking for this error for at least 3 weeks now.

And NIBOGO probably has other things to do ... sigh

/ Dan
Title: Re: Ant's Mutant Curve
Post by: Ninja ZX-10RR on July 13, 2021, 12:02:03 AM
Quote from: dan4ever on July 09, 2021, 08:49:33 AM
https://www.guldforum.se/forum/index.php?action=multimedia
Can you see this? the second menu!
No, because guests cannot access that link, so we can't even see the menu and it's extremely hard to help without being able to see the issue plus being in Swedish :D
Title: Re: Ant's Mutant Curve
Post by: dan4ever on July 13, 2021, 05:23:20 PM
This 2 pic show the submenu for "Groups" and "Multimedia".

The first one works but not the "Multimedia".
Nibogo told me that its a CSS problem on the theme and he don't fix others theme.

And on a cellphone the submenu not exist at al.
/Dan
Title: Re: Ant's Mutant Curve
Post by: Diego Andrés on July 13, 2021, 06:25:05 PM
I made an account in your forum to test your issue.
It's both a theme issue and a mod issue.

The theme uses only vertical menu for sections and most mods don't do it exactly like smf so it won't look good when this happens.
You can fix simply by adding the submenu class to the ul child on the multimedia nav.

Additionally would be required to rename the div and ul ids (which shouldn't have the same name as the main menu to begin with). This because it will give you warnings in your site when validating, and most importantly because you'll need to add a custom css rule to prevent this menu from being hidden because it's using the same styles from the main menu (should also not be done imo as custom themes would break it very often).

The first change I assume should be done in the main template of the mod.

Regards.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on July 16, 2021, 09:48:26 PM
Quote from: Ninja ZX-10RR on March 21, 2021, 08:07:14 PM
The "Page X of Y" buttons in #messageindex got way too big font or they're too small (whichever), but I guess you're still working on that one, it's too evident.
Not sure what you mean here. I've checked it on my Android phone* and it looks pretty good in either FF or Chrome. Font sizing is slightly out on Chrome, but wouldn't be hard to fix. It's certainly not "way too big". What were you testing it on?


QuoteHoly cow I love the go up/down buttons, I may steal that bit of code for some things!
They really still need a bit of tweaking to deal with landscape vs portrait on mobile. Should be easy enough with the right query. Will take a look at it.

*Yes, grumpy old bugger now haz teh smartphone. :D
Title: Re: Ant's Mutant Curve
Post by: Antechinus on July 16, 2021, 09:52:34 PM
Quote from: dan4ever on July 13, 2021, 05:23:20 PM
This 2 pic show the submenu for "Groups" and "Multimedia".

The first one works but not the "Multimedia".
Nibogo told me that its a CSS problem on the theme and he don't fix others theme.

And on a cellphone the submenu not exist at al.
/Dan
That mod is not on the mod site, so I assume it is one of NIBOGO's paid mods. If it is a paid mod, he should provide support for it. If he's not prepared to do that, I'd need copies of the mod files to know what the problem is. And no, I'm not paying for them.
Title: Re: Ant's Mutant Curve
Post by: Ninja ZX-10RR on July 18, 2021, 02:10:17 PM
You got 5em on .subject .antPages_select which cuts the page navigation in messageindex, I'll post a screenshot of that later if you can't see it on your end.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on July 18, 2021, 05:41:24 PM
Oh I know what you mean. That's deliberate. The page index calls the same basic markup everywhere, and I restricted the visible width of the select in that location to save space and give a cleaner look. It's a bit tricky though, depending on language defined in SMF and on the font defined in the browser. I should probably change the string to just give the page number, without the "of **". The extra text seemed like a good idea at the time, but probably isn't. Opening the select shows you how many pages there are anyway.

By the way: this is not part of the theme itself anyway. It's my page index mod: Dangerous Marsupial Page Index (https://custom.simplemachines.org/mods/index.php?mod=4247)

By default the theme just runs the standard 2.0.x page index.
Title: Re: Ant's Mutant Curve
Post by: Ninja ZX-10RR on July 18, 2021, 07:06:08 PM
I love that mod name lmfao ;D
Interesting one, too. Might use it somewhere, since the default pagination kinda sucks.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on August 06, 2021, 09:06:16 PM
Quote from: Ninja ZX-10RR on March 21, 2021, 08:07:14 PMYou're missing a max-width: 55% (or thereabouts) on div.user at the top, as the search bar overflows at certain resolutions (body ~650px width...

Finally remembered to have a look at this, and I can't see what the issue is. AFAICT it seems fine with the code it already has. Can you be more specific? Possibly post a screenshot? Which device and browser. All the usual crud. :)
Title: Re: Ant's Mutant Curve
Post by: Ninja ZX-10RR on August 07, 2021, 08:19:18 PM
Told ya, about 650px body width it overflows as you don't have a max-width set O:)

Browser you know it's irrelevant, but it's Chrome up-to-date. Device it's some Akai 20something inches screen, would take me a lot of effort to actually check the exact model though, as I'd have to undo several cables.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on August 07, 2021, 08:38:10 PM
OK, Chrome bug. Just checked in Chrome and it happens. Doesn't happen at all with Firefox. Will take a look at it.
Title: Re: Ant's Mutant Curve
Post by: Mike66 on September 10, 2021, 12:56:43 PM
Have been playing with this as an alternative theme on my forum today  :)

I really like the responsive layout, but I can't get my head round something. I'm running 2.0.18 and I use the Global Headers & Footers mod for a couple of images and text, which are in html.

The theme seems to ignore or overide things like 'centre' written in html in the mod?
And also allows the images in html to overflow small screens, which doesn't happen in my other themes.
Yet all the images in posts etc ( non Global Headers & Footers mod ) are displaying responsively.

I'm sure there is a simple answer to this, but it's not coming to me  ;D 
Title: Re: Ant's Mutant Curve
Post by: Antechinus on September 10, 2021, 02:30:20 PM
It probably is simple, but I would have to take a look at the code for that mod. I'll look at it over the weekend. :)
Title: Re: Ant's Mutant Curve
Post by: Mike66 on September 18, 2021, 10:09:58 AM
Quote from: Antechinus on September 10, 2021, 02:30:20 PMIt probably is simple, but I would have to take a look at the code for that mod. I'll look at it over the weekend. :)

I think I'm (fingers crossed) finding my way round this now Ant  :)
To fix my images that were going off screen in mobile I added:

img, video, iframe
{
    max-width: 100%;
    margin: 0 auto;
}

img{
    max-width: 100%;
    height: auto; /* Prevent stretching of full-size images with height and width attributes in IE8 */
}

To fix the Global Headers & Footers Mod issue I added:

/* Forum footer */

.forum-footer {
margin-top: 20px;
text-align: center;
}

.forum-footer p {
padding: 0;
margin-bottom: 20px;
}

.forum-footer p:last-child {
margin-bottom: 0;
}

So far so good, but I'm sure I'll find a few other things to tweak  ;D  The theme is awesome thanks  8)

Cheers
Mike
Title: Re: Ant's Mutant Curve
Post by: Antechinus on September 18, 2021, 03:21:49 PM
Ok, sounds good. BTW, I just noticed this:
Quote from: Mike66 on September 10, 2021, 12:56:43 PMThe theme seems to ignore or overide things like 'centre' written in html...
You have to use the Yankglish spelling: "center". It's the standard for any W3C stuff (HTML, CSS, etc). But don't use the antiquated "center" tag. If you want something centred use one of these:
.element_class_or_tag {text-align: center;}.element_class_or_tag {margin: 0 auto;}
The first works for inline or inline-block elements. The second works for display: block; elements. :)

I still haven't got around to looking at that mod on a test site. I may be able to add something to the theme's index.css to deal with this issue, without breaking anything else.
Title: Re: Ant's Mutant Curve
Post by: Mike66 on September 18, 2021, 03:48:00 PM
Thanks Ant, I always have to check my spelling of center/centre  ;D  but it was OK this time.

Previous niggles are fixed and working fine.
But I've now realised that SMF Gallery Pro isn't playing nice. The Add Picture editor is overflowing the screen, which is strange, as the post/message editor is fine.

Cheers
Mike
Title: Re: Ant's Mutant Curve
Post by: Antechinus on September 18, 2021, 04:42:26 PM
TBH I probably should revamp the CSS in this thing. Some places I used floats and absolute positioning, where it would probably be better with grid.

I'm not sure if the way it is done now would mess with that editor. I don't have a copy of that mod (and don't plan on buying it). If the free version of the Gallery mod uses the same editor setup I could take a look at that.

If you really get stuck, you can PM me details for a test acount if you like.
Title: Re: Ant's Mutant Curve
Post by: Mike66 on September 18, 2021, 05:26:43 PM
Don't worry, I'll play with it, I can usually work things out if I try hard enough.

What could possibly go wrong  ;D

Cheers
Mike
Title: Re: Ant's Mutant Curve
Post by: FredHH21 on October 21, 2021, 07:14:31 AM
Nice job

but, "Karma" is not visible in posts on Mobiles ... at least I couldn't find it

Anything I can do  ?
Title: Re: Ant's Mutant Curve
Post by: Antechinus on October 21, 2021, 02:58:04 PM
@media screen and (max-width: 56em) {
#menu_skip, .user_time, .table_list .stats,
.topic_table th:nth-child(3),
.topic_table th:nth-child(4) a:last-child::after,
.topic_table td:nth-child(4),
#author, .poster>ul {
display: none;
}
The last part of that (where it says .poster>ul) hides all the messy bits on mobile. If you want some of them showing you would remove that, and then decide which bits you still want hidden.
Title: Re: Ant's Mutant Curve
Post by: FredHH21 on October 22, 2021, 04:13:38 AM
That worked for me. Thanks a lot.
Is there any chance to line up the "messy bits" horizontally
Title: Re: Ant's Mutant Curve
Post by: FredHH21 on October 22, 2021, 09:50:07 AM
Antechinus, could you assist to get the "board description" in mobile view `?
Thanx
Title: Re: Ant's Mutant Curve
Post by: Antechinus on October 23, 2021, 02:13:10 AM
@media screen and (max-width: 40em) {
/* Set Retina font-size to browser default. */
/* This is mainly for testing on standard desktop. */
/* Should not be needed for actual mobile or HD use. */
html {
font-size: 71.43%;
}
/* -------------------- */
#smflogo, #siteslogan>span,
.recent_posts span:last-child,
#posting_icons, #advanced_search .smalltext,
.table_list .info>p, .topic_table .icon2, a.button_strip_print,
.pagelinks_inline + .buttonlist a.button_strip_send,
#lastPost + .buttonlist a.button_strip_mark_unread,
.nextlinks, .postarea .modified {
display: none;
}
.table_list .info>p, is the board description and the board moderators (separate paragraph tags for each).

Quote from: FredHH21 on October 22, 2021, 04:13:38 AMIs there any chance to line up the "messy bits" horizontally
.poster>ul>li {display: inline-block;} should do it.
Title: Re: Ant's Mutant Curve
Post by: FredHH21 on October 23, 2021, 04:00:25 AM
Thanks for your help. I just found out that Board-Description wrapping is wrong for long descriptions.
Text goes "under" the posts/topics column

Couldn't attach an image, here a screen shot on my onedrive.

https://1drv.ms/u/s!ApHF_SjodCCNj91u7BdyHBp1kYUewQ?e=G5LvTM

Problem at all sizes

Regards, Fred

Title: Re: Ant's Mutant Curve
Post by: Antechinus on October 23, 2021, 03:42:27 PM
That does not occur with the theme in default form. Live example here: http://smftest.hawkdawg.com/index.php

Obvious question: what have you done to it?
Title: Re: Ant's Mutant Curve
Post by: FredHH21 on October 25, 2021, 03:38:12 AM
The posts/topic block disappears in your example.
It remains on my system.

I do not really know what I'm doing .. just trial an error.
Any hint where I should look for the posts/topics column to disappear ?

Thanky you very much for your help !!!
Title: Re: Ant's Mutant Curve
Post by: Antechinus on October 25, 2021, 02:04:05 PM
This is what makes it disappear:
/* 896px at standard browser settings. */
@media screen and (max-width: 56em) {
     #menu_skip, .user_time, .table_list .stats,
    .topic_table th:nth-child(3),
    .topic_table th:nth-child(4) a:last-child::after,
    .topic_table td:nth-child(4),
     #author, .poster>ul {
        display: none;
    }

.table_list .stats is the relevant one for the board index. Without knowing what you have done to the theme I can't really diagnose your issue. :)
Title: Re: Ant's Mutant Curve
Post by: FredHH21 on October 25, 2021, 02:27:49 PM
/* Basic responsive tweaks.
----------------------------------------*/
/* 1024px at standard browser settings. */
@media screen and (max-width: 64em) {}
/* 896px at standard browser settings. */
@media screen and (max-width: 56em) {
     #menu_skip, .user_time, .table_list .stats,
    .topic_table th:nth-child(3),
    .topic_table th:nth-child(4) a:last-child::after,
    .topic_table td:nth-child(4),
    .poster>ul>li {display: inline-block;},
     #author, .poster>ul {
        display: none;
    }
    body {
        padding: 0 0 2em;
    }

The line for displaying the karma and other "bits"
is responsible for not disappearing the topics column ...
If I remove the line, behaviour is normal, but NO more karma and other author details

Title: Re: Ant's Mutant Curve
Post by: Antechinus on October 25, 2021, 02:32:20 PM
That line has nothing to do with the stats column. You probably have a syntax error somewhere, like a stray comma or something.
Title: Re: Ant's Mutant Curve
Post by: FredHH21 on October 26, 2021, 04:33:19 AM
Maybe I got you wrong about the "karma" display in compact views

@Media screen and (max-width: 56em) {
    #menu_skip, .user_time, .table_list .stats,
    .topic_table th:nth-child(3),
    .topic_table th:nth-child(4) a:last-child::after,
    .topic_table td:nth-child(4),
    #author, .poster>ul {
        display: none;
    }

If I remove the bold part, as you told me, Karma is shown in post-view,
but in main index the the post/topic column remains and the board descriptions mess up

I do not really know what I'm doing ... maybe I did wrong

I just need to display the karma settings ( and other stuff )
Title: Re: Ant's Mutant Curve
Post by: Antechinus on October 26, 2021, 03:35:08 PM
It needs to look like this:
/* 896px at standard browser settings. */
@media screen and (max-width: 56em) {
     #menu_skip, .user_time, .table_list .stats,
    .topic_table th:nth-child(3),
    .topic_table th:nth-child(4) a:last-child::after,
    .topic_table td:nth-child(4),
     #author {
        display: none;
    }
Note that there is no stray comma before the {
Title: Re: Ant's Mutant Curve
Post by: FredHH21 on October 27, 2021, 02:16:20 AM
Thanks for you endless patience with such "stupid" :-)
Everything works now, my fault ... I didn't read carefully.

Is there a donation button somewhere ?  8)
Title: Re: Ant's Mutant Curve
Post by: Antechinus on October 27, 2021, 02:28:24 AM
Don't worry about it. It's just normal theme support. Or donate a bit to SMF if you like.
Title: Re: Ant's Mutant Curve
Post by: FredHH21 on October 28, 2021, 02:14:19 AM
Hello again :-)

Is it possible to disable the hamburger-menus ?
And if, how  :D
Title: Re: Ant's Mutant Curve
Post by: Antechinus on October 28, 2021, 04:00:27 PM
It's possible, but why would you want to do it?
Title: Re: Ant's Mutant Curve
Post by: FredHH21 on October 30, 2021, 12:49:53 AM
My users are not used to these hamburger-menus in the forum.
We have some menu options like ajax-chat with online user count etc.
These are not visible anymore because they are collapsed.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on October 30, 2021, 01:28:59 AM
Hamburger menus are standard these days, once screen size is small enough for them to be relevant. Just about anyone using the web will have no choice but to get used to them.

In particular, the sidebar menu in this theme (inside profile areas, etc) needs to be collapsed by default on small screens. It chews too much width to be permanently expanded. Having it as a collapsible overlay is the only way that makes sense.

If you want some specific main menu links duplicated outside the hamburger menu that is possible. The PM count and link are done that way in this theme.
Title: Re: Ant's Mutant Curve
Post by: FredHH21 on November 10, 2021, 04:54:04 AM
There is no "re:" anymore when replying to a post.
Any hint what is going wrong ?
Thanks
Title: Re: Ant's Mutant Curve
Post by: Antechinus on November 10, 2021, 01:58:44 PM
I deliberately got rid of that. A lot of people hate it, and I'm one of those people. :D
However, if you want to have it cluttering up the gui and annoying people you can do that easily. The code is in languages/ThemeStrings.english.php:
// Hide the response prefix (the dreaded "Re:").
$txt['response_prefix'] = '';

If you remove that, it will go back to the default. Note you will also have to clear the forum cache (in the admin maintenance area).
Title: Re: Ant's Mutant Curve
Post by: User Andrey on November 14, 2021, 04:06:20 PM
Just started to use this awesome theme. It's great! Thanks a lot!

But I have experienced one problem blocking making this theme as default - several pages are blank for unregistered users (with no any php/httpd/smf errors in all logs). How can I debug this case?
Title: Re: Ant's Mutant Curve
Post by: rcane on November 16, 2021, 11:13:45 AM
I love the Theme, but I've got a problem and cannot find the box to check:

If you click on some of the boards' names it doesn't go in and show you ALL the posts; it goes to a blank box saying there are no messages.  There is a sticky in there, so I know it's not empty.

The problem is, quite a few of the boards do this, and I'm unable to spot the box to check.

Thoughts?
Title: Re: Ant's Mutant Curve
Post by: Mike66 on November 16, 2021, 11:18:34 AM
Board permissions?

Admin - Forum - Boards - Modify Boards
Title: Re: Ant's Mutant Curve
Post by: rcane on November 16, 2021, 11:54:33 AM
Quote from: Mike66 on November 16, 2021, 11:18:34 AMBoard permissions?

Admin - Forum - Boards - Modify Boards

I checked.  It's not the only read-only board I have.  Looks like it's just that one board.  Deleted it, re-built, and it seems to be behaving normally.  I'll keep an eye on it.  Thank you though.
Title: Re: Ant's Mutant Curve
Post by: Antechinus on November 16, 2021, 04:50:20 PM
Quote from: andreifrommsk on November 14, 2021, 04:06:20 PMJust started to use this awesome theme. It's great! Thanks a lot!

But I have experienced one problem blocking making this theme as default - several pages are blank for unregistered users (with no any php/httpd/smf errors in all logs). How can I debug this case?
Offhand I don't know. Would need more information. For a start, which pages are blank?
Title: Re: Ant's Mutant Curve
Post by: User Andrey on November 20, 2021, 05:48:41 PM
Quote from: Antechinus on November 16, 2021, 04:50:20 PM
Quote from: andreifrommsk on November 14, 2021, 04:06:20 PMJust started to use this awesome theme. It's great! Thanks a lot!

But I have experienced one problem blocking making this theme as default - several pages are blank for unregistered users (with no any php/httpd/smf errors in all logs). How can I debug this case?
Offhand I don't know. Would need more information. For a start, which pages are blank?

All index.php?board=* are fine.

Almost all index.php?topic=* are blank. Only topics with small number of answers are loaded fine.

I have about 10 different themes installed. All of them load pages fine, so this is not the httpd / php or hardware problem.

I have investigated the index.php a bit and found that everything goes fine at least till obExit, but I have failed to investigate further.

I use smf 2.0.18 btw.
Title: Re: Ant's Mutant Curve
Post by: User Andrey on November 20, 2021, 05:53:47 PM
Quote from: andreifrommsk on November 20, 2021, 05:48:41 PM
Quote from: Antechinus on November 16, 2021, 04:50:20 PM
Quote from: andreifrommsk on November 14, 2021, 04:06:20 PMJust started to use this awesome theme. It's great! Thanks a lot!

But I have experienced one problem blocking making this theme as default - several pages are blank for unregistered users (with no any php/httpd/smf errors in all logs). How can I debug this case?
Offhand I don't know. Would need more information. For a start, which pages are blank?

All index.php?board=* are fine.

Almost all index.php?topic=* are blank. Only topics with small number of answers are loaded fine.

I have about 10 different themes installed. All of them load pages fine, so this is not the httpd / php or hardware problem.

I have investigated the index.php a bit and found that everything goes fine at least till obExit, but I have failed to investigate further.

I use smf 2.0.18 btw.

For example, this page is blank: https://xn--l1adgmc.xn-----6kccnlg3aef0aghb5bfbs6ge7h0c.xn--p1ai/index.php?topic=79.0 (Currently there is Curve installed).
Title: Re: Ant's Mutant Curve
Post by: Antechinus on November 20, 2021, 06:05:56 PM
Ok. This is odd, because the theme does not mess with anything relevant, as far as I know. Topic pages are generated in Sources, not in the themes. Themes just render the output from Sources, and I can't see how the theme could truncate topics at all.

How large do the topics have to be before the problem appears?
And what is the theme ID number for my theme on your site?
Title: Re: Ant's Mutant Curve
Post by: dbovine on November 21, 2021, 09:47:40 AM
Hi, I had messaged you about trying to add a Like button but before install it says failed when it comes to your theme files
Here is a link to the mod I was trying to use
Like Post (https://custom.simplemachines.org/index.php?mod=3708)

Title: Re: Ant's Mutant Curve
Post by: Antechinus on November 21, 2021, 02:05:54 PM
Ok. It should be easy enough to sort this. I'll take a look at it later today,
Title: Re: Ant's Mutant Curve
Post by: User Andrey on November 21, 2021, 04:09:45 PM
Quote from: Antechinus on November 20, 2021, 06:05:56 PMOk. This is odd, because the theme does not mess with anything relevant, as far as I know. Topic pages are generated in Sources, not in the themes. Themes just render the output from Sources, and I can't see how the theme could truncate topics at all.

How large do the topics have to be before the problem appears?
And what is the theme ID number for my theme on your site?

Topics with >=4 answers are blank. Topics with <=3 answers are fine. The theme ID is Ants_Mutant_Curve_1
Title: Re: Ant's Mutant Curve
Post by: Antechinus on November 21, 2021, 04:43:06 PM
Ok, it's something specific to your site. This topic on one of my test sites has 128 replies: http://smftest.hawkdawg.com/index.php?topic=3.0

As you can see, it all works. So, I can only assume that you have done something to the copy of the theme on your site. Have you edited any of the theme files, or installed any mods that would edit any of the theme files?

And regarding the theme ID on your site, I meant the numerical ID that is stored in the database. For example, this theme on that test site is http://smftest.hawkdawg.com/index.php?theme=2

If some of us can select the theme on your site, this may make diagnosing the problem easier.
Title: Re: Ant's Mutant Curve
Post by: User Andrey on November 23, 2021, 09:31:23 AM
Quote from: Antechinus on November 21, 2021, 04:43:06 PMOk, it's something specific to your site. This topic on one of my test sites has 128 replies: http://smftest.hawkdawg.com/index.php?topic=3.0

As you can see, it all works. So, I can only assume that you have done something to the copy of the theme on your site. Have you edited any of the theme files, or installed any mods that would edit any of the theme files?

And regarding the theme ID on your site, I meant the numerical ID that is stored in the database. For example, this theme on that test site is http://smftest.hawkdawg.com/index.php?theme=2

If some of us can select the theme on your site, this may make diagnosing the problem easier.

I've reinstalled the theme (and checked that diff between the archive and theme folder is empty), but pages were still blank.

The theme number is 9.

Example blank page is https://форум.школа-женского-счастья.рф/index.php?topic=631.0
Title: Re: Ant's Mutant Curve
Post by: Kindred on November 23, 2021, 11:52:56 AM
Quote from: andreifrommsk on November 23, 2021, 09:31:23 AMExample blank page is https://форум.школа-женского-счастья.рф/index.php?topic=631.0


I can see that page just fine... and all 64 pages on that thread....

I do know that 2.0.18 has an issue with UTF-8 languages like Cyrilic which received a patch (and will be incorporated into 2.0.19)
Title: Re: Ant's Mutant Curve
Post by: Antechinus on November 23, 2021, 01:57:13 PM
Quote from: Kindred on November 23, 2021, 11:52:56 AM
Quote from: andreifrommsk on November 23, 2021, 09:31:23 AMExample blank page is https://форум.школа-женского-счастья.рф/index.php?topic=631.0

I can see that page just fine... and all 64 pages on that thread
I can't see them when using theme=9. Have you tried that?

There is definitely some sort of issue here.
Title: Re: Ant's Mutant Curve
Post by: User Andrey on November 24, 2021, 02:20:41 AM
Example blank page is https://форум.школа-женского-счастья.рф/index.php?topic=631.0
Quote from: Antechinus on November 23, 2021, 01:57:13 PM
Quote from: Kindred on November 23, 2021, 11:52:56 AM
Quote from: andreifrommsk on November 23, 2021, 09:31:23 AMExample blank page is https://форум.школа-женского-счастья.рф/index.php?topic=631.0

I can see that page just fine... and all 64 pages on that thread
I can't see them when using theme=9. Have you tried that?

There is definitely some sort of issue here.

Maybe I can add some debug printing somewhere in the code to figure out the problem?
Title: Re: Ant's Mutant Curve
Post by: Antechinus on November 24, 2021, 03:01:34 AM
Maybe. Honestly at the moment I have no idea what the problem is. I only tested the theme with a couple of langauges, and it seemed fine. We might need to rope in one of the devs
Title: Re: Ant's Mutant Curve
Post by: dbovine on December 01, 2021, 08:45:42 PM
Quote from: Antechinus on November 21, 2021, 02:05:54 PMOk. It should be easy enough to sort this. I'll take a look at it later today,

any chance you have looked at this?
Title: Re: Ant's Mutant Curve
Post by: rcane on December 10, 2021, 09:00:09 AM
Good morning,

Using the Mutant Curve (nice theme btw).

Could you provide some guidance on importing an image to replace the gradient at the header?  Just the header area; it's fine from the menu buttons downward.
Title: Re: Ant's Mutant Curve
Post by: rcane on December 10, 2021, 09:12:21 AM
Not to double dip on questions so early in the morning, but I have a menu button added (that contains a sub-menu of two items) that only works on desktops.

If you are on a mobile device it simply takes you to your profile page.

The two sub-menu items are just links to open the email page to contact two members for support--just links based on their ID#.  Works fine in desktop sized environments.

I tried the "moderate" menu button and that works fine on the phone.  It's got the proper pop-up. 

I'll try over at 2.0 topics as this might not be theme related.

Title: Re: Ant's Mutant Curve
Post by: Kindred on December 10, 2021, 10:08:58 AM
You need to be slightly more specific...
1- the gradient in the header.....    well, there are THREE levels of gradient -- see attached
backgrounds.png

2- How did you create the sub-menus?
 edit subs.php
Below is a demo of how to add properly

'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
'help2' => array(
'title' => $txt['help2'],
'href' => $scripturl . '?action=help2',
'show' => true,
),
'help3' => array(
'title' => $txt['help3'],
'href' => $scripturl . '?action=help3',
'show' => true,
),
),
),
Title: Re: Ant's Mutant Curve
Post by: rcane on December 10, 2021, 10:36:56 AM
This is what I have. 
I can't tell if it's an iOS issue or not.  If I tap "get help" on my phone it just refreshes the main board display.  But, if I long-press (which brings up the iOS popup of "open, open in background, etc") and cancel that the sub menu is waiting underneath. 

I had a friend test it on Android.  Same thing.   

That happens for all the sub-menus in fact--one's that I haven't touched (like Profile and Members).  Unless you long-press and clear the OS pop-up options you won't see a menu has sub-items.





'GET HELP' => array(
   'title' => $txt['GET HELP'],
        'show' => true,
         'sub_buttons' => array(
'General Questions' => array (
'title' => $txt['General Questions'],
         'href' => https://mydomain.com/index.php?action=emailuser;sa=email;uid=2367',
         'show' => true,
         ),
         
'Forum Support' => array(
         'title' => $txt['Forum Support'],
         'href' => 'https://mydomain.com/index.php?action=emailuser;sa=email;uid=1',
         'show' => true,
         'is_last' => true,
      ),
   ),
),
Title: Re: Ant's Mutant Curve
Post by: Kindred on December 10, 2021, 11:46:07 AM
you can not have spaces in variables!!

'Forum Support' => array(
         'title' => $txt['Forum Support'],


don't use caps - don't use spaces
in both cases, use this:   forum_support
Title: Re: Ant's Mutant Curve
Post by: rcane on December 10, 2021, 12:06:06 PM
I made the corrections, but the behavior hasn't changed.  The sub-menus won't appear until after a long-press is made and cleared.
Title: Re: Ant's Mutant Curve
Post by: Kindred on December 10, 2021, 03:44:15 PM
Did you fix all of the cases that were broken?
Title: Re: Ant's Mutant Curve
Post by: shadav on December 10, 2021, 04:29:58 PM
Quote from: rcane on December 10, 2021, 10:36:56 AMThis is what I have. 
I can't tell if it's an iOS issue or not.  If I tap "get help" on my phone it just refreshes the main board display.  But, if I long-press (which brings up the iOS popup of "open, open in background, etc") and cancel that the sub menu is waiting underneath. 

I had a friend test it on Android.  Same thing. 

That happens for all the sub-menus in fact--one's that I haven't touched (like Profile and Members).  Unless you long-press and clear the OS pop-up options you won't see a menu has sub-items.





'GET HELP' => array(
    'title' => $txt['GET HELP'],
        'show' => true,
        'sub_buttons' => array(
'General Questions' => array (
'title' => $txt['General Questions'],
            'href' => https://mydomain.com/index.php?action=emailuser;sa=email;uid=2367',
            'show' => true,
            ),
           
'Forum Support' => array(
            'title' => $txt['Forum Support'],
            'href' => 'https://mydomain.com/index.php?action=emailuser;sa=email;uid=1',
            'show' => true,
            'is_last' => true,
        ),
    ),
),


replace yours with this
'gethelp' => array(
    'title' => $txt['get_help'],
        'show' => true,
        'sub_buttons' => array(
'generalquestions' => array (
'title' => $txt['general_questions'],
            'href' => $scripturl . '?action=emailuser;sa=email;uid=2367',
            'show' => true,
            ),
           
'forumsupport' => array(
            'title' => $txt['forum_support'],
            'href' => '$scripturl . '?action=emailuser;sa=email;uid=1',
            'show' => true,
            'is_last' => true,
        ),
    ),
),

I feel like one of those 3 at the end ), should be moved up from the end to above the forumsupport though

then in your Themes/default/languages/Modifications.english.php and Modifications.english-utf8.php
and any other language files you have
don't forget to add the language strings (or change them now to match)
$txt['get_help'] = 'Get Help';
$txt['general_questions'] = 'General Questions';
$txt['forum_support'] = 'Forum Support';
Title: Re: Ant's Mutant Curve
Post by: rcane on December 10, 2021, 05:43:02 PM
Quote from: shadav on December 10, 2021, 04:29:58 PM
Quote from: rcane on December 10, 2021, 10:36:56 AMThis is what I have. 
I can't tell if it's an iOS issue or not.  If I tap "get help" on my phone it just refreshes the main board display.  But, if I long-press (which brings up the iOS popup of "open, open in background, etc") and cancel that the sub menu is waiting underneath. 

I had a friend test it on Android.  Same thing. 

That happens for all the sub-menus in fact--one's that I haven't touched (like Profile and Members).  Unless you long-press and clear the OS pop-up options you won't see a menu has sub-items.





'GET HELP' => array(
    'title' => $txt['GET HELP'],
        'show' => true,
        'sub_buttons' => array(
'General Questions' => array (
'title' => $txt['General Questions'],
            'href' => https://mydomain.com/index.php?action=emailuser;sa=email;uid=2367',
            'show' => true,
            ),
           
'Forum Support' => array(
            'title' => $txt['Forum Support'],
            'href' => 'https://mydomain.com/index.php?action=emailuser;sa=email;uid=1',
            'show' => true,
            'is_last' => true,
        ),
    ),
),


replace yours with this
'gethelp' => array(
    'title' => $txt['get_help'],
        'show' => true,
        'sub_buttons' => array(
'generalquestions' => array (
'title' => $txt['general_questions'],
            'href' => $scripturl . '?action=emailuser;sa=email;uid=2367',
            'show' => true,
            ),
           
'forumsupport' => array(
            'title' => $txt['forum_support'],
            'href' => '$scripturl . '?action=emailuser;sa=email;uid=1',
            'show' => true,
            'is_last' => true,
        ),
    ),
),

I feel like one of those 3 at the end ), should be moved up from the end to above the forumsupport though

then in your Themes/default/languages/Modifications.english.php and Modifications.english-utf8.php
and any other language files you have
don't forget to add the language strings (or change them now to match)
$txt['get_help'] = 'Get Help';
$txt['general_questions'] = 'General Questions';
$txt['forum_support'] = 'Forum Support';



I like the actions to email rather than the links.  it's cleaner.  it all failed if I didn't have the three there.  And, if one gets move up, it drops the second button out.


HOWEVER, none of that fixes why you can't tap the parent button on a mobile device and popup the child menu.  You literally have to long-press, close the iOS link options that pop up, and then you will see the buttons we just built.

It's on ALL the menus like this.  Android and iPhone.  I don't know if it's Ants or all SMF. 

Do you have an iphone you could try out a different theme on?
Title: Re: Ant's Mutant Curve
Post by: shadav on December 10, 2021, 05:50:24 PM
got a link to your site?
Title: Re: Ant's Mutant Curve
Post by: Kindred on December 10, 2021, 10:08:10 PM
Can't exactly replicate on my trst site with ant's theme....   the only thing I notce is that tge so menu is FAST, and if the main menu has its own link, there us not much time to click the submenu link before the main menu link triggers
Title: Re: Ant's Mutant Curve
Post by: rcane on December 10, 2021, 10:15:54 PM
Quote from: Kindred on December 10, 2021, 10:08:10 PMCan't exactly replicate on my trst site with ant's theme....   the only thing I notce is that tge so menu is FAST, and if the main menu has its own link, there us not much time to click the submenu link before the main menu link triggers

well, my menu just drops down to two sub menus.  no link.  and it happens on ALL the menu items with sub menus.
Title: Re: Ant's Mutant Curve
Post by: rcane on December 12, 2021, 11:59:21 AM
I tried changing the iOS haptic settings to increase and decrease the long-press sensitivity and nothing affects it.
Title: Re: Ant's Mutant Curve
Post by: Kindred on December 12, 2021, 04:01:05 PM
Log into my test site and see if it does the same
Title: Re: Ant's Mutant Curve
Post by: rcane on December 12, 2021, 05:50:32 PM
Quote from: Kindred on December 12, 2021, 04:01:05 PMLog into my test site and see if it does the same

I do not have the URL
Title: Re: Ant's Mutant Curve
Post by: Kindred on December 12, 2021, 09:15:05 PM
Test.turtleshellprod.com
Title: Re: Ant's Mutant Curve
Post by: rcane on December 12, 2021, 09:20:28 PM
Quote from: Kindred on December 12, 2021, 09:15:05 PMTest.turtleshellprod.com

well, i checked that site on my desktop first but there are no sub menus to test that i can see.

the main menu pops out (as does mine), but its the sub menus that don't like my phone.
Title: Re: Ant's Mutant Curve
Post by: rcane on December 13, 2021, 11:20:31 AM
The only menu that pops out properly in the mobile display is the main "hamburger".  I don't believe I explained that properly.
Title: Re: Ant's Mutant Curve
Post by: Kindred on December 13, 2021, 02:06:06 PM
@Antechinus

--there does appear to be an issue with your second level sub-menus

Go to a site running this theme with a mobile device
tap the hamburger menu
(main menu is displayed)
tap an item with a second-level sub menu    (in the case of my test site, the help menu item has 3 sub-menu items)
---- problem
the second-level submenu OPENS, for a brief instant before the main menu item link is triggered, thus loading the new page and closing the entire hamburger menu.
Title: Re: Ant's Mutant Curve
Post by: rcane on December 13, 2021, 02:08:50 PM
Quote from: Kindred on December 13, 2021, 02:06:06 PM@Antechinus

--there does appear to be an issue with your second level sub-menus

Go to a site running this theme with a mobile device
tap the hamburger menu
(main menu is displayed)
tap an item with a second-level sub menu    (in the case of my test site, the help menu item has 3 sub-menu items)
---- problem
the second-level submenu OPENS, for a brief instant before the main menu item link is triggered, thus loading the new page and closing the entire hamburger menu.
Thank you for forwarding the concern.  Truly appreciated.
Title: Re: Ant's Mutant Curve
Post by: rcane on January 02, 2022, 04:57:16 PM
Quote from: Kindred on December 10, 2021, 03:44:15 PMDid you fix all of the cases that were broken?

Forgot to answer.  Yes


Still no word from Ant
Title: Re: Ant's Mutant Curve
Post by: Sir Osis of Liver on January 04, 2022, 05:28:54 PM
2.0.19 upgrade is balking at this in index.template.php:

Find -


// If we're viewing a topic, these should be the previous and next topics, respectively.
    if (!empty($context['current_topic']))
        echo '
    <link rel="prev" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=prev" />
    <link rel="next" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=next" />';

    // If we're in a board, or a topic for that matter, the index will be the board's index.


Replace -


// If we're in a board, or a topic for that matter, the index will be the board's index.


What's there is this -


    // If we're viewing a topic, these should be the previous and next topics, respectively.
    if (!empty($context['links']['next']))
        echo '
    <link rel="next" href="', $context['links']['next'], '" />';
    else if (!empty($context['current_topic']))
        echo '
    <link rel="next" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=next" />';
    if (!empty($context['links']['prev']))
        echo '
    <link rel="prev" href="', $context['links']['prev'], '" />';
    else if (!empty($context['current_topic']))
        echo '
    <link rel="prev" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=prev" />';

    // If we're in a board, or a topic for that matter, the index will be the board's index.


Just delete the first comment and following links?

Title: Re: Ant's Mutant Curve
Post by: rcane on January 04, 2022, 05:40:56 PM
Quote from: Sir Osis of Liver on January 04, 2022, 05:28:54 PM2.0.19 upgrade is balking at this in index.template.php:

Find -


// If we're viewing a topic, these should be the previous and next topics, respectively.
    if (!empty($context['current_topic']))
        echo '
    <link rel="prev" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=prev" />
    <link rel="next" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=next" />';

    // If we're in a board, or a topic for that matter, the index will be the board's index.


Replace -


// If we're in a board, or a topic for that matter, the index will be the board's index.


What's there is this -


    // If we're viewing a topic, these should be the previous and next topics, respectively.
    if (!empty($context['links']['next']))
        echo '
    <link rel="next" href="', $context['links']['next'], '" />';
    else if (!empty($context['current_topic']))
        echo '
    <link rel="next" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=next" />';
    if (!empty($context['links']['prev']))
        echo '
    <link rel="prev" href="', $context['links']['prev'], '" />';
    else if (!empty($context['current_topic']))
        echo '
    <link rel="prev" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=prev" />';

    // If we're in a board, or a topic for that matter, the index will be the board's index.


Just delete the first comment and following links?



is this index.template in Ant's theme directory?  I presume so, but always safer to ask.
Title: Re: Ant's Mutant Curve
Post by: Diego Andrés on January 04, 2022, 05:42:48 PM
Yes, index.template.php
Title: Re: Ant's Mutant Curve
Post by: rcane on January 04, 2022, 05:47:50 PM
Quote from: Diego Andrés on January 04, 2022, 05:42:48 PMYes, index.template.php

This is what's already in mine.

// If we're viewing a topic, these should be the previous and next topics, respectively.
    if (!empty($context['links']['next']))
        echo '
    <link rel="next" href="', $context['links']['next'], '" />';
    else if (!empty($context['current_topic']))
        echo '
    <link rel="next" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=next" />';
    if (!empty($context['links']['prev']))
        echo '
    <link rel="prev" href="', $context['links']['prev'], '" />';
    else if (!empty($context['current_topic']))
        echo '
    <link rel="prev" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=prev" />';

    // If we're in a board, or a topic for that matter, the index will be the board's index.
    if (!empty($context['current_board']))
        echo '
    <link rel="index" href="', $scripturl, '?board=', $context['current_board'], '.0" />';
Title: Re: Ant's Mutant Curve
Post by: rcane on January 04, 2022, 06:14:58 PM
I should say, the example to find/replace was in the core>index.template.php file.

The index.template in Ant's directory seemed already to have been corrected.
Title: Re: Ant's Mutant Curve
Post by: Sir Osis of Liver on January 05, 2022, 08:36:33 PM
Quote from: Sir Osis of Liver on January 04, 2022, 05:28:54 PM2.0.19 upgrade is balking at this in index.template.php:

Find -


// If we're viewing a topic, these should be the previous and next topics, respectively.
    if (!empty($context['current_topic']))
        echo '
    <link rel="prev" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=prev" />
    <link rel="next" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=next" />';

    // If we're in a board, or a topic for that matter, the index will be the board's index.


Replace -


// If we're in a board, or a topic for that matter, the index will be the board's index.


What's there is this -


    // If we're viewing a topic, these should be the previous and next topics, respectively.
    if (!empty($context['links']['next']))
        echo '
    <link rel="next" href="', $context['links']['next'], '" />';
    else if (!empty($context['current_topic']))
        echo '
    <link rel="next" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=next" />';
    if (!empty($context['links']['prev']))
        echo '
    <link rel="prev" href="', $context['links']['prev'], '" />';
    else if (!empty($context['current_topic']))
        echo '
    <link rel="prev" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=prev" />';

    // If we're in a board, or a topic for that matter, the index will be the board's index.


Just delete the first comment and following links?



Ant?