Leaderboard
Popular Content
Showing content with the highest reputation on 04/10/2018 in all areas
-
Please see the current version of this module here: https://modules.processwire.com/modules/rock-finder/10 points
-
I just relaunched my portfolio website. It's my first ajax driven website using ProcessWire as a CMS. Its a showcase of some of my work as well as a digital playground to improve my coding skills. If you encounter any bugs or have feedback, feel free to share janploch.de8 points
-
You might want to have a look at my REST API tutorial. It implements basic HTML authentication which is a standard that is quite secure when used over SSL. If you use that appoach, then you need to to send base64-encoded credentials (username:password) when your App authenticates with PW. Then on the PW side you need to decode those into username and password. See how this is done in the Rest Helper php Then do the login attempt with $session->login('username', 'password'); to see whether the credentials are valid.4 points
-
Cool! I forgot to say that the Dropbox API installation is only supported trough Composer. I will see if I got the time to make a "standalone SDK". Also I don't know if people here already heard about of the cloud backup solution for professional, iDrive. Our company is a long time customer of their services and we never had an issue. They have military grade security implemented on backups. I was not going to promote their service as I trough they had only paid plans, but finally they have a free plan of 5Gb. I would like to say that there are no more reason to not have a professional backup solution for your client ! It will be implemented in Duplicator very soon as I need it quickly! ?4 points
-
To send emails from the template you would use WireMail, accessible in the API through $mail To get values for your image and other fields, just use regular $page->image, $page->title etc. The hardest part will be the cross-client responsive Email template. This is not a trivial thing to do. Some resources: http://leemunroe.github.io/responsive-html-email-template/email.html http://tedgoas.github.io/Cerberus/ If you send emails from ProcessWire and want to send them in plain text and in HTML, you typically construct the HTML email first and then convert that to a plain text version with something like $emailMessageAdminHtml = "<h1>Some HTML</h1><p>with paragraph</p>"; $emailMessage = str_replace( "<br>", "\n", strip_tags($emailMessageAdminHtml, '<br>') ); // construct email $mail->to($recipient); $mail->from($sender); $mail->subject($subject); $mail->body($emailMessage); $mail->bodyHTML('<html><body>' . $emailMessageAdminHtml . '</body></html>'); // send $mail->send();3 points
-
3 points
-
Yes, this would be the correct way to implement. You can find some responsive site profiles in this thread: https://processwire.com/talk/forum/12-themes-and-profiles/ Here's a BS4 site profile in the module's directory: https://modules.processwire.com/modules/process-wire-bootstrap4/ You can have a look at some of those profiles to get a better idea about implementation. The beautiful thing about ProcessWire is that there is no single correct way to do things. It leaves structural decisions up to the developer.3 points
-
For people interested, Dropbox support is back. It needs to be tested a bit3 points
-
This tells you that there are no published, non-hidden pages using template "staff-page" under parent with id "1018" with a field named "locations" containing the current page. Try removing parts of the selector to find out what part of it causes no pages to match the selector. If you are wanting to match hidden or unpublished pages see the docs here: https://processwire.com/api/selectors/#access_control2 points
-
2 points
-
Do that. Rely on the built-in mechanisms for user authentication and authorization as much as you can, and you have already eliminated three quarters of the security pitfalls of writing a client app. Let your app deal with regular http status codes like 401 instead of custom status messages and you have another ten percent.2 points
-
Just tested the field on a custom admin page: public function ___execute() { $form = $this->modules->get('InputfieldForm'); $f = $this->modules->get('InputfieldRockGrid'); $f->label = 'Default Report'; $f->themeBorder = 'none'; $f->setData("id>0, limit=10", [ 'title', 'templates_id', 'created', 'status', ]); $form->add($f); return $form->render(); } Thanks again @adrian for Tracy's awesome request info panel to get the proper "themeBorder" setting edit: ajax mode does not yet work in processmodules...2 points
-
I lol'd, thanks. Yes sure, but its robust! Like ProcessWire and his 90s homepage ? They work on features, no time for frontend fashion things!2 points
-
Hi @pycode, welcome to the forum. First advice, if you need more answers, try to format your post with the forum tools so it will be more readable by us ! Wrap your code into the code tag, use quote for errors, etc. About the error you are encountering, looking at the line 777 of the _uikit.php $n = $page->comments->count(); It seem that the function want a Page with a comments field registered on the template. To fix it, just add the comments field to the according template and everything should work. I also suggest you to read this thread :2 points
-
This is the new topic for the Settings Factory module (formerly known as Settings Train). Repo: https://github.com/outflux3/SettingsFactory I'm not sure what versions this is compatible with, it has only been tested on 3.x branch; it is not namespaced, and i'm not sure if namespacing is necessary or a benefit for this module; if any namespace or module gurus can weigh in on this, let me know. I'm also not sure if there needs to be a minimum php version; I have one live site using this now and it's working great; But before submitting to mods directory, would be better if there was some additional testing by other users.1 point
-
NOTE: This thread originally started in the Pub section of the forum. Since we moved it into the Plugin/Modules section I edited this post to meet the guidelines but also left the original content so that the replies can make sense. ProcessGraphQL ProcessGraphQL seamlessly integrates to your ProcessWire web app and allows you to serve the GraphQL api of your existing content. You don't need to apply changes to your content or it's structure. Just choose what you want to serve via GraphQL and your API is ready. Warning: The module supports PHP version >= 5.5 and ProcessWire version >= 3. Links: Zip Download Github Repo ScreenCast PW modules Page Please refer to the Readme to learn more about how to use the module. Original post starts here... Hi Everyone! I became very interested in this GraphQL thing lately and decided to learn a bit about it. And what is the better way of learning a new thing than making a ProcessWire module out of it! For those who are wondering what GraphQL is, in short, it is an alternative to REST. I couldn't find the thread but I remember that Ryan was not very happy with the REST and did not see much value in it. He offered his own AJAX API instead, but it doesn't seem to be supported much by him, and was never published to official modules directory. While ProcessWire's API is already amazing and allows you to quickly serve your content in any format with less than ten lines of code, I think it might be convenient to install a module and have JSON access to all of your content instantly. Especially this could be useful for developers that use ProcessWire as a framework instead of CMS. GraphQL is much more flexible than REST. In fact you can build queries in GraphQL with the same patterns you do with ProcessWire API. Ok, Ok. Enough talk. Here is what the module does after just installing it into skyscrapers profile. It supports filtering via ProcessWire selectors and complex fields like FieldtypeImage or FieldtypePage. See more demo here The module is ready to be used, but there are lots of things could be added to it. Like supporting any type of fields via third party modules, authentication, permissions on field level, optimization and so on. I would love to continue to develop it further if I would only know that there is an interest in it. It would be great to hear some feedback from you. I did not open a thread in modules section of the forum because I wanted to be sure there is interest in it first. You can install and learn about it more from it's repository. It should work with PHP >=5.5 and ProcessWire 3.x.x. The support for 2.x.x version is not planned yet. Please open an issue if you find bugs or you want some features added in issue tracker. Or you can share your experience with the module here in this thread.1 point
-
Yeah - I don't think init.php and ready.php existed when I wrote this. I guess the only advantage to admin.php is that it is only called in the backend, whereas init.php and ready.php are called in frontend as well. It won't make any significant impact on performance though, so whatever works for you.1 point
-
You could put it in your admin.php as I mentioned in that thread, or your ready.php if you prefer.1 point
-
I guess there's nothing more in the logs that you already wrote. Was it a ML site btw, and if yes, how any languages? Php version?1 point
-
I'm quite sure you will Actually it's a VERY important part of my RockGrid module. This makes building Grids (or Datatables, or "Listers" how we in the PW world would call it) a breeze. You just throw a $pages->findObjects() call to the grid and let it do the rest (sorting, filtering, pagination etc). Another usecase where this can really be a lifesaver is all kinds of data exports, feed generation etc. - It makes a huge difference to load 10.000 pw pages compared to executing an SQL and a quick php foreach. I'm working on the module again because it was too limited for my needs. I think I will come up with a good solution the next days! (And proper docs)1 point
-
I am not sure if I would ever have a practical use for this myself (at least not in the foreseeable future), but I must say it's a pleasure to see this project seeing the light of day. Kudos. For me, it's always a treat to see what people come up with using PW. Goes to show you never can tell. PW really is "not just another CMS", but a framework as well. Hope I find some time taking a test-ride with your module very soon...1 point
-
1 point
-
In PHP you have to use double quotes if you want variables (i.e. $page) to be parsed inside a quoted string. See: http://php.net/manual/en/language.types.string.php#language.types.string.parsing $doctors = $pages->find("template=staff-page,parent=1018,locations=$page");1 point
-
I see, forgot about that config setting in Tracy. Setting z-index: 1 for #tracy-debug looks like fixing the issue for the sticky header vs menus in Uikit theme, but I guess that would still spoil the Tracy config setting. Edit: I've removed the #tracy-debug z-index rule, I think the safest is keeping the navbar above all.1 point
-
Ok, here you go. It's simple. Create two files in your root directory gulpfile.js var concat = require('gulp-concat'); var uglify = require('gulp-uglify'); var gulp = require('gulp'); var jsFiles = 'lib/**/*.js', jsDest = 'dist/'; gulp.task('scripts', function() { return gulp.src(jsFiles) .pipe(concat('scripts.js')) .pipe(uglify()) .pipe(gulp.dest(jsDest)) }) gulp.task('default', ['scripts']); Please change the paths to your javascript files according to your needs. In my example every .js file under "lib" and its subdirectories are catched. You can also change the jsDest. This is where the concatenated file "scripts.js" will be stored. Create a package.json { "name": "gulp-simple-concat", "version": "1.0.0", "description": "", "main": "gulpfile.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "devDependencies": { "gulp": "^3.9.1", "gulp-concat": "^2.6.1", "gulp-uglify": "^3.0.0" } } Then run npm install Node.js has to be installed for this to work. But it is very common now for web-devs to have this installed. When npm is finished, just run `gulp`in your console/terminal. That's it. Now you have a concatenated and minified javascript file.1 point
-
1 point
-
His next post was definitely spam - links to shady site - he's blocked as a spammer now!1 point
-
I can confirm this and there is a similar issue with Lister's "refresh" and "reset" icon buttons, which are also partially covered by the standard "Sticky header" (I never used the Compact option besides testing it once upon a time).1 point
-
Hey @tpr - there is an issue with the z-index when using the fixed/sticky navbar option. Tracy's panels appear under the navbar even though their z-index is higher. Setting the z-index of the navbar to 0 is the only value that puts it behind the Tracy panels. I don't honestly know what the correct solution is, but position:fixed and z-index does seem to have some weird issues. Maybe this is useful? https://developers.google.com/web/updates/2012/09/Stacking-Changes-Coming-to-position-fixed-elements1 point
-
I knew you would ask Thats the screenshot tool Hm, never worked with gulp and don't think it would be worth the effort. Maybe it does not matter at all? Does anybody know of any real issues when loading a lot of files? Does anybody know at which number this "a lot" could be? I thought of a snippet that does a foreach and creates a file on the fly with file_put_contents. But the file would need to be different for all pages (thats how it works now). Hm... I could actually change that behaviour and create one single js and one single css file thats always loaded when any rockgrid item is available on the page. Since all the plugins load with eventlisteners this should work... I'll leave this on the ideas-list...1 point
-
Untested $doctors = $pages->find("template=staff-page,parent=1018,locations={$page->id}");1 point
-
Hey @bernhard - totally OT, but any ideas why the full Tracy bar is showing twice in your screenshot?1 point
-
Maybe you could provide a Gulp tasks file along the module which could be called and generate a rockdatatables.min.js/css.1 point
-
The error message reads like Memcached session handler is either unable to reach the server nfs01.cl2000.ams1.nl.leaseweb.net or to read from it. If you're on shared hosting, you should probably forward the error to your provider and let them take a look.1 point
-
Its the same features yes. Only the data space is limited. More info there: https://www.idrive.com/online-backup-plans-faq1 point
-
1 point
-
Hi, I enabled the four options on some websites, some with version 2.x, others with version 3.x (updated/upgraded several times), most if not all with the French language as the default one (and keeping the English one active in the admin), some with the multilingual modules and fields installed and/or activated, some without, some with fr/ added to the French urls, some without, etc. I'm not sure I ever made the Update image alt attributes work. Or perhaps once the first time I found it existed. I tried/tested a little the Link abstraction, I don't remember what the result was most of the time. I'll have to do it again. But a few hours ago, with a website updated recently to the last legacy Master (but the result was the same before), that is not multilingual (in the templates or in the backend) with the French language as default (and English kept as secondary), when I activated it and then saved a page, an internal link (via a selected page) in the CKEditor field had fr/ added to the url, which logically pointed to a 404 page. I had to deactivate the option to be able to have the normal url back after recreating the link (in order to be sure) and saving the page. I don't know where the fr/ comes from. Perhaps, the website was multilingual before and I removed all the multilingual things but there is a reference to /fr somewhere in the database. I don't remember for this particular website. I don't see/can't find any mention of fr in the current website's backend (and in site/templates/ neither). Concerning the last two options, I didn't have the opportunity/take the time to test them. So, it's a bit of a mystery. I don't know what is missing for the Update image alt attributes to work. And why the Link abstraction doesn't work correctly, at least in the mentioned website. Fortunately I didn't use the Apply HTML options now... (I'm not sure how many internal links were created via the existing CKEditor fields). And I tried not only in the body field, but also in other CKEditor fields. I would/will have to test again on a new/fresh installation.1 point
-
1 point
-
@nazim13 uhm, are you sure you posted in the correct thread? What you posted here seems totally unrelated to the original subject... (and also... two years later?)1 point
-
1 point
-
Sorry @flydev - I don't quite follow what you are saying there, but to clarify what I am seeing - once it hit's 10 packages for one site, none are deleted, so no more are uploaded unless I manually delete some.1 point
-
Thanks for the showcase! Two major UX issues worth noting: I cannot find a menu to navigate the site. On the home page I could not spot the language switcher as it is tiny and blends into the red line too much.1 point
-
The reason, after the upgrade of Plesk and PHP, by default the PHP setting session.save_path point to /var/lib/php/session and not /var/tmp where before he got r/w permissions (I don't know if Plesk was already installed or not before the upgrade). The final problem was not MySQL.1 point
-
I think it could be checked on the installation process, checking if these path are writable or not and thus sending a warning that potential session issue could arise. I can't tell you, I think nothing, but I never tried to install this CMS ?1 point
-
Thanks for sharing your video @Jonathan Lahijani! In case your interested, I added your technique to my "Techniques for flexible page layouts in Processwire" document https://docs.google.com/document/d/1peY-FUpevKgy87cKOxIVz8jwcv2-3c61zbiJr3QKO6c/edit?usp=sharing1 point
-
Or, even better since it avoids a roundtrip through the database, would be Pages::cloneReady, which is called after the page is copied in memory and before it is saved to the database. Usage is the same, sans the call to $newpage->save(). I'm using Pages::cloned in my module because I need the ID of the new page which is only available after it has been saved.1 point
-
1 point
-
Here is something I hacked together quickly for automatically adding new child pages to the pagetable field. This is only if you are using the page as the parent. It also handles deletion of items if they are trashed externally. I also disabled the internal check for orphans - because they have been automatically added already, there is no need for the "Children were found that may be added to this table. Check the box next to any you would like to add." option. I seems to be working great here, but please test carefully!! Add this to your admin.php file: wire()->addHookBefore('InputfieldPageTable::render', function($event) { $pp = wire('pages')->get(wire('input')->get->id); $ptf = $event->object; //remove pages from pagetable field if they were externally trashed foreach($pp->{$ptf->name} as $item) { if($item->is(Page::statusTrash)) $pp->{$ptf->name}->remove($item); } //add pages to pagetable field if they were created externally foreach($pp->children as $child) { if(!$ptf->has($child->id)) { $pp->{$ptf->name}->add($child); $pp->of(false); $pp->save($ptf->name); } } //reset orphans property so that we don't get a message asking to add new pages that are now already automatically added $ptf->setOrphans(new pageArray()); });1 point