Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/11/2017 in all areas

  1. Feeling the love for ProcessWire today. Two sites launched and owners over the moon happy. Two additional sites ordered by existing clients and both specified ProcessWire as the platform. New sites: 1. https://flywithmehorses.com.au/ Owner is just starting out in business and had already spent $100's dollars and 6+ months on a 'free' website without success. She helped me so I sponsored development of her site. Client's comment: "OMGOSH this is sooo exciting!!!!!!! YAY!! Thank you alot!!!!! Can't wait to tell everyone!!! THANK YOU!!!" ProcessWire 3.0.63 2. https://cttcfilmcourse.com/ Original site built in WordPress. Over 1000 lines of code on the home page and the https://validator.w3.org/ bombed out at line 124 with "Too many errors". Google's page speed insights were cringingly bad. Project was to keep the visuals and rebuild the site in PW with a solid foundation. Job done. No validation errors and vastly improved page speed insights. Also added search and better site navigation. Client's comment: "So good!" ProcessWire 3.0.63 Looking forward to working on the next two sites, both of which will be website apps with workflows rather than informational sites. As ever, grateful for comments/feedback to improve either site.
    10 points
  2. New website created by myself for Hannah Shaw Children's book illustrator: http://hannahshawillustrator.co.uk/ Modules used: AIOM+ Croppable Image 3 PageTable extended - used to create layouts such as: 2up, 3up, 1third-2thirds, video, slideshow etc. Image Animated GIF Site-wide File Manager PublishToTwitter3 Video embed for YouTube/Vimeo Template Notes lots of Javascript and CSS animations to give it some fun flare where possible.
    8 points
  3. Update: Menu Builder Version 0.1.8. Changelog Added support to disable menu items + related (required for this) permission 'menu-builder-disable-items'. Thanks @cjx2240 Support not to show menu items (pages) not listable to current user. Needs option 'check_listable' => 1 in $options Array. Thanks @Peejay 'current_class' now also applies to Breadcrumbs as well. Thanks @Jonathan Lahijani Note Disabling a menu item cascades the status to all its descendants. In Build Menu view (backend), disabled items displayed with strike-through. Currently available in dev branch only. Please test and let me know, thanks. Screenshots
    3 points
  4. Bootstrapping processwire does skip the whole web request stuff, so theirs neither a current_user nor any $input items and other things dependent on a webrequest. It's only meant for api work and it cannot piggyback onto a webrequest of the php script pw was included into.
    2 points
  5. Hi HarryPhone, sounds like you are just a little too early. Your usecase looks like a perfect fit for my new modules agree with this, would do it a little different though: i would use my RockDatatables instead of the Core AdminDataTable. you will be much quicker and you will have much more options regarding rendering the table (coloring cells, rendering linked icons and the like). regarding the import you have serveral options (there are several csv modules around). it's also very easy to write your own XML importer: using my module you can build highly customized listers. its also very easy to create processmodules to make them available as single pages in the pw admin. the module is not released yet and has some drawbacks (like mobile usage or handling large datasets is not yet implemented, that would be a case for regular listers), but maybe it's interesting to know that something like this is coming up.
    2 points
  6. Two small additions in v150: Misc: add new page: uncheck `Active?` for non-default language names (thanks to Tomka) Misc: hide the `Add new` dropdown button from above the main pagelist Unchecking the active state for the non-default language variant of a page can be handy if only a few pages need to be multi-language, so you don't have to go to the Settings tab to uncheck them all every time adding a new page. Also works with templates with parent-child relationships set (when the first step of the addnew process is invisible). Hiding the Add new dropdown doesn't take the available bookmarks into account, just hides the button entirely (CSS only btw). I never really needed this feature and I agree that it's rather confusing. The main pagelist looks a bit empty without this button though
    2 points
  7. @Soma wrote about his solution related to your problem, take a look:
    2 points
  8. ConnectPageFields Allows the connecting of two related Page fields so that changing one updates the other. Purpose of module An example: suppose your website is about movies. You have a template "movie" with Page field "actors". For each movie you add the actors that appear in the movie. All good, but what if you want to find results like... the 10 actors who have appeared in the most movies actors who haven't appeared in any movies since 1990 You cannot retrieve these pages with a single efficient $pages->find() query, and must load a large PageArray into memory in order to iterate or filter it. For the sake of making these types of queries more efficient you could structure your templates/fields so that movies are added to actors instead, but this may be a less comfortable workflow and can run into equivalent problems (e.g. "find the 10 movies with the largest cast"). The solution is to have a two-way relationship so that movie pages have an "actors" Page field and actor pages have a "movies" Page field. This module will keep these two Page fields in sync so that adding "Ryan Gosling" to "Drive" automatically adds "Drive" to "Ryan Gosling". Also, you can select the same Page field in both Page field A and Page field B. For example, create a "Related" Page field for related pages. Choose "Related" for both fields in a pair in the module config. Now when you add "Orange buffoon" to Related for "Donald Trump", "Donald Trump" is automatically added to Related for "Orange buffoon". Usage Install the ConnectPageFields module. If you haven't already done so, create the two Page fields you want to connect and add them to templates. In the module config select the two Page fields in a "Connected field pair" row as Page field A and Page field B. You can add rows as needed using the "Add another row" button. Troubleshooting Make sure you have set the "Selectable Pages" settings for each Page field correctly: The settings for Page field A should allow pages using the template(s) that Page field B has been added to. The settings for Page field B should allow pages using the template(s) that Page field A has been added to. http://modules.processwire.com/modules/connect-page-fields/ https://github.com/Toutouwai/ConnectPageFields Module config: Demo showing how changing one Page field updates the other:
    1 point
  9. Hi everyone, I'm proud to share my first fieldtype module and I think it's a quite handy one It helps you to create all kinds of table/matrix inputs very quickly and easily. You have loads of options for customizing your field via plain javascript. See the handsontable docs for that Please consider this module ALPHA until i got some more time to test it. Any help would be highly appreciated Numbers are for example always tricky. Different locale settings, different types, rounding errors and so on... Download: https://gitlab.com/baumrock/FieldtypeHandsontable Result: Installation/Configuration: Just install the Fieldtype, add a field to your template and set the handsontable options in the fields details. If you have InputfieldAceExtended installed you will also have code highlighting for your code: Get data: If you retrieve the data from the API with outputformatting ON you have some helper methods available: getData() + getRows() get all data of the field getRow($row) get one special row, eg getRow(1) or getRow("2017") getCols() get all data but by columns not by rows getCol($col) get one special column, eg getCol(1) or getCol("mycolumnheader") You can also access rowHeaders and colHeaders directly (see examples) Simple Example: Caution: the examples below are outdated! see this post:
    1 point
  10. Hej, A module which helps including Photoswipe and brings some modules for rendering gallery markup. Feedback highly appreciated (Also pull requests are appreciated ? - have a new Job now and don't work a lot with ProcessWire anymore, yet, feel free to contact me here or on GitHub, Im'm still "online"!) Modules directory: http://modules.processwire.com/modules/markup-processwire-photoswipe .zip download: https://github.com/blynx/MarkupProcesswirePhotoswipe/archive/master.zip You can add a photoswipe enabled thumbnail gallery / lightbox to your site like this. Just pass an image field to the renderGallery method: <?php $pwpswp = $modules->get('Pwpswp'); echo $pwpswp->renderGallery($page->nicePictures); Options are provided like so: <?php $galleryOptions = [ 'imageResizerOptions' => [ 'size' => '500x500' 'quality' => 70, 'upscaling' => false, 'cropping' => false ], 'loresResizerOptions' => [ 'size' => '500x500' 'quality' => 20, 'upscaling' => false, 'cropping' => false ], 'pswpOptions' => (object) [ 'shareEl' => false, 'indexIndicatorSep' => ' von ', 'closeOnScroll' => false ] ]; echo $pswp->renderGallery($page->images, $galleryOptions); More info about all that is in the readme: https://github.com/blynx/MarkupProcesswirePhotoswipe What do you think? Any ideas, bugs, critique, requests? cheers Steffen
    1 point
  11. The name is a bit misleading. Just look in the modules section in your backend under "install". It's distributed with every core version, not installed though.
    1 point
  12. Yay, update: https://github.com/blynx/MarkupProcesswirePhotoswipe Now has some simple 'themes', cooler ones later ... <?php $pwpswp = $modules->get('MarkupProcesswirePhotoswipe'); echo $pwpswp->renderGallery($page->nicePictures, ['theme' => 'h-scroller']); // available themes: plain, flex, h-scroller 0.7 - 2017/07/11, themes fixed: Size option correctly adopts height value added: Theme functionality added: Simple themes 'plain' (previous default), 'flex', 'h-scroller' other: Updated readme other: No notice on undefined photoswipe options other: Refactoring
    1 point
  13. Maybe you can try http://modules.processwire.com/modules/auto-smush/ But I'm thinking about using Cloudinary for my next project: http://cloudinary.com/ One of the greatest features of their service is to auto detect and serve .webp files if the browser supports. This format has a better compression that jpg or png.
    1 point
  14. Cool site, Ben! Seems it was very fun to work on it. The css / js file sizes are minimum which is very good, congrats! But I noticed that some images could be more compressed and save a lot of bandwidth on mobile, like clouds.png. I used https://tinypng.com/ to compress it and it went from 278kb to 91.1kb. Their tool also compresses JPGs. I reckon you didn't have the time to do it yet.
    1 point
  15. Does uncaching the parent page fix it? $pages->delete($pages->get('/parent/child')); $prnt = $pages->get('/parent'); $pages->uncache($prnt); $pages->delete($prnt);
    1 point
  16. Hi @alan, Hope it's not too late to reply. Sorry I missed this! It is possible but the how would depend on the condition you want to check for to decide whether to output the whole menu or just part of it. There are at least two solutions: Using their IDs, remove unwanted menu items from the array or object returned by getMenuItems(). This would probably cost a bit more in memory, but probably nothing to write home about Modify the menu function in the gist you've linked to, to filter out IDs of unwanted items. It should suffice with creating an array of unwanted parent IDs. The, in the recursive function, check, for example if(in_array($m->parentID, $arrayOfParentIDs)) continue;. This is pseudo/incomplete code. You would also need to account for menu items without parents, etc. If you gave us more info (condition to check for), I can give you a more clear answer.
    1 point
  17. In a similar scenario, I update a free ticket counter field on the event page whenever a booking is made. This works for both solutions and enables a blazing fast search.
    1 point
  18. @dweeda, it would probably be better to put your code into a template file. Then instead of redirecting to the PHP file you redirect to some page URL that uses the template file. That way you can use the $user and $session variables as expected.
    1 point
  19. In addition to all the above. @Sipho If you want to make sure hidden pages never show up accidentally (say they have a template, guest access, and someone happens to know/figure out its URL) then you can turn hidden into password protected with @adrian's great PageProtector module easily: Another tip when dealing with related data: you might want to take a look at @Robin S's cool module: Hope this helps too.
    1 point
  20. hi dweeda and welcome to the forum, not sure what you are trying to do exactly. maybe you can be more clear about what you are trying to achieve? if you need the script to run as a special user you can use https://processwire.com/api/ref/session/force-login/ but your question sounds a bit strange. maybe (as often in pw) there is a much more elegant solution and you don't need all this bootstrapping
    1 point
  21. If it's working then there shouldn't be any issue with it, but to be honest I'd personally prefer to simply use some.sh file. Just let it move though project folders and use the module's cli (e.g. migrate run -l) to invoke migrations separately. I'd be far to worried about the multi instance stuff mixing up something somewhere and potentially affecting all of the projects at once.
    1 point
  22. you can report issues here: https://github.com/processwire/processwire-issues but i think it's too early to report this as an issue since the image field is commonly used without any problems. i guess it is somehow related to your setup. what is the output of your response (you see it in the network tab of your dev-tools)? it seems that you have an error that throws only when debug is ON. when you switch it off the error is supressed and therefore the upload works. check also your error logs of processwire and your server. i'm quite sure you'll find valuable information there
    1 point
  23. looking forward to using this module... thanks for building it!
    1 point
  24. hi ocr_b, what do you mean by "suddenly"? did you install some updates? any server changes? any other installed modules (or updates of those)? try it with a fresh install, different image, different server etc...
    1 point
  25. Technically, nothing is stored in a page, but a field. 10,000 rows of entries in one field is nothing really. MySQL can easily handle millions of rows. The crucial question is usually how you are going to query those rows in a fast and efficient manner. One can't and shouldn't query all the rows. Instead, it usually boils down to using a combination of limit (number of queried rows) and caching. Welcome to the forums .
    1 point
  26. Hi @Sipho, Welcome to the forums. Instead of unpublished you could also make them hidden. They won't show in a $pages->find() either unless you explicit ask: $pages->find('include=hidden')'. Also check out this famous post on how to organise content in ProcessWire with great examples. This will give you good insight on possibilities on how to structure your data.
    1 point
  27. Hello fellow ProcessWire-ers. Here's another little project I've made: http://godesign.pt/ GOdesign is a, you've guessed it, design agency, in Portugal. I've been doing quite a few projects with them where they design, then I build. It's portuguese only, but it's just a design portfolio and little more. It was built with a modular approach that I've been applying to some projects lately. Building a project page you get a repeater, where at first you select the block type, and then the respective fields appear. That way the admin can do a block with a single image, two side by side, text on the left, text on the right, video, and so on... The approach is great, and makes me wonder how cool it would be to be able to create templates in PW that can be used in repeaters. Like creating pages, but in a repeater-like field instead of the actual tree.
    1 point
  28. Hi @opalepatrick Take a look at this module https://github.com/teppokoivula/PageRenderIPRestriction
    1 point
  29. did a total rewrite of the module and will release it the next weeks when i'm done
    1 point
  30. Hi @bernhard I added some screenshots.
    1 point
  31. thank you @dragan for reporting that. took me some time to get it working and in the end it was only one function call to addslashes ^^ please check the latest version of the inputfield: https://gitlab.com/baumrock/FieldtypeHandsontable/commit/57d5e117fa87470cfea784bb1f9a24e3895b8ac2
    1 point
  32. To my knowledge, recompiling is the only way, since the index count limit depends on the storage engine itself, not the row format used (unlike index length / column count). Even then it's only possible to double the number of languages - though 64 languages is quite a lot. There might be a MySQL compatible database system without that limitation. I haven't found a list of limitations of Amazon Aurora yet, but it might be worth checking out where its limitations are.
    1 point
  33. @Juergen I have used this module with ProcessWire's translation capabilities with no problems! And actually, forgot to mention that on my previous post. Once upon a time, a client wanted to control the contrast of their b&w converted image, so with the help of @horst 's PIM 2 module and RuntimeMarkup I was able to quickly setup a "thumb preview and edit" button. All buttons and text were in spanish and english.
    1 point
  34. Make sure your post url ends with a slash.
    1 point
  35. I have a model field that depends on the selected manufacturer. Its options update upon manufacturer selection (both are page select fields). In my model field > Input tab > Selectable Pages > Custom selector, I have: parent=page.make, template=model, sort=title, include=all Where 'make' is the name of my manufacturer field. Try that?
    1 point
  36. Hello, I'm back again with my beginner issues... This time, I'd like to update a field found in a repeater across multiple pages. My code : $found = $pages->find("parent=/invitations/$user->name, guests.guest_name=".$form['oldname']); foreach ($found as $f) { foreach ($f->guests as $g) { if ($g->guest_name == $form['oldname']) { $f->of(false); $out .= '/01:'.$g->guest_name; // THIS IS TO CHECK IF IT WORKS $g->guest_name = $form['name']; $out .= '/02:'.$g->guest_name; // CHANGE APPARENTLY OCCURRED $f->save(); // BUT NEVER SAVES??? } } } Let me try to explain a little : the name of a 'guest' is modified on the front-end. I want to adjust all 'invitations' under the '$user->name' branch (that's how I organized my pages, maybe it's not the best solution...) where the 'oldname' was found (in a 'guests' repeater having 'guest_name' text fields). So I look for the pages and I try to loop each page to check which field has the 'oldname' and when I find it, I change it to the 'newname' ($form['name']) and try to save this change... I have tried many things, but this never worked ! Although I did the same stuff to delete a field (If I remove the guest) and it worked! I just don't understand, so if someone could give me a hand, I'd greatly appreciate... Thanks!
    1 point
  37. The problem is that page $f doesn't know the repeater item changed. Those repeater items are individual pages themselves. You can solve this by saving the repeater item ($g) rather than the owning page ($f): 1. Replace your $f->save(); with $g->save(); 2. Also replace your $f->of(false); with $g->of(false); 3. Lastly, I also suggest replacing your first line with this: $found = $pages->find("parent=/invitations/$user->name, guests.guest_name=" . $sanitizer->selectorValue($form['oldname'])); Adding that selectorValue() sanitizer in there will prevent problems from occurring if the guest_name happens to contain characters like commas or quotes.
    1 point
×
×
  • Create New...