WebDev

SMF Arcade => SMF Arcade Support + Plugins => Topic started by: kennethwriedtjensen on September 07, 2018, 02:28:27 PM

Title: Change the number of letters
Post by: kennethwriedtjensen on September 07, 2018, 02:28:27 PM
Under Latest Games, Latest Champs, Most Played does not show the full name of the game.

There comes ... after the game.

How do I remove it so it shows the full game name?
Title: Re: Change the number of letters
Post by: Skhilled on September 07, 2018, 06:21:43 PM
Hi kennethwriedtjensen. Are the game names really long? Are you viewing the arcade on, a cell phone or tablet?
Title: Re: Change the number of letters
Post by: Chen Zhen on September 07, 2018, 08:45:53 PM

I assume you are referring to the Enterprise skin.

Edit file:
./Source/Subs-ArcadeSkinA.php

Use a proper text editor (not MS Notepad) like notepad++
Download Notepad++ (https://notepad-plus-plus.org/)

search for
>= 23

Look at the lines of code that have that in it.
They are not identical so you can't search for the whole line which is why I suggest you search for those 5 characters.
Here is one example..

This:
strlen($row['game_name']) >= 23 ? $row['game_name'] = mb_substr($row['game_name'],0,22) . '...' : '';

can be changed to (to allow an extra 5 characters):
strlen($row['game_name']) >= 28 ? $row['game_name'] = mb_substr($row['game_name'],0,27) . '...' : '';
Title: Re: Change the number of letters
Post by: Chen Zhen on September 07, 2018, 08:50:28 PM

I might add an admin setting for this.
Keep in mind that it was set up on a desktop whereas those limits flow nicely due to the surrounding content.
Making the lines of text longer may cause that template to not look aesthetically pleasing.
Title: Re: Change the number of letters
Post by: kennethwriedtjensen on September 08, 2018, 05:14:02 AM
Thanks.

How do I allow me to write longer names on "Category Name"

Think there is a limit of 20 words now about?

Is it also in php, or in mysql you change it?
EhPortal 1.39.6 © 2024, WebDev