Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/24/2021 in all areas

  1. Hello! I wanted to share my latest website with you. https://www.reese-moden.de It's called "Reese Modehäuser" (beware! It is a german speaking website...) which loosely translates to "Reese Fashion Boutiques". A translator is not needed at all. The whole content is "picture-heavy" and there is not much text. I wanted to create a fashion boutique site that has a very crisp and clear look with huge magazine-like images that showcase the current fashion trends that are for sale. The page also features a simple blog/news system for posting new content. Because there are lots of large pictures I wanted to keep those loading times small. So the whole site makes full use of the processwire WEBP image support. In order to make responsive images in WEBP format available this site makes use of @nbcommunication fantastic PageimageSrcset module: https://github.com/nbcommunication/PageimageSrcset I can highly recommend this module! Nowadays everyone has an Instagram page. So I included an Instagram feed directly to the site, again with the help of @nbcommunication and his Instagram Basic Display Api Module: https://processwire.com/modules/instagram-basic-display-api/ This is another fantastic module which I am looking forward to use on other pages. Other modules I used on this site (als recommended): - AIOM+ (https://github.com/matjazpotocnik/ProcessWire-AIOM-All-In-One-Minify) for the compression of all JS and CSS files - Wiremail SMTP (https://processwire.com/talk/topic/5704-module-wiremailsmtp/) for sending mails. I am using a custom form builder system I created myself with some repeater fields. - Redirects (https://processwire.com/talk/topic/148-release-redirects/
    3 points
  2. I just realised I never showcased this site here, and it's a pretty one. https://clinicatrust.pt/ Clínica Trust is a health clinic in downtown Porto offering services on multiple medical fields. The website is a collaboration between Supertiny and Go Design (whose site is also PW, by the way). Go designed it, we built it. This was made some two years ago, and I just came back to it as we're back to working with this clinic on SEO, social media and marketing. Since we're starting a marketing effort for this client, recently we've refactored the specialties structure. Where initially we had a single page listing all specialties with a paragraph of text for each one, we now have dedicated pages for each one and profiles for each specialist. This will allow campaigns and posts to point directly to a specialty and create the necessary means for better ads and greater conversion. The scheduling form was also tweaked for better conversion tracking and improved UX, as now a user can request an appointment straight from a specialty/specialist page and have that info automatically carried over to the request.
    3 points
  3. Nikita Popov is about to leave JetBrains, which triggered the birth of the PHP Foundation in order to make sure there will be enough knowledgable and paid developers behind the PHP project: https://blog.jetbrains.com/phpstorm/2021/11/the-php-foundation/ You can even apply for such a position ;) (just bad joke...)
    2 points
  4. This should take care of the language change I am suggesting: if($this->wire('modules')->isInstalled('LanguageSupportPageNames')) { $out .= $this->renderSelectOptions($options); }
    2 points
  5. That is a good idea. Maybe I'll suggest that as an upgrade when we do a performance review. That and a search box. Initially this was very simplified, summarised in a single page with only a paragraph of text for each specialty. Very visual, but very little content and a bit hard to scan, as you had to scroll through a huge page to find the specialty you're looking for. But considering they'll start investing in SEM, that needed to change and have dedicated pages where users land from a campaign. Looking at how it's turned out now, a dropdown menu of sorts would certainly make it quicker to navigate. Good point.
    2 points
  6. I have updated the post to reflect this and also added the following:
    2 points
  7. Good ideas. I think both of the things mentioned (autosave only while live preview active) and some kind of obvious toggle/checkbox would both be good to have. I'll plan to add.
    2 points
  8. In preparation for testing of the initial (alpha/early beta) release of Padloper 2, I would like to gather expressions of interest. In the past, some of you expressed a willingness to help with testing. It has been many days since and your position might have changed. In addition, I would like to do this in an organised manner so we cover as much ground as possible. The grounds I’d like to cover are usability and technical aspects with a bias towards the latter. Please also note that there are a number of planned features that will follow the initial release. Hence, we shouldn’t focus much on those. These and similar thoughts will be added to a planned features list (more on this below). The main focus of this testing is to make Padloper 2 production-ready. In order to properly organise this testing, I will need to gather some information from you. I will be doing this via Google Forms. The most important detail will be your email address. I will need this in order to inform you how to access Padloper 2 as well as for other necessary communication. I will not use your email address for any other purposes nor pass it to any third-party ?. Other information to be captured in the form would be what areas of testing you will you want to be involved in and your preference for planned features (since I will need to prioritise them). Forms are better than plain emails in this respect. Please note the following if you wish to be involved in the testing programme: Pricing and subscription will follow the model I have previously stated (similar to ProcessWire Pro Modules). However, for the testing programme, your subscription period will NOT start counting down until after the production-ready release. You will still also have VIP support (please note the nature and location of this may change). To be fair to other testers, anyone joining the programme needs to actually spend time testing the product. If you won’t have time to do this, please wait for the production release. This initial release is NOT a production release. Although it may work for some in that regard, it will not be tagged as production-ready (hence the alpha tag). Licences will be the usual three: (i) Basic/Single Site Licence, (ii) Developer Licence and (iii) Agency Licence. I can explain the different between these three if anyone needs clarity. The initial release will have the introductory prices of €150, €300, €900 for single, developer and agency licences respectively. Cooling period will be 14 days (within which a full refund can be requested, no questions asked). Please note that this time period may change for the production release. Here is the link to the Google Form to express your interest in the testing programme. The form will close in 10 days. Many thanks for your patience. Hope to see you soon in the testing programme. I trust you will enjoy Padloper 2 as much as I have had the pleasure (and honour) of developing it ?.
    1 point
  9. Re: this, it seems to be because constants declared using define() do not respect namespace unless explicitely specified. One solution though seems to be to replace define() by const declarations. I'll try to do that tomorrow (also what you suggested is done but I want to also fix this first).
    1 point
  10. Is this still the case ? I changed the way I import the library by putting it in the __construct rather than outside the class. Also it's weird because in Ryan's case its class is namespaced "Processwire\TfaTotp" so there shouldn't be conflicts ? Or maybe I should use a namespace as well ? Thanks for your suggestion. I don't see any issue to adding this, I'll let you know once it's done. Maybe it's something to keep in mind to allow to say which language to output from the "source" config input, something like "httpUrl.default" (opening the way to other ways to narrow down what to output for files/images but I'm already getting too far ahead...)
    1 point
  11. Annnnd I found a tiny bug where there was no output if a source was empty... new release published!
    1 point
  12. I just published a new release of the Fieldtype and updated the original post with a copy of the README. I think it's pretty complete at this point: you can output several QR codes by specifying the sources in the field's config (limited to httpUrl, editUrl and PageFiles/PageImages fields), it supports multi-languages by outputting as many QR codes for httpUrl as there are languages (only those visible to the user when output in the front-end), there is now a static function to generate any QR code you want and there are several functions you can hook at to adjust according to your needs. Let me know if you notice anything strange or a bug!
    1 point
  13. Great read! Thanks @szabesz. Hopefully we get this right. We can learn a lot from Apache, both what ASF have got right and the things they didn't get right. I loved this one ?:
    1 point
  14. Hi @Marco Ro. I have read this several times and I am not sure I understand it all. Could you please explain what you mean by a php page? Do you mean a PHP file? Secondly, what module is this? Is this a custom module you are developing, e.g., /site/MyModule/. Is it perhaps a Process Module? If so, by page, do you mean executeSomePage() in your custom Process Module? Are you talking about two servers talking to each other? How are you fetching the JSON? Are you accessing some API endpoint? Are you fetching the JSON using CURL? By 'another API call', do you mean a different (third) server? OK, this means whatever is trying to access your file inside your modules folder is forbidden to do so, which is expected, but dependent on where the call is coming from. I think if you could provide some code, illustration or clarifications to the above questions, we would be better placed to assist.
    1 point
  15. I agree that some sort of on-the-fly option to opt out of autosave would be essential. One option is what you suggest ("PageAutoSave O N L Y when in PreviewMode?") but maybe an on/off switch would be nice to have too (next to the page title or something like that). So I am thinking of not just one way to opt out temporarily but more than one way to suit "all needs". I do not have the time to test the autosave feature, so I cannot be more specific but the issue you are facing sounds quite reasonable and that is why I commented on it ;)
    1 point
  16. Right now it's broken ? hopefully I'll have it fixed real soon. My initial approach is this: https://heldercervantes.com/tiny-cookie-consent/ On PW's side, I just have a field where you enter the analytics and other scripts. But when this is rendered on the page, some replacements occur that make sure the scripts don't run. It's a matter of replacing stuff like `type="javascript"` to `type="text/plain"`, or renaming the src attribute to data-src. Then I have a JS on the consent popup that when the user clicks the accept button the `type="text/plain"` is reverted and the block is added to the page again, starting the script. When it starts, my script also checks if a `cookieConsent` cookie is set to 1 (this is set when you accept cookies). If it is, the scripts are activated automatically on page load and the popup doesn't show again. But anyhow, there's a flaw in this approach for sites that run ads. If there are ads campaigns pointing to the site, not firing the scripts at all means no stats and no conversion tracking. This is unacceptable if you're running ads, so right now I'm rebuilding this as I move to GA4 and consent mode. I'm experimenting on myself before implementing this on clients.
    1 point
  17. Hi @Stefanowitsch, I'm always using UIkit when developing so either make use of the Image component which has background image srcset functionality, or if using the <picture> element functionality of this module, I use the Cover component. Cheers, Chris
    1 point
  18. This can be used to avoid sessions on the front end, or on some pages. (And allow them for the admin, where it is needed) You should check this site in regard of its GDPR rules / announcements. (In regard that you not now has enabled sessions where it should not be.) 0400 is better == more secure. If you need to update the site/config.php in the future, you THEN can set it temporary to 0600 for your changes, and directly afterwards back to 0400.
    1 point
  19. There is some code and some links to explore in this post:
    1 point
  20. Where do i get? From here: https://github.com/IDT-media/Pages2JSON (thanks to LostKobrakai for "bug" report) What does this do? Simply adds method toJSON() to Page and PageArray elements, is capable to converting image and file arrays to URL containers, travels recursively all objects before outputs actual JSON. How to use? Simply install this module, configure data you want it to export in JSON result (similar to Ryan's ServicePages, thanks btw used some of ur code here). in templates or anywhere you need JSON output, call: $page->toJSON(); or $pages->toJSON(); Live example with template: search.php /***************************************************************** Do search *****************************************************************/ $term = $sanitizer->text($input->term); $results = array(); if($term) { $input->whitelist('term', $term); $term = $sanitizer->selectorValue($term); $limit = (int)$input->limit; $limit = $limit ? $limit : 50; $limit = $sanitizer->selectorValue($limit); $selector = "title|categories|content*=$term, limit=$limit, template=default|product"; // Prevent admin pages. if($user->isLoggedin()) $selector .= ", has_parent!=2"; // Find pages that match the selector $results = $pages->find($selector); } /***************************************************************** Output *****************************************************************/ header("Content-type: application/json"); echo $results->toJSON(); exit(); Customizing values: if(wire('config')->ajax) { wire()->addHookAfter('Pages2JSON::getValue', function($event) { $value = $event->arguments(0); if(!is_object($value)) return; $page = wire('page'); if($page->template == 'thumbs' && $value->className == 'Pageimage') $event->return = $value->size(28,28)->url; }); } Here i swap URL of all Pageimage objects in JSON response to match thumbs. Simple hu?
    1 point
  21. Here are links for a few different approaches to the general question: https://github.com/LostKobrakai/Paginator https://gist.github.com/somatonic/5420536 https://processwire.com/talk/topic/5558-adding-pagination-after-merging-two-pagearrays/?do=findComment&amp;comment=54122 And my own suggestion: // Find all the matches, but only find the IDs to reduce memory overhead $matchest = $pages->findIDs("title~=$q, template=BN-article|BN-infopage"); $matchest_str = implode('|', $matchest); $matchesb = $pages->findIDs("body~=$q, template=BN-article|BN-infopage, id!=$matchest_str"); $match_ids = array_merge($matchest, $matchesb); // Define some pagination settings $items_per_page = 10; $start = ($input->pageNum - 1) * $items_per_page; $total = count($match_ids); // Get the IDs for this page of the pagination $item_ids = array_slice($match_ids, $start, $items_per_page); // Get the pages using the IDs $items = $pages->getById($item_ids); // Apply the pagination settings to the pager $items->setTotal($total); $items->setLimit($items_per_page); $items->setStart($start); // Output the items as needed foreach($items as $item) { echo "{$item->title}<br>"; } // Output the pager echo $items->renderPager();
    1 point
  22. Hi, I am trying to create a frontend form that allows the user to create a page with a specific template (and fill out the fields) I have started to use code from this post This is my current code <?php $p = $pages->get(1029); $template = $p->template->name; // this is the template where we will get the fields from // make a form $form = $modules->get('InputfieldForm'); $form->method = 'post'; $form->action = './'; $form->attr("id+name",'subscribe-form'); // add the page's fields to the form $fields = $p->fieldgroup; foreach($fields as $field) { $inputfield = $fields->{$field->name}->getInputfield($p); $form->append($inputfield); } // add a submit button to the form $submit = $modules->get('InputfieldSubmit'); $submit->name = 'save_service'; $submit->attr("value", "Go"); $form->append($submit); // process the form if it was submitted if($this->input->post->save_service) { // now we assume the form has been submitted. // tell the form to process input from the post vars. $form->processInput($this->input->post); // see if any errors occurred if( count( $form->getErrors() )) { // re-render the form, it will include the error messages echo $form->render(); } else { // successful form submission $np = new Page(); // create new page object $np->template = 'service'; // set template $np->parent = $pages->get($user); // set the parent $np->of(false); // turn off output formatting before setting values $np->save(); foreach($np->fields as $f) { $np->set($f->name, $form->get($f->name)->value); } $np->save(); //create the page echo "<p>Page saved.</p>"; } } else { echo $form->render(); } And I am getting this error, I can't figure out what it is. Error: Exception: Unknown Selector operator: '' -- was your selector value properly escaped? (in /home/dev/public_html/wire/core/Selectors.php line 396) #0 /home/dev/public_html/wire/core/Selectors.php(439): ProcessWire\Selectors->create('41', '', '') #1 /home/dev/public_html/wire/core/Selectors.php(159): ProcessWire\Selectors->extractString('41') #2 /home/dev/public_html/wire/core/Selectors.php(145): ProcessWire\Selectors->setSelectorString(Object(ProcessWire\User)) #3 /home/dev/public_html/wire/core/PagesLoader.php(217): ProcessWire\Selectors->init(Object(ProcessWire\User)) #4 /home/dev/public_html/wire/core/Pages.php(232): ProcessWire\PagesLoader->find(Object(ProcessWire\User), Array) #5 /home/dev/public_html/wire/core/Wire.php(383): ProcessWire\Pages->___find(Object(ProcessWire\User), Array) #6 /home/dev/public_html/wire/core/WireHooks.php(698): ProcessWire\Wire->_callMethod('___find', Array) #7 /home/dev/public_html/wire/core/Wire.php(439): ProcessWire\WireHooks->runHooks(Object(ProcessWire\Pages), 'find', Ar This error message was shown because: you are logged in as a Superuser. Error has been logged.
    1 point
  23. My wife kindly asked why it isn't possible to type tabulators in an inputfield. Here is the answer: Inputfield which allows using the tab key to write tabulators in an Inputfield. Disables switching field focus functionality of the tab key. Use the mouse to get to the next input. Against some principals module doesn't respect minimum accessibility guidelines. Download from github https://github.com/kixe/InputfieldTextareaTabKey Tested in Firefox and Safari on Mac.
    1 point
  24. Sorry, but can we please remove this site (https://reached.space) from the showcase? I have been running it for 3 years now, but sadly it has not done as well as some of my other sites and I haven't had as much time to devote to it as I would have liked. I have therefore had to make the difficult decision to shut it down in the next few weeks. From about 30 days from now it will no longer be running, and the domain name will no longer be in my control.
    0 points
×
×
  • Create New...