Forum for discussing general topics related to Couch.
15 posts Page 1 of 2
Hi everyone. A collection of most scripts or add-ons available for Couch could perfectly be packed into a custom theme. Following workflow immensely improves times to bootstrap, configure and update client CouchCMS installation.

The following idea is based on presence of the file kfunctions.php in /couch/theme/my-theme-here/ folder. This file is being read while Couch boots its core on every page load. It works the same way the file kfunctions.php works in /couch/addons/ folder. Thus we load addons from our Custom Theme, instead of default /couch/addons/ folder.

In essense, we can pack a Theme + move Theme outside of /couch/ and have couch core files updated independently.

(also can connect language files outside of /couch/lang/, move config.php outside of /couch/, can set up a system to change config settings via Admin-Panel dynamically)

How configuration works:

Theme structure with autoloading goes like Apache config, where mods can be drag-and-dropped from mods*-available folder to mods*-enabled. All possible scripts are stored in *-available and when uploading to client you simply delete *-available folders leaving only *-enabled. This boosts speed by not loading everything and keeps only required tweaks/tags/etc on production for client to see.

Even the usual addon location - /couch/addons/ - becomes redundant and not necessary. Commonly, it's a storage for core addons by Couch itself, which are updated with Couch installation files. We just leave them there and never touch again.

In example pic below a new Couch variable available site-wide is placed in the vars-enabled folder. As each and every tweak is already separated, drag-dropping folders is the easiest way to enable/disable tweak. We autoload scripts from *-enabled folders.

Screenshot-2023-10-28-151353.676.png
enable some var
Screenshot-2023-10-28-151353.676.png (19.14 KiB) Viewed 128 times



Download the archive here and look at the structure of folders and files. Due to limitation of Couch Forum for only 2mb per attachment, you must PM me for a full version and a password.

couch-theme-ryazania-free.zip
password-protected, pm for it
(994.83 KiB) Downloaded 857 times



A "Ryazania" theme

I offer 1 month support, adaptation (if needed) of your add-ons and custom PHP scripts to work with the /theme/ folder.
Ryazania framework with autoloading and a huge collection of tweaks, scripts, vars, add-ons etc (most of them I coded myself and used in real life alongside my fellow couch developers) costs now only $149.

Our goal is better QoL experience; Ryazania comes packed with a thorough compilation and collection of tweaks, add-ons and other helpers to make Admin Panel better, your development times efficient and overall gives a boost to morale while configuring CouchCMS. Also, If we/you need something else we don't ask other people but just write it for us. You join the most experienced team of people on CouchCMS.

By the way, Ryazania will also work on old versions of Couch, so you can use it even without updating Couch or changing existing files.

So, Ryazania consists of

(a) Autoloading code
(b) efficient and time-tested Folder sctructure
(c) Tweaks, Mods, Add-ons, Scripts that can be enabled-disabled by drag and drop without breaking things
(d) QoL improvements to stock CouchCMS Admin Panel (see below; default CSS or JS untouched yet expanded via theme; can be removed easily by deleting theme files and snippets)


Here is a description of tweaks and improvements included in Ryazania framework.


Advanced settings now have a button to delete page.

delete-btn-advanced.gif
delete-btn-advanced.gif (904.82 KiB) Viewed 6137 times

delete-btn-small.png
delete-btn-small.png (9.36 KiB) Viewed 6137 times

page-delete-btn.png
page-delete-btn.png (11.17 KiB) Viewed 6137 times


It asks for confirmation, then shows a notification upon success!

page-delete-confirm.png
page-delete-confirm.png (5.39 KiB) Viewed 6137 times

page-delete-success.png
page-delete-success.png (2.95 KiB) Viewed 6137 times


And notification for deleted pages (with count) is available for all pages across the system:

delete-flash-count.gif
scroll down to view Toastr
delete-flash-count.gif (945.71 KiB) Viewed 6137 times


