{"id":26279087,"url":"https://github.com/jools-r/bot_wtc","last_synced_at":"2025-07-14T01:02:33.966Z","repository":{"id":42216200,"uuid":"59607681","full_name":"jools-r/bot_wtc","owner":"jools-r","description":"bot_write_tab_customize for Textpattern v4.7","archived":false,"fork":false,"pushed_at":"2024-07-17T16:12:23.000Z","size":376,"stargazers_count":6,"open_issues_count":1,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-13T21:53:31.075Z","etag":null,"topics":["textpattern-plugin"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jools-r.png","metadata":{"files":{"readme":"README.textile","changelog":"CHANGELOG.textile","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-05-24T20:49:20.000Z","updated_at":"2025-07-07T12:29:35.000Z","dependencies_parsed_at":"2025-05-07T00:43:41.997Z","dependency_job_id":"58ee6477-7f34-4317-81d7-eed0d9b08b50","html_url":"https://github.com/jools-r/bot_wtc","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jools-r/bot_wtc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jools-r%2Fbot_wtc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jools-r%2Fbot_wtc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jools-r%2Fbot_wtc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jools-r%2Fbot_wtc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jools-r","download_url":"https://codeload.github.com/jools-r/bot_wtc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jools-r%2Fbot_wtc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265228802,"owners_count":23731084,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["textpattern-plugin"],"created_at":"2025-03-14T13:19:23.807Z","updated_at":"2025-07-14T01:02:33.915Z","avatar_url":"https://github.com/jools-r.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"h1. Write tab customize\n\n*Note: This version is for Textpattern v4.7 and is not compatible with earlier versions of Textpattern.*\n\nThis plugin provides the ability to customize Textpattern's \"write\" panel. It makes it possible to rearrange UI items, hide parts of the UI on a per-section basis, hide specific sections from the _Sections_ dropdown and more.\n\nBy combining its features you can re-arrange the _write_ tab differently depending on the section you choose in the _sections_ dropdown. Used on its own or together with other plugins (e.g. glz_custom_fields and bot_admin_body_class), it will help you customize the Textpattern admin area to meet your clients needs.\n\nh3(#features). Features\n\n* Single UI items (custom fields, body, excerpt etc.) or whole regions (main content, sidebar etc.) can be moved around relative to other single items or regions\n* UI Items can be hidden on a per-section basis\n* Sections can be hidden from the \"write\" panel sections dropdown (for static sections like \"about us\" or \"search\")\n* A custom css class can be set for each item. This let's you add classes to items to target with your own javascript.\n* Javascript code can be set directly through the plugin interface. Particularly useful for use with an external jquery plugin and in conjunction with the ability to add a css class to any item on the page. The script will be executed only in the _Write_ panel.\n* Advanced settings for hiding / attributing classes to multiple items – helpful on sites with lots of custom fields.\n* Compatible with glz_custom_fields.\n\nbot_wtc's rearranging capability offers a simple way of customizing Textpattern, but is just one tool for customizing the admin area. More extensive modifications, e.g adapting Textpattern your customer's branding, can be achieved by creating an own admin theme.\n\n\nh2(#installation). Installation\n\nPaste the .txt or .zip.txt package code into the Admin \u003e Plugins panel, install and enable the plugin. Visit the \"Extensions\" tab and customize your write tab settings.\n\nh3(#upgrading). Upgrade notes\n\nThe plugin should take care of updating existing data to match the v4.7. panel layout on activation. Nevertheless, it is strongly recommended to back up your database prior to updating so that you can restore your settings should something go awry.\n\n\nh2(#examples). Examples\n\nh3. Example: Adding a _menu title_ beneath the regular _Title_ field\n\n# Define a custom field called ‘menu_title’ in 'Admin › Preferences » Custom fields' or using the glz_custom_fields plugin. If using glz_custom_fields, you can give it a title text of ‘Menu title’. It will appear in the 'custom fields' group on the write panel.\n# Switch to the 'Write Tab Customize' panel, create a rule ‘Menu title’ \u003e After \u003e ‘Title’. It will now appear beneath the title.\n\nh3. Example: Showing fields on certain sections only\n\nSuppose you have an 'events' section and an 'organisers' section, and custom fields called 'event_location', 'event_time', 'event_duration' and 'organiser_address', 'organiser_tel', 'organiser_email'.\n\n# Switch to the 'Write Tab Customize' panel, create a rule 'event_location', then click on 'Section list' and place a checkbox next to all the section _except_ 'events'. Click the 'Update' button, and repeat for each event custom fields. The fields will now only show when \"events\" is chosen in the Section dropdown.\n# Now create a rule 'organiser_address', then click on 'Section list' and place a checkmark next to all the section _except_ 'organisers'. Click the 'Update' button, and repeat for each organiser custom fields. The fields will now only show when \"organiser\" is chosen in the Section dropdown.\n\nAlternative: If you have a lot of custom fields, it can be tiresome to set these settings for each custom field individually. A quicker way to set several custom_fields at once is to choose \"Toggle advanced\" at the top right. Now put a checkmark next to all the \"event_\" custom fields and checkmarks next to all the sections _except_ the 'events' section. Click the 'Update' button and they will all be set at once.\n\nh3. Example: Using classes to address fields with javascript / jQuery\n\nSuppose you want to draw attention to some specific fields to ensure they are not overlooked by making them pulsate briefly when the 'Write' panel loads.\n\n# In the 'Write Tab Customize' panel, assign a class @required@ (without a dot) to all the items that need to be filled out.\n# Add the appropriate javascript code in the 'Add javascript' box as follows (use the buttons to insert boilerplate code):\n\nbc. \u003cscript src= \"/js/jquery.pulsate.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n$(document).ready(function() {\n  $(\".required\").pulsate({times:3});\n});\n\u003c/script\u003e\n\nFor this simple example you'll need to have the file @jquery.pulsate.js@ in the @js@ directory.\nYou can extend this principle, for example to highlight required fields that have no content and still need to be filled out, or to validate that field data has been entered correctly.\n\nh3. Tip: Making collapsible groups permanently open\n\nSuppose you wish to prevent your users from overlooking fields in collapsible groups. You can use 'Write Tab Customize' to hide the label headings for each collapsible group, so that the \"twisty\" arrow that make it possible to show/hide the group will no longer be accessible. You can also hide the \"expand all/collapse all\" buttons. Now all you need is the following tiny jQuery rule in the 'Add javascript' box to ensure every collapsible group is automatically opened when the page opens:\n\nbc. \u003cscript\u003e\n$(document).ready(function() {\n  $(\".toggle\").show();\n});\n\u003c/script\u003e\n\n\nh2(#issues). Notes and known issues\n\n* *Order does matter*: The rules for moving items are executed from top to bottom so if the sequence gets garbled it's advisable to delete them all and start over.\n* *Class names* must be inserted *without the dot*.\n* If you want to hide an item in *all sections*, it is more efficient to hide items using css than it is to hide them using this plugin. See below.\n* This plugin may not function properly if you have the Suhosing module (a security-related module for PHP) installed. In this case follow \"these instructions\":http://forum.textpattern.io/viewtopic.php?pid=243861#p243861 (thanks maniqui!).\n\nh3. Other ways of customising the admin UI\n\nSuccessive versions of Textpattern have brought extensive enhancements to the \"write\" panel and almost every item now has an id or a class which means snappier jquery execution but more importantly also makes it possible to hide these elements with simple css in a theme. Hiding items using CSS is more efficient than using javascript / jQuery but cannot respond conditionally to section changes.\n\nIf you have elements you will consistently hide or restyle or javascript you consistently use – i.e. that is not dependent on the chosen section – you can add an optional user-defined custom CSS and JavaScript file to your textpattern installation directory. By default, these are located at:\n\nbc. assets/css/custom.css\nassets/js/custom.js\n\nYou may use different file names by adding the following line(s) within your Textpattern 'config.php' file (before the closing @?\u003e@ line):\n\nbc. define('admin_custom_css', 'your_custom_rules.css');\ndefine('admin_custom_js', 'your_custom_javascript.js');\n\nFor examples, see the \"Readme\":https://github.com/textpattern/textpattern/tree/master/textpattern/admin-themes/hive and \"custom-example.css\":https://github.com/textpattern/textpattern/tree/master/textpattern/admin-themes/hive/assets/css in the admin-themes.\n\n\nh2(#changelog). Changelog\n\nh3. 8.1 – 2024-07-15 (jools-r)\n\n* Textpattern v4.9 support\n* Fix for mysqli query error when adding new settings via the advanced settings pane (missing column defaults)\n* Plugin install and update routine to add column defaults if not already present.\n* Update deprecated jquery – hopefully fixes flaky field updates on save\n* Support for CSP-aware (nonced) inline \u003cstyle\u003e and \u003cscript\u003e blocks. Textpattern v4.9+ (when activated in config.php)\n\nh3. 8.0 – 2018-03-26 (jools-r)\n\n* *Note: for Textpattern version 4.7 only.* No longer compatible with earlier versions of Textpattern.\n* Write tab area classes and id updates to match Textpattern v4.7's 'Write' panel layout.\n* Revised custom field handling to reflect new UI pattern, including migration of previous settings on installation.\n* Revised 'Write Tab Customize' panel using txp's in-built UI functions.\n* Compatibility with glz_custom_fields v2 (e.g. custom field titles).\n* Translatable UI text (see Textpack).\n* Error notices now use Txp's own in-built messaging functions.\n* Revised help.\n\n\nh3. 7.5 – 2016-05-22\n\n* Further write tab area classes and id updates for Textpattern v4.6. (jools-r)\n* Updated install routine to use Textpattern’s built-in functions (jools-r) for better PHP 7 compatibility.\n\n\nh3. 7.4 – 2015-12-07\n\n* *Note: for Textpattern version 4.6 only.* No longer compatible with earlier versions of Textpattern.\n* Updated write tab area classes and id for Textpattern v4.6 (jools-r).\n\n\nh3. 7.3 – 2014-06-14\n\n* Updated to address \"Sorry, the form could not be submitted\" error in 4.6 (by mrdale).\n* Update bot_wtc extension panel to use new \"hive\" admin controls.\n\n\nh3. 7.1\n\n* Fixed \"issue with multi-select and checkboxes\":http://forum.textpattern.io/viewtopic.php?pid=245511#p245511 custom fields.\n* Fixed deprecated jquery.\n* Changed 'sections' field \"from varchar to text\":http://forum.textpattern.io/viewtopic.php?pid=254132#p254132.\n* Removed deprecated language attribute from 'script' tag.\n* Updated help.\n* Cleaned up code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjools-r%2Fbot_wtc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjools-r%2Fbot_wtc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjools-r%2Fbot_wtc/lists"}