Jump to content

dragan

Members
  • Posts

    2,007
  • Joined

  • Last visited

  • Days Won

    21

Everything posted by dragan

  1. Thanks for the feedbacks so far. @Robin S you're correct - if I would use this, it's always just under one certain parent, and only one certain template is allowed. I already hide the template select dropdown for the admins on this screen, since it only adds confusion. The use-case here is: People quickly create pages, keep them unpublished, and get back later to fill in all necessary fields. The only other text field on the "add new page" screen would be some internal project code (which is unique; a cross-reference to our CRM/accounting software). That way, they can first check if the exact same page already exists. Of course, I was thinking about other methods, e.g. use batcher.
  2. A question just popped up in our office: Is it possible to customize the very first screen when you choose "add new page"? Would it be possible (with a hook maybe?) to add another input field (besides title + name)? Or maybe even use another mandatory field than title? Of course, then I would have to take care myself of the name-creation (sanitize, plus making sure it's unique). Not sure I'd want that, really, for what is ultimately just a "nice-to-have" feature.
  3. Great forum thread idea I don't have time right now for creating screenshots and copy-pasting settings, but from the top of my head here are a few things I like to use: maximize (open RTE in fullscreen, a.k.a. distraction-free writing mode) show blocks (puts visual border around the currently selected block accessibility checker embed media from external sites (Youtube etc.) I'll follow up tomorrow with links, screenshots etc.
  4. The easiest is probably to use a module like this https://modules.processwire.com/modules/import-pages-csv/ To avoid timeout errors, you maybe have to split your data into smaller chunks, and/or temporarily increase PHP script execution time + memory. Writing a script yourself would look a bit like this (of course you'd have to hold your data in an array and do a foreach) https://processwire-recipes.com/recipes/create-page-via-api/ Helper library for parsing CSVs: https://github.com/parsecsv/parsecsv-for-php
  5. Oh, and actually... you're not "hiding" the login URL with that. You're just making it harder to guess. You would need to add some .htaccess rules to login first via basicauth, adding another layer of security.
  6. in the install screens, you have the choice of changing the default backend URL to something else. If you missed that step, you can always alter it later
  7. Joomla? We're all pointing at you and laughing. Did you not google? How about this? https://extensions.joomla.org/extensions/extension/access-a-security/site-security/akeeba-backup/
  8. With the API, those 6k pages would be quickly created. There's open data around in various formats (CSV, JSON etc.) you can use, e.g. https://github.com/datasets
  9. It's weird. Now it works here too. Don't know if it was some funky browser hickup, but everything's fine now.
  10. I'm building a little dashboard... Part of it will be some shortcuts - directly linking to attribute pages (page references). Now, I've tried to simply add the #ProcessPageEditChildren to the URL. But clicking such links never opens the children tab, i.e. <a href="../page/edit/?id=1040#ProcessPageEditChildren"> will always open with the first, default tab. The entire #foo is then removed from the URL. This is with PW dev 81 + 84 (but afair I also stumbled over this issue with older versions). Does anybody know how this can be done? Or maybe even when linking to the main tree-view: some sort of hashtag / query string to open parent page and show its children?
  11. In the backend or frontend? Maybe that's what you're looking for: https://processwire.com/api/selectors/inputfield-dependencies/ Similar discussion:
  12. Thanks for this module! I had to change a few things to get this to work with PW 3.0.84 a) add PW namespace b) change page id from 2 to 3 (2 = admin root, but 3 = page, which is the actual default landing page after login) if ($this->page->id === 3) { (and then the two lines from @Macrura above) c) // $t = new TemplateFile($this->config->paths->siteModules . __CLASS__ . "/dashboard.php"); // this creates a URL like site/modules\ProcessWire/ProcessDashboard/ $t = new TemplateFile($this->config->paths->siteModules . "ProcessDashboard/dashboard.php"); Perhaps you could re-check, and publish a new version that officially supports PW 3 ?
  13. Thanks for this great tutorial! I was playing around lately with modules myself. It's really remarkable how easy it can be. Quick question: Is this the only (or just the "recommended") way to add content in a module page? $form = wire()->modules->get('InputfieldForm'); $field = wire()->modules->get('InputfieldMarkup'); What I'd like, is include() a PHP file that resides either in my modules or my site/templates folder. Or - well - any kind of PHP code right in the .module. InputFieldMarkup will not allow PHP. Is is possible to include just about anything I'd like? Or is this some kind of security limitation? Background: I created a simple custom help page that resides under /admin/setup, and also installs a custom role. If I wanted to extend that to not only use HTML/CSS/JS, but also PHP, how would I do that? (using all of PW's methods... $pages / wire() etc.). I'd like to create some kind of dashboard (just as a proof of concept).
  14. Great. Now that I've uninstalled Reno (went OK), and then wanting to uninstall default admin theme too, I can't access module section anymore. Edit profile: same fatal error.
  15. I wonder if this is a bug or if I need to adjust something? Every user I create, no matter what role, only sees the classic or Reno theme. For those users where I decided they can't edit their own profile, they can never switch to the UIKit admin theme. Even if I go back to a user's profile as superadmin, and again save the profile (with Uikit checked), nothing changes. I tried with several users, did logoff/login several times - nothing. Do I have to uninstall the classis + Reno theme, in order that every new user is assigned the UIKit theme?
  16. Do you intend to import this tabular data into PW as pages? If yes, have a look here:
  17. I don't think it's a permission problem - see previous threads with the same error message: https://www.google.ch/search?q=Unable+to+generate+password+hash site:.processwire.com
  18. I'm not sure, but maybe you could use selectize: https://processwire.com/talk/topic/13549-selectizejs-modules-family/ Also, there's an option in the Admin On Steroids module to check/uncheck all radio buttons, if I'm not mistaken. Not sure if it works with checkboxes. As for intending: Inspect the checkboxes and see if there's any CSS classes you could use in a custom admin CSS.
  19. Is there any way to insert image width + height attributes, when I link to a bigger image with CKEditor? i.e. to use Photoswipe, I have to supply a data-attribute that holds the width + height of the big image, e.g. data-size="1920x675". The above code by @SamC works nice, but I would need the same for the linked image, in the href. Where does that actually happen? Click on "link" icon in RTE -> wrap anchor around image? Is that core or a module? I guess I'd rather try a PW hook than fiddling with CKE JS... edit: I just found this related forum thread... guess I will try this out
  20. This new fork doesn't work at all for me. Well, it did work, but as soon as I needed to clear the cache (after adding/changing some CSS/JS), I get a fatal error. Exception: DirectoryIterator::__construct(C:/xampp/htdocs/xxx/site/assets/cache/Page/,C:/xampp/htdocs/xxx/site/assets/cache/Page/): Das System kann die angegebene Datei nicht finden. (code: 2) (in C:\xampp\htdocs\xxx\wire\core\CacheFile.php line 240) Das System kann die angegebene Datei nicht finden = the system can't find the supplied file Also, the HTML doesn't get minified at all, although it's checked in the module settings. PW 3.0.82, Tracy Debugger active, debug-mode true, local install
  21. I wonder why on smaller screens @ http://stellardebating.nicegrp.com/ you'll get to see the Twitter feed first, and then the main content? Is that on purpose? Don't you want to change the order of the content so the most important stuff is always seen first? On the blacksmith site, you can see PHP code not being rendered: <meta name="keywords" content="echo $homepage->keywords;">
  22. Are you sure the path is correct? What if you omit true (i.e. don't just search in include-path) and use an absolute path? PW doesn't disable this function. If you're in devmode and/or have Tracy Debugger installed, you should see some hint why it's failing.
  23. You could have a look at pageArray filter: https://processwire.com/apigen/source-class-PageArray.html#329 Also, something you might try: Query all blog posts, get all the categories, then use something like array_unique() to get all used categories. From that array, you can create a "safe" list-link, i.e. list that doesn't show categories without blog posts.
  24. In other words: You have pre-defined categories? Can't you set it up so that categories are only created, when there actually is a matching post? i.e. use page reference field and check "Allow new pages to be created from field?" in the field settings (tab "input"). That way you never end up with empty/unused categories.
  25. @Nukro If you care about accessibility (and I think you should), stay away from Slider "Pro"... it's an accessibility nightmare. DIV-soup, no semantic markup, you can't navigate with keyboard, and screenreaders will most likely be confused. I'm a big fan of Slick. Highly configurable and lightweight.
×
×
  • Create New...