Leaderboard
Popular Content
Showing content with the highest reputation on 01/23/2017 in all areas
-
Last update: June 2024 Current stable version: 1.5.4 Dev version: github dev-branch You can find the module on Github and in the modules directory : https://modules.processwire.com/modules/duplicator/ https://github.com/flydev-fr/Duplicator/archive/master.zip Screenshots / Features Dir and files exclusion CRON job Advanced settings Local and Cloud storage duplicator.mp410 points
-
6 points
-
It's weird, I was also about to start on something very similar, but also just recently noticed @rot's module, and now yours. @rot has been quiet here for a couple of months, so it would be good if he could confirm his intentions with updating his module. If you are close to being functional, it would be great to test both to figure out the differences in feature set.3 points
-
@kongondo Ok, I'm going and get a coffee EDIT: @OpenBayou Try this code <?php $deal_items = $pages->find("deals_show_on_endorse={$page->id}");?> <?php foreach($deal_items as $deal_item) : ?> <?php echo $deal_item->title;?> <?php endforeach; ?>3 points
-
+1 Since @rot does not seem to have enough time to work on his module (he can correct me anytime... ), I think it is quite reasonable for you to finish and maintain this module of yours. I would also be happy to use it, and share my findings about how it performs, etc.. meaning "testing it".3 points
-
Hey flydev, Looks great. How far have you developed this? The other module is at the very least beta software. I've got it running on several websites and it is running quite fast and smoothly. On the other hand I think there could be improvements. Perhaps you could join forces? Your modules both have the same goal. If you need help, I'm happy to help in any way.3 points
-
To be honest, although that thread shows you how you can use the PW API to create (read, the HTML) forms, 'a basic (or non-basic) PW form' does not exist; You need to create a HTML form and use ProcessWire to process that form. It is that simple. OK, back to crux of the matter; how to handle user registration from the frontend. There are several issues/steps here: How to create the form (simple; use a HTML form) Where to post that form (i.e., post to the page where the form is displayed, or post to another page) How to handle spam + cross-site forgery How to handle double registrations Feedback to the user once form has been submitted How to deal with errors/validation - client and server-side How to process the form inputs on the server-side (including sanitizing inputs) How and where to save form inputs How to send confirmation email Tackling above: Create Form: This is simple. Create your HTML form in a template file. I suggest using 'post' for method and action to post to self, i.e. './' Post destination: I've suggested posting to self, but you can use some other URL (i.e. an existing page). Spam: I suggest using a honeypot or double honeypot AND CSRF (see $session->csrf). Please Google this forums for examples. If I get time to do this I'll update this post. Double registrations: You would need to check submitted email against saved emails. User Feedback: Some people prefer to redirect to a different page with a thank you message, others reload the same page but don't show the form, just the thank you message. Up to you. If redirecting, see $session->redirect(). Errors + Validation: I suppose you know how to deal with client-side validation. Server-side, you will use $input->post; Use that to check if all required inputs sent; Use $sanitizer to sanitize inputs, e.g. $sanitize->email() for emails. Process Form: See #6. Save Guest: This depends on how you want to save guests. Do you have an external database? Then make use of $database. However, I would go for pages, whereby, each registration is a page, tucked away under some parent page. The title of the page could be the guest's full name and the email would be saved in an email field. This means a template with two fields; title and email. Confirmation Email: See WireMail. Sorry, it's getting late here and cannot give you specific examples. Hopefully the above will give you some food for thought. Happy to provide more details later if you get stuck. Others may chime in too, so, you should be alright :-). ps: If you will be dealing with forms a lot, I recommend investing in Form Builder.3 points
-
Hello everyone, I've been fiddling around a lot lately with docker containers for my local development on a linux machine. Tried many different options, also readily available processwire images and tutorials from the forum. But never got it right. Mainly because of permission issues with docker volumes. That is a tricky part on linux machines whereas on OSX it doesn't seem to be an issue. Then I discovered http://www.wordpressdocker.com/. And the setup with nginx as a proxy that routes requests to separate containers with the actual site install appealed to me. The whole thing sits on top of alpine linux containers which are really lightweight. So I decided to give it a try. And, first time since experimenting with docker, I got a running PW install. Rewriting was not working until I adjusted the nginx config. Now I have a fairly complex PW site running in a container. Everything is working, image upload/editing etc. So I'm really exited, especially since the dev site is now blazing fast compared to my old vagrant virtualbox vm setup. Honestly, I don't really understand everything that is happening behind the scene. But I managed to adjust the original files and build a new image that works with PW and doesn't have all the WP stuff. The nginx config I took from https://github.com/elasticweb/nginx-configs/blob/master/configs/processwire-2.conf Not sure if it covers everything for PW3 as well. I would very much appreciate if someone who is more in the know than me could take a look. All files for building the docker image are here https://github.com/gebeer/alpine-php-processwire A working image here: https://hub.docker.com/r/gebeer/alpine-php-processwire/ Documentation is kind of lacking. I took over quite a lot from the original project. But following the github README and the original documentation should get people started who have a little experience with docker already. If someone needs a more in depth step by step tutorial for setting things up, let me know and I'll put something together.2 points
-
Thanx @clsource ! I will as soon as i manage to publish it first! Regarding updates i am not thinking of providing any special update strategy. New versions will have the latest database & files and list with all the files that have changed. See ya2 points
-
Great work! I think this module could be very handy. And I think if your module has other options than @rot's module you can release it. But if it is exactly the same, I don't know what solution would fit this situation.2 points
-
Maybe you can show us what you've tried? I just copied/pasted Soma's example and the core of it stills offers a starting point for using PW core inputfields in custom forms. Here's how the result looks: This is with the code Soma gives for the form and the head.inc which he gives in the mentioned thread. You'll have to make it functional for your needs but it gives you a starting point.2 points
-
Loving my host so much -- they automatically enabled LetsEncrypt for every single one of their clients on shared and reseller hosting with automated renewals. Interesting thing is that they didn't announce it or place a readme in the skeleton directory for new accounts. Nonetheless, it's there, and it works really well. All I have to do is force HTTPS. ??2 points
-
It seems to me that $page->author is referencing a single Page and thus not an PageArray you can loop through, please check the author field configuration, on the Details tab of the field, you can select the field type value. Also, I don't see any other difference rather than having (to my opinion) a better organised code base with the render() function. For example, you could keep your publication.php containing only the markup that makes up an author, and do the render() inside the loop. Another way I have found useful is to use wireIncludeFile() which accepts a second parameter which could be the actual author page found by a selector in case I don't want to actually assign a template file to a template.2 points
-
Why not? Seems like a paragraph tag is the appropriate markup for a paragraph of text.2 points
-
Purchasing a dev licence for Form Builder is a no-brainer: if you place a dollar value on your time you will quickly realise that after only a small number of forms it has saved you $$$.2 points
-
Been using lets encrypt for a number of months now. Just note the date so you can re issue the cert before it expires. In htaccess on lines starting at 90 is where you set https.2 points
-
That's coming from ProcessWire's file compiler; it is not a bug on Blog's side. Try clearing your file compiler cache to see if it solves the issue.2 points
-
Good day! Looking at @ryan's wonderful documentation I am trying to document my code better. Of course the main standard is phpdoc. I think that is what is mostly used in PW core code and almost everywhere in php world. But phpdoc only standardizes commenting only some elements, like variable definitions, classes, methods. As I write a lot of procedural code in template files I need to document code parts which are not supposed to have their DocBlocks by phpdoc standard. So I am looking for recommendations/standards how to write those. I guess there should be some distinction between simple multiline comments and phdoc DocBlocks. Maybe something to consider about IDE integration or something like that. What I found so far is these (seemingly) phpdoc non-compliant comments in new skyscraper profiles, and these Wordpress recomendations. If you got any thought and/or links on the topic, please share!1 point
-
Does it make much sense to use isotope in this case? When one resizes the browser the isotope animation looks cool, but users rarely do it and other than that kinda pointless, or is it just me? Or am I missing the point?1 point
-
really strange. I get missing .js (made with AIOM module) now and then which is why its blank, as isotope only triggers when all images are loaded using imagesLoaded mmm...1 point
-
Just an idea: use PageTable. Maybe use a template for artist that has Artist_firstname and Artist_lastname, etc. Then, a pageTable called Artist_pageTable that uses the artist template. Also, create a template called Artist_works with the associated work fields, including the Artist_works_inventory_no. Then create a pageTable called Artist_works_pageTable that uses the Artist_works template. Since everything's a page, you could do this: $pages->get("template=artist,Artist_firstname=$firstname,Artist_lastname=$lastname")->children("Artist_works_inventory_no=1")->count();1 point
-
No worries. You are just trying to help . @MaryMatlow, what @adrian said. I've been testing against 3.0.42 and Blog seems to work fine. If upgrading doesn't fix the issue, we'll focus on autoload modules.1 point
-
There have been significant changes to the File Compiler since that version. I would recommend the latest dev version - 3.0.50 It may not be related to this issue, but it shouldn't hurt!1 point
-
Nice design! Thanks for the showcase. I find it a bit hard to navigate though. One opens a slide show at the bottom of the page (for example), but after closing it we are left at the top, so to check out all the photos one has to jump back and forth a lot, or am I missing something? And the /projects/sid-magazine/ slideshow starts with a different photo (different from the one we click on as a preview). At first I was confused. Another thing is Isotope: switching between ALL and COMMISSIONS swaps some(?) photos in the middle(?). I can only only see the top of three photos changing. What happens actually and why?1 point
-
1 point
-
Actually not a good idea to do that . I made a decision not to namespace my modules (am the author of the Blog module) to instead let the compiler do its work. If @MaryMatlow did that, any changes will be overwritten by the next Blog update. There's something going on with this install which I'd like to get to the bottom of. @MaryMatlow, could you please confirm the ProcessWire version that you are running? (down to the 3.x.x please). The only difference between that module (in the Blog suite of modules) and the others is that BlogPublishDate is an autoload module. I haven't received any other similar reports from other Blog users, which makes me even more curious.1 point
-
Your first error is a Compile error -> Check if there is a namespace in that file called processwire. If not then add this: <?php namespace Processwire; ?> For the 2nd error, I don't know at the moment... Are you 100% sure you have the right id's for your pages and everything in your wire folder of processwire is correct? Because for me the wire('pages')->get(pageid) works normal... ~ Harmen1 point
-
I know code syntax choices can be a personal thing, but take a look at how much simpler this version is to read: foreach($pages->find("deals_show_on_endorse={$page->id}") as $deal_item) { echo $deal_item->title; } or if you want a one liner, even this: foreach($pages->find("deals_show_on_endorse={$page->id}") as $deal_item) echo $deal_item->title; PS - not judging here, just want to make sure you are aware of other options. I am not sure if you are just new to PW or also new to PHP.1 point
-
@kreativmonkey - I would also recommend upgrading the to latest stable, if not the latest dev. 3.0.4 is very old now and there have been many bug fixes and especially, lots of improvements to the file compiler.1 point
-
Oops. Pure coincidence; I'm not on your case or anything, ha! .1 point
-
What @gebeer said. I'd be surprised if that solved your problem though since this line: <?php $deals_item = $pages->get("deals_show_on_endorse=$page->id");?> fetches one page, meaning the foreach in the next line makes no sense.1 point
-
Thats because of the s in <?php echo $deals_item->title;?> It needs to read <?php echo $deal_item->title;?>1 point
-
1 point
-
It's the language choosen for that user in the backend. For non logged-in users it's the language of the guest user.1 point
-
Thank you for all your responses. kongondo's response in particular was really helpful in focusing my attention. szabesz, I have been working on a front-end user registration system as well, have been following that thread: I am now trying to wrap my head around the basics of forms in PW; a generic form, just getting some data submitted to a database. Isn't Soma's thread/example mostly about rendering the form through the API, input fields etc., not so much about how the data gets processed? If it is possible to just use a plain html form in a template, I'd like to start there. The main thing I need to understand today is how to process the data from the form, how to get it into the database via PW. I'll follow up when I have tried some things... Ryan gave a very clear explanation of how to work with the database in Processwire: BTW, apologies for my dumb questions. I also use these threads to keep track of my own "research" and hopefully that will help others in the same situation.1 point
-
Just do it Kongondo! I would have bought it directly. It would have saved me a lot of time for the project I'm going to work.1 point
-
1 point
-
So I understood that right. I think what I provided should work, of course you have to put in your own field names / variable names. Though, I just saw that I had an error in my code above (the variable in the if condition was wrong). I corrected it - you should try it again - Maybe also try this selector with $page->id "deals_show_on_endorse={$page->id}" But as I remember right this shouldn't be necessary.1 point
-
maybe this helps for further research: otherwise, also mentioned there as a quick and somewhat dirty hack: <?php echo str_replace(['<p>', '</p>'], ['', ''], $page->summary);1 point
-
I spent way too much of my spare time with trying to produce an overly complex site backup module. Anyway - it is here in a pre-release state. I somehow have to get rid of the monster. Features: Use Storage Providers There are two base classes for Storage modules and three reference implementations: Remote Storage Driver This is a baseclass for construcing plug-in modules that allow to send data to a remote storage. You need to extend all abstract functions: connect, disconnect, upload and getConfigFieldset Implemented Examples Storage Mail Sends a backup as mail attachment. If the file size exceeds a set limit it will get split. It uses PHPMailer library as WireMail does not support attachments. @todo: For now this mails all in a single smtp session - maybe thats not so safe? Remote Directory Driver This is a baseclass for construcing plug-in modules that allow to send data to a remote storage and list and delete old files. You need to extend all abstract functions: connect, disconnect, upload, find, size, mdate, delete and getConfigFieldset. Implemented Examples Storage FTP Allows to connect to an ftp server and upload, list and delete files. Uses standard php ftp functions. Storage Google Drive Allows to connect to google drive server and upload, list and delete files. Uses the php google api. You have to create a Service account with the google developers console and add the key file to the plugin directory (or another directory if you specify a relative or absolute path to that file). s. https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount I don't use the OAuth token process because it is not more secure. Once there is a renew token (which is necessary to avoid user interaction) it is as powerful and insecure as a keyfile. It is just more complex as it needs a callback url for registering. @todo? In case you can prove otherwise I will implement the callback registration. Run from the web or the command line It's allways better to have a regular cron job running. But sometimes you might need webcron Command Line You just need to call backup.php with the id of a backup job and it will be run Web Cron There is a token that starts the backup job from the web if passed as a url parameter. You can specify whether you want logging the http stream or not. You can also specify whether you want a job to be repeated within a certain timespan. This is for using unreliable webcron services by hitting the backup multiple times. @todo Consider integration of cron.pw @todo I use the init function of an automatically loaded module as a hook. This seems a bit strange. Is there better ways to do that? Log to mail, file and admin You can recieve logs by mail (on success or failure), log to a file and see log in a an admin page: Configure I built a admin interface that - besides the log viewer - features a list of jobs: and an editor for the job (which is too extensive to be described in detail): Dicussion I am not too sure on how to solve the issues indicated with @todo. My main concern are the hooking (init of an autoload module for the moment) and locking (none, no singleton for the moment). As for hooking I only know of the alternative of using a page where one would have (afaik) to use a special template as the admin template is secured or hook into the security functions (which would probably call for a singleton module). Concerning the locking issue I think it might be good if the Admin Class would lock if it is updateing something. For the moment this is the same class that runs the backups thus it would also lock the admin if there is a backup running. And it would lock the whole site if it is on autoload (as I use the init hook). Lastly I should reconsider the logging and maybe try to better integrate it with processwire logging. I would appreciate comments and suggestionsn on these issues. I appreciate your test results. Don't be took frutsrated if something goes wrong, this is at an early stage but afaik it should be running. Please find the modulle on: https://github.com/romanseidl/remote-backup1 point
-
<?php // on endorsement subpage $thatRelatedDealsPage = $pages->get("show_on_endorsements=$page"); if($thatRelatedDealsPage) { echo $thatRelatedDealsPage->title; // etc ... } Something like this? I assume: On the deal page you select the endorsement in a PageReference field - and then on the endorsement page/template you can just search which page has "this page" (= $page) selected in that field. hope that helps1 point
-
Have been doing some work on v2, Currently, the new manager looks like this the image below. Descriptions: I've opted to show the optional descriptions underneath the source, and there will also be an option to not show them if it starts looking too cluttered. Originally, I'd said that they should be shown to the side of the source, but that makes it difficult and tedious to prevent datatables from running of the side of the page. With that said, my recommendation is to only use descriptions where they are really necessary -- like if you need to use the description for the purposes of searching a large data-set and you can't remember the source. At the end of the day, this feature won't be used my many and, for those who don't use it, it won't get in your way. Parameter Highlighting: You'll also notice that parameters in the jumplink destinations are now highlighted - this makes it easy for those who don't know 100% what's going on (like someone who has taken over a site) to learn quickly (tooltips provided). This feature can be disabled, though I'm not sure if it should be disabled by default. Please vote in reply -- if there's no feedback, I'll leave it enabled by default. Lastly, I don't think it's necessary to highlight source parameters (too flashy), but I do plan to add a slight underline to those for the purposes of tooltips, which will only really be handy for aliases such as segment. Slug alias: Speaking of aliases, I've added a slug alias, which strictly captures parts of a URI that are slugs; that is, a word, optionally followed by a single hyphen, rinse, repeat. Segment, however, is not strict and allows any amount of consecutive hyphens. In the new documentation, I'll recommend the use of slug.1 point
-
Just want to give a big thanks you to the processwire team! And all the hard work that has gone into the PW this year! Really grateful for how well this project has been developing and how much thought and handwork goes in behind the scenes. I am really looking forward to those native import / export features! As far as JavaScript rest $page API's goes you might also want to look into a GraphQL implementation, it seems like an ideal way to cut down on the network chatter for headless CMS's, and is becoming an emerging standard. also see:1 point
-
Hi @MaryMatlow, Same way, really. renderPosts() takes 3 arguments, the third of which is $options. Since you need to pass in the 3rd argument, in blog-post.php, line #56, you also have to specify the second argument like so: $options = array('post_comments'=>0); $content = $blog->renderPosts($page, false, $options) . $blog->postAuthor() . $renderComments . $blog->renderNextPrevPosts($page); The 'false' is the second argument. The post will be rendered in full since what that says is that $small = false.1 point
-
I'd like to contradict. The admin themes we have really need a css overhaul and cleanup (and maybe docs), but a prebuild framework is in my opinion not the way to go. Because it's not developed internally every special usecases the admin does have will feel like a hack to the framework. Framework + custom workarounds will always be bigger (more code / more maintainence) than a customized solution. It's also a matter of branding. True, one can add custom colors to UIKit, but in the end it's probably still noticable enough that it's UIKit. Also consider all the markup in core and 3rd party modules, which are needed to be supported the the admin theme. I doubt any prebuild framework is bendable enough to support that level of custom markup coming from our side.1 point
-
Hello @franciccio-ITALIANO, the CKEditor is not poor, you just have to read the instructions. There are plugins available for color and align. In case of the color, in my opinion, I find the default behavior of stripping out inline styles preferable and much cleaner to define your own styles. Regards, Andreas1 point
-
In this case, Google recommends just in the head, or after the opening body tag:1 point
-
1 point