Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 12/04/2019 in Posts

  1. 6 points
    What @gebeer said. It could even be as simple as that in /site/ready.php if($page->template == "admin") { if(!$user->hasRole('your-role')) $session->redirect($pages->get(1)->url); }
  2. 6 points
  3. 5 points
    It would be, but as we all know, life is not as straightforward like that 😉 There are issues Ryan solves pretty fast after being reported, there are others that take more time and there are some which seem to take forever... and the worst category is in which he is only marginally interested. Also, what we might provide as a "fix" via a PR can easily turn out to be just a workaround and there is no point in submitting such a PR. For example, in all of my use-cases PageTable without an "add new" bottom at the TOP of the table is a UX nightmare, so I have a JS hack to clone the button from the bottom to the top. In my point of view I "fixed" this is issue, but in reality it is just a hack which would be a good fit for this module, I think. Maybe we should call this module PwQuickFixes which might better reflect its intended purpose: temporary workarounds until they get properly fixed. We just need stats to see how many of us is using a particular quick fix, and another way to make our voice heard is to add a kind nudge by asking the user to go to the related Github issue in order to make her/his voice heard too.
  4. 4 points
    I just implemented it here: The only changes I had to make to the module were to set the root path higher than the default site/templates/ so that I could point it to /site/assets/files/xxxx and it works brilliantly! BTW, this is what the Global Images page looks like:
  5. 4 points
    Hey, @Macaco! This very question has been asked a trillion of times on the forums. And here is the way to find the answers already given: go here and search. The forum search does not work well. The closest to what you desire is probably the Duplicator module, but I never used it in production. I suggest you make yourself comfortable with moving you site here and there "with bare hands" anyway. It is not that hard. You just need to: Copy files. Backup database and restore it where you want the site to be moved to (probably some local dev env like xampp or laragon). Adjust site/config.php (or better use config-dev.php - look here at the very botoom). There is a lot to it only the 1st time)
  6. 3 points
    Updated to v0.0.5 on github New features: optional Ajax loading of thumbnails. Especially useful when field is used inside repeaters or has many images. edit link right next to the thumbnails for the page that supplies the images. When clicked, the images field that holds the images will be loaded in a modal window. After making changes to the images and saving, the thumbnails are dynamically reloaded Side note: while working on these, I discovered that you cannot assign custom attributes to InputfieldMarkup and InputfieldWrapper (both inherit from Inputfield class) with $field->attr('data-sth', 'value'). $field->setAttribute() also doesn't work. Anyone else also experienced this? Is it deliberate or a bug?
  7. 3 points
    And done 🙂 0.5.0 released
  8. 3 points
    Maybe it is art, but you know what would be logical and efficient ? ..... fixing issues via PRs 🙂
  9. 3 points
    In you home template, you could do something like: <?php $newsArticles = $pages->find('template=your_news_templates'); foreach ($newsArticles as $newsArticle) { echo "<a href=\"" . $newsArticle->url . "\">" . $newsArticle->title . "</a>"; } ?> This would output each article's title (as well as a url to the article). Obviously you can change the markup to whatever you would need.
  10. 2 points
    Welcome to the forum, @Ovolion. It sounds like you would be better off using a dedicated e-commerce solution such as PrestaShop. Not that ProcessWire can't accomplish the same thing, but in this case I think it would be better to go with a dedicated solution. Just my $.02
  11. 2 points
    Nowhere. This is embarrassing. I forgot about language field when I rewrote the module for alternative graphql library. My bad, sorry. New Version 1.1.0 I updated the module to support languages now. Please upgrade and it should work fine. Sorry for inconvenience and thanks a lot for the feedback.
  12. 2 points
    @kongondo's Media Manager module offers a lot more than this module would offer even with the child pages feature, so as far as I can see it you are not working on something like that. The suggested child pages feature would be welcome but if you stick to the one page only solution than that is great too.
  13. 2 points
    @adrian I'm with you here. After contemplating some more, I think the page approach should be the only option, discarding the folder option in site/templates/. Since PW is all about pages, this makes more sense. Also editors can easily add/remove images as they see fit without having to use other tools like FTP clients. This also provides the manipulation methods from Pageimage class to all images. What do you all think?
  14. 2 points
    Exactly the same thought came to my mind. Will implement this as an option.
  15. 2 points
    Please read this: https://processwire.com/blog/posts/pw-3.0.80/#pro-module-faqs then contact Ryan directly.
  16. 2 points
    Tis the season to clean out the mechanical keyboard (first time in 7 years)...
  17. 1 point
    I'd support @rick's advice. Setup, coding and everything around ProcessWire as eCommerce solution might already be too much effort in time and money just to get things rollin'. I don't know Prestashop but yet Shopify might be an option as well. Low fees, ready made solution with lots of features right out of the box. You and your client could split things - a shop on a subdomain and the marketing buzz on the main-domain powered by ProcessWire.
  18. 1 point
    Just an opinion and the same @Gideon So already said but... this module should be part of ProcessWire by default. It saved me hours today. Literally.
  19. 1 point
    Hi @Jonathan Lahijani - I've just seen the open issue in Github, which should be resolved now. Are you still getting the issue above on this latest version?
  20. 1 point
    Thanks! Hugely usefull! Think my main issue is the grid editing element so I might implement most of the site and leave the editable image/link section till last and maybe look at building something. I would like it to mirror the frontend as much as possible, so i could just use css grid and do some limited js stuff pushing the page id's, item number and span columns and rows into the database..... mmmmmmmmmmmmm
  21. 1 point
    There is an old video around that shows how it could be done. It's the older version of ProcessWire in that video but it would work the same nowadays - just looks a bit different now. In terms of best workflow... it really depends on various factors as @bernhard already mentioned. I wrote about my personal workflow in or with ProcessWire here and here.
  22. 1 point
    Hello, thanks a lot for your messages and applications. We are happy to have found someone who will support us. Regards Annemie
  23. 1 point
    Here is my final init.php code for bilingual password forgot. if (wire('session')->language) { wire('languages')->setLanguage(wire('session')->language); } $wire->addHookBefore('ProcessLogin::execute', function($event) { if (wire('input')->lang == 'fr') { wire('languages')->setLanguage(7085); wire('session')->language = 7085 } });
  24. 1 point
  25. 1 point
    @gebeer - I am sure you have already thought of this, but if you're changing to only support selecting a page (and its children), you could make use of PW's API to load up the images in the picker field, rather than scanning the server folder directly. I don't think there is a reason not to change.
  26. 1 point
    You should be able to do that with any module, but you will likely also need to delete its entry from the modules DB table so that PW isn't looking for it. That said, I'd like to know more about the login issue - never heard anyone have that problem before - those details on PHP version etc will be useful.
  27. 1 point
    What about adding the image description, width, height, and filesize to the tooltip and under the selected image?
  28. 1 point
    Hi @dadish the module is awesome. But i have some troubles with language support. Here is my query: { language(name: "default") airport(s: "limit=4, sort=title") { list { id title } } } Here is the response problem: { "errors": [ { "message": "Cannot query field \"language\" on type \"Query\".", "extensions": { "category": "graphql" }, "locations": [ { "line": 2, "column": 3 } ] }, { "message": "Cannot query field \"title\" on type \"AirportPage\".", "extensions": { "category": "graphql" }, "locations": [ { "line": 6, "column": 7 } ] } ] } title field has type - Page Title (Multi-Language), but as it mentioned above response is "Cannot query field \"title\" on type \"AirportPage\" Here is GraphQL module configuration screen. Where did I make a mistake?
  29. 1 point
    I could, but I am not sure if you want to refine things a little more than my quick hack. I just replaced all instances of $this->config->paths->templates and $this->config->urls->templates with $this->config->paths->root and $this->config->urls->root I think perhaps it would be better to have an option in the field's settings to actually choose a page rather than manually /site/assets/files/xxxx - what do you think?
  30. 1 point
    @szabesz Actually I was thinking about making this change, too 🙂 @adrian Great job! Could you make a PR with your changes? I'd like to implement them. This will also make the images instances of Pageimage and we get all image manipulation methods.
  31. 1 point
    Are you receiving any errors at mydomain.com/pwone etc etc ? What issues are you exactly running into? A bit more information would be helpful.
  32. 1 point
    Similar background... totally different solution: 2,000 recipients 1 older lady weekly newsletter Nothing worked out good enough. No software, no CMS plugin, no nothing. For a small fee each newsletter she now gets kind of proofreading, formatting and everything her newsletter needs. She writes and sends the newsletter in her mail client (Thunderbird) to me, I copy/paste everything into a plaintext file, format everything, read everything, put it together in Mailchimp and send it out to her recipients. It takes about 20 minutes. Everyone is happy. As it works so well for her, she wants to send more newsletters with more content, more links in the future. Lucky me.
  33. 1 point
    @OllieMackJames Okay, well I honestly don't think there's much more I can do here (unless I'm missing something staring at me in the face 🙈). Hoping to find time soon to continue work on v2 (starting writing the frontend a little while back), which will keep track of these things a little differently (a migration table). Scary to think how long it's been around, and how long I've taken to get v2 anywhere 🙃
  34. 1 point
    I added $config->sessionExpireSeconds = 120; to my config.php deleted all cookies and sessions (/site/assets/sessions/) opened a private window and logged in waited 2+ minutes clicked a link and was redirected to the login page It works in the backend. How and why there might be a difference in an application or frontend... I don't know. Maybe caching, maybing something that keeps the session alive. Another thing is session()->isLoggedin where did you find that? All I know is $user->isLoggedin(). Maybe you could try: if(!$user()->isLoggedin) session()->redirect(config()->loginUrl);
  35. 1 point
    Ok I found this codepen: multiple sortBy and through rearranging and cleaning up my code a bit, as well as making the sort order static and not changeable via a page field this sortBy: ['featured', 'date'], actually works, where the items get first sorted by the value of featured and if that is the same they get sorted by date.
  36. 1 point
    You're nearly answering your own question there. The key is the position number in the field (zero-indexed like all arrays). Using this field as an example... The key is the position:
  37. 1 point
    Have you cleared all previous cookies and session files? Just to make sure there aren't any "old habits".
  38. 1 point
    RockAwesome ProcessWire Fieldtype to easily choose FontAwesome Icons Usage Install the module. Set paths in the Inputfield's settings page. Add a RockAwesome field to any template (or change an existing TEXT field). Preview https://modules.processwire.com/modules/fieldtype-rock-awesome/ https://github.com/BernhardBaumrock/RockAwesome
  39. 1 point
    @bernhard just installed RockAwesome to have a play with it. It's excellent! Straightforward and intuitive... Thank you.
  40. 1 point
    They do it all the time. No matter how many accounts exists... most of the time all people use just one. I always try to convince clients not to share accounts, but in some cases they flatly express that they will indeed use "shared accounts" no matter what. Their excuse usually boils down to laziness: they do not want to deal with managing users at all. In such a case I ask them at least to call such a user as "shared editor" or similar so that at least we know how to treat that account in question. So for the reasons outlined above, some support for this would be welcome, maybe with some additional logging options so that we can track down such activities even days after...
  41. 1 point
    @charger I have no other ideas how to solve your case. Could you describe the steps to reproduce the error? You can take a starting point of any site profile and outline the steps to reproduce the issue. That would make it much easier for me to help you.
  42. 1 point
    Shouldn't the manufacturer name be FILTHCO?
  43. 1 point
    We recently relaunched DOMiD, the Documentation center and Museum of Migration in Germany. Concept, design and implementation by schwarzdesign. Features Bilingual site with German and English A section-based design focusing on flexibility and ease-of-use for editors Multiple forms built with FormBuilder that can be placed on any page Separate feeds for news & press releases Lightning fast page loads with almost perfect ratings in Lighthouse Completely accessible and SEO-friendly Notable tech decisions Forms and form placement There are multiple forms for different services that DOMiD offers. Those are built with the FormBuilder. The editors don't have access to the FormBuilder itself, but we still wanted to allow them to control which form is displayed on what page. For this purpose, every page has a select field to select which form to include (if any). Additionally, the form placement has additional fields for a headline and a description, so a generic contact form can be reused in different contexts. Section-based design Most pages are built through Repeater Matrix sections. There are multiple section types available, for example: A generic text / image column with up to three columns of text and images An accordion (rendered as <details> elements). An image gallery Downloads (for files and images, displayed as a list of downloads) External Embed (e.g. YouTube) All sections have an optional headline and a selection of three different background colours. In addition, text columns may be rendered as a coloured block with some padding. This allows for interesting and diverse layouts. Testimonial database One of the available sections is for testimonials or statements (you can see one at the bottom of the homepage). Because one testimonial may be displayed on multiple pages and the client wanted to be able to switch the displayed testimonial on the fly, there's a separate content type for statements. The statement content type has fields for the statement text, author, and author image. The testimonial section only has a page reference field to select which statement to show. This way, the testimonial definition is separate from the placement on a page. Modules used Form Builder Pro Fields (Repeater Matrix in particular) Unique Image Variations ALIF - Admin Links in Frontend Sitemap Wire Mail SMTP Developer Tools: Tracy Debugger, Duplicator, ProcesWire Upgrade Migration museum As a sidenote for anyone living in Germany, this month the German Bundestag has approved funding for DOMiD's first Migration Museum ("Haus der Einwanderungsgesellschaft")! The museum will be build in Cologne and is scheduled to be finished by 2023. We're looking forward to it! Check out this page if you want to learn more, or find out what people are saying about it here.
  44. 1 point
    Go to the settings of your CKE field, TAB Details at the bottom are a few options. One of them is: Replace blank alt attributes with image description Check, and done!
  45. 1 point
    The thing to remember is that this setting is called the "Formatted value", i.e. the value when output formatting is on. When output formatting is off the value of an image field is always a WireArray. And in your code, you specifically turn output formatting off before you work with the field (as you must). If you treat the image field value as an array I think it will work as expected. Something like: $page->of(false); $page->photo->removeAll(); $page->photo->add('https://example.com/img.jpg'); $page->save(); $image = $page->photo->last(); $image->textfield = 'Some text'; $page->save();
  46. 1 point
    Just chucking this in here incase anyone else has this problem. Upgraded to the latest dev and it failed (I never get that!!!!!) I got the warning: Warning: require_once(/sites/domain name/wire/core/ProcessWire.php): failed to open stream: No such file or directory in /sites\domain name\index.php on line 32Fatal error: require_once(): Failed opening required '/sites/domain name/wire/core/ProcessWire.php' (include_path='\php\PEAR') in \sites\domain name\index.php on line 32 Turned out it hadn't renamed wire-3xx to wire This was locally using XAMMP. So, if you see this, check: Has it renamed the wire directory, And if everything extracted okay. (I have seen that on another post once, I think). Okay, back to what you were doing!
  47. 1 point
    ProcessWire 3.0.146 contains about 22 commits (relative to 3.0.145) and these commits are largely focused on resolving reports from the processwire-issues repository. However, there have also been several improvements and related additions. One of these additions was a foundational upgrade that adds support for Fieldtype modules to use a custom class for Field objects. This will open more possibilities for improved Field/Fieldtype-specific APIs. Several have asked for improvements in the APIs of Repeaters and other fields, so this is a step that begins the lay the tracks for moving in that direction. Traditionally the API calls for working with Fields and Fieldtypes have not been nearly as simple as those that work with Pages, so this will be an upgrade that narrows and eventually eliminates that gap, longer term. On the core side, I currently plan on using this to improve the API for Repeaters, Comments and Options fields, and perhaps others. Outside of the core, ProFields will eventually take advantage of custom Field objects as well. As usual, none of this will break any existing code, but it will add simplicity for those that work with Field/Fieldtype APIs in ProcessWire. As for other changes in 3.0.146, I think last week’s ProcessWire Weekly did a great job of covering them, so if you are interested be sure to check that out. Next week is partially a holiday week here in the US, so I’ll be on a little bit of a reduced schedule, but will still be working on the core. I’m also releasing a new module into the ProDevTools set of modules next week, so I’ll tell you more about that one in next week’s blog or forum post. Thanks for reading and have a great weekend!
  48. 1 point
    Whoa, just got bit by this as well. Couple of my sites (on an Ubuntu server) were using SessionHandlerDB, so this happened: > select count(*) from sessions; +----------+ | count(*) | +----------+ | 1561416 | +----------+ 1.5 million rows in the sessions table – "whoops". Should probably add sensible session.gc_probability number for these sites 😅
  49. 1 point
    Since today, 31-01-2018, we have support for this in the PW Core. Therefore I updated this module to version 2.0.2 This version handles the detection of the core support and dismiss its installation then. If the core module is available but not installed, it get installed instead of this third party module. If you have this third party module already installed since a previous PW version and upgrade your wire folder, this module will detect the core module and install it. Its own hook isn't registered then and you get a notification about the changes.
  50. 1 point
    In addition to this, I also recommend reading up about the very basics of Object Oriented Programming, http://www.tutorialspoint.com/php/php_object_oriented.htm at least the concepts behind it. Although in the case of ProcessWire frontend development you are not "forced" to implement anything in OOP, knowing the fundamentals helps a lot to understand the API and its usage. An often used technique in the OOP world is method chaining. You do not have to use it, but when you want to look up someone else's code, you need to how and why it works: http://www.xpertdeveloper.com/2010/09/method-chaining-in-php/ BTW I highly recommend bookmarking http://www.tutorialspoint.com/php/ You can use this method before you jump into your trial-and-error experiment: Whenever you start working on something unfamiliar, say sending emails, study some basics in pure PHP, say: http://www.tutorialspoint.com/php/php_sending_emails.htm After that, look for alternatives in the ProcessWire world: API support, module support Of course, it is recommended to use the API and/or modules whenever you can, but understanding why is so makes working with them easier. Hope this helps, good luck, and never give up!
×
×
  • Create New...