CMSB v3.66 Beta (Admin Shortcuts & Developer Console)
14 posts by 4 authors in: Forums > CMS Builder
Last Post: March 21, 2024 (RSS)
By Dave - March 13, 2024 - edited: March 13, 2024
Hi All,
We're working on some massive new updates, but this is a smaller maintenance release in the meantime. Here's what's new:
Admin Shortcut Icons & middle-click shortcuts: If you're anything like us, you're probably frequently switching back and forth between the database editor and CMS sections while developing. We're often adding, modifying and re-arranging fields and want to see our changes as we go. The easiest way to do this is to have two tabs open and switch back and forth between them. Saving clicks and keystrokes during this process can speed things up a lot and make the software more enjoyable to develop in. We've made two changes to make this easier.
1. When an "admin" users hover over a menu item a wrench icon will appear. Clicking that will jump you right to the database editor for that section, or middle-click to open a new browser tab.
2. When you are editing a section in the database editor there are two buttons for "Code Generator" and "Editor". We've now made these buttons work like links, so you can middle-click them to open a new tab.
And... of course, if for some reason you don't want admin shortcut icons appearing on your menu you can disable them under the settings menu.
Developer Console: This is one of our plugins that we are now bundling with CMS Builder. It's for developers and advanced users and lets you directly run MySQL queries, shell commands and PHP code. It will be disabled by default but you can enable it with a click and it's very useful for when you need to do those kinds of things.
When we log in to a client server to debug an issue, Developer Console is often the first thing I upload so I can more easily examine the database and server config. So for us, it will make supporting CMS issues even faster, and there's a lot of useful functionality in there for everyone else as well.
Also, if you have Admin Shortcuts enabled and Developer Console enabled, hovering over menu icons as an admin user will also show a database icon which can be clicked to jump right to the MySQL console and list the records for that section.
Admin Menu Updates: We also re-organized the Admin > General Settings menu a bit to make this clearer and easy to find. This is a work in progress but if you have any questions or feedback feel free to let us know.
Here's the complete changelog:
*** March 13, 2024 - Version 3.66 (Admin Shortcuts & Developer Console)
SERVER REQUIREMENTS: PHP 8.0+ and MySQL 5.7+ (or MariaDB 10.2+)
NEW FEATURES
- Admin Shortcut Icons: Shortcut menu icons allow quick access to table editor for admins (can be disabled in settings)
- Developer Console: Now included by default, allows developers to run MySQL queries, shell commands and PHP code
MINOR CHANGES
- Section Editors > Menu Icon: Latest Font Awesome icons can now be used (preview widget and search link updated)
- Database Editor: Code Generator & Editor buttons can be middle-clicked to open in new tab (buttons are now links)
- Admin > General: Re-organized settings for easier access
BUG FIXES
- Error logging: Caught exceptions are now displayed with the correct file and line number
- Field Editor: Fixed issue where insert field icon wasn't showing when using Font Awesome Pro
- Uploads Sorting: Fixed issue where drag sort icon wasn't displaying
- Database Editor > "Input Type Hidden" fields: Fixed issue where updated field issue wasn't saving
- List Fields: Fixed issue where multi-value lists with no selections saved "\t\t" instead of an empty field
- Misc Code and other minor improvements.
You can download the latest beta here: https://www.interactivetools.com/download/
Please feel free to ask any questions or post any feedback, questions, concerns, or bugs you find!
Thanks! :)
interactivetools.com
By KennyH - March 15, 2024 - edited: March 15, 2024
Admin Shortcut Icons & middle-click shortcuts: These are two new features that I didn't know I had to have. Fantastic! This removes clicks, making it easier to two frequented areas.
Thanks!
By Deborah - March 15, 2024
Hey, Chris. I agree with KennyH.
I tested the shortcut icons and buttons and Developer Console - both excellent time savers!
I'm wondering if the beta could be adjusted to accommodate the following two requests:
1) Show thumbnails at actual size when viewed in CMSB
Years ago I was provided the following code edit by IT to allow thumbnails to be viewed at their actual size in CMSB:
In /lib/menus/default/list_functions.php (around line 713):
Original code: showUploadPreview($upload, 50);
Modified code: showUploadPreview($upload, $upload['thumbWidth']);
This doesn't work with beta 3.66 or recent releases. The actual thumbnail image is correctly sized, but is displayed 50 pixels wide in CMSB. I think it might be due to the inline style, but can't find where that code is coming from.
<img src="/_cmsbetaupl/thumb/temp-horizontal_003.jpg" border="0" width="50" height="32" alt="temp-horizontal_003.jpg" title="temp-horizontal_003.jpg">
2) Change WYSIWYG coded line breaks to <br>
When TinyMCE saves code for a WYSIWYG textarea, line breaks are coded as <br />, instead of HTML5 format <br>. This was updated in CMSB to <br> many versions ago, but has now reverted to <br />. I realize either tag format can be used, but prefer <br>, because it doesn't trip the html validator.
------------------------------------
Thanks for continuing to evolve this software!
~ Deborah
By Dave - March 18, 2024
Hi All,
Thanks for testing the beta and any feedback you posted or emailed me directly.
I've just released Beta 4 with the following changes:
- num fields can now be saved in field editor (previously output an error)
- Fixed double encoding of displayed MySQL column types in field editor
- Added plugin filter 'listRow_uploadPreviewWidth' - see attached plugin for change upload preview display with on list pages
- Wysiwyg now outputs <br> instead of <br/>, added element_format: 'html', in /lib/wysiwyg.php
- Misc Code and other minor improvements.
You can download it here: https://www.interactivetools.com/download/
Let me know if you find any other issues, otherwise we'll release this in the next few days.
interactivetools.com
By Dave - March 18, 2024
Hi Deborah,
Re-reading your post, I think I misinterpreted what you're wanting with the upload preview sizes. The reason we limit the width to 50 pixels is to keep the list rows from getting too tall and impacting the usability of the page. Let me know how you'd like it work and what your particular use case is.
interactivetools.com
By Deborah - March 19, 2024
Dave, Thank you for looking at my requests and for making the <br> change.
For the thumbs, I should have been more specific and I was also remembering something wrong.
Thumb sizes in the CMSB list view are displaying at the size I indicate.
Thumb sizes in the image upload preview are hard-coded at 50 pixels wide. I thought those were resizing with my custom code, but now see they were not. With a large batch of uploads, the 50px wide thumbs can make it difficult to determine what the image is without opening the large view. Sorting then becomes more tedious. I understand a larger size would not always be desired.
I located the source of the 50px in /lib/menus/default/uploadList.php and can manually change that size on a per-site basis.
Thanks again!
~ Deborah
By kitsguru - March 19, 2024 - edited: March 19, 2024
For the image size in the preview, I modified my code to add an inline style that sets the width to 100% and height to auto.
Around line 1233 in cmsb/lib/upload_functions.php, I changed:
if ($isImage && $bestSrc) { $html .= "<img src='$bestSrc' border='0' width='$bestWidth' height='$bestHeight' alt='$title' title='$title'>"; }
to:
if ($isImage && $bestSrc) { $html .= "<img src='$bestSrc' border='0' width='$bestWidth' height='$bestHeight' alt='$title' title='$title' style='width:100%; height:auto;'>"; }
For me, seeing the image is more important than the row height.
By kitsguru - March 19, 2024
I realized that hard coding might not be ideal, so I changed the inline style to a class 'img-preview' and added it to the custom.css file.
NEW Version
if ($isImage && $bestSrc) { $html .= "<img src='$bestSrc' border='0' width='$bestWidth' height='$bestHeight' alt='$title' title='$title' class='img_preview'>"; }
custom.css
.img_preview {
width: 100%;
height: auto;
}
By Deborah - March 19, 2024
Jeff,
That's a perfect solution - and a responsive/adaptive one, too. Thanks so much for sharing it!
~ Deborah
By kitsguru - March 19, 2024
You could modify the css to something like this
.img_preview {
max-width: 100%;
width: auto;
height: auto;
max-height: 150px;
margin: 0 auto;
}
This would file the cell but limit the image height to whatever you set it to, and the width would be adjusted accordingly.