Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/22/2018 in all areas

  1. emplate Field Widths Adds a "Field widths" field to Edit Template that allows you to quickly set the widths of inputfields in the template. Since v0.2.0 the module also adds a similar field to the settings of Edit Field for Repeater, FieldsetPage and Repeater Matrix allowing you to quickly set the widths of inputfields within the Repeater/FieldsetPage field, or within each Repeater Matrix type. Note: widths are only saved if the edit form is submitted with the "Field widths" field in an open (non-collapsed) state. Edit template Edit Field: Repeater Edit Field: Repeater Matrix Why? When setting up a new template/repeater or trying out different field layouts I find it a bit slow and tedious to have to open each field individually in a modal just to set the width. This module speeds up the process. Config options You can set the default presentation of the "Field widths" field to collapsed or open. Widths entered into the "Field widths" field are only applied if the edit form is submitted with the field in an open (non-collapsed) state. "Collapsed" is the recommended setting if you think you might also use core inputs for setting field widths in a template context. You can choose Name or Label as the primary identifier shown for the field. The unchosen alternative will become the title attribute shown on hover. You can choose to show the original field width next to the template context field width. https://github.com/Toutouwai/TemplateFieldWidths https://modules.processwire.com/modules/template-field-widths/
    14 points
  2. S. Siedle & Söhne Telefon- und Telegrafenwerke OHG is one of the leading manufacturers of building communications technology in Germany and Europe. For a company of this size it is important to have a solid brand communication. For this reason our agency designconcepts developed a portal where the employees of the company as well as others who work with or have interest in their brand can find everything that is important for the brand Siedle. The website introduces the brand, provides informations for different topics (for example logos, typography, colors etc.) and has a large Media-Center with images, videos and documents. The website was build with the framework UIkit. brand.siedle.com Features: Repeater Matrix Protected Content Media-Center Cart Auotcomplete Search Repeater Matrix The information pages are build with a Repeater Matrix field and have a two columns layout. To be even more flexible, a section is a content element containing two Repeater Matrix fields for each column. This maybe sound crazy at first but was no problem and made complex layouts possible. ? Protected Content Not all of the informations are meant for guests, so we made it possible to protect each page, section and content element with a checkbox. If this checkbox is checked, the content will only be visible for logged-in users. Media-Center The core of the brand portal is the Media-Center. The Media-Center is actually a mirror of a separate digital assets management database where the client can manage images, videos and documents with a nice interface in a protected environment. All new assets will be synced via a shell script containing PHP and curl commands calling the API of the database. This script will be executed every 15 minutes via cron job. This way all of the assets are saved as pages in ProcessWire and we can expand them with our own logic and fields. Also for the unlikely case that the database is not available, the Media-Center would still work. Cart Inside the Media-Center you can add assets to your cart. This cart is for downloading selected assets or sharing them with others. A cart will be accessible for 30 days. Modules used: Admin Custom Files Continents and Countries Email Obfuscation (EMO) Front-End Page Editor Functional Fields Markup Sitemap XML ProCache Repeater Matrix Tracy Debugger Upgrades Regards, Andreas
    6 points
  3. echo $staff->skills->implode(',' 'title'); http://processwire.com/api/ref/wire-array/implode/
    4 points
  4. Some extra overhead is to be expected, but it really shouldn't affect performance "massively". Hard to say more without seeing actual numbers and/or digging into the implementation, but first you should make absolutely sure that there's nothing strange going on: Check that there aren't any 404 requests due to HTTP/HTTPS mismatch. These can sometimes result in very noticeable increase in load times. Double check for odd redirects using something like Chrome dev tools: make sure that your HTTPS requests are not, for some weird reason, getting unnecessarily redirected. Make sure that your server isn't doing anything it shouldn't be doing when request is sent over HTTPS. This is a bit vague, but without knowing anything about your server, it's hard to narrow this point down either ? Finally, try to see if there are any third party dependencies (browser or server side) that could cause the delay. Regarding server side issues, you can find useful tips from the typical sources, such as Stack Overflow. This particular thread, for an example, mentions keepalive as a possible source of slowdowns. Although I find it hard to believe that someone would intentionally disable keepalive, that's definitely worth checking if the issue is very noticeable. Probably plenty of other stuff to check too, but to summarise: HTTPS is slower than HTTP, but the difference is rarely in "massive" scale ? Edit: if it wasn't already clear, I'd like to add that there's a very high probability that this issue is actually not about ProcessWire per se, but something else entirely.
    4 points
  5. Hello, Currently I'm hunting for IT deals, so I thought I'd share what I find interesting. If you happen to find more IT and webdev related offers, please share it. VPN: Cheapest VPN with P2P, streaming (Netflix, BBC, etc...) support, multi device (routers too), 5 simultaneous device connections, 5 year deal: https://www.purevpn.com/ I did purchase it. MAMP Pro, I've been waiting for this ? new licence and/or upgrade: 25% by using a coupon https://www.mamp.info/en/store/black-friday/
    2 points
  6. @kongondo's approach is definitely the best for PW, but just for extra info in case you ever need to do this with a standard PHP array, you can simply do: The ugly way is rarely useful, but I suppose there might be more flexibility depending on your needs.
    2 points
  7. Yes. You need to change the order of fields in $template->fieldgroup like e.g. here https://github.com/LostKobrakai/Migrations/blob/master/classes/Migration.php#L41-L62
    2 points
  8. ...with a not so little impact when building complex sites. I already know I'm going to use this a lot ? Thank you!
    2 points
  9. Cool! Add an arrows-h icon to the InputfieldMarkup? Make the widths with the slider instead of text input? Dynamically show the width of fields as they change?
    2 points
  10. It's okay to use a page/template for an AJAX response, but if you're using a delayed output approach with an auto-appended main.php file then remember to disable that for your AJAX template: Edit Template > Files > Disable automatic append of file...
    2 points
  11. Hi LAPS, based on the error message it appears the file your function lives in is not namespaced. So your type-hint Page $item is telling PHP that you expect an object of the class Page in the global namespace. All ProcessWire classes are in the Processwire namespace (check out the namespace declaration at the top of any given core PHP file). So you need to type-hint against the class in that namespace: function functionName(\Processwire\Page $item) { //... } Alternatively, you can alias the Page class for the file with your function, or put that file in the Processwire namespace itself. At the top of the PHP file, add one of those: // importing the Page class, this tells PHP that `Page` should be interpretated as `\Processwire\Page` <?php use \Processwire\Page; // namespacing the file itself, so ´Page´ will resolve to ´\Processwire\Page´ <?php namespace Processwire; Hope this works for you. Cheers!
    2 points
  12. @ripper2600 For sure you can use WireCache to cache number of matches. $cache->preloadFor('matches'); $today_matches = $cache->getFor('matches', 'today'); if(!$today_matches) { $latest_matches = $api->getLatestMatches('today'); $cache->saveFor('matches', 'today', $today_matches, 3600) } $yesterday_matches = $cache->getFor('matches', 'yesterday'); if(!$yesterday_matches) { $latest_matches = $api->getLatestMatches('yesterday'); $cache->saveFor('matches', 'yesterday', $yesterday_matches, 3600) } // setting setting([ 'matches' => WireArray([ 'today' => $today_matches, 'yesterday' => $yesterday_matches ]) ]);
    2 points
  13. Thx Ivan, I was actually more interested in his/her/its response to my statement than in yours ? But yours is a very good one and shows the high quality of this community. Thx - I'm happy to be here and improve! Let's see what he/she/it found out about ecommerce with processwire so far - maybe he/she/it has some valuable information for us... ?
    2 points
  14. true, i dont like them either. but due to GDPR is a european law to have them. technically you still have them even if they are blocked. only problem are clients who do not understand this ? but maybe you add a note into the module, that it might get blocked by adblockers.
    1 point
  15. Probably, but honestly as a user I think I might go back from uBlock to ABP to get this feature ? I actually really hate these cookie banners - who of us out there actually bother to use them to decline setting cookies anyway?
    1 point
  16. Thanks for figuring that out. Not sure if you are using http://prebake.eu/ or whether AdblockPlus blocks these by default now.
    1 point
  17. thx problem is solved. found out that the latest adblockplus-browserplugin blocks it ... hihi
    1 point
  18. @Robin S and anyone else interested - there have been several small updates over the last week. Some reorganization of the form and some tweaks to the pluralize functionality, including now automatic selection of the page field value type and input field type based on the plurality of the field label. Anyway, please update to the latest and let me know what you think of the new tweaks.
    1 point
  19. Another option is using this in your template: <?php echo "my ajax response"; $this->halt(); That's similar to robin's suggestion but you can also use it without creating a separate file/template only for the ajax requests. For example you can send the ajax request to the page itself (the current url) and check if it is an ajax request or not. If it is an ajax request, you echo only the response, if not, you render the page (with the automatic appended main markup file). <?php if($config->ajax) { echo "my response"; $this->halt(); } ?> <region id="main"> <h1>my page markup</h1> <p>blablabla</p> </region> $this->halt() is better than die() because it will fire after render hooks for example and just stop rendering the template output while die() will stop all further executions.
    1 point
  20. Another hint: Use a browser without installed extensions. For example Chrome in Incognito mode. Maybe an extension causes the slowdown.
    1 point
  21. Very nice ? I used to have a separate template and output everything in a HTML table. Just to get an overview of it. But this is much better! How about putting the original with in a light gray somewhere? I am always interesetd wether I changed the value in template context or not.
    1 point
  22. @matjazp, thanks for the suggestions. Yes, done in v0.1.2 Sorry, no, if I'm wanting numbers to sum to exactly 100 then I much prefer a number input than a slider. Just tab from field to field and it's very quick. Great idea, done in v0.1.2
    1 point
  23. @a-ok Would be great to hear more info like PW, PHP and MySQL version, do you use admin interface or API for importing? Also, take a look at these links: https://github.com/processwire/processwire-issues/issues/132
    1 point
  24. Thanks Robin S, your reply was exactly what I needed in this particular use case ? And to everyone else who replied many thanks as well. I now realize my question was kinda vague, next time I'll try and be a bit more descriptive.
    1 point
  25. [joke]You're gonna hate underscore.js then[/joke] ?
    1 point
  26. It might be @Nvim is a troll, an AI bot or just someone not polite. We should treat them accordingly as soon as we find that out. But they might as well be someone very new to web development, forum software and even English language. I would presume Nvim innocent for now ? (after reading his other posts). It is more about our community spirit than about someone else) So until some of you moderators ban him, he is a proper forum citizen, I guess)) Come on @Nvim, give me some likes for defending you (and @BitPoet and everyone else you received some good answers from) by clicking the heart icon in the lower right corner under a post. Prove your good will ?. Install Codelobster or whatever you choose and try out ProcessWire, the favorite CMS of this forum members and simply put the best one in the world at the time of writing. P.S. Forum search is still broken by design, so more duplicate beginner questions will come)
    1 point
  27. Which regular templates do you mean? A new template contains only the title field and doesn't return anything until you create a template file and tell it to return (echo) something.
    1 point
  28. I really like your sentiment @Ivan Gretsky and I do think we should refrain from dismissing any questions, but if you look at Nvim's post history: https://processwire.com/talk/profile/7184-nvim/ their very first post in this forum was "Is Codelobster IDE any good?" - unfortunately I don't think they have much (if any) genuine interest in PW. Even when they posted what seemed like it might have been a genuine question (https://processwire.com/talk/topic/20104-how-to-convert-relational-data-in-pw-pages) which was given a thoughtful response, they never followed up - not even a "like" on the response.
    1 point
  29. I guess the safest approach would be to create a new PageArray Array 3, iterate over Array 1, compare with each item in Array 2 and if not matched, add the Page to Array 3. Or, in code: $array3 = new PageArray(); $array1->each(function($pg) use($array2) { if(! $array2->has($pg)) { $array3->add($pg); } });
    1 point
  30. Do not agree with you, @bernhard for a couple of reasons. 1. Choosing ProcessWire over WordPress or some other more popular solution is a hard decision. It is often made because of this forum friendly support before one finds the beauty and power of the system. 2. Every answer we post here helps someone who googles for it later. And even answering the same questions later in time helps to prove the answers still exists and there are people still caring to answer. And often there are more new ways to solve the already solved problem, so the got to be mentioned in this forum. I can see @Nvim came here to learn about ProcessWire, to compare it with other solutions he knows about. Just maybe in a year or two he (or she?) will be the author of a new e-commerce module for PW, who knows)) If he does not stop here, the discovery of ProcessWire may become the beginning of one of the most exciting adventures for him (her?) as it was for me and so many others here, who perfectly know and have used systems like WordPress, Drupal, Joomla or MODx.
    1 point
  31. The Katharinenhöhe is a rehabilitation clinic in the Black Forest (Germany) for teenagers, young adults and families with children who suffer from cancer. Our agency designconcepts was lucky to relaunch their website. Our goal was to unify the previous separated areas (families and teenagers/young adults) and provide a clear structure for potential patients. Also we wanted to show that the clinic is a nice place to live, despite the circumstances. We rebuild the website from scratch with the framework UIkit and used large images as well as videos. www.katharinenhoehe.de Features: Repeater Matrix Tour Contrast Theme Glossary Autocomplete Search Facebook Repeater Matrix Most of the pages use a basic page template which have one Repeater Matrix field. This field has around 15 different content elements, so it is easy to build a page with different elements in various amounts. Tour On the site tour we build a image map with markers showing interesting places of the clinic. For this task the nice module Image Marker and the Marker component of UIkit came in handy. The tour is available on every page containing a marker. Contrast Theme For a better reading experience you can switch to a more contrasting theme of the website by clicking the theme switcher (on the top right). This is a separate stylesheet with darker color variables. The choice will be saved in a session variable and stays as long as the browser is opened. Glossary To explain complicated medical terms better, we highlight a set of terms in every textarea they occur and explain them with a tooltip. For this task we wrote a simple Textformatter module which looks for the terms in a page and replaces the terms with the tooltip. This tutorial by @benbyf helped me. Thank you! ? Modules used: Color Email Obfuscation (EMO) Front-End Page Editor Functional Fields Image Marker Markup Sitemap XML Phone ProCache Repeater Matrix Tracy Debugger Upgrades Regards, Andreas
    1 point
  32. @Soma Yeah this is my issue with Vue.JS - I use Vue.JS often for two way data-binding which is amazing to be able to easily update content and do visual changes to the site based on those updates. For example adding something to a basket. It's much easier with Vue than jQuery or JavaScript. My issue with Vue is exactly that. You can use it just on a component basis or you can use it to render your entire UI. To me it just doesn't make sense to use it to render an entire UI with a website. A web app sure, but a website it's often overkill and introduces that exact problem. You can introduce server side rendering of Vue with Nuxt but then it just seems like another layer of 'over complication'. I personally stopped using Vue for websites unless I absolutely needed two way binding. It just didn't make sense and the extra complication of implementing it such as having to convert everything from ProcessWire into a JSON feed. EDIT: Noticed this post still gets likes, so what's changed since then? AlpineJS. AlpineJS is a solution to this exact problem, worth a look for anyone wanting to do some cool UI stuff without including all of Vue features and overhead.
    1 point
×
×
  • Create New...