e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
318 stars 212 forks source link

[Feature request]: fix or standard media uploading on frontend for bootstrap5 #5221

Open Jimmi08 opened 3 months ago

Jimmi08 commented 3 months ago

Motivation

Creating advanced plugin when users can upload images without making them admins

Proposed Solution

this is used:

        $fields['field']  =  array(
            'title' => LAN_IMAGE,
            'type' => 'images', 'data' => 'array',
            'readParms' => [],
            'writeParms' => [
                'size' => 'small',
            ],
        ); 
            foreach($fields as $key=>$fld)
            {
                $text .= "<tr><td style='width:20%' class='forumheader3'>
                            ".$fld['title']
                            ."</td>
                            <td style='width:80%' class='forumheader3'>".$frm->renderElement($key, '', $fld)."</td>
                        </tr>";

            }

Result: Core bootstrap5 theme: image

Other bootstrap5 theme with fontawesome CSS (not script) show: <i class="glyphicon glyphicon-fa-plus fa-fw"></i> for button Add - Font Awesome Free 6.0.0 is loaded from theme, not library.

There is no option to delete image either (empty image),

Modal is working only in bootstrap3 theme

Alternatives

To use admin UI functionality on frontend. image.php is limited by admins only on many places.


        'property_media'        => array('title' => 'Media', 
        'type' => 'images',
         'data' => 'array', 'width' => 'auto',
          'help' => '', 'readParms' => [], 'writeParms' => [], 'class' => 'left', 'thclass' => 'left',),

the same issues then no preview in Edge

Additional Context

No response