[1.0.1] mChat Font Size

Allow users to customize the default font size for all mChat messages
User avatar
kasimi
mChat developer
Posts: 1173
Joined: 06 Oct 2016, 09:56
Location: Germany

[1.0.1] mChat Font Size

Post by kasimi »

mChat Font Size

This mChat addon allows users to customize the default font size for all mChat messages (not just yours). It adds a new setting in the UCP for users to specify their font size in pixels.

You can test this extension by changing the font size in the mChat settings in your UCP.

Screenshots
  • Increased or decreased font size for all messages:

    Image
  • Customizable in the UCP:

    Image
Requirements
  • PHP at least 5.3.3
  • phpBB at least 3.1.8-RC1
  • mChat at least 2.0.0-RC7
Download

This extension is only available to Donors. How to get access.

kasimi-phpbb-ext-mchat-fontsize-1.0.1.zip
How to install, update and uninstall extensions: https://www.phpbb.com/extensions/installing/
Install path: ext/kasimi/mchatfontsize/


Changelog
  • v1.0.1 - 2017-01-12
    • Don't include CSS if mChat is not present
  • v1.0.0 - 2016-10-20
    • First release
You do not have the required permissions to view the files attached to this post.
User avatar
Darloup
Posts: 62
Joined: 20 Oct 2016, 18:21
Location: Barranquilla (Colombia)

Re: mChat Font Size

Post by Darloup »

Hello,

I have downloaded, installed and activated this superb extension, I cleared the cache but, so far, I can't see the option to select the font size in the mChat tab of my UCP.

What am I doing wrong?!

Regards,

Henry

P.S. Got it! I had to give the Administrator group the permission to do so as it was set on "No" by default!

P.P.S. A request please! Would it be possible to implement the DEFAULT font size as an option under GLOBAL SETTINGS in the ACP? My experience has shown me that users rarely bother to configure their preferences in their UCP. Thus, I would thus love a GLOBAL SETTING in the ACP where I could set the font size by default for ALL USERS (let's say 11 pix). Naturally, users could override this default setting in their UCP (if they ever bothered to do so).

Thanks!

Regards,

Henry
User avatar
kasimi
mChat developer
Posts: 1173
Joined: 06 Oct 2016, 09:56
Location: Germany

Re: mChat Font Size

Post by kasimi »

There should be an option for this in the global user settings. By changing the value there, new user accounts will automatically use that value. You can can override the font size of all existing users by using the "Override settings for all users" feature at the bottom of that page. Keep in mind that this will override all other user settings as well (display on index, input type, new messages at the top/bottom etc).

If you only want to change the font size for all users, you have two options:
    1. Uninstall this add-on extension and delete the data
    2. Open ext/kasimi/mchatfontsize/migrations/v1_0_0.php
    3. Find 'user_mchat_font_size' => array('USINT', 12),
    4. Change the 12 to whatever font size you want all users to have by default
    5. Install the extension again
  1. Run this query in phpMyAdmin or similar after installing the extension. Change the 12 to the default size you want.

    Code: Select all

    - This code is only accessible to donors -
I hope this helps. :)
User avatar
Darloup
Posts: 62
Joined: 20 Oct 2016, 18:21
Location: Barranquilla (Colombia)

Re: mChat Font Size

Post by Darloup »

Hello kasimi,
There should be an option for this in the global user settings. By changing the value there, new user accounts will automatically use that value
.
Found it - thanks!

Henry
User avatar
kasimi
mChat developer
Posts: 1173
Joined: 06 Oct 2016, 09:56
Location: Germany

Re: mChat Font Size

Post by kasimi »

Small update in the first post. The CSS for this extension was included on all pages and sometimes resulted in wrong CSS, which is fixed in version 1.0.1. No language changes.
Kong
Posts: 18
Joined: 21 Aug 2017, 22:48

Re: mChat Font Size

Post by Kong »

Have you considered doing a version of this for font colour?
User avatar
kasimi
mChat developer
Posts: 1173
Joined: 06 Oct 2016, 09:56
Location: Germany

Re: mChat Font Size

Post by kasimi »

I haven't, you're the first one who brought up the idea. :)

My time is very limited at the moment, but you can edit this extension to get a rudimentary version for font color:
  • Adjust the two language strings MCHAT_FONT_SIZE and ACL_U_MCHAT_FONT_SIZE in the en folder.
  • Open ext/kasimi/mchatfontsize/styles/prosilver/template/event/overall_header_stylesheets_after.html and change font-size: {{ MCHAT_FONT_SIZE }}px; to color: {{ MCHAT_FONT_SIZE }};. Now users can set their UCP preference to red, #123456 etc.
  • If you want to have the real Font Size add-on installed at the same time, a few more edits are required: you will need to change the migration file to set a new unique table column name, and the composer.json will need a new extension name.
User avatar
rapblues
Posts: 11
Joined: 18 Apr 2018, 08:34
Location: Paris

Re: mChat Font Size

Post by rapblues »

Fine extension, thanks ! ;)
rap

Image

Who is online

Users browsing this forum: CCBot [Bot] and 0 guests