Jump to content

BrendonKoz

Members
  • Posts

    236
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by BrendonKoz

  1. I haven't used it either but have thought about contributing to this particular module (since I've done work with fMailbox.php). As long as I've followed ProcessWire I still have yet to have a production website developed with it under my belt...but that will "soon" change. At that point I'll be better able to contribute.
  2. Just happened across this while randomly perusing (since I love the work Jason and Pete did with this). I have an updated version of the fMailbox.php class in my github account that may solve some of these issues. Technically speaking, the "problem" is that newer versions of PHP are much more secure, and so when connecting to mail servers it's *actually* checking validity of certificates and credentials and what-not. The quickest way to get things working is to fall back on how PHP used to work -- no security checks. My fMailbox.php version does that. It's not the best solution, but determining exactly how to get fMailbox to properly work with all variations of servers, certificates, credentials and what-not was just not working out too well for me. In terms of a good PHP mailbox checking library, I've found that Flourish seems to have one of the best even if it is primarily a dead project. https://github.com/BrendonKoz/flourish-classes/blob/master/fMailbox.php There have been various GitHub users that have all forked the Flourish library and provided pull requests. I've seen some and added the few fixes that (1)I hadn't already added, or that (2)didn't conflict. That said, there have been others that have been much more active in maintaining their fork than I have.
  3. Hey @teppo, How did you go about managing to configure Nagios to send email notifications? I've been trying to set that up on a Raspberry Pi but need to connect to an external email service in order to send the notifications and haven't quite managed to get that to work yet. As for simple site uptime checkers, I'm currently using UptimeRobot as well.
  4. I hate bumping really old topics, but since I've recently been looking at responsive images with regard to a central focal point, and this was the only topic that came up in a search (that I could tell was directly related), I thought I'd chime in and mention that there's a jQuery resource for defining a focal point when using various dimension based images in a responsive image layout. https://github.com/jonom/jquery-focuspoint I haven't looked closely enough (yet) on how best to possibly integrate this without requiring custom code in the templates, but it looks like a similar solution to the PHP-based solution offered here (and possibly more efficient overall). Below is an example of the script in action: http://jonom.github.io/jquery-focuspoint/demos/grid/lizard.html My buddy, the developer behind Statamic, built this (but customized) in to his CMS' control panel and his demo of it was awesome. It made me jealous that PW didn't have it, so the first step I did was to figure out which script he based it off of. So far I've only completed Step 1.
  5. Pete, have you tried (or had any problems) with Flourish incorrectly converting non-standard ASCII characters in your emails? I was enjoying their Mailbox classes for something else up until I had this problem, then checked their GitHub issues page and was a lot more skeptical. I'll be checking out Zend's classes now to see if it works any better, but was curious with your own results in using this. Dealing with mail and all the different variations on what should be a strict format is kind of a pain. == EDIT == Nevermind. I just noticed that in my super-quick test page to see how Flourish would work I did not set up the proper PHP settings for UTF-8 rendering (header and meta). It would be worth noting that a site (or page) layout using the Flourish library must be rendered in UTF-8 due to how it was developed. I feel silly, but am glad that I was mistaken. I may still look at Zend, but only if Flourish doesn't handle all of my use-cases properly.
  6. Hmm, it looks like I might be able to use Wanze's Batcher ProcessModule as an example to start from to figure out how to go about doing things in this way (displaying fields in a tabular manner). I should have thought to check the ProcessModules before when Wanze had mentioned creating something... :-/
  7. kongondo, that's not really a hijack of the thread/topic. Wanze, I too would be interested to know a little more detail of how you went about doing this. Most of the things that I've done in ProcessWire are simply using the core functionality, except for with templates which I simply refer to soma's API cheatsheet (which is fabulous). I've only done one module thus far which was 99% based on Ryan's RSS Module (I swapped RSS for JSON). My experience beyond that would be minimal. Example: I looked at the InputfieldMarkup.module but wasn't entirely clear on how to even use it. If anyone else has other suggestions for the original question or to broaden my eyes towards the awesomeness that Wanze is trying to describe, I'd be grateful.
  8. I'm having a hard time trying to understand how to do one particular type of task within ProcessWire. I'm hoping some of you others have dealt with this problem already and found an elegant solution to deal with it. The primary website that I maintain for my employer has quite a few pages that are basically just simple HTML representation of a non-relational table in the database. It's required to be managed (CRUD) with regard to the fields/rows in the database. However, there are a few tables that have upwards of 400 rows. (It's quite a bit to show on a single page, I know, that's how they want it portrayed.) Getting the data FROM ProcessWire is easy enough with a custom template. My concern is the administration of the data. I started looking at each row as a "repeater" type. Repeater types can fill up vertical space on the page very quickly and therefore (unfortunately) are unsuited for quick and easy management. Creating a single record for each value would also clutter the administrative interface rather quickly. I've seen soma's "jQuery Data Table AJAX" module which seems to be the closest solution, but since it's listed as an alpha and not to be used in production I have (unfortunately) not looked at it too closely to know if it supports all PW field types, or just text... I've also been asked to redevelop a running club's website. They upload and save the running/race results to their website. They'd like to be able to search for a particular user and automatically have all of their race results show up (and potentially run formulas on them to calculate different metrics). This would require that the fields are all visible individually within ProcessWire (and not an external database - which I was thinking might have been a possible solution previously). Any ideas or thoughts? Comments? I can't imagine I'd be the first to run in to this.
  9. For the most part, different templates serve different purposes. For displaying customized site content in the editor, this is a fantastic tool (Bramus). I realized that based on information that we already have available to us in the page create/edit form, we could dynamically load CSS content specific to a particular template. I have not entirely thought how this might best be served, it's more of a proof-of-concept idea at the moment. (Originally in my head I was thinking of "template" as a "theme" which is entirely different, but my curiosity was piqued. I have not discovered yet how themes work with PW, or if they do.) Unfortunately - from the research I've thus far made - it seems as though changing the loaded CSS on-the-fly with regard to TinyMCE requires a complete removal and reload (init) of the RTE. It seems possible (for all TinyMCE compatible browsers), but does cause a Flash-Of-Content. Since the editor would be hidden in a different tab (in the default admin theme) when changing themes, I don't think this would matter all too much. Alternatively, the TEXTAREA could be animated to hide (fade), remove/init, then unhide. Regardless...below is a link to an example where I've made it happen (the code is shoddy, it was just to get it working). It seems to work best in WebKit as you can more easily see the redraw in Firefox. http://gravball.net/test/examples/css_change.html (Note: this link will not remain forever) Dirty work of the code (where the IDs in the switch relate to a BUTTON element being pressed, just for an example): tinyMCE.init({ mode : "textareas", theme : "simple" }); $(document).ready(function(){ $('button').click(function(){ // set the css file path based on button pushed var cssfile = ''; switch($(this).attr('id')) { case 'css1': cssfile = 'css/test1.css'; break; case 'css2': cssfile = 'css/test2.css'; break; case 'clear': cssfile = ''; break; } // http://blog.gbinghan.com/2012/04/reintialize-tinymce-after-jquery-load.html $('textarea').each(function() { try { tinymce.execCommand('mceRemoveControl', true, $(this).attr('id')); } catch(e) { alert('error'); } }).promise().done( function() { tinyMCE.init({ mode : "textareas", theme : "simple", content_css : cssfile }); }); }); }); A script could be modified to listen for an onchange of the template and swap out the Bramus CSS for a template-specific version. Unfortunately I would need to somehow either determine and copy the current Processwire init settings, or call it with a modifier (if that is possible, I haven't gotten quite that far). Realistically this, I would imagine, would be much more handy with front-end themes that come with an accompanying backend Bramus CSS file to match the frontend. Still, at this point it's more of a proof-of-concept. Administrators: Feel free to move this to a new forum/topic, I didn't intend for this to become a conversation of its own.
  10. So after reading through this topic, I also realized that it would be possible to load CSS files with the same names as the template assigned to a page (for all TinyMCE enabled textarea fields related to that page) -- and change dynamically if the template was changed on-the-fly. Example: Template: basic-page CSS Filename: basic-page.css Unfortunately I'm having a hard time following how Processwire is loading TinyMCE since it seems to be rather customized. Is it the jQuery version of TinyMCE? Are there hooks to interact with the TinyMCE init? Is it possible to override select settings from the default? Once I can figure this out I'll gladly share my solution for anyone to use...or critique. I don't know if naming CSS files based on the template name is the best method, but the concept could be pretty easily used to provide for a more meaningful and useful solution.
  11. I'm trying to determine how to do an hourly "Daily" display for a calendar system. When I look at Yahoo or similarly design properties for calendars, when they do the hourly-separated daily calendars, it looks great. I'd kind of like to do something similar to that at least. Unfortunately, I'm having trouble trying to figure out how it's done. It appears as though Yahoo (and Hotmail, etc.) use a large amount of JavaScript to get the rendering to look the way it does. I'd have to imagine that CSS could do a decent enough job at this point with a modern browser. Immediately I think "tables", but then I wonder if it should be a list item (since things in an hourly fashion really are a chronological list). If it's a list, how would the markup (CSS) work? How would the labels to denote the hours be aligned properly to the left? I haven't yet been able to figure it out. Any ideas from those of you who may have already implemented your own, or anyone that just has an idea? I'm OK with using tables since the data will be tabular, but realistically it also is chronological (a list). Darn semantics! Example image of what I'm trying to achieve.
  12. I'm still following this topic but don't remember getting email notifications. Both of your responses were well thought out and, I believe, are much better solutions. Right now this conversion is a proof of concept so I won't worry too much about the security. After it's proven to be an effective way of managing content, I plan to redesign/redevelop the website, much of it from scratch. I will definitely be keeping this in mind as I build it out as I'd prefer not to solve the situation in the same way (and instead keep it outside the reach of content editors). Thank you again for following up and making an excellent point.
  13. In this instance I think I'd want to use the same template file for all of the static files. With the exception of the additional JS/CSS to interact with the body content, everything else would be the same - though I do like that way of doing things. Ryan, when you mention using the same technique with page IDs, you mean PW page IDs and not a body element property "id" value right? If so, at that point I think Nico's solution might be more versatile in that it can take advantage of other features, such as the "copy page" module, unless I'm just not understanding something. Thank you both very much for your input though! I was leaning toward's Nico's way of doing it for this project, but just wasn't sure if it was the right way of doing this type of thing. There isn't always a right or wrong, but oftentimes there's a "best" - whether that's this or not, it's time to stop over-thinking and move forward. Thank you again!
  14. I have a website that will be converted from mostly static PHP/HTML to (hopefully) using ProcessWire. There are still a few things I have to work out (mostly the database-driven aspects to be converted) but this particular website pretty much uses a global site header and footer. Out of around 100 pages there are a handful of pages that have custom CSS and/or JS added to do specific things. Each of these pages' CSS/JS is custom to the page. I've been trying to think of the best course of action in designing the template for this conversion. Many small sites can include the custom JS/CSS in globally included files and rely on caching. On the other hand even if it were cached it's additional KB that wouldn't need to be included on 90% of the site's pages. ProcessWire could be used to include a field for additional code (or additional js and css, respectively separated). I realize this could potentially be an extra hit on query time on the database, but ProcessWire also has some impressive caching, especially with regard to Ryan's PRO Cache. I'm just curious how others might handle this type of situation, and why?
  15. I suppose that does make sense since a DB error would be a non-recoverable system error. I'd actually think that would make more sense in most cases than a 404 - at least if a page is supposed to exist. As for the error template - that was basically what I had in mind, yes. I believe that would be perfect. Thank you all for the feedback and discussion!
  16. Yes, sorry for not being clear. Information to developers/administrators is definitely important! I typically check error logs. I could even understand seeing logged in users of the admin group seeing a more descriptive error message (if desirable in the template) than standard site visitors, but what I'm envisioning is basically a custom error page, except obviously not sending 404 headers. Exactly. A default splash page might be nice, but being able to customize it to your own site's design, as well as to your audience, would make things so much nicer when the unthinkable (database goes down) might happen. ...unfortunately that "unthinkable" issue does happen to us more frequently than I'd like under our shared hosting plan. Having the ability to display a custom designed page would just make the system that more robust.
  17. I guess I did find the proper forum then. I realize that Processwire uses Exception handling to bubble up error reporting. I'd just hope that, even if there's an error handler for database issues that it (somewhere) has a way to implement this change. I'll have to look around, but I don't know if I'll be able to find anything. Wishlist!
  18. Although not frequent, and usually not for very long, databases will experience problems and just not be able to be connected to. An error message of just "Unable to complete this request due to an error. Error has been logged." just doesn't seem too friendly to visitors. Perhaps I just haven't seen this (or discovered how to do it), but if it isn't currently an option (or a hook) for this, it'd be a welcomed thing. (If there is a way to do this, I apologize...it's sometimes hard to come up with the proper search terms to find results.)
  19. Okay, it seems I have some more reading and comprehension to do then. I really don't want a redirect, but after reading yellowled's response it then got me thinking about using a ("clone"?) template that could request a page fieldtype and simply pull all of its information. The only difficulty stemming from that would be requiring users to then manually find the original source to modify the content. ... but somartist might have a slightly nicer implementation (I'll have to look it over more carefully to see what it truly does). I'm about to leave for a 4 hour drive to visit family for an extended weekend, so I have not had a chance to fully grasp every one else's responses, but I wanted to drop in really quickly and say "THANK YOU!" as it not only shows the power of Processwire, but also the strong community support. You're all awesome. Hopefully Monday evening when I get back I can look this over and get a much clearer sense of it all.
  20. The more I read through the API documentation, the more I learn, but the more I also manage to confuse myself at the same time, so I thought it was about time that I just asked my question. I built a very, very simple management system for my site awhile back. I received a request that during development of my system I never thought would happen, but seemed completely reasonable once I saw the request - apparently EECMS also doesn't handle what was requested though, so I didn't feel too bad. I'll try to explain below once I ask the question: Is it possible for PW to handle a single page (item/id) under multiple parents within a site's hierarchy? Example Fictitious Hierarchy 1: HOME - Vacuums - - Wet Vac Cleaning Solutions - - - Super Clean 2000™ - Household Cleaning Products - - Super Clean 2000™ Example Fictitious Hierarchy 2: HOME - Payroll - - Paycheck Schedule by Title - Human Resources - - Titles and Salary Levels - - - Paycheck Schedule by Title So the idea here is that a single page/item ("Super Clean 2000™" and "Paycheck Schedule by Title", respectively) only needs to be created and maintained once, but due to logical association should be found as being related to multiple parents within a site's hierarchy (and appear as though they actually are, in fact, children of each parent individually within the navigational structure). Is it possible for Processwire to handle this sort of thing?
×
×
  • Create New...