Wish List

Ask for help or provide support to other members.
User avatar
NorfolkGreg
Developer
Posts: 160
Joined: Wed Sep 01, 2021 7:50 am

Wish List

Post by NorfolkGreg »

Hi Robert,

I'm back working on my own Wcms site. Check out:
https://gregchapman.uk
and am hoping to offer my theme to the community once I am happier with it. My PHP and JavaScript knowledge is limited to being able to insert snippets of other people's code into my files so I'm going to gently lean on you to help with a couple of, hopefully simple upgrades to Wcms.

There are two things that are high on my wish list:
  • A revised default template that includes the following blocks
    • header
    • Navigation
    • Main
    • Footer
    I have never understood why a header block is missing from the existing default template. I'm assuming one could be left empty to accommodate existing themes without issue, but an editable space would have the benefit of making WonderCMS so much more flexible and useful out of the box for many more types of site.
  • Improved sub-page handling
    To my mind this comes down to a simple change in the <?= $Wcms->menu() ?> module. Currently, it produces code like this when a couple of sub-pages are added (as in my site linked above):

    Code: Select all

    1.	<li class="nav-item subpage-nav">
    2.		<a class="nav-link" href="games/">Games</a>
    3.		<ul class="subPageDropdown">
    4.			<li class="nav-item ">
    5.				<a class="nav-link" href="games/board">Board</a>
    6.			</li>
    7.			<li class="nav-item ">
    8.				<a class="nav-link" href="games/table">Table</a>
    9.			</li>
    10.		</ul>
    11.	</li>
    
    I would like to see Line 2 become something like
    2. <button class="subPageBtn">Games</button>
    It doesn't have to be button. <p> would do!

    I accept that it would leave the top level menu without access to a page, as it currently does but the advantage is that you can have "click" menu options and don't have to rely on "hover" actions on touch screens, which make access to pages a real pain on touch screens.
I'd love your thoughts, and anyone else's reaction to these ideas.
Last edited by NorfolkGreg on Mon Mar 04, 2024 4:01 pm, edited 1 time in total.

OneManLaptop
Developer
Posts: 70
Joined: Tue Mar 16, 2021 3:29 pm

Re: Wish List

Post by OneManLaptop »

All that sounds sensible Robert. I can't imagine it being too much work to implement either.

arshem
Posts: 2
Joined: Sat Oct 26, 2024 2:52 pm

Re: Wish List

Post by arshem »

Header Block can be added pretty easily from your theme.php file in your existing theme, and adding a line in database.js, actually all of those mentioned would be easy.

theme.php:
<?=wCMS::block('headerArea');?>
<?=wCMS::block('navigationArea');?>
<?=wCMS::block('mainArea');?> (though wouldn't this already be in wCMS::pages('content')?
Footer is already present (you can see it by using <?=wCMS::footer();?>, however if you want a full customization, create a block like above ;)

database.js:
find: "blocks": {
Add a new block by adding:
"headerArea": {
"content": "Custom Header Area \n"
},
"navigationArea": {
"content": "Custom Nav Area \n"
},
"mainArea": {
"content": "Custom Main Area \n"
},
"footerArea": {
"content": "Custom Footer Area \n"
}


So it would end up looking like this in total:

"blocks": {
"headerArea": {
"content": "Custom Header Area \n"
},
"navigationArea": {
"content": "Custom Nav Area \n"
},
"mainArea": {
"content": "Custom Main Area \n"
},
"footerArea": {
"content": "Custom Footer Area \n"
}
}



-- Do not that you had specifically asked for blocks, which are globals, so each page would show the same content. mainArea in this case would be maybe a hero area? Not sure, but alas that's just my warning.

As for subpages / dropdowns. I agree that would be awesome to have default. I can add it to my to-do list to create as a plugin over the next few months. I am working on a few different plugins. A SMTP Contact Form (for servers that don't have a mail server), Updated Nav to allow external links, a new wysiwyg editor, that utilizes bootstrap syntax, and I was thinking about adding on to the "additional content" plugin, or forking it and updating it to push the 'additional' content to the bottom of the page (after all the other additional contents) instead of above. Currently you have to work from the bottom up if you're converting a static site to WonderCMS

User avatar
wiz
Admin
Posts: 803
Joined: Sat Oct 30, 2010 12:23 am

Re: Wish List

Post by wiz »

Some of there requested features and general improvements are in a pull request.

It includes:
WonderCMS 3.5.0

1. Search
- works for all content and blog plugin by calling <?= $Wcms->search() ?> in theme (has to be styled)
- has hook, is modifiable.
- https://github.com/WonderCMS/wondercms/issues/237

2. Option to display Blog page as default page.
- Available in Settings -> Menu
- https://github.com/WonderCMS/wondercms/issues/308

3. Modal window persistence (settings)
- user can choose to make settings modal popup persistent (re-opens on last tab that had any changed)
- can be activated in settings-security.
- https://github.com/WonderCMS/wondercms/issues/320

4. Updated to newest admin.js.min library with included modal persistence functionality.
- changes to unminified version: https://github.com/WonderCMS/wondercms- ... in.js#L293


5. Pages have now 3 new parameters:
- created (time of creation)
- modified (time when last modified)
- https://github.com/WonderCMS/wondercms/issues/307
- visibility (inherited and synced with menuItems)
- https://github.com/WonderCMS/wondercms/issues/301

6. Added header block, which can be called in the theme.
- can be called with <?= $wCMS->header() ?>
- header includes a hook, is modifiable
- https://github.com/WonderCMS/wondercms/issues/320

7. Added hooks on login (supports banning IPs, 2FA implementations)
- https://github.com/WonderCMS/wondercms/issues/302

8. renderPageNavMenuItem is now hookable: https://github.com/WonderCMS/wondercms/issues/297



"Nearby future" todo:
- fix blog plugin to avoid duplicate entries, possibly add keywords per post.
- include Romanian translation
- figure out a way to display files uploaded files in Settings to be displayed in Summernote
- contact form data should not be deleted after update

User avatar
NorfolkGreg
Developer
Posts: 160
Joined: Wed Sep 01, 2021 7:50 am

Re: Wish List

Post by NorfolkGreg »

This is exciting news, Wiz!

I guess they'll be an update to my GregCustom theme required. Hopefully I can make the time to do that promptly. Is there any chance of getting an early copy of the update so I can work on ithe theme before official release.

User avatar
wiz
Admin
Posts: 803
Joined: Sat Oct 30, 2010 12:23 am

Re: Wish List

Post by wiz »

Hi Greg. Happy to get some movement!

Backwards compatibility should not be affected, but it is really worth checking out and it would be greatly appreciated.

What I suggest is the following:
1. Copy paste your whole old installation to another folder.
2. In the new folder, replace the old index.php content with the new one and refresh your page. This can be as simple as editing the index manually and refreshing your home page.
3. See if there are any error_logs that populated and if everything is working correctly. If you can, do check as much as possible.
4. If there’s any issues, please let me know.

Link to the 3.5.0 index.php - https://github.com/WonderCMS/wondercms/ ... /index.php

With this, we can possibly catch any issues before we proceed with the release.

User avatar
NorfolkGreg
Developer
Posts: 160
Joined: Wed Sep 01, 2021 7:50 am

Re: Wish List

Post by NorfolkGreg »

Hi Wiz,

I have just created a copy of "gregchapman.uk" and switched in the 3.5.0 index.php.

I've quickly run through all its pages and, as you expect, nothing appears broken.

I will be away from home next week, house-sitting for our son while he is away. That should mean I won't have my regular chores to do and I hope to have time to develop the additional styling needed to cope with the new header block and search facility.

Is adding 2FA or any of the other new features in 3.5.0 mean I am likely to need to add anything else to the theme?

User avatar
wiz
Admin
Posts: 803
Joined: Sat Oct 30, 2010 12:23 am

Re: Wish List

Post by wiz »

That is great news. :)

However, when trying out your theme on a fresh install, the blog looks a bit messy. This is probably the same on the old version of WonderCMS.
Image


As for now, your theme does not need to be changed, as the new version should be fully backwards compatible.
2FA is just an option the new login hooks support, if anyone wants to implement it.
Same goes with search, if you will want to implement it, it's as easy as copy pasting the search into your theme and styling it.

User avatar
NorfolkGreg
Developer
Posts: 160
Joined: Wed Sep 01, 2021 7:50 am

Re: Wish List

Post by NorfolkGreg »

The theme's README.md file does report the theme is incompatible with the Blog plugin.

It was one of the reasons my Wish List included the request for a "header" block. Currently I use the "Page Title" and "Page Description" fields on the Admin Modal in a highly undesirable way.

I use those fields in both the theme's <header> and <body> blocks. It was my "lack of header work-around". :(

User avatar
wiz
Admin
Posts: 803
Joined: Sat Oct 30, 2010 12:23 am

Re: Wish List

Post by wiz »

I missed the readme, however it’s good because this means Wcms 3.5.0 is not the one breaking things.

Hopefully the new header block makes it easier for productive users like yourself. We can still modify this addition also at a later stage, if it needs more fine tuning.

Did you maybe check if any error_log file was generated after you updated the test website?

Post Reply