-
Posts
2,776 -
Joined
-
Last visited
-
Days Won
40
Everything posted by Macrura
-
@Pete - i'm wondering how to 'addon' to this module in the sense that your module provides a blank canvas for setting up a dashboard, but i'd like to avoid changing anything in your module and also avoid putting anything custom into the module folder; what i did to hack this was change the dashboard module like this: public function execute() { // Redirect calls for the admin homepage to the dashboard (first child page) if ($this->page->id == 2) { $this->session->redirect($this->page->child->url); } $dashboard = $this->getDashboard(); return $dashboard->render(); } public function ___getDashboard() { $t = new TemplateFile($this->config->paths->siteModules . __CLASS__ . "/dashboard.php"); return $t; } then in my dashboard widgets module, i have this: public function init() { $this->addHookAfter('ProcessDashboard::getDashboard', $this, 'getCustomDashboard'); } public function getCustomDashboard(HookEvent $event) { $template = $event->return; $event->replace = true; $template = new TemplateFile($this->config->paths->siteModules . __CLASS__ . "/dashboard.php"); $event->return = $template; } let me know what you think, if this would be a possible change that wouldn't affect existing sites, but would allow other modules to hook into the main dashboard for rendering...
-
@Pete - thanks for noticing.. yeah there isn't really a 'blog' icon in fontawesome, so i just used that one..., and i also have some questions/comments about the dashboard module, but i'll do those over on the module thread.. @Mike - yeah, i should probably change to a rocket, but the idea of 're-routing' something seemed also to communicate what that does... any sort of looped arrow i guess would work...
-
Update: So I've been using Pete's dashboard module instead of the technique described above; it's quicker to setup, and easier to clone to other installs, and no need to have code in various places like the themes folder and in ready.php The hope/plan is to turn it into a full widget enabled dashboard module that i can install on various installations a) without having to do any hardcoding b) enable control over which widgets are shown on the dashboard (by user/role/permission) c) allow for easy configuration of colors, icons, columns, etc. To achieve this I setup some templates for different widget types, one is a shortcuts widget, another is a page lister widget; these each have pages and fields to configure them; i can set them to appear by user/role. in the future i can add different types of widgets as needed and then include them in the needed user's dashboard. This is using a combination of a free (MIT licensed) admin theme for bootstrap, but instead of using bootstrap as the css layout, it uses a tiny grid called rwdgrid which i s 2KB; it uses the box, and other widget classes from the admin theme.
-
yes, as mentioned you could use whatever you have in your kit and prefer to use, table, pagetable, repeaters, pages... though you may want to give Menu Builder a try...
-
Make dashboard plugin page the default admin page
Macrura replied to kriegar's topic in General Support
Also, the module itself should handle the redirect: // Redirect calls for the admin homepage to the dashboard (first child page) if ($this->page->id == 2) { $this->session->redirect($this->page->child->url); } i usually just move the dashboard page up to the top if it isn't there after installing. you could also try posting your issue on the module's topic. -
can you check the error logs and see if there are any errors? When you say you added some pages to a page, do you mean a page table field? I'll also include the boilerplate troubleshooting below... ----- In order to provide the best chance of help, could you provide the following info: Processwire Version Apache, MySQL & PHP Versions List of installed modules details of any applicable/related errors in your error log (assets/logs/errors.txt) Browser you are using In addition make sure to take the following steps before reporting errors: Upgrade to the latest stable version of PW Upgrade all modules to the current version Install the diagnostics module check that your server environment meets the minimum server requirements Repair database tables address any existing warnings or failures Try increasing your .ini variables like memory, and execution time *Note, if you cannot even run processwire due to WSOD or other fatal error, please try a clean install, and then import the site folder and database, prior to posting issue reports. When reporting errors that happen on a form such as the editor, please open the chrome console, or FF/firebug, and see if there are any network or JavaScript errors. Please report those errors along with your issue.
-
PrevNextTabs Module Github: https://github.com/outflux3/PrevNextTabs Processwire helper modules for adding page navigation within the editor. Overview This is a very simple module that adds Previous and Next links inline with the tabs on the page editor. Hovering over the tab shows the title of the previous or next page (using the admin's built in jqueryUI tooltips.) Usage This module is typically used during development where you or your editors need to traverse through pages for the purpose of proofing, flagging and/or commenting. Rather than returning to the page tree or lister, they can navigate with these links. Warnings If you are using PW version 2.6.1 or later, the system will prevent you from leaving the page if you have unsaved edits. For earlier versions, to avoid accidentally losing changes made to a page that might occur if a user accidentally clicks on one of these, make sure to have the Form Save Reminder module installed. http://modules.processwire.com/modules/prev-next-tabs/
- 31 replies
-
- 21
-
-
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..")