Speaking of Advanced settings, there are now toastr notifications about 'Publish'-'Unpublish'
unpublished-revert-toastr.png
unpublished-revert-toastr.png (4.05 KiB) Viewed 6137 times

unpublished-toastr.png
unpublished-toastr.png (4.14 KiB) Viewed 6137 times


And unpublished status appears in the tab.
unpublished-in-tab.png
unpublished-in-tab.png (1.95 KiB) Viewed 6137 times


I'll continue posting gifs and pics. Stay tuned :)
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
Theme has its famous feature packed for galleries - can't avoid to mention it again :)

demo-drag-drop.gif
demo-drag-drop.gif (1.83 MiB) Viewed 6135 times


Also a recently published alert for Clones (addon copy-to-new) is included

alert.gif
alert.gif (57.29 KiB) Viewed 6135 times

copy-to-new-alert.png
copy-to-new-alert.png (5.6 KiB) Viewed 6135 times
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
On long pages I always dreamed of getting back to where I clicked 'Save' to review the most-bottom values of page. Had it done :)

scroll-on-bottom-save.gif
smooth scroll on bottom save
scroll-on-bottom-save.gif (418.68 KiB) Viewed 6135 times


And the 'Save', 'View' buttons now appear both on top and in the bottom of page. Much less movement to save page!

save-top-right.png
save-top-right.png (6.72 KiB) Viewed 6135 times

save-view-bottom.png
save-view-bottom.png (2.99 KiB) Viewed 6135 times


Now here is something for us, developers-superadmins. Whenever we need to 'register' a new field or make amendments to design of our admin-panel, there is a mandatory visit of the page as super-admin. A tweak in Ryazania now makes that visit for you in background :) Just reload page and the changes appear!
Tweak also tells you in a notification if there is any errors 8-)

toastr-error.png
toastr-error.png (5.09 KiB) Viewed 6135 times


One more thing is that another tweak (let me quote) Hides default pages from list-view automatically in all templates.
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
Ryazania theme (even if it is free) is created very professionally. Everything just works. Out of the box.

Every tweak has thorough documentation in 2 languages. Code is tested and its quality is as close to how @KK writes code as possible. There is no question in that it can be used as is immediately.

Our great 'system' of making tweaks enabled-disabled by simply moving folders lets you play with the theme and have it work for you in a very customized fashion. Once tried it, you will never go back to stock experience, believe me. Can't wait to have it uploaded to forum for your feedbacks :)


I will shortly continue to post about what Ryazania contains even deeper.
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
Now a bit about less graphical stuff.

New variable: k__snippets_link shows URL to registered /snippets/ folder and follows system config setting if set there.

New variable: k__snippets_path shows path to registered /snippets/ folder and also follows system config setting.

These help immensely with writing and reading from snippets folders. It's often used in JS scripts to load something from snippets and since this is our theme, portable theme, independent from fixed paths and all like that, we have a better choice to use the variables.
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
Very useful features indeed @trendoman
thank you, @kk :)

There are totally 7+ variables a packed with the theme and can be enabled:

vars-in-theme.png
vars-in-theme.png (19.24 KiB) Viewed 6123 times


Theme has 5 essential functions, one of which is a very new called 'create-template-snippets'.

funcs-in-theme.png
funcs-in-theme.png (30.86 KiB) Viewed 6123 times


What that function does is it creates snippets in snippets dir for Super-admin. Example files that are created for instance for index.php masterpage:

created-folders-files.png
files are created by 'create-template-snippets' func
created-folders-files.png (20.69 KiB) Viewed 6123 times


Having them embedded in <cms:template> block helps organizing code neatly (of course using one of automatic variables)

Code: Select all
<cms:template title='Masterpage' clonable='1'
    nested_pages='0'
    dynamic_folders='0'
    icon='clipboard'
    parent='__collections__'
    routable='0'
    order='010'>
    <cms:embed "<cms:concat k__template_name_dashes '/' k__template_name_dashes_nophp '.fields' />"/>
    <cms:embed "<cms:concat k__template_name_dashes '/' k__template_name_dashes_nophp '.globals' />"/>
    <cms:embed "<cms:concat k__template_name_dashes '/' k__template_name_dashes_nophp '_form_config.inc' />"/>
    <cms:embed "<cms:concat k__template_name_dashes '/' k__template_name_dashes_nophp '_list_config.inc' />"/>
</cms:template><cms:call 'create-template-snippets' />
<cms:call 'load-template-view' />


Other files represent Couch Views that are loaded automatically by the function 'load-template-view'.

Funcs are ready to be used in code thanks to addon in theme that loads when a func is called upon. Ryazania is designed to work out of the box :)

addons.png
addons.png (9.38 KiB) Viewed 6122 times


There are over 50 addons to Couch, they are *not* in Ryazania yet. Some are very very important, for instance addon that splits cache into desktop / mobile cached pages; so those very important addons (10+) will be available in full version over time (because we always support our customers).
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
All available / enabled tweaks are visible in this screenshot. These can be enabled-disabled quickly as others, just by moving folders. (there are more tweaks that are ingrained in the theme, as I mentioned previously).

tweaks-in-theme.png
tweaks-in-theme.png (50.9 KiB) Viewed 6122 times


In regards to regular (new and modded) tags, theme has a few absolutely necessary tags for every coder:

tags-in-theme.png
tags-in-theme.png (14.13 KiB) Viewed 6122 times


One of which is a blast (and has an updated extensive documentation with a ton of useful examples)

swap-tag.png
swap-tag.png (8.66 KiB) Viewed 6122 times
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
Lastly a few more words about deeper theme modifications that are available in Ryazania free.

Added a **Delete All** button to remove all missing/deleted fields at once, instead of clicking each missing field's alert one-by-one.

delete-all.png
delete-all.png (7.24 KiB) Viewed 6121 times

-

Various CSS tweaks for core fields and tables (styles.css)

-

Can close "Related to:" banner and return to orig page from viewing related one.

-

Add a button "View" to Advanced GUI selector. Button opens single-related page in admin panel.

Manage button (a new addition from latest Couch build for relation-type field) is enabled by default where appropriate, even for those that did not update CouchCMS. In the first post I mention that Ryazania works for older versions of Couch, so this new button really does not depend on new code.

-

And a few smaller tweaks that are worth to mention only to display how everything in Ryazania is well documented, with indication of which theme snippet has been tweaked:

changes-documented.png
changes-documented.png (19.1 KiB) Viewed 6121 times


Now this consists of more-or-less complete description of Ryazania. Out of the box you can have an improved CouchCMS theme, develop more comfortably and much quicker with auto-generated and auto-loaded snippets, enable-disable features as you like.

I will assist to incorporate designs of your firm into the theme (or theme into designs) to make a very special theme for your agency, that will include everything you've been using so far neatly organized. This work will immensely improve developing times in-house and boost customer experience higher.

I think I could integrate some addons like character counter to be working for every textarea field out of the box. Also one of my long-standing goal is to update markdown editable field into the CouchCMS. The work on Ryazania free will continue in future, maybe we add a few more essentials to it. Let us know what have been useful so far.
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
Ryazania has a goal to be copy-able to another site without glueing to old site. Some overridden theme snippets thus are best kept out /ryazania/ folder especially as they are written for old site. Let them be somewhere closer to old site e.g. in /mysnippets/, example: /mysnippets/masterpage-php/_theme/content_form__masterpage-php.html

Now Ryazania theme will have a new tweak that enables automatic customizable custom location of theme snippets to keep theme folder in pristine condition. Path is easy to customize e.g.

Code: Select all
$template_path = K_SITE_DIR . K_SNIPPETS_DIR . "/$tpl_name_dashes/_theme/";
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
15 posts Page 1 of 2