Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/10/2016 in all areas

  1. COMPOSER ELLIOTT CARTER (December 11, 1908 - November 5, 2012) is internationally recognized as one of the most influential American voices in classical music, and a leading figure of modernism in the 20th and 21st centuries. https://www.elliottcarter.com/ This site was launched some months ago, and was one of the larger projects I completed so far. It took about 4 month to build. (PW 2.7.3) This was the first project I used the wireRenderFile() pattern on, and it consequently allowed me to reuse a lot of output code, as well as do a lot of markup/object caching with wirecache. The site uses DataTables for all of the major listing pages, Works, Discography and Events, allowing users to filter and search with no page reload. This probably has the most advanced caching setup that I've done so far, and one example of how it works is on the discography page: https://www.elliottcarter.com/discography/ That page has to hold all 264 albums (json object which is rendered by dataTables), and each album takes a bit of processing to render (formatting of works, artists etc.). The json for each album's list view is wirecached individually and is generated on visits to the individual album pages, so that they never get generated all at once when visiting the discography page. The complete json object containing all of the albums is also wirecached, then the final page is pro-cached. The album covers are lazy loaded so as to not affect page size or load speed. The selects on the left are also all wirecached as page or regular arrays. This results in a 1.6s page load time and a page size of 1.12 MB. Without the data being wirecached the load time is around 9 seconds to generate the page, probably longer if it had to regenerate all 264 albums, but the album info never changes, so they are permanently cached unless someone edits one. Also should note that since there is so much use of wirecache, @Soma's Clear Cache Admin was pretty much indispensable for managing all of the caches. Other features of the site include extensive use of Schema.org microdata, an events submission system, and a lot of custom stuff in the admin for managing the content, such as automated fetching of album covers from Amazon, converting formbuilder submissions into events, a custom admin dashboard etc.. There are probably 60 modules in use overall, but these in particular saved the day: MenuBuilder AdminCustomFiles AdminPageFieldEditLinks All the Selectize modules URL checker PrevNextTabs WireMailMailgun SetupPageName Changelog AdminCustomPages Twitter Feed Social Share Buttons RSS Enhanced Chosen Select Runtime Markup Batch Child Editor Tracy Debugger As well as all of the pro modules (ProFields, FormBuilder, ListerPro, and ProCache). More info, screen shots etc will be gradually posted here...
    6 points
  2. If anyone is interested, I just pushed a couple of updates to my fork of Nik's excellent module. This version adds logging of selector string and the result summary - something I was missing as I'd kind of play with the string, hit a selector that worked for me and promptly loose it by fiddling some more with it. You need to look in the log (or use the log viewer) to find the previous strings - but at least they are there. Additionally, the forked version adds a hook to allow custom titles to be generated for repeater fields (Shown below with custom titles for the relationships repeater) The code to produce the custom label being... /** * Custom hook to format repeater field labels in ProcessSelectorTest results... * * Turns labels from ... to => ... this * * '0' => '0 Parent of: Jack, Jane, Jill' * '1' => '1 Coach of: Anne, Benjamin, Connie, Dick, Emily, Faith, Gill' * '2' => '2 Spouse of: Richard' */ $pages->addHookAfter('ProcessSelectorTest::formatRepeaterLabel', function($event) { $replabel = $event->return; $parent_field = $event->arguments(0); $repeater = $event->arguments(1); if ('relationships' == $parent_field->name) { if ($repeater->people) { $replabel .= ': ' . $repeater->people->implode(', ', 'title'); } } $event->return = $replabel; }); I'll issue a pull request to Nik - but he's not been particularly active here recently.
    4 points
  3. Another update: the latest version logs multi-language name changes as renames. The implementation is a bit hacky since core doesn't trigger a renamed hook in this case and also doesn't track previous name etc. like it does for the default name field. The output also doesn't mention the language specifically, though that's something that could be added later on. Please let me know if you have the chance to give this feature a try and happen to notice any inconsistencies. Thanks!
    4 points
  4. Um, well, I am now feeling very sheepish... I've found the problem and it is monumentally stupid of me. I was trying to include the template partial _BEFORE_ I had run the function to do the search, so of course the variable was empty! The other places I was using the variable were after the function had run! I only spotted it after spending some time away from the code. I've now rejigged the code so it works as intended. Sorry for wasting anybody's time.
    3 points
  5. It really does depends on your needs. @teppo has a valid point about using the Options field, but I have actually used pages for storing years because of all the other possibilities of using a page field provides (too many to go into here). Not saying I wouldn't use the Options field for years in a different project, but just saying you should read up and plan ahead before deciding. Remember that pages are just database rows, so 100 rows is not a big deal. Also, if you are worried about creating those pages, check out: or
    3 points
  6. I haven't followed said tutorial myself, but I probably wouldn't store years as pages. What I would rather use for storing a year (and nothing more) would be an integer field, or if it really has to be a dropdown on the page editor, I might use an Options field instead. Just my five cents
    3 points
  7. Actually there was no need for version_compare(): hooking into something that doesn't exist doesn't seem to cause any issues. While hooking into savePageOrFieldReady would make sense, at this point I'm not ready to ditch 2.x support, and since that's not an option, I don't really see any benefit in it Latest version, just pushed to GitHub, fixes one minor bug and adds support for saveFieldReady.
    3 points
  8. You might be looking for getForPage(), but you might be better off with subselectors: https://processwire.com/api/selectors/#sub-selectors There are some examples in there about finding main pages based on the content of repeater fields on those pages.
    3 points
  9. ... $pwVersion = wire('config')->version; if(version_compare($pwVersion, '3.0.35', '>')) { $pages->addHookAfter('Pages::savePageOrFieldReady', $this, 'saveReady'); // Pages::savedPageOrField(Page $page, array $changes); } else { $pages->addHookAfter('Pages::saveReady', $this, 'saveReady'); if(version_compare($pwVersion, '2.5.9', '>')) { $pages->addHookAfter('Pages::saveFieldReady', $this, 'saveReady'); } } ...
    3 points
  10. @arjen: thanks for notifying me of this. The solution posted by Ryan a bit later (hooking into both Pages::saveReady and Pages::saveFieldReady) should be relatively easy to implement, but the problem is that Pages::saveFieldReady was added in 2.5.10 and this module currently supports >= 2.2. This could mean either jumping through some extra hoops or dropping support for a couple of releases. Anyway, I'll take a closer look at this soon. What would've been awesome was if Pages::saveReady worked consistently across all revisions, but it is what it is
    3 points
  11. Nice work Steve! Sounds like a perfect use case for the log viewer in Tracy
    2 points
  12. @antoiba86: I don't think downgrading is really an option. But I've already got the magnific and markup issues sorted and am working on the issue with the blog_files field, so a 3.0-compatible version is around the corner. @kongondo: as I've got a few sites running on 2.8, I try to stay clear of namespaces anyway
    2 points
  13. Most probably Tracy Debugger to disable modules.
    2 points
  14. Hi Bernhard I don't think many people could have seen how useful this approach is. Fingers crossed for the future.
    2 points
  15. i'm still voting for a solid and core solution of image cropping. using either an exact crop, or predefined ratios, or using a focus area and make it possible to get the right image for the right spot on your template/design and allowing different ratios! but i guess we 2 are in a minority... ?
    2 points
  16. No problem @teppo. Thanks for taking a look. It's something we ran into a while ago. Since I'm testing all the modules which are tracking changes I've ran into this again Thought you should know. Thank you @horst for stepping in!
    2 points
  17. Thanks for the updates teppo. I've noticed that ProcessChangeLog doesn't log when a page (or rather field) is updated from ListerPro. My guess is this has to do something to do the saveReady hook not being called within ListerPro. Ryan posted a solution to 'force' the hook. p.s. I also posted this in the the Activity Log post by renobird, since I believe it's the same issue.
    2 points
  18. https://developers.google.com/web/tools/chrome-devtools/device-mode/ You can add the device pixel ratio with the 3-vertical-dots menu in the top-left panel. https://developer.mozilla.org/en-US/docs/Tools/Responsive_Design_Mode Firefox or Firefox Developer Edition: https://www.mozilla.org/en-US/firefox/developer/. http://www.opera.com/developer/mobile-emulator https://chrispederick.com/work/web-developer/
    2 points
  19. @antoiba86: Welcome to the ProcessWire forums! Are you using ProcessWire 3.x? I'm currently working on making the blog module compatible with the latest PW versions, and I also encountered this error. It is caused by something that goes wrong in the install routine, which fails to assign the blog_files field to its template. I'm working on it and have an idea about its cause, but I haven't tracked it down completely, and there are a few other issues (mainly the switch to jQuery magnific popups) I'm working on as well since a lot has changed under PW's hood. The blog module should work on PW 2.7, though, which is also linked on the download page, so setting up your blog site on 2.7 and upgrading everything once the blog module has been adapted and tested on 3.x (give that a week or two) might be an option.
    2 points
  20. That's why the settings are in config.php https://github.com/somatonic/Multisite/tree/dev2#add-multisitedomains You'd have a config already for both so it's just a matter of having different domain and the root in PW stays the same.
    2 points
  21. Or just use this module for automatic upgrades: http://modules.processwire.com/modules/process-wire-upgrade/ Then if you want to downgrade you can use the version switcher in Tracy to instantly switch to any previous version installed with the Upgrades module.
    2 points
  22. Under pressure from a client, I had to launch a PW front end user membership site 2 months earlier than the agreed schedule. Never an ideal situ and no time to fully test everything. The client web admin and I were able to monitor the logs, esp the session logs to see who'd logged in and who'd had trouble. We immediately emailed those who'd lost/forgotten/did-not-receive-the-email-with their username. Every single one of those new members emailed back their appreciation for the proactive customer support. What could have been disastrous turned those subscribers into site fans. PW logs are your friends! Thank you Ryan, the PW dev team and every forum/module contributor for delivering such a solid product.
    2 points
  23. Sorry, folks -- looks like I managed to overestimate the amount of time I'd have for this module. Anyway, I've just pushed version 1.3 to Github, along with a new module called ProcessChangelogRSS. Here's the gist of this update: If you access the changelog via /setup/changelog/rss/ you should find an RSS feed for the module. This feed requires the same permissions as the regular changelog view, i.e. you have to be authenticated and have the "changelog" permission. Since the RSS feed might have valid use cases where authentication is an issue, an optional ProcessChangelogRSS module is now included. After installing this module you should go to it's config screen (in the Modules section) and type in a key of your own. After that you can view an RSS feed of changelog events at yourdomain.com/process-changelog-rss.xml?key=your-very-long-and-complex-key. I don't really know how important this RSS feature is going to be, so didn't want to spend too much time on it -- this is why the description of each item makes use of the same tabular output as the main changelog view itself. Originally I had planned to implement multiple keys and such, but in the end decided to strip all that away and go with the most basic implementation possible. Feedback on these features would be appreciated, but please note that if you do enable the ProcessChangelogRSS module, the changelog RSS feed is publicly available, even if only for those who somehow gain access to your private key (or are somehow able to guess it). If you are uncomfortable with that, please leave it uninstalled.
    2 points
  24. Hmmm... I'm looking for a module that can clean my house and can make me coffee...
    2 points
  25. So, 48 hours or so after a question that initially got the standard "PW != WP" answer, there's been a reasoned discussion, people have come round to seeing some merit in the initial premise, and BitPoet has a couple of alpha modules on GitHub. That is an extraordinary testament to the quality of PW and this community.
    2 points
  26. So far things are going great for our new master version of ProcessWire, version 3.x. In this post, we'll take a look at what's new in ProcessWire 3.0.36 master, plus a look forward at what we'll be working on in the weeks ahead. https://processwire.com/blog/posts/processwire-3.0.36-and-looking-forward/
    1 point
  27. Thanks @BitPoet...appreciate the work. I have seen the PR...Will get to it when I finally install PW 3.x/2.8 ...hopefully soon.
    1 point
  28. @Mike Rockett Thanks for your suggetions and effort. I deleted last_hit column, after that I got error Failed to init module: ProcessJumplinks - SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'process_jumplinks_nf' already exists So I deleted this table too and after that, finally Jumplinks started to work. Thanks!!!
    1 point
  29. What do you mean by "elsewhere"? Why don't you store the intermediate values in variable so that you can check them? E.g.: $whitelist=whitelist; bd($whitelist); $search_keywords=$whitelist->search_keywords; bd($search_keywords); $page_body .= wireRenderFile("includes/comic-search-form", array( 'search_keywords' => $search_keywords )); Also, @adrian's Tracy has a panel called "Template Resources" showing all available variables loaded for the page. If it is null in the template partial, then it should be null when it was passed to it...
    1 point
  30. You might find something here: http://navnav.co/ It looks like the classic "Off-Canvas Navigation Menu" is the one you might like to build upon. As for the memory problem, isn't it an image resize problem by any chance? E.g.:
    1 point
  31. @Zeka - I'm afraid I'm not getting any errors on this side; everything is running smoothly as expected. I assume that something went wrong during a schema upgrade (which happens when you install the module the first time, or when it is upgraded), and this prevented the schema version tracker from being updated. The safest bet would be to delete the last_hit column from the process_jumplinks table using whichever database admin tool you have on your server (phpMyAdmin, I'd assume). Then simply refresh the admin interface or request about-us.html again and the schema should update. Alternatively, I'd be happy to have a look at your database, if you'd prefer.
    1 point
  32. Quick update: it turned out that the problem of blog_files not being added to the template is due to $this->files somehow having become a reserved variable. It holds an instance of WireLog instead of the blog_files field created earlier, though I haven't spotted the part in the core where this happens yet. However, changing $this->files to $this->blogfiles fixed the problem. I'm now going to run some tests. Stay tuned.
    1 point
  33. @adrian: to be fair I was about to mention Batch Child Editor, but in the end couldn't think of any solid benefits for pages vs. integers. Now that I think about it, I guess you could do something like use a specific template for your year pages and have them render all related items right there.. which is pretty neat. You could do the same thing with URL segments without having those pages there (this is what I've done in at least one project), but a page-based approach would, at the very least, be more obvious. So yeah, there are some valid reasons to use pages That being said, I do have to point out that each page is actually a bit more than just a row in the database, and while ProcessWire can handle tremendous amounts of pages without breaking a sweat, often they are not the most efficient solution.
    1 point
  34. Thanks Tom. It would be nice if you can look into the issues. I'm currently testing all existing 'tracking' modules for a project. Also please look in the ProcessChangeLog thread (and the thread linked to) since it faces similar issues.
    1 point
  35. Hi Arjen, I haven't released anything new. I will try to take a look at any outstanding issues this week.
    1 point
  36. Hi folks, I have been asked by Pete (my boss) to pick up the ball and run with it, as he is quite keen to have a centralised solution for monitoring versions and updates. Having worked with Wordpress, Perch and Umbraco in my time, I must say this is the nicest CMS I have has the joy of using (Perch is a very close second). It seems to be very well maintained by a core of hard working individuals, but has yet to reach the size where it is a target for crackers and script kiddies. That said, with it being our CMS of choice, we don't want fragmentation to be come a problem. I remember the groans that went around the office of a former employers when we needed to make a change to an Umbraco 4 website. I'd be interested to know if anyone has had any success with developing a solution for this? @BitPoet thanks for being so pro-active and working on a prototype, although it looks like you haven't had chance to make a commit to it since January. Understandable, you have to pay the bills and keep the lights on rather than maintaining a side project for some guys you have never met. Perhaps we could have a quick chat on Slack, DM or similar about the project and see if we can pick it up and help develop a solution with/for you? In the meantime, I'll have a good poke around and see how it works on a test installation. Thanks all
    1 point
  37. Hey @renobird, did you release your new version yet? I just ran into the same issues as @SteveB. I've updated the MarkupActivityLog.inc since the FileCompiler didn't like the PHP short tags. Another thing I've noticed is that Activity Log doesn't record/log when a page (or rather field) is updated from ListerPro. My guess is this has to do something to do the saveReady hook not being called within ListerPro. Ryan posted a solution to 'force' the hook. Thanks!
    1 point
  38. Haha... that fooled me too! That's because there is no mobile menu to open. The hamburger icon is just an anchor link to the bottom of the page. That is where the menu is already shown. Confusing...
    1 point
  39. I see this error when looking at http://www.bielenberg-soerup.de/center/ with Chrome, and console open in phone mode... What I also found strange: when opening the hamburger menu on mobile, there is no "close menu" icon visible...
    1 point
  40. You can definitely use include() inside a Hanna Code snippet. Have you tried an absolute path to that portfolio.php file?
    1 point
  41. Yes, it was made using PW3. netcarver's module should work fine too, or you can use AdminOnSteroids in which there are some improvements too.
    1 point
  42. Hi, $hp = $this->wire('pages')->get(1); The reason:
    1 point
  43. Wanted to mention that there's a new dev version https://github.com/somatonic/Multisite/tree/dev2 that we are testing and using right now. It was tested and works with multilanguage and PW3 various features.
    1 point
  44. For Windows users there is the Laragon version: https://laragon.org/download.html
    1 point
  45. Hi There are about 10 projects I know that use Padloper (although license sales are 100+). I haven't asked promises to showcase those, but I will soon focus on that (asking showcases and putting them up to padloper.pw).
    1 point
  46. here.u go echo $pages("parent=/")->implode('<a href={url}>{title}</a> ');
    1 point
  47. I like the original version of old boy
    1 point
  48. wait.for net split i do,my bots take over.yr channl Yes.will
    1 point
  49. Same here. I get same kind of feeling now while developing websites than I got when building my team on JA, building transportation network in Transport Tycoon or developing new technologies in X-COM. But big difference is in what comes after I have played: websites are something real, that is there for other people to use and enjoy. Computer games just sucked my time But most bizarre feeling is that I sometimes feel bad that I don't play games anymore... like not keeping touch with an old friend PS: I do not play a lot of games, but I tried Terraria about a week ago. I played 14 hours straight with my friend. I will not touch that game anymore though
    1 point
  50. Thanks man - if you ever feel like turning back the clocks to 1994 again, you can now play the original X-COM on Windows 7 pretty easily if you grab it via Steam. Bizarrely, although I'm the guy who built the site (structure and a lot of the content - can't claim to have written all of those articles though!) I also have little time for gaming any more and when I do I prefer to dive into an FPS for an hour or so just to unwind, so it's Left 4 Dead or Team Fortress 2 for me nowadays. Most of the time it's web development though, which I like to think of as a puzzle game
    1 point
×
×
  • Create New...