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. 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
  30. 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
  31. @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
  32. 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
  33. thank you @pwired do you have processwire running on laragon? what are the steps necessary to do? thank you
    1 point
  34. 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
  35. 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
  36. Hi all, thanks for all the comments. It seems like there is no standard answer to my question ;-) Happy to started this discussion. For what I brainstormed with the current level of Processwire knowledge, I think I will be very feasable to get all the items in here. Having a look at the Skyscraper example (were jobpenings are the skyscrapers) I just need to add one additional layer (being the applicants). The challenge would be to build a dashboard with (front-end) access control were only the company posted the opening is able to post/edit/see the jobopenings and the applicants. My guess is that this would be very feasible using the current RBAC model in Processwire as the login is quite standard. In essence there would only be two roles defined: #1 me as being the admin and 2# as companies that want to post a jobopening. 2# would only be front-end access to the dashboard. When I find the time, I'll set-up a basic version of this website to test if this will work. I`ll keep you updated on the progress. Thanks!
    1 point
  37. 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
  38. You can definitely use include() inside a Hanna Code snippet. Have you tried an absolute path to that portfolio.php file?
    1 point
  39. A few minor optimizations: the "else" block isn't necessary no need to put the "class=\"something\"" into the variable, you just need to store the class name HTML attributes can also use single quotes, which makes assigning them in interpolated strings easier to read you have two identical if/elseif conditionals for the class and for rendering children, so you can set a flag in the first place storing the result of wire('page') in a variable (I used $page) shortens the code $a != $b is (to me) more readable in complex conditional expressions than !($a == $b) Untested: <?php // ... function renderMenu($items) { $page = wire('page'); // if we were given a single Page rather than a group of them, we'll pretend they // gave us a group of them (a group/array of 1) if($items instanceof Page) { $items = array($items); } $str = ''; foreach ($items as $item) { if ($item->showInMenu == true) { $menuText = $item->get('menuLinkTitle|title'); $currentClass = ''; $renderChildren = false; if ($page->id == $item->id) { $currentClass .= "current"; $renderChildren = true; } elseif ($page->parents->has($item) && $item->id != 1) { $currentClass .= "current-parent"; $renderChildren = true; } $str .= "<li><a class='$currentClass' href='$item->url'>$menuText</a>"; if ($page->id != 1 && $renderChildren) { $str .= renderMenu($item->children); } $str .= "</li>"; } } // if output was generated above, wrap it in a <ul> if ($str) { $str = "<ul>$str</ul>"; } return $str; }
    1 point
  40. @Zeka - Thanks for reporting this. Unfortunately, I haven't allocated some time to see if Jumplinks is compatible with the new PW3 master - it was tested on earlier builds. That said, I still don't understand why this could be happening. The only thing that springs to mind is a possible conflict with another module. I'm not sure which module it is, but I think there is a module that allows you to disable (not uninstall) other modules. Are you perhaps using any of those? If not, mind sharing the source and destination of the jumplink to see what the problem could be? I'm busy with a client project at the moment, but will try test the module on the latest PW3 master in a few hours.
    1 point
  41. v075 is up: grouped several AdminTweaks and RenoTweaks items into a new submodule "PageListTweaks" added new tweak "Show page IDs in pagelists" to PageListTweaks moved AdminOnSteroids.scss into the "src" subfolder
    1 point
  42. As you've already found nico's textformatter you could also use a:not(.external) to get all internal links.
    1 point
  43. First things first: what do you need this for? If it's a style-related thing use attribute selectors instead. Basically the same thing goes for JavaScript stuff. If you really need a server-side solution to this, the polite thing to do would be giving it a try yourself before asking someone to do it for you. That being said, what you are asking for would mean a) checking that the link isn't relative (href="/foo/" or href="index.html") and b) checking that it doesn't point to your own site (href="your-own-site...) It's really not a very difficult thing to do if you put your mind to it, so why don't you give it a try and if you run into any issues ask help with those?
    1 point
  44. 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
  45. For Windows users there is the Laragon version: https://laragon.org/download.html
    1 point
  46. 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
  47. Okay, so I've done it. Two sets of modules, one for the server side, the other for the client side. There are still a lot of ToDos, like adding dedicated endpoints on server and client (I'm currently hooking indiscriminately into ProcessPageView::execute, but I'd like to go the route of only loading the listeners for this template) or adding some kind of challenge-response mechanism to keep nosy third parties out. The modules are up on github: Server component Client component There's also a screen cap in the readmes. Both module sets have lots of hooks, so component modules should be easily able to extend the basic functionality. Currently, the online functions arealdy built-in are the setup of the management connection on both sides and getting basic client information. I haven't really looked at the upgrade or db backup modules, so I've got no idea how complicated remoting them would be. But the sky's the limit. Comments, critiques and pull requests welcome!
    1 point
  48. I think a central manager (ProcessWatch ?) is a great idea and something I've needed in the past. My collection of PW sites is growing rapidly and a birds eye view if all of them would be a real bonus as we manage more and more. Are there recent developments with PW3 which allows it to share data with other PW sites? Maybe the time has never been better to have a central PW install with the: 1. Ability to see which version is running and what latest Dev and Stable version is 2. Ability to upgrade , backup database etc 3. See a modules installed and their version. See if a new version is available 4. See the health of a site (some kind of ping or status - live or non responsive) 5. See who is logged in per site 6. See latest changes per site I think all of the above are already available within a PW install via native functions and Module so I wonder how they could be harnessed on a central console.
    1 point
  49. I like the original version of old boy
    1 point
  50. wait.for net split i do,my bots take over.yr channl Yes.will
    1 point
×
×
  • Create New...