News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Activitybar

Started by Suki, June 30, 2009, 11:40:36 AM

Previous topic - Next topic

FrizzleFried

Hello @Suki ...

This old 2.0 mod made it very easy to see just how active each member who was posting is...

Is there any way you could take a look at it and update it for 2.1.1?   It appears to fail on DISPLAY and PROFILE templates... perhaps only where to "display" the bar?

I am hoping you'd consider taking a look.

Thank you.

Suki

New version 2.0 only compatible with SMF 2.1.x.

2.0 April 2022
- Use SMF's bar css style for bar colors
- Remove Ohara library
- Remove old dependencies
- PHP 7.4 or above support
- Remove utf-8 language files
- Clean up template functions

Old versions are still avaliable at github: https://github.com/MissAllSunday/ActivityBar/releases
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

FrizzleFried

Awesome!  Upgraded as well (at least from the last version we were using).

Thank you Suki...


FrizzleFried

#423
Hello Suki...

Looks FANTASTIC in PC wide screen mode...

...however if you make the screen thin enough to go in to mobile mode... activity bar is nowhere to be seen...

You cannot view this attachment.


EDIT: Standard location BTW.

It appears this is the case for all locations that are in the field to the left.  The two options to show the bar above/below the signature shows a bar in both PC and Mobile modes... but aren't nearly as visually appealing as the options to the left.


FrizzleFried

Also,  I am seeing the Activity bar LABEL in the Profile (down bottom) ... but not the actual bar (again,  standard bar)... not in any view mode. I cane provide a screenshot if necessary.

Curve2 theme BTW

Diego Andrés

Some custom fields positions are hidden on mobile, you can bring them back editing the responsive.css file.
The idea is to not have clutter when people are just quickly browsing/reading from a phone.

SMF Tricks - Free & Premium Responsive Themes for SMF.

FrizzleFried

Thanks... I'll take a look at the responsive.css file and see how things appear in mobile if I am able to enable.  Thanks for the heads up.

FrizzleFried

Quote from: FrizzleFried on April 07, 2022, 06:54:21 PMAlso,  I am seeing the Activity bar LABEL in the Profile (down bottom) ... but not the actual bar (again,  standard bar)... not in any view mode. I cane provide a screenshot if necessary.

Curve2 theme BTW

Here is a screenshot of that page.  While the mod shows fine in the SUMMARY section as it is supposed to... I am not sure what is supposed to show here... (please forgive,  the label we use for the mod is a little ... shall we say ... ahem ... uncouth... our PRIVATE SITE is pretty much a "water-cooler" type of place with a bunch of guys... )

#1 - LOOK & LAYOUT PAGE

You cannot view this attachment.

#2 -  ACCOUNT SETTINGS PAGE

(I tried to upload another photo... I got this error)

QuoteScreenHunter 377.jpg There was a problem during the uploading of ScreenHunter 377.jpg.
The upload directory is full. Please contact an administrator about this problem. 22.8 KB

In any case... it shows the same tag on the ACCOUNTS SETTINGS PAGE.

# - PROFILE DETAILS PAGE

Same thing.  Same text appears at the bottom.

It's not a huge deal by any stretch,  but should be cleaned up.

I'm gunna see what I can do about getting the nice color bars up in to the top field of the mobile view.

Suki

yeah there was a flaw in the code's logic, the bar should not be displayed on any profile settings edit page.

I made a new version to fix that: https://github.com/MissAllSunday/ActivityBar/releases/tag/Version_2.0.1
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Arantor

Please can you add a check to addProfile that $area is not 'register'? It's loading during the registration page and causing errors because the output to $context['custom_fields'] is missing items such as desc.

Diego Andrés

It's doing that now no?, it had a typo before

SMF Tricks - Free & Premium Responsive Themes for SMF.

Arantor

I'm only going off FrizzleFried's error log from earlier on about errors during registration owing to missing items in the custom fields arrays.

FrizzleFried

I have not tried the new version offered earlier today.  I will as soon as possible.

Arantor

I'm not 100% sure if it won't show up in the registration area anyway, if it's turned on, as the return only happens if "area is not summary" and "set to show in profile".

Seems to me it could show up in registration even if show in profile is off, no?

FrizzleFried

New version is installed.  Only time will tell at this point...

:)

I will report back.

FrizzleFried

I can report that the stray text string throughout the profile pages is gone ... and I've not had a single error reported since installation.

Thank you Suki!

FrizzleFried

14+ hours later and not a single error.  Based on prior behavior I am 100% certain the new version rectified the issues I was having.  Again... thank you!   :D

Senkusha

Hi all!  I searched through the 22 pages of the comments, but couldn't find my answer, maybe I missed it.  Anyway, I wanted to reverse the colors, so that a higher percentage of posting give a green bar instead of a red bar, which seems to be more intuitive than the default version.  I also made four conditions, Green, Yellow, Orange, and Red.

/Sources/ActivityBar.php (Starting at line 196)
    public function setColor(float $percentage): string
    {
        $color = self::DEFAULT_COLOR;

        // Which color should we use?
        if ($this->setting('colors'))
        {
            if ($percentage <= 24)
                $color = 'red';

            elseif ($percentage >= 25 && $percentage <= 49)
                $color = 'orange';

            elseif ($percentage >= 50 && $percentage <= 74)
                $color = 'yellow';

            else
                $color = 'green';
        }

        return $color;
    }

Although, I wonder if a bar could be added to the Memberlist?   Thanks for the Mod!
--Senkusha
The Anime Brigade
Anime-style Role Playing Games and Discussion.
(SMF v. 2.1.4, PHP v. 8.0)

Ricsca

I just noticed that if you set Placement to "With Icons" it doesn't take into account the size set to Max width

Suki

Quote from: Ricsca on April 23, 2023, 06:56:50 AMI just noticed that if you set Placement to "With Icons" it doesn't take into account the size set to Max width

And after a year, I will take a look on this, thank you for the report.

Quote from: Senkusha on February 01, 2023, 10:04:39 AM/Sources/ActivityBar.php (Starting at line 196)

Thanks, will see about adding an option to switch colors or even implement custom ones.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Advertisement: