pwFoo
Members-
Posts
708 -
Joined
-
Last visited
Everything posted by pwFoo
-
Module FrontendUser: login, logout and register users / members
pwFoo replied to pwFoo's topic in Modules/Plugins
Hi, I'm moved away from PW some time ago because I stopped build websites or server site web applications and so unhappily have no use case for Processwire... For me Processwire is still the best CMS. Create content types / pages and fields and create content / pages with the backend and enjoy the flexibility to build your page with html, css, js and the awesome PW api ? With more complex applications, you also benefit from the flexibility and the powerful API, but more like from a framework / CMF. Without restrictions regarding the frontend. Write own modules, plugins and hooks is really easy to learn. Frontend User was one of my first modules I wrote. And the community is great ? -
Hi, do not use my old "FrontendUser: login, logout and register users / members" module... It's not up to date and not maintained for a long time...
-
Hi, I would build a website with embedded videos (because of used video source maybe need to use iframe...) and would like to export sites to PDFs. Before I start with PW / pages2pdf... is it possible to export a page to pdf with the embedded video? Anyone tested that use case? Regards
-
I thought about different cms/f and headless cms (for example directus, cockpit). Processwire can be used as headless cms out of the box (response with json) or with a rest api module. Directus / cockpit looks great, but it would be so much easier to use processwire with custom code / modules to add some server side features I think? Will PW as headless cms bloated by template system and some more non-headless features? Maybe best would be a rest api module with a process module? Would that skip some not needed core parts like template parser? Will that reduce overhead or maybe there isn't really overhead by not needed core features?
-
Nice to see a push notification module, but I would love a universal webpush api module for that case? Browser dependent push notifications working with edge, firefox, chrome (for android) without forced to use one push service. Just let the browser decide.
- 15 replies
-
- push
- notifications
-
(and 1 more)
Tagged with:
-
Module FrontendUser: login, logout and register users / members
pwFoo replied to pwFoo's topic in Modules/Plugins
Hi, module isn't maintained or tested anymore. I love PW, but at the moment I don't need / use it. Because of missing time I stopped web development / fun tasks some time ago... -
It isn't really difficult to setup with php and javascript. Working example: https://webpushdemo.azurewebsites.net/ Custom server php lib for testing: https://github.com/web-push-libs/web-push-php I tried to build it with php and js, which works. But the js part isn't a library for simple use... I tested it some time ago, but the code should work... https://notify.it-dengler.de/index.php Just subscribe / enable notifications and wait 5 seconds (configured delay). It also works if you disable and enable notifications and close the browser during delay. You will get a notification and click opens a new tab.
-
Hi, gallery, forum and push notifications would be great, but it's to expensive for a small non commercial site for few users.
-
Yes! ? I would love to see such a DB class standalone for small not PW projects! Best ever! In the last time I found some nice frameworks like Flight PHP micro-framework (router, hooks, extendable, views, ...) or db frameworks Medoo, Propel3 and lessql.
-
SQLite would be nice, but not really needed. If possible and changes to database abstraction is needed a move to PDO would make it possible. At the moment it would be interesting because of a small private php project which should run on cheap webhostings without extra features. So sqlite would reduce the requirements *g* With a small private projects I would try to keep hosting cost low... But web hostings with mysql isn't expensive today...
-
Hi, I would use Service worker for additional tasks like push notifications. Instead of build another service worker module it would be great to add (custom) code to the existing service worker?
-
Nice module, but I would prefer push notifications dependent on used browser only instead of an additional push provider. It works with that demo cross browser (with system-worker web push api support). https://webpushdemo.azurewebsites.net/
- 23 replies
-
- 1
-
- alerts
- notifications
-
(and 1 more)
Tagged with:
-
Hi @stikki, thanks for take a look into it. Additional / instead of GUI field selection I use a array to filter the fields to convert / output. At the moment I have some other topics and can't work & play with PW. My code seems to work for my needs and I like the multidimensional filter array to filter sub-pages and wirearray / pagearray / image fields too. So if you could implement it a nice and easy way it would be fine. I like to have one module for one job and not some similar modules ?
-
WireHTTP use custom port and self signed certificate
pwFoo replied to pwFoo's topic in General Support
UPDATE I can't test self signed certificate to work because WireHttp don't respect given connection port? The following url: https://127.0.0.1:10000/api/... Will return that error message: 2: fsockopen(): unable to connect to ssl://127.0.0.1:443 (Operation timed out), 110: Operation timed out Looks like port 10000 is changed to default https port 443 by WireHttp? php curl is installed and also tried to force it with option 'use' (if it falls back to another method). Need it solved or drop WireHttp for that use ☹️ -
I won't enable UrlSegments for each template, but have a autoload module with should react based on path / urlSegments. Don't like the way to do it with query string. So allow one urlSegment by name (string) would be nice without the need to activate urlSegments at all.
-
How to enable urlSegments runtime instead of persistent in template settings? And where to be loaded before the current page returns a 404 error? https://processwire.com/docs/front-end/how-to-use-url-segments/#how-do-you-enable-url-segments
-
Hi, I try to convert a rest api client to WireHttp and seaching for the option? verify=false // curl --insecure, self signed certificates Haven't found such a option in api documentation or source code (quick search...). Are self signed certificates supported by WireHttp?
-
solved Custom permissions page-delete-own and page-edit-own
pwFoo replied to pwFoo's topic in General Support
Hi @gmclelland, strange... Image isn't broken here, but I changed the post a short time later because I fixed it... The changes are gone, just the "solved" tag is there. Problem was that the page was moved to trash and so parent wasn't home ("/") anymore. So different permissions and trashable == false was "fine". I moved the page back and all looks good. -
solved Custom permissions page-delete-own and page-edit-own
pwFoo replied to pwFoo's topic in General Support
Thanks! Tested the permissions, but have a problem with permissions or understanding how it works. "page-create" is activated for "basic-page". Don't know if needed... just activated to test... My role has the following permissions set. Tried to add a page to home ("/") with template ""basic-page". Do some permission check before... Page owner: test Current user: test Current user roles: guest, writer Current user permissions: page-view, page-edit // --> missing allowed permissions "page-edit-created, page-edit-trash-created" Addable (parent): 0 // --> 1 (allowed to add child to "/") Addable (child to page): 0 // --> OK, add to parent should work, not add children to that page Editable: 1 // --> OK, but by page-edit or as should page-edit-created??? Trashable: 0 // --> 1 (allowed by page-edit-trash-created) Deleteable: 0 // --> OK, just allowed to trash the page... User test has role "writer" (screenshot with permissions), is page owner(!). Added expected values to the permission check output above. Checked by addable(), editable(), trashable() and deleteable() methods. -
Hi, I try to add page-edit-own and page-delete-own permissions, but it's strange... If a add the custom permissions it looks like both are children of page-edit respectively page-delete. I played with added / revoked permissions, but I can't get it work, that a user of a role just can delete own content. First the user can't delete any content and now the user can delete own and foreign pages ? Is there a tutorial to learn more about the PW permissions? Or do I have to rename the permissions to page-own-edit and page-own-delete to be independent from page-edit and page-delete?
-
Module method name create() was the problem... Changed to add() to have the same naming than permissions page-* and it works fine!
- 1 reply
-
- 2
-
I tried to add a new page with $pages->add() with a custom method inside of a module. It looks like the method is called each page load (as should) and also if the backend page tree is loaded / refreshed (bug??)? public function create($template, $parent, Array $data = array(), $name = false) { $name = wire('sanitizer')->pageName($name ? $name : $data['title']); $obj = wire('pages')->add($template, $parent, $name, $data); return $obj; } called inside of home page ("/"): $api->create('basic-page', '/', array('title' => 'ApiCreatedTest1')); Works fine. Load it twice (create duplicate page) results in an error. But without "/" requested the page gets created if I view the backend?! Checked it by delete the page, check the page tree again and it looks fine. But if I reload the backend page the page appears again. So backend page tree load executes the home page ("/") and create the page? Is it a bug or I'm missing anything...?
-
I do some tests with custom code because I need a simple way to set (recursive) fields to view for different page types and fields. public function ___WireToArray($obj, $filter = array()) { $values = array(); foreach ($obj AS $item) { $array = array(); foreach ($filter AS $key => $val) { if (is_array($val)) { $array[$key] = WireToArray($item->$key, $val); } else { $string = (string)$item->$val; $array[$val] = strpos($string, '|') ? explode('|', $string) : $string; } } $values[] = $array; } return $values; } I built a module which used that way: $userFilter = array('id', 'name', 'email', 'roles' => array('id', 'name')); $pages->find('template=user')->toJSON($userFilter, JSON_PRETTY_PRINT) Output [ { "id": "40", "name": "guest", "email": "", "roles": [ { "id": "37", "name": "guest" } ] }, { "id": "41", "name": "admin", "email": "andre.hoeg@gmail.com", "roles": [ { "id": "37", "name": "guest" }, { "id": "38", "name": "superuser" } ] } ] Example with images $wa = $pages->find('template=basic-page'); $filter = array( 'id', 'name', 'images' => array('url', 'width', 'height'), 'files' => array('url', 'name', 'filesize'), 'pageref', ); Output [ { "id": "1016", "name": "test1", "images": [ { "url": "\/site\/assets\/files\/1016\/dscn2585.jpg", "width": "4608", "height": "3456" }, { "url": "\/site\/assets\/files\/1016\/dscn2823.jpg", "width": "4608", "height": "3456" } ], "files": [ { "url": "\/site\/assets\/files\/1016\/aufstellung_und_taktische_aufgaben.pdf", "name": "aufstellung_und_taktische_aufgaben.pdf", "filesize": "68628" }, { "url": "\/site\/assets\/files\/1016\/1und1_leistungsbeschreibung_mobilfunk.pdf", "name": "1und1_leistungsbeschreibung_mobilfunk.pdf", "filesize": "207816" } ], "pageref": [ "1017", "27" ] }, { "id": "1017", "name": "test2", "images": [ { "url": "\/site\/assets\/files\/1017\/dscn2813.jpg", "width": "4608", "height": "3456" } ], "files": [], "pageref": "" } ] Because Pageimages and Pagefiles are based on WireArray it's possible to get just images as JSON $img = $page->images; $imgFilter = array('url', 'name', 'filesize', 'width'); $img->toJSON($imgFilter); Output [ { "url": "\/site\/assets\/files\/1016\/dscn2585.jpg", "name": "dscn2585.jpg", "filesize": "4085826", "width": "4608" }, { "url": "\/site\/assets\/files\/1016\/dscn2823.jpg", "name": "dscn2823.jpg", "filesize": "3225062", "width": "4608" } ]