Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/24/2020 in all areas

  1. I guess that tool was not exactly built for mocking up a ProcessWire template/field-setup ? But I think this could be quite helpful - also for asking/explaining questions here on the forum! https://dbdiagram.io/
    6 points
  2. PageArray inherits from PaginatedArray which inherits from WireArray. WireArray checks for duplicates by default. You can change this behaviour through setDuplicateChecking!
    4 points
  3. The title might sound more exciting that it actually is. It's just a little helper module to keep things organized ? Basically it just saves you from finding the correct require_once("where/is/my/nette?") and, for a little extra security, it adds an .htaccess file to block all direct access to Nette source files. Why? Nette is an awesome framework with some awesome features/utilities that ProcessWire lacks. Creating separate modules and including Nette packages multiple times in those modules would not be efficient. RockNette makes it easy to store them in a central place. Usage You'll get all necessary instructions on the module information screen: https://github.com/BernhardBaumrock/RockNette
    1 point
  4. Then try the Hanna code approach and set up attributes for the video ID, and max width / height and wrap the iframe in a container. Google embed video responsively and you'll get tutorials on how the wrapping works. You might end up with a shortcode format like this that lets you insert that into the RTE with the video ID and a max width and the Hanna code takes care of inserting these into the wrapper and iframe HTML. [[video_embed id="" width="500"]]
    1 point
  5. Now it shows this, so I guess it was somehow messing up with some cached values ? Wow, this even works for my own $theme API variable ?
    1 point
  6. v0.0.3 fixes a bug where cssUrl returned the path and not the relative url due to windows directory separator. Not sure why this was no issue until now... And another reason why I hope that we get $files->url() and $files->path() soon ?
    1 point
  7. Hi @LuisM Thank you, that's a known issue https://github.com/BernhardBaumrock/RockDatetime/issues/1 and thx to @Jan Romero we already know the reason. I have some more important stuff to do at the moment and I think I'll refactor my module to use the https://carbon.nesbot.com/ library for handling single timestamps as it has everything already done and is well tested and maintained ?
    1 point
  8. Just to clarify: the png format has no quality loss. But the GD lib has massive issues in resizing dark image parts. With such dark images, you must set the imagesizer defaultGamma option to -1 !! If your server supports imagick, you can activate the ImageSizerEngineIMagick, that is part of processwires core. (Under modules core).
    1 point
  9. Everything works ok following to your suggestion. Tks again
    1 point
  10. that's exactly what I don't want ? Just a quick comment - that is exactly what you are doing here anyway ? $channel->name = $this->sanitizer->pageName($title);
    1 point
  11. Hello There, First of all tks a lot for the module and I hope you (and every PW forum members) are doing fine. I am using BCE to import a few pages from an other CMS with the cvs import function. For the time being I am playing with the module to test it out. Everything works fine but the field pairing options. I can import pages from the CSV file (without field paring) but when I am using the field pairing it doesn't work (no pages are created) or rather I don't know how to make it work. I am using PW 3.0.148 (latest stable release) et the module version 1.8.19. and php 7 I have simplified my use case to try to understand the problem. I have a template with 2 fields title and body. In this test I am trying to import only the title field. here is the config screen The process runs with no error (nothing in the logs) and this is the message I get. But no pages are created under the parent pages. nothing ! here are my settings I went through the support board but didn't find any pointers at a solution. If I run the same import without the field pairing option ... it s all good with all the fields. Thanks for your help
    1 point
  12. v1.0.2 is out ? pwinputfield: Add Inputfield Boilerplate
    1 point
  13. @maddmac, I tested here inside a repeater and it's working correctly. You might need to clear cached files from your browser to get the updated CKEditor plugins that are included in the module. As far as I know plugins don't get automatic cache busting in CKEditor and I don't know any way to do this manually due to the way external plugins are loaded. If you do a hard refresh in Page Edit it should fix things.
    1 point
  14. Hi there, I'm with @Neeraz - it would be great to have the possibility to also add a class to the link element (for what reason ever). Maybe @kongondo it is not a big deal for you to add that functionality to the module? That would be great ?. Have a nice Friday ?
    1 point
  15. Since you have an array(ish) $clearPages, it looks like you want to recreate the cache for depending pages too (blog categories/tags pages etc.?) so I'd guess you'd have to make a request for each of those. It might become a runtime issue if you have multiple complex pages to render, but the worst that could happen is that rendering breaks at some point and the first request to an uncached page is slower.
    1 point
  16. This is related to the Wireframe::page() static utility method (https://wireframe-framework.com/docs/static-utility-methods/) but not specifically covered in the docs, I think. This is also one of the things I struggled trying to explain briefly in the changelog ? The general idea is that since Wireframe works through the Alternate Template Filename setting of templates, in earlier versions you couldn't do things like $pages->get(1234)->setLayout(null)->render() and expect the output to come from a Wireframe view UNLESS the Alternate Template Filename for the template this page uses had the alt filename pointing to a Wireframe bootstrap file (i.e. /site/templates/wireframe.php). After this update the syntax mentioned above will — in most cases at least — work right out of the box. And even in cases where it won't work (such as when you're fetching data from ProcessWire via a command-line script), Wireframe::page(1234)->setLayout(null)->render() will almost certainly work. Typical use case for me are pages that are not supposed to be directly accessible, like a contact page that lives under a shared "bucket" (e.g. /data/contacts/lastname-firstname/) and is only ever made visible when rendered as part of another page's markup. If I only need to output a few fields from the page I can do that directly in the view file for the containing page, but if I need to reuse this data all over the site, I prefer to define a view file for the contact (e.g. /site/templates/views/contact/embed.php) and render it using that: <!-- some page that lists contacts --> <?php foreach ($page->contacts as $contact): ?> <?= $contact->setLayout(null)->setView('embed')->render() ?> <?php endforeach; ?> Hope this makes more sense ?
    1 point
  17. @NoremPload ProcessWire 3.0.142 (which is a dev version and very recently released) brings in the ability to have custom fields for images. I personally had some issues with this ImageExtra plugin and stopped using it a while ago (it's been a few years). Also the author is no longer working with ProcessWire so there's also that. I'd recommend putting in the extra work to do it the new, native way: https://processwire.com/blog/posts/pw-3.0.142/
    1 point
  18. Perhaps PW's core PagesExportImport fits the bill there. The result is quite verbose and more nested though since it includes everything needed to recreate a page. $myPages = $pages->find('template=catalog-item'); $PEI = new PagesExportImport(); export $PEI->exportJSON($mypages); To get array data instead of a JSON string, call pagesToArray instead of exportJSON.
    1 point
  19. This is just a rough idea, not sure if it's going to go anywhere but I'm actually wondering if I should extend the $partials object a bit? Currently it's actually a bit silly – basically an "object oriented" way to replace <?php include 'partials/menu/top.php' ?> with <?php include $partials->menu->top ?>. If each property could be used as a function, this would allow us to pass the partial arguments: <?= $partials->menu->meta([ 'description' => 'some text' ]) ?>, etc. Or we could pass in a string, in which case a Controller method would be used to pass the data to the partial. Again, just thinking out loud here. Not sure if this makes any sense, but I'm kind of liking the idea ? Another idea I've been toying with would be subcontrollers (or child controllers, or partial controllers, or whatever terminology makes most sense). These could solve situations where you end up needing the same stuff from template to template. You can always create custom base controllers and extend them, but this might allow for easier composition.
    1 point
  20. A terminal for running server commands: http://modules.processwire.com/modules/process-terminal/ https://github.com/adrianbj/ProcessTerminal NOTE: It does not support interactive commands like vi, nano, apt, etc. DO NOT attempt to use these as they may result in you needing to restart apache. This is a bash terminal that lets you quickly execute commands on a server. In addition to normal commands like: ls, cd, cat, mkdir, rm, chmod, chown, etc, you can also do mysql command line calls which is very handy if you need to add a new user, create a mysqldump etc. Note that for mysql commands you need to issue them individually - you can't simply start "mysql" and issue commands from there - each call needs to include your username and password and the command to be run, eg: mysql -u root -p mypassword -e "CREATE DATABASE newtablename"; There is also an upload and download command, eg "upload test.txt" which will spawn a file selector dialog on your machine to upload that file to your server with the given name. It also has arrow up and down for command history as well as tab autocompletion of commands and file names. This module was separated from Tracy because some shared hosts were flagging it as spam. This is because it uses system_exec to run server commands. This can certainly be dangerous, but in my opinion it is no more dangerous than the HannaCode module or the Tracy Console panel which both allow you to run system_exec. The key thing is that ProcessWire's htaccess rules prevent the shell.php file from being run directly and because this is a process module it uses PW's permissions to restrict usage to superusers.
    1 point
  21. Some fresh sounds I discovered recently. I didn't know I'd like this Synthwave music but... can't get anything done without it. Whole YT Channel: https://www.youtube.com/channel/UCmYTgpKxd-QOJCPDrmaXuqQ Some more on Basecamp. If you loved Stranger Things (Netflix) you will probably like this too. https://synthwavecafe.bandcamp.com/album/stranger-things-tribute
    1 point
×
×
  • Create New...