Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/13/2019 in all areas

  1. This is a website for the musical area of the protestant town church Pforzheim, Germany. Our agency designconcepts developed a website that provides informations about the choirs, ensembles and orchestras as well as dates for their rehearsals, services and concerts. The website was build with help of the framework UIkit. www.musik.stadtkirche-pforzheim.de Features: Events Download dates Events The events for rehearsals, services and concerts were created in Microsoft Excel and then imported as pages from CSV. For better organization, events are cross-referenced with choirs, ensembles and orchestras. Services and concerts are displayed in a events list, but rehearsals are only displayed on the page of the choir, ensemble or orchestra, to make the events list more compact. Download dates It is possible to download every event date as ICS file, which will be generated on clicking the download button. You can then add this event easily to your calendar app and stay up-to-date. Modules used: Email Obfuscation (EMO) Front-End Page Editor Import Pages from CSV Markup Sitemap XML ProCache Tracy Debugger Upgrades Wire Mail SMTP Regards, Andreas
    5 points
  2. Hi @Robin S, thanks for your help making the module even better and more useable. I think I found a good solution to fullfill both requirements. With version 1.0.2 you can choose in module's configuration wether the fields should be added globally or only to selected templates. You can choose the templates via ASMSelect, if the checkbox is unchecked. I do check wether the fields were added manually in the template as well, and check the template if all fields were found. I actually find my solution with checkboxes more understandable for normal users. If you uncheck the option "Activate Releasetime from?", it is very clear that the no releasetime is active. If I'd use only the datetime fields without checkbox, I would at least add a notice that gives a hint about the possibility to leave it blank. Of course it's a trifle, but I've worked with customers who would otherwise have had queries about it. I've heeded your advice about explaining selectors in the documentation. For convenience, I added a constant with the selectorstring that is needed to filter unreleased pages. To filter unreleased pages, add the PageAccessReleasetime::selector to your selector: $onlyReleasedPages = wire('pages')->find('template.name=news, ' . PageAccessReleasetime::selector); I thought about manipulating the page's status to achieve this without adding a custom selector part to each query, but I haven't found anything useful yet. Extending the selector seems to be the best solution at the moment. Thanks again for your support! ?
    5 points
  3. Hello there! I wanted to share my new proect with you. It's a small online shop for a local wine dealer: https://www.weinmarkt21.de/ Beware, the site is in german language. I used PW 3, Bootstrap 4 and a very few modules for this site. For the whole shop system I used the Processwire shop module Padloper exclusively. Developing in Processwire was a breeze as always. However I had to put some work into the Padloper stuff to make it fit to the needs of my client. It's a vey good base to start with but you should bring a bit of developing experience with you.
    4 points
  4. Gallery Claeys is a art gallery in Freiburg, Germany, with focus on exhibitions of female artists. Our agency designconcepts developed a website that features the latest exhibitions of the gallery as well as an archive of previous exhibitions. Every artist has its own page with an excerpt of their works and a vita of the artist. The website was build with help of the framework UIkit and Barba.js for smooth transitions between pages. www.galerie-claeys.de Features: Exhibitions Page transitions Exhibitions On the homepage you can find a preview of upcoming or current exhibitions as well as an archive of previous exhibitions. Based on the date the exhibitions get automatically sorted in one of the three categories (preview, current or archive). Each category has its own deep-link with URL segment. Page transitions The smooth fading page transitions are made with Barba.js. Modules used: Front-End Page Editor Markup Sitemap XML ProCache Tracy Debugger Upgrades Regards, Andreas
    4 points
  5. Not sure if it gets exactly what you want, but I think @Robin S's Breadcrumb Dropdowns are the best thing ever ? http://modules.processwire.com/modules/breadcrumb-dropdowns/
    4 points
  6. There is discussion on this topic here: https://github.com/processwire/processwire-issues/issues/22
    4 points
  7. In case anyone is researching this topic, I can attest that this works beautifully on a live site! It was such a smooth and painless process! ?? I used Diogo's advice to go from Wordpress to Processwire on a site that I wanted to switch over. I had less than a minute or two downtime. Firstly, over a week or two, I built the Processwire version of the site in a subfolder (used a hard-to-guess-name) with the Wordpress version still running live in the root. Then when I was happy with the look of the Processwire version, I deleted the Wordpress installation via 1 click in Softaculous, which gets rid of the Wordpress database and the files, and leaves behind your own folders, like my staging subfolder containing the Processwire site. Then I just moved the contents of that staging subfolder up one level, into the document root. It renders just like it should. Done, and done. Thanks, diogo.
    3 points
  8. I've created a small module which lets you define a timestamp after which a page should be accessible. In addition you can define a timestamp when the release should end and the page should not be accessable any more. ProcessWire-Module: http://modules.processwire.com/modules/page-access-releasetime/ Github: https://github.com/Sebiworld/PageAccessReleasetime Usage PageAccessReleasetime can be installed like every other module in ProcessWire. Check the following guide for detailed information: How-To Install or Uninstall Modules After that, you will find checkboxes for activating the releasetime-fields at the settings-tab of each page. You don't need to add the fields to your templates manually. Check e.g. the checkbox "Activate Releasetime from?" and fill in a date in the future. The page will not be accessable for your users until the given date is reached. If you have $config->pagefileSecure = true, the module will protect files of unreleased pages as well. How it works This module hooks into Page::viewable to prevent users to access unreleased pages: public function hookPageViewable($event) { $page = $event->object; $viewable = $event->return; if($viewable){ // If the page would be viewable, additionally check Releasetime and User-Permission $viewable = $this->canUserSee($page); } $event->return = $viewable; } To prevent access to the files of unreleased pages, we hook into Page::isPublic and ProcessPageView::sendFile. public function hookPageIsPublic($e) { $page = $e->object; if($e->return && $this->isReleaseTimeSet($page)) { $e->return = false; } } The site/assets/files/ directory of pages, which isPublic() returns false, will get a '-' as prefix. This indicates ProcessWire (with activated $config->pagefileSecure) to check the file's permissions via PHP before delivering it to the client. The check wether a not-public file should be accessable happens in ProcessPageView::sendFile. We throw an 404 Exception if the current user must not see the file. public function hookProcessPageViewSendFile($e) { $page = $e->arguments[0]; if(!$this->canUserSee($page)) { throw new Wire404Exception('File not found'); } } Additionally we hook into ProcessPageEdit::buildForm to add the PageAccessReleasetime fields to each page and move them to the settings tab. Limitations In the current version, releasetime-protected pages will appear in wire('pages')->find() queries. If you want to display a list of pages, where pages could be releasetime-protected, you should double-check with $page->viewable() wether the page can be accessed. $page->viewable() returns false, if the page is not released yet. If you have an idea how unreleased pages can be filtered out of ProcessWire selector queries, feel free to write an issue, comment or make a pull request!
    2 points
  9. I added support for this in v0.1.16
    2 points
  10. Thank you. ? My solution was to include a script for converting PHP to ICS, if you visit the event template with the URL segment "/download/". Tricky was to format all data for the ICS format. Here is my version of the script mentioned above: <?php namespace ProcessWire; // Variables used in this script: // $summary - text title of the event // $datestart - the starting date (in seconds since unix epoch) // $dateend - the ending date (in seconds since unix epoch) // $address - the event's address // $uri - the URL of the event (add http://) // $description - text description of the event // $filename - the name of this file for saving (e.g. my-event-name.ics) // // Notes: // - the UID should be unique to the event, so in this case I'm just using // uniqid to create a uid, but you could do whatever you'd like. // // - iCal requires a date format of "yyyymmddThhiissZ". The "T" and "Z" // characters are not placeholders, just plain ol' characters. The "T" // character acts as a delimeter between the date (yyyymmdd) and the time // (hhiiss), and the "Z" states that the date is in UTC time. Note that if // you don't want to use UTC time, you must prepend your date-time values // with a TZID property. See RFC 5545 section 3.3.5 // // - The Content-Disposition: attachment; header tells the browser to save/open // the file. The filename param sets the name of the file, so you could set // it as "my-event-name.ics" or something similar. // // - Read up on RFC 5545, the iCalendar specification. There is a lot of helpful // info in there, such as formatting rules. There are also many more options // to set, including alarms, invitees, busy status, etc. // // https://www.ietf.org/rfc/rfc5545.txt $filename = page()->name . ".ics"; // 1. Set the correct headers for this file header('Content-type: text/calendar; charset=utf-8'); header('Content-Disposition: attachment; filename=' . $filename); // 2. Define helper functions // Converts a unix timestamp to an ics-friendly format // NOTE: "Z" means that this timestamp is a UTC timestamp. If you need // to set a locale, remove the "\Z" and modify DTEND, DTSTAMP and DTSTART // with TZID properties (see RFC 5545 section 3.3.5 for info) // // Also note that we are using "H" instead of "g" because iCalendar's Time format // requires 24-hour time (see RFC 5545 section 3.3.12 for info). function dateToCal($timestamp) { return gmdate('Ymd\THis\Z', $timestamp); } // Escapes a string of characters function escapeString($string) { return preg_replace('/([\,;])/','\\\$1', $string); } // 3. Echo out the ics file's contents ?> BEGIN:VCALENDAR CALSCALE:GREGORIAN VERSION:2.0 PRODID:-//Stadtkirche Pforzheim//NONSGML ProcessWire//DE <?php if (page()->template == "event"): $summary = page()->getUnformatted("headline"); $dateStart = page()->dateStart; $dateEnd = page()->dateEnd; $address = page()->place->getUnformatted("title"); $uri = page()->httpUrl; $description = strip_tags(page()->getUnformatted("summary")); ?> BEGIN:VEVENT DTEND:<?= dateToCal($dateEnd) . "\n"; ?> UID:<?= uniqid() . "\n"; ?> DTSTAMP:<?= dateToCal(time()) . "\n"; ?> LOCATION:<?= escapeString($address) . "\n"; ?> DESCRIPTION:<?= escapeString($description) . "\n"; ?> URL;VALUE=URI:<?= escapeString($uri) . "\n"; ?> SUMMARY:<?= escapeString($summary) . "\n"; ?> DTSTART:<?= dateToCal($dateStart) . "\n"; ?> END:VEVENT <?php elseif (page()->template == "ensemble"): $eventsPage = pages()->get("template=events"); $events = pages()->find("template=event, has_parent=$eventsPage, ensemblesSinging|ensemblesPlaying=$page, sort=dateStart, dateStart>" . time()); foreach ($events as $event): $summary = $event->getUnformatted("headline"); $dateStart = $event->dateStart; $dateEnd = $event->dateEnd; $address = $event->place->getUnformatted("title"); $uri = $event->httpUrl; $description = strip_tags($event->getUnformatted("summary")); ?> BEGIN:VEVENT DTEND:<?= dateToCal($dateEnd) . "\n"; ?> UID:<?= uniqid() . "\n"; ?> DTSTAMP:<?= dateToCal(time()) . "\n"; ?> LOCATION:<?= escapeString($address) . "\n"; ?> DESCRIPTION:<?= escapeString($description) . "\n"; ?> URL;VALUE=URI:<?= escapeString($uri) . "\n"; ?> SUMMARY:<?= escapeString($summary) . "\n"; ?> DTSTART:<?= dateToCal($dateStart) . "\n"; ?> END:VEVENT <?php endforeach; endif; ?> END:VCALENDAR I have never bothered to try any other calendar format than ICS, because ICS is the only standard calendar format I know of. I usually use the latest version installed with Yarn and then compile the source SCSS. The source SCSS files don't seem to have the comment.
    2 points
  11. Hi folks! I release a now major version 2.x of the TemplateEngineTwig module. This version is compatible with the newly released 2.x version of the TemplateEngineFactory (more details in this post). Note that the new version of the TemplateEngineFactory might break backwards compatibility, depending on the feature usage. Read the following guide on how to update, before you do so. So what's new in version 2.0? Updated Twig to 2.6.2 Added a setting to enable debug mode, independently from ProcessWire's debug mode. The Twig_Extension_Debug is automatically loaded if debug mode is active. Added unit tests and Travis for CI. Note that this version no longer bundles Twig. Therefore, installation is only possible with Composer. This makes sure that the 3rd party dependencies are handled correctly. If you update from 1.x to 2.x, please let me know any issues you have. If you do not update: The 1.x version of the module will stay available on the 1.x branch. For a new project, definitely pick version 2.x! Cheers
    2 points
  12. Hi folks! I just released a new major (2.x) version of the module. Important things first: This version includes backwards compatibility breaks. At the moment, only Twig and the bundled ProcessWire engine work with the 2.0 version. I will now contact maintainers that implemented other engines (Pug, Jade etc.) and ask them to release a 2.x version as well. The 1.x version of the module is still available on the 1.x branch and continues to exist. So why a version 2.x? Basically it's the same concept, but done in the right way. ? The rendering via template engine is now integrated correctly into Page::render(). You can call the render() method on any page, and the module will render it via template engine. In version 1.x, this is only true for the current page. Automatic page rendering is now optional, you can use the module to only integrate a template engine, without hooking into Page::render at all. There are settings to enable/disable the automatic page rendering for templates. Because there might be templates where Page::render should not be replaced. The module provides hooks to customize it for your needs. I wrote a bunch of unit tests and use Travis for CI. Problems like "the 404 page is not displayed if a Wire404Exception is thrown in a controller" are now tested properly. I am writing a documentation on everything, you can read it here: https://github.com/wanze/TemplateEngineFactory/blob/master/DOCUMENTATION.md One important part is how to update from 1.x to 2.x. Depending on the feature usage of the module, this might involve some manual update steps, because the public API changed. If you try to update, please let me know about any issues you are encountering, so that we can add them to the documentation. Don't worry, you do not have to update, as the 1.x version continues to exist. For a new project, definitely start with 2.x! Last but not least, modules providing template engines must be updated too, but this should be quite easy. For Twig, I decided to support installations only via Composer, and I think that this should be the way to go for the other modules. 3rd party dependencies must be manageable in a reliable way, and Composer is the right tool for this job. Cheers
    2 points
  13. Did chuckle: https://github.com/craftcms/cms/issues/805 Apparently, Craft 3 still doesn't have conditional fields...
    2 points
  14. Hello apeisa, that's correct. It totals all views. However, you can still display something similar to a function like "most of the week". If the page being tracked has a date field. For example I have a news template with the date field "start_date" and activated tracking. Now you can output the 5 most read news of the last week with the following selector: $startDate = strtotime("-1 week"); $endDate = strtotime("now"); $bestNews = $pages->find("template=news, start_date>={$startDate}, start_date<={$endDate}, sort=-phits, start=0, limit=5");
    2 points
  15. https://processwire.com/api/ref/config/
    2 points
  16. With the the relatively new ProField FieldtypeFieldsetGroup it should be a quick job to add this to all templates.
    2 points
  17. Very nice, thanks for the module! I have to say though, the fact that the fields get automatically added to all templates doesn't sit quite right with me. People probably only need to use time limits for specific templates and for the other templates the fields become a kind of clutter. Better I think to let people add the fields to only the templates they need to be on. I haven't looked closely but perhaps you could reduce the number of needed fields to two - just the Datetime fields. Instead of the checkboxes you can have the Datetime fields set to collapse when empty. Don't have the fields default to "today" but just let people populate them when they want them to be active and leave them empty if they want them deactivated. Another possibility if you want to make it easy for people to add/remove the fields from templates would be to have an AsmSelect field in the module config for choosing templates. Then you could hook Modules::saveConfig to get the selected templates and programmatically add/remove the fields from those templates. Clauses could be added to the selector to check... 1. Either releasetime_start is unpopulated or releasetime_start is less than "now" ...and... 2. Either releasetime_end is unpopulated or releasetime_end is greater than "now"... $pages->find("or1=(releasetime_start=''), or1=(releasetime_start<now), or2=(releasetime_end=''), or2=(releasetime_end>now)"); But rather than try and do this automatically in a hook to Pages::find (which would almost certainly be problematic) I suggest just explaining this in the documentation and letting people add it to their selectors as needed.
    2 points
  18. That seems to be the best solution. Here is the code for the ProcessSettings module: <?php namespace ProcessWire; /** * Settings Module * ProcessWire 3.x, Copyright 2018 by Ryan Cramer * https://processwire.com * */ class ProcessSettings extends Process { public static function getModuleInfo() { return array( 'title' => 'Settings', 'version' => "1.0.0", 'summary' => "Modify site settings", 'permission' => 'settings-view', 'singular' => false, 'autoload' => false, 'author' => "PWaddict", 'icon' => 'cog', 'page' => array( 'name' => 'settings', 'parent' => 'setup', 'title' => 'Settings' ) ); } public function execute() { $settings = $this->pages->get("template=settings"); $this->session->redirect($this->wire('config')->urls->admin.'page/edit/?id='.$settings->id, false); // false = 302 temporary redirect } } and with my HidePages module I hide the Settings page from the Pages tree for non-superusers so they can only access it from Setup menu.
    2 points
  19. A module helping you to manage SEO related tasks like a boss! Automatically generates and maintains a XML sitemap from your pages. Includes a Fieldtype and Inputfield to manage sitemap settings and meta data for pages (Title, Description, Canonical URL, Opengraph, Twitter, Structured Data etc.) Multi language support for the sitemap and meta data. Configure default values for meta data on template level and let pages inherit or overwrite them individually. Map existing fields to meta data, reducing the need to duplicate content. Live preview for content editors how the entered meta data appears on Google. Live preview for content editors how the entered Opengraph data looks like when sharing a page with Facebook. Check out the README on GitHub for more details, including usage instructions. The module is currently released as beta and needs testing! Please report any issues on GitHub or in this forum thread, if you find time to give it a try ? Examples Here is an example of rendered meta data you will get from a single SeoMaestro field: <title>Sed dictum eros quis massa semper rutrum. | acme.com</title> <meta name="description" content="Si lobortis singularis genitus ibidem saluto. Dolore ad nunc, mos accumsan paratus duis suscipit luptatum facilisis macto uxor iaceo quadrum. Demoveo, appellatio elit neque ad commodo ea. Wisi, iaceo, tincidunt at commoveo rusticus et, ludus."> <meta name="keywords" content="Foo,Bar"> <link rel="canonical" href="https://acme.com/en/about/"> <meta property="og:title" content="Sed dictum eros quis massa semper rutrum."> <meta property="og:description" content="Si lobortis singularis genitus ibidem saluto. Dolore ad nunc, mos accumsan paratus duis suscipit luptatum facilisis macto uxor iaceo quadrum. Demoveo, appellatio elit neque ad commodo ea. Wisi, iaceo, tincidunt at commoveo rusticus et, ludus."> <meta property="og:image" content="https://acme.com/site/assets/files/1001/og-image.jpg"> <meta property="og:image:type" content="image/jpg"> <meta property="og:image:width" content="1600"> <meta property="og:image:height" content="1200"> <meta property="og:image:alt" content="Lorem Ipsum"> <meta property="og:type" content="website"> <meta property="og:url" content="https://acme.com/en/about/"> <meta property="og:locale" content="en_EN"> <meta name="twitter:card" content="summary"> <meta name="twitter:creator" content="@schtifu"> <meta name="twitter:site" content="@schtifu"> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [ { "@type": "ListItem", "position": 1, "name": "About", "item": "https://acme.com/en/about/" } ] } </script> <meta name="generator" content="ProcessWire"> <link rel="alternate" href="https://acme.com/en/about/" hreflang="en"> <link rel="alternate" href="https://acme.com/en/about/" hreflang="x-default"> <link rel="alternate" href="https://acme.com/de/ueber/" hreflang="de"> <link rel="alternate" href="https://acme.com/fi/tietoja/" hreflang="fi"> And some screenshots of the UI:
    1 point
  20. Thank you for your feedback. I think the page load of the homepage was slow, because the whole archive of exhibitions was loaded. I now have reduced it to only three exhibitions in the archive and you can load the rest via Ajax. Hopefully this will improve the performance. ?
    1 point
  21. @Robin S Thanks a lot for this module. Is it possible to show also custom page list names? i.e. if I define in my template to use certain fields for page list {title} {client_name} {pl_active_only} {year} (edit template > tab "advanced") I still only see the default title being displayed.
    1 point
  22. @renobird the module is still actively maintained ?? any planned functions?
    1 point
  23. You can use the Google CSE in my sig as an alternative
    1 point
  24. @renobird, have you re-considered releasing the code for your ticket system or partly. Basicly the part that creates new tickets from emails and sends updates is the most important and difficult.
    1 point
  25. You cannot use a Repeater field in a Process module. I think a similar restriction might apply to PageTable fields. It sound like your Process module is getting fields from another page, so maybe it would be better to simply edit that page in Page Edit? If you want a menu item to appear in the Setup menu you could create a Process module that redirects to Page Edit for a particular page, as @PWaddict shows in the post below:
    1 point
  26. https://processwire.com/api/ref/sanitizer/test-all/ can be helpful in such cases
    1 point
  27. @Moebius Try to set useLanguages property to true. $field->useLanguages = true;
    1 point
  28. Nice! First post and you already come with a new module ? I'll take your module for a test-run soon. edit: A quick glimpse at your code shows me you apparently didn't take into account translateable strings, i.e. multilanguage setups: $field->label = 'Activate Releasetime from?'; https://processwire.com/docs/multi-language-support/code-i18n/#translatable-strings
    1 point
  29. Thanks @B3ta I think that the decision where the Seo Maestro field is rendered should be left to the user. And it should be done in the same way it works for all fields: By editing the template and placing the field. Display it in a new tab? Create an InputfieldFieldsetOpen and wrap the field. But maybe the content editor only needs to see meta title and description - then it's not worth to create a new tab. I understand that it requires some manual work to add the field to all templates, but I don't think it is the responsibility of the module to do this. There are other solutions like the Migrations module, which can do this task in a few milliseconds. For the project I built this module, it took me 10 minutes to write a migration that creates and configures the field, adds it to all templates, tweaks the settings per template and also wraps it in a tab. No need to do this by hand if I deploy to production. Cheers
    1 point
  30. Techniques to use in order to cut down on new field creation: Free: https://processwire.com/blog/posts/making-efficient-use-of-fields-in-processwire/ https://processwire.com/blog/posts/processwire-3.0.73-and-new-fieldset-types/ https://processwire.com/blog/posts/pw-3.0.87/#new-field-template-context-settings https://processwire.com/blog/posts/processwire-3.0.14-updates-file-compiler-fields-and-more/#best-practices-with-fields-and-values https://processwire.com/blog/posts/pw-3.0.106/#a-new-way-to-search-with-upgraded-tags-for-fields Paid but this money supports the project ? https://processwire.com/store/pro-fields/ https://processwire.com/blog/posts/functional-fields/
    1 point
  31. Hello, Just for information (one of my recent bookmarks, featuring Stimulus and Turbolinks): https://m.signalvnoise.com/stimulus-1-0-a-modest-javascript-framework-for-the-html-you-already-have-f04307009130 Have a nice week!
    1 point
  32. You only have to move all the folders and files from inside 'pwire' to the root. Make sure you move also the hidden .htaccess
    1 point
×
×
  • Create New...