satopian / poti-kaini-EN

POTI-board EVO English ver, The OekakiBBS for PaintBBS NEO, tegaki.js, ChickenPaint, and Klecks. (PHP7.4-PHP8.3) https://paintbbs.sakura.ne.jp/poti/
https://paintbbs.sakura.ne.jp/
Other
28 stars 9 forks source link

Change default paint program? #5

Closed catharsis71 closed 3 months ago

catharsis71 commented 2 years ago

New visitors seem to always have Shi-Painter set as the default paint program option:

image

this is probably the worst choice for a default because it loads very slowly & sometimes doesn't load at all

I don't want to disable Shi-Painter completely in case someone likes it but I want to change the default to something else preferably via my config.php

How can I do this?

satopian commented 2 years ago

@catharsis71 shi-Painter is not the default setting. If shi-Painter is already selected, it's a cookie. The cookie remembers the last tool you used. And on the smartphone, it is set with JavaScript so that shi-Painter cannot be selected.

catharsis71 commented 2 years ago

I apologize, I tested again in a private window and it's actually PaintBBS Neo that's the default.

But if I wanted to set ChickenPaint or Klercks as the default (without disabling any of them) would that be possible to do?

satopian commented 2 years ago

@catharsis71 select_app edit poti-kaini-EN\potiboard5\templates\mono_en\mono_main.blade.php.

        @if($select_app)
            Tool:
            <select name="shi">
                @if ($use_klecks)<option value="klecks">Klecks</option>@endif
                @if($use_chickenpaint)<option value="chicken">ChickenPaint</option>@endif
            <option value="neo">PaintBBS NEO</option>
            @if($use_shi_painter)<option value="1" class="for_pc">Shi-Painter</option>@endif
        </select>
        @else 
        {{-- <!-- 選択メニューを出さない時に起動するアプリ --> --}}
        <input type="hidden" name="shi" value="neo">
        @endif

In this example, klecks, chickenpaint, PaintBBS, shi-Painter are listed in that order. If I change this part to use an array, the sort will be in the order of the array, but I can't ask the end user to set a multidimensional associative array, so it's on hold. However, no matter how they are lined up, if the last app you used is klecks, klecks will be selected. If the last app you used is Chicken Paint, then Chicken Paint will be will be selected. That's because it's remembered by cookies.