Leaderboard
Popular Content
Showing content with the highest reputation on 03/14/2020 in all areas
-
I hope you are having a good week and staying healthy with all that’s going on with this Coronavirus pandemic. Here in Atlanta, they have closed the schools indefinitely, so I’ve got my kids with me during the work days for awhile, which started this week. That might slow me down with work and development here, but hopefully not too much. It might also take me a little longer than usual to respond to messages temporarily, as I get used to the new schedule. It’s a nice change of pace to have the kids home during the day, even if it slows work a bit. Thankfully everyone here is healthy and we don’t yet know of anyone being sick. But then again, nobody is apparently able to get tested for it, so who knows. It sounds like the whole world is dealing with this, I hope you and your families stay healthy and safe. I’m still working on the same client project I’ve been working on here for months, and of course doing it all in ProcessWire. This week the client project needed to do a lot with user-submitted comments, and I had to make a lot of major upgrades to ProcessWire’s comments system in order to accommodate them. Most of these upgrades are related to API improvements and making the comments field able to better handle completely custom markup for both comments and the forms to submit them. (Commit details). A couple new classes were added, and existing classes went through major refactoring. While there have been some nice API additions as well, there aren’t any breaking changes to the existing API, so it should all keep working as it always has. I’m not going to bump the core version this week because, as major as the additions were, I don’t think they will matter much to most existing installations, so there's little reason to upgrade for most. So I’ll continue plugging away here and save the version update for when there are some more things to share as well, hopefully next week. Thanks for reading and have a great weekend.6 points
-
For logged in users, name and email are already filled in automatically and have been for awhile. There is also an option where you can make them non-editable, so that a logged in user can't modify them for each comment they make. But if you want to pull them from something other than "name" and "email" (which I think might be what you were looking for), then the new classes would definitely make it a lot easier to customize, and populate whatever you'd like in there. Likewise to render a custom avatar or hide fields, etc. The custom classes should open up a lot of new possibilities.4 points
-
Thanks for the comments system upgrades. Any chance while you're still in that space that you'd consider taking another look at the enhancement this PR (https://github.com/ryancramerdesign/ProcessWire/pull/954) added so that logged in users don't need to fill out name, email fields etc? Thanks.4 points
-
Just wanted to put it on everyone's radar that VueMastery is having a free weekend starting today at (12 ET). All videos in every course are free to watch until Sunday at midnight. Cheers!3 points
-
Hey, we all make simple mistakes at times. No worries though. There are many members here that will gladly help you get your site up and running. [edit] You can edit your original post and add [Closed] to the subject line.2 points
-
Sorry for this amaterus mistake , you were right i totally forgot about those JS paths, i changed those css paths by adding "<?=$config->urls->templates;?>" before the path and css worked but i forgot to add it to those scripts too, sorry for making this thread i'll close it now hello by php changes i just splitted header, footer, body and sub-page to it's own .php files and including footer.php and header.php in home.php and sub-page.php, i also tried adding image fields but so far without a succsess. thanks for fast replies2 points
-
ProcessWire doesn't care about any of your frontend-assets. It's your job as a developer to put it all together and get the expected output. Looking at your site, I noticed that all JS references are wrong, i.e. the paths to your Javascript files are incorrect and therefore don't load. My guess is that some of these "CSS animations" aren't pure CSS animations, but actually triggered by those (missing) JS files. Adjust your CSS + JS paths, and put them somewhere in site/templates/ and it will work as expected. You can use pre-configured paths like $config->paths->templates in your .php templates, which will also work regardless if you are developing on localhost or a remote server.2 points
-
there is a thirdparty module available, that let you define different crops with absolute width x height sizes. It is called CroppableImage3.2 points
-
Hello @picarica and welcome to the forum. View the page source of your site and you will see a couple if issues. When you say you made php changes so it would work, what changes did you make? Are you sure you have the correct CSS files referenced in your header? Javascript files? You should not have any issues applying a 3rd party theme to processwire. It is actually fairly simple once you have your structure set up. Have you followed any of the tutorials for your site structure? If you are still having problems, then please post back here. We will need more information so we can better answer your questions.1 point
-
Well, that's in your HTML. PHP doesn't care about that, or even knows about it ? Set it somewhere in your template, at the top (if you have a multi-lang setup, you probably need to detect the user language first) https://www.php.net/manual/en/function.setlocale.php or globally in site/config.php1 point
-
That's great. I implemented it in the meantime. It was very easy, took no time at all. Great, seriously. Just a side question - is there a way to translate the name of the crop preset?1 point
-
@kunago, here a screenshot with the selections for a 1920x750 px variation and a mobile version of 960x750 px: The live site of this example is https://www.die-wurzen-studie.de/ , where all of those fullwidth images (1920x750 px) have a mobile version of 960x750 px for the smaller screen resolutions.1 point
-
Check /wire/core/ProcessWire.php. Version number is split into major, minor, and revision properties.1 point
-
then you can let this out. try it like this: $p->of(false); $title = trim($p->get('seo_title')); $title = $title ? $title : 'inherit'; $desc = trim($p->get('seo_description')); $desc = $desc ? $desc : 'inherit'; var_dump($title); var_dump($desc); $p->seo->meta->title = $title; $p->seo->meta->description = $desc; echo $p->save() ? " - 1" : " - 0";1 point
-
so you need to check that the fieldnames (your old fieldnames and the new ones) are adressed correct in the script part that came from Wanze. Also you can output the result of the save() method, for example by using var_dump($p->save());1 point
-
Hi, you need to remove my name from the check, if its a Superuser, who called the script. Please follow the comments in the script to adapt all parts to suit your needs, (selector, fieldnames, ...), and you may add some temporary checks when testing the script first time. AT FIRST, uncomment the //die('BREAK!!'); line, so that you only test with one page. (Script stops after first loop). Maybe this is already all what is to do. If not, come back and tell what is missing or has happened.1 point
-
1 point
-
Tip: How to "rename" an image field when the name you want to rename it to already exists I ran into a situation when I had two single-file image fields. Let's call them A and B. I didn't like the field name of 'A' and I wanted to give it a new name of 'B', but that field name was already being used in OTHER templates and had content populated. Therefore we need a clever way to rename A into B. With non-image fields this isn't a problem, but with an image field, there's files involved, so it gets a little more complicated. Admin Actions can handle this using the "Copy Content to Other Field" action. Set Source to 'A' and Destination to 'B'. The way it seems to be programmed is that it won't actually make a copy of the file (which is good because I don't want to duplicate the image), but instead it seems to copy the name of the file to the destination image field. Once the action has been run, if you view the a page using the template you applied to the action to, you will see that the image exists in both fields. DO NOT TOUCH THEM because whether you delete from A or B, it will delete in both fields. So now to complete this renaming, edit your template file and remove field "A". It will remove the field, but it will NOT remove the image, which is good. The end result is you now have image field 'B' with the contents from 'A', without having had to duplicate the image (meaning any references to that image will still be intact and not 404) and without ProcessWire having deleted the image when you removed "A" from your template. ?1 point
-
Just as a follow-up to the shortlinks tutorial posted yesterday: Jumplinks can also come in handy if you want to redirect ID-based URIs. This is a result of the Destination Selectors feature I added a while back, thanks to the suggestion by Macrura. The Process: Let's say you have a Journal located in the root of your page tree, named journal. Each journal entry is assigned to the journal-entry template If you want to redirect ID-based URIs to their named equivalents, create a new jumplink like so: Source: journal/{id} Destination: [[template=journal-entry,id={id}]] So, when requesting /journal/1078, for example, you'll be redirected accordingly to /journal/hello-world/. Of course, you could take this further, but this is just a basic idea. Might be handy for someone using Jumplinks.1 point