Jump to content

dragan

Members
  • Posts

    2,007
  • Joined

  • Last visited

  • Days Won

    21

Everything posted by dragan

  1. You can just do something like $posts = $pages->find("has_parent=123, template=blogpost, sort=-created, limit=5"); 123 = id of your blog main parent page limit = number of groups (I'm guessing you want just one per group) In your foreach, it's easy to output the blog post's group #, perhaps with parentsUntil or similar...
  2. Here's a little example how to do client-side start-date / end-date validation:
  3. Perhaps you could also just use CSS? https://css-tricks.com/almanac/selectors/n/nth-of-type/ or Flexbox.
  4. https://processwire.com/api/ref/sanitizer/filename/
  5. Do you see any suspicious stuff when you open the browser inspector? Did you try editing in another browser?
  6. Can we look at your code? How exactly did you try it? Are you using something like curl_setopt ($ch, CURLOPT_COOKIEJAR, COOKIE_FILE); curl_setopt ($ch, CURLOPT_COOKIEFILE, COOKIE_FILE); ? And did you try to use PHP's native $_SESSION instead of PW's $session?
  7. you could try a CKE plugin like https://ckeditor.com/cke4/addon/codemirror
  8. Activate debug mode in config.php, and also check your server's error log files. With something like the web development browser extension you could at least see if the server returns HTTP 200 or 500 - that would be a start for further debugging. You could also copy everything to another server, and try if you can login there (of course, do a mySQL dump, adjust config.php file etc.)
  9. I would copy it to a dev server first (locally) and switch to PHP 7.x and test it out completely (backend and frontend) with debug mode on.
  10. @blad thanks for this module. Sadly, I get an error when trying to access setup/elfinder: Call to a member function getLanguageValue() on string on line 190: $title = $p->title->getLanguageValue($this->user->language); Even when I don't select "show page titles instead of id", this fatal error is thrown. The "Example connector configuration options" textearea is read-only. Is that intentional? PW 3.0.111, debug and advanced mode = on. Multilang PW-site. PHP 7.2.11 Apache/2.4 Tracy 2.5-dev Any ideas?
  11. I'm wondering what (web?)-app this is. Care to share? Congrats. Very nice, quick loading and slick site. I like the thorough use of sliders/carousels.
  12. I'm not sure, but I was just quickly looking at two modules I've installed - apparently you can do it in two ways: In the module file itself, getModuleInfo(): public static function getModuleInfo() { return array( 'title' => 'myModule', 'version' => '0.1.1', 'nav' => array( array( 'url' => 'export/', 'label' => 'Export', 'icon' => 'arrow-right', ), array( 'url' => 'import/', 'label' => 'Import', 'icon' => 'arrow-left' ), array( 'url' => 'restore/', 'label' => 'Restore', 'icon' => 'reply' ) ) ); } taken from the great Migrator module (shortened) Or with a JSON file named ModuleName.info.json: { "title": "Module Name", "page": { "name": "db-backups", "parent": "setup", "title": "DB Backups" }, "nav": [ { "url": "backup/", "label": "New Backup", "icon": "plus-circle" }, { "url": "upload/", "label": "Upload", "icon": "upload" } ] } taken from Ryan's Database Backup module.
  13. I didn't install this module, but here's a little hint: Try to remove the @ character on this line: https://github.com/ryancramerdesign/MarkupLoadRSS/blob/master/MarkupLoadRSS.module#L371 @ before a function in PHP suppresses error messages. When you do that change, you have to refresh modules. Or delete and re-install it.
  14. You should learn emacs! ? I'm afraid I don't have any tips for you, but here's two forum threads asking basically the same question:
  15. I would try upgrading to the latest dev version. Ryan mentioned something in his most recent weekly update: I don't know if this will also be the case for image-fields though; didn't have time to test it out myself...
  16. I would rather check if there's a hookable method, or if you can do something with an admin.js/.css instead.
  17. and what does it say? Most probably, you just have to adjust a path/URL. Or maybe you have to create a dummy PW template + page for check_code.php file as well.
  18. If you're using Node for your frontend stuff, you could use something like https://www.npmjs.com/package/favicons
  19. perhaps comment this line and see what happens? https://github.com/processwire/processwire/blob/dev/htaccess.txt#L22
  20. Same here. Did you try using a text sanitizer though? https://processwire.com/blog/posts/processwire-3.0.13-selector-upgrades-and-new-form-builder-version/#selector-engine-array-support
  21. Done. Knowing very little about the subject or the website, I had to guess about 10-20% of the items, e.g. I have no idea what "RAAF C-17 Globemaster" actually is (of course, I could have googled it, but I'm a bit short on time right now...)
  22. Since every hosting company can basically configure their servers as they wish, it would be wise to ask them directly. On some hosting environments, you can add PHP/Apache customization via control panel, on others you have to add a user.ini file in your site's root directory. With others you have to use .htaccess. But which methods are allowed or not, can surely be answered by their tech support team.
  23. There are helper tools like export/import of pages, fields and templates, built into the core. There are modules like Duplicator you may find useful: https://modules.processwire.com/modules/duplicator/ And here are similar discussions:
  24. PW template files and assets like CSS, JS etc. are meant to be uploaded via FTP. It's just the way PW handles things. You could try the following: Create a new page at root-level, and enter the page-name that Google Analytics provided. random-string-23080980.html. Publish it (no content necessary). Make sure it's hidden (i.e. not searchable, and not appearing in dynamic navigations etc. under page settings) Chances are, PW will add a / to the page-slug. However, you could try to send that to GA anyway, maybe it will be accepted. If not, create a new template just for this purpose, and under the tab "URLs", select "no" under "should page URLs end with a slash?". Assign this template to your GA page, and try again.
  25. Not a direct answer to your question, but did you consider building a dashboard? i.e. a special page where you would have useful shortcuts for your admins, like "add news item", "add new event" etc. There are quite a few helpful forum threads with various suggestions how to build something like that.
×
×
  • Create New...