-
Posts
2,765 -
Joined
-
Last visited
-
Days Won
40
Everything posted by Macrura
-
WordLimiter anyone? https://processwire.com/talk/topic/3429-how-to-set-text-linecharacter-limits-in-templates/?p=33779 https://processwire.com/talk/topic/11606-how-to-generate-auto-summary-of-long-cnkeditor-content-with-valid-xhtml/?p=108088
-
well every page is a child of a page except for the homepage. otherwise these may be of help: http://cheatsheet.processwire.com/page/built-in-fields-reference/page-parent/ http://cheatsheet.processwire.com/page/built-in-fields-reference/page-parent_id/ http://cheatsheet.processwire.com/page/built-in-methods-reference/page-parent-selector/
-
wow the original post was like 3 years ago... i think if i was doing this now i would probably go with javascript cookie, since i tend to do a lot more server side caching over the last years;
-
select field type who uses images for preview changes
Macrura replied to Chris's topic in Wishlist & Roadmap
well there is this: http://modules.processwire.com/modules/template-preview-images/ and then you could probably clone the radio inputfield and integrate something with this: https://rvera.github.io/image-picker/ -
This is updated/version of the AdminDocsTab module as was posted here: https://processwire.com/talk/topic/11803-admindocstab/ (that one is now obsolete) https://github.com/outflux3/AdminHelp AdminHelp module for ProcessWire Processwire helper modules for managing site documentation. Currently alpha state - please use with caution and report all errors. Instructions There are 3 modules included with this: the master module holds the settings for the other 2. This is a helper module which expects you to have already setup a hidden part of your page tree* to establish your help documentation, using any template (e.g. 'help-doc') and a body field (ckeditor) (*or you can run the setup and it will create these items). The help-doc template does not need to have an output template, as the module will only echo the body field inside the admin. In addition this 'help-doc' template requires "template select" field (separate module) which should be named template_select. (if you run setup it will create this). To have a global help page, which renders all of the help docs in an accordion view, you can install the ProcessAdminHelp module, which will setup a page to view the help docs, under setup. Help Setup Module (AdminHelp) This is how the setup module looks before setup is completed: If you use the automated setup, it will create the field, templates and pages, and will auto-set the module configuration: Example Help Tab (when using AdminHelpTab) Admin Help page (ProcessAdminHelp) This shows all help docs in accordion. (it is capable of displaying child pages also but this is not currently implemented in the module due to the family settings of the default templates). Accordion opened: Features Summary: Manages settings for the help templates (help-index, and help-doc), which enabled users to add new help docs where applicable; these can already exist and be named whatever, you just specify them in the setting. Getting the help/docs tab to show up in the right place (based on user preference template selected on the help doc). Has it's own scoped CSS styling that makes the documentation readable and engaging; has some @import fonts, and also rules to make text layout look correct in PW admin (paragraphs, lists, headings, blockquotes etc.) Makes it easy for site editors to add their notes, mods/edits/enhancements to the docs (edit button - currently only enabled for Superadmin - this can be made a setting based on user feedback). Using the secondary process module will create a 'Help Docs' page under Setup where you can view all of the docs in 1 place as an accordion. (could be moved somewhere else) There is also an automated setup that can run, where it will create the field, templates, and pages for you to get started. This module is probably optimized to handle no more than 10-15 or so help pages; if you needed more than that, the Process module may need to be changed to work differently. Most sites I do need around 4-5 help pages. *If you don't want to load those extra google fonts in your admin you can modify the CSS to your needs, e.g. remove the @import and then change the few lines of css that reference those; Once there have been a few testers, I can see about adding this to the modules directory in a week or so.
- 31 replies
-
- 15
-
yeah, i think it would be cool to have a completely pre-built demo site with filler content, sort of like the old Joomla 'quick start' model. the expectation would be that this is for people who only want the features as shown on the profile, and no custom development; could make it easier to promote it to clients with lower budgets, instead of sending on their way to WP or SS..
-
So maybe this should be renamed and some of the wording changed for clarity - like AdminHelp instead of docs; as J. Lahijani brings up, what if you only want the main help page but not the help tab on the editor. So rethinking this setup to where there would be 3 modules: 1.) AdminHelp this would hold the settings for the AdminHelp sub-modules: - template being used for help pages (for sites with existing help pages) - root page of help pages it could possibly: - create the 'help' and 'help-index' templates if not found, and add the title and body fields and set the family rules. - create a default help page. 2.) AdminHelpTab - requires the FieldtypeTemplates and AdminHelp modules. - creates the field for the template_select on the template that is specified in the main module, and add it to that template; - holds the setting for which templates to allow help tab on - handles hooking into the page editor and adding the Help tab, and the scoped CSS for the display of the help text. 3.) ProcessAdminHelp - requires AdminHelp module - handles creation and display of the main help page
-
yes, this way you can manage your docs using the standard page editor and all of the development team, users etc can keep on contributing to them; if you install the ProcessDocsView module, then it makes a documentation area that shows all of the docs (help); it is similar to the wordpress thing, but not as advanced; it just has collapsed accordions for each help topic; but it could be expanded, e.g. maybe a separate process module, like DocsViewAdvanced which has some left menu with heirarchy and then loads each content by ajax.. if you don't want any docs to show up on the page editor then you just wouldn't need to select any templates when making the docs; only thing is that the Process module gets the settings from the DocsTab module currently
-
ok this is finally a module under construction https://processwire.com/talk/topic/11803-admindocstab/
-
** replaced with this: https://processwire.com/talk/topic/11817-module-adminhelp/ ** This is a new module, work in progress/alpha (not for use on live site): [github link deleted] AdminDocsTab module for ProcessWire Processwire helper modules for managing site documentation. Instructions This is a helper module which expects you to have already setup a hidden part of your page tree to establish your documentation, using any template (e.g. 'docs') and a body field (ckeditor). The docs template does not need to have an output template, as the module will only echo the body field inside the admin. In addition this 'docs' template will require a template select field (separate module: FieldtypeTemplates) which should be named template_select. Once you have setup your docs template, template_select field and some docs pages, you should install the AdminDocsTab module, then select the template(s) to show the docs on, as well as the root page of your docs. At this point the 'Docs' tab should show up for the relevant template (as specified in the Doc), and show the docs that have that template specified. To have a global docs overview page (e.g. 'Docs'), which renders all of the docs in an accordion view, you can install the ProcessDocsView module, which will setup a page to view the docs (under Setup).
- 3 replies
-
- 15
-
I will carry on researching this (will check out blog module), this is/will be my first real module of any consequence... lot of stuff to learn, thanks for the help! Module Under Construction: https://processwire.com/talk/topic/11803-admindocstab/
-
I'm extending WireData; this hooks into ProcessPageEdit::buildForm and adds a tab for the found documentation based on the template; but i realized that it shouldn't load the css/js by default, only when the hook runs, and i wasn't doing parent::init; i may need to rename the css if i need that parent init for some other reason. but that brings up another question - i also want to have a process module bundled in with this to render the global documentation page; right now i'm hacking it together by using admin custom pages and then calling this module's (render) method on that; i will look at some other modules that have submodules, so i guess it would install the 2nd module as a child and then i could still get the confiig data somehow (need it to find the root page to render, in the process module)..
-
It's a really nice documentation site - much appreciated.
-
great - thanks for the clarification - i think in my case i should only load the assets if the hook is run (which hooks into the page edit and adds a tab), because those assets are not needed unless those conditions are met..
-
this module definitely wasn't loading the .css file, but i have no idea why - could it be the name of the module? For now i'm able to get it to load using the code above, but would be curious as to why...
-
In terms of building this module (PageDocsTab), i wonder how to deal with it needing to work with a 3rd party fieldtype, namely FieldtypeTemplates, because the way i have it working is that you specify on the doc which templates to show that particular doc on, so that field needs to be added to the template that is being used for "Docs'. I guess it could be in the instructions and also could be made a requirement that the fieldtype is installed before installing this one... and then once this module is installed it could create the required field, e.g. 'template_select'... Another question - i've looked through a bunch of modules and i was under the impression that if you had css or js named the same as the module that it would load them, and in some modules i don't see any code to load css or js, even though there are css and js files in the module folder; on the URL checker module, this code is used to get the css to load: $this->config->styles->add($this->config->urls->siteModules . __CLASS__ . '/' . __CLASS__ . '.css?v=' . time()); so is this the recommended/correct way?
-
whoa - sweet - super amplified thanks for this... just tested and totally works... !
-
ok thanks - i will research again tonight and try and venture forth; in the meantime I might change it to an integer input ("please enter the page ID of the root for docs..")
-
right, i will check the database shortly... i've spent some hours looking at other modules including the menu builder, to try and figure out how to get a page list select to work for module setting...
-
many thanks - but i can't seem to get the module to save the selected page; it shows the field but it reverts to unselection after you hit submit..
-
Hi - i have a module i'm trying to improve so i added a page list select to the getModuleConfigInputfields function like this: $fieldDocsRoot = wire('modules')->get('InputfieldPageListSelect'); $fieldDocsRoot->attr('name+id', 'docsRoot'); $fieldDocsRoot->label = __('Docs Root', __FILE__); $fieldDocsRoot->description = __('Select the root page of your docs. (Allows the module to know where to create new docs.', __FILE__); $fieldDocsRoot->attr('title', __('Docs root', __FILE__)); $wrapper->add($fieldDocsRoot); i also tried to init the docRoot var up in __construct, but i can't figure out how to get it to save the page on that inputfield.. TIA
-
@Jon - the wire class can be used inside functions - so in the case of Joss' issue, he wanted the solution to be in a function. when outside of a function like in a template you can use the $pages variable directly...
-
sorry, yeah that was a profields; removed it now...not super relevant anyway
-
yes, there is an extensive discussion of that here, with code of how to achieve that: https://processwire.com/talk/topic/4991-sub-arrays-dates-times-and-pure-hell/ other options: https://processwire.com/talk/topic/6733-better-way-to-finding-all-years/#entry65975 https://processwire.com/talk/topic/11690-display-results-with-a-year-heading-using-datetime-field/?p=108709