Jump to content

BrendonKoz

Members
  • Posts

    326
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by BrendonKoz

  1. No apologies necessary; I appreciate even just the initial response! There's no expectation of a response, but thanks again for the reply!
  2. Brilliant! I need to check the module configuration options more often. Never think to look there after initial install. Thanks, BitPoet!!
  3. Hey 3fingers - thanks for the reply! Unfortunately those are not helpful in this instance. I've gotten the default CKEditor to comply just fine the way I was hoping. The problem is specifically with the PWimage add-on for embedding images in to CKEditor. Thanks, tpr! These are kind of what I was thinking I could do, but was thinking/hoping there might be a PW way of fixing it that I just didn't find. Once this project's done I have a few things that I'll want to tackle to see if I might be able to fix. Looks like this might be added to the list.
  4. Hmm... I could disable the core pwimage plugin (from the field settings), copy/paste that plugin from wire and move to site, rename it, and just maintain a diff from the official repo version... Just not sure if this is the best or only method available. Thoughts?
  5. Hi all, I'm wondering if anyone's come across this problem and/or solved it. I'm using Bootstrap for my front-end CSS in the current project. Bootstrap's image alignment classes are pull-left, center-block, and pull-right (as opposed to PW default of align_left, align_center, align_right). I could rebuild the Bootstrap CSS to accomodate (by adding) PW's chosen class names, but I'm currently instead trying to accomodate PW to use Bootstrap's names. I've found the information about using Custom Editor JS Styles within the field's settings in the ProcessWire admin. What I haven't found is... ... How can I allow and enable custom class names from the PWimage CKE plugin? I'm aware that I could modify the JS source of pwimage, but since that's a core module if I were to update ProcessWire I'd overwrite my modifications. Is there an alternate, best-practice way to handle this? Thanks!
  6. Thank you for the response, AndZyk! Do you happen to know what any of the "internal uses" of the published field are? That was mostly my concern, as I think in this case the easiest solution would be for me to manually update that field's data, and is currently what I'm leaning towards as a quick solution. In the future, with this project, access to a published field will be unnecessary.
  7. I am currently running the Processwire 3.x branch (specifically 3.0.36 at the moment) and am back-porting data from a previous website that was created back in 2010. In trying to provide seemingly accurate publication dates to the older articles that I'm manually porting, I was thinking of adding a `published` field to the pages. Upon closer inspection I found that all pages do indeed have a `published` field already (in this version of ProcessWire anyhow). I suspect it was added to core back when ProDrafts was created. I see that there's a module to handle the ability of providing this field to all pages. http://modules.processwire.com/modules/publish-date/ I'm not sure if this is necessary now though if all pages already have an associated `published` date field? Would a module need to be created to expose this database field to the admin side, or is there another way to do this? Would modifying this field cause any detrimental side-effects (I do own a ProDrafts dev license, though am not currently using it in this project).
  8. No, I actually side with @cstevensjr in not wanting to remove the added security. I do have some additional fixes that have nothing to do with the security certificate issues though, so at some point I'll probably offer those fixes as a patch to the plugin without introducing the reduced security. They primarily have to deal with fixing the way various mail clients and how they handle (or don't correctly handle) attachments and/or inline images.
  9. 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.
  10. 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.
  11. 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.
  12. 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.
  13. 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.
  14. 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... :-/
  15. 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.
  16. 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.
  17. 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.
  18. 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.
  19. 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.
  20. 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.
  21. 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!
  22. 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?
  23. 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!
  24. 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.
  25. 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!
×
×
  • Create New...