Jump to content

ryan

Administrators
  • Posts

    17,240
  • Joined

  • Days Won

    1,704

Everything posted by ryan

  1. Thanks for looking at these. I was thinking some css3pie might be a good way to go here. The only reason I haven't yet is that I like the squared off version almost as well (like in IE and other older browsers), so don't mind the variation. But I think the right thing for me to do is instead let the client decide... but that's after I figure out the rendering issues. So far I haven't been able to find anyone else that can duplicate it except for this client. But this client has been able to duplicate it on many computers running FF3, both in and out of their network. Their whole company is apparently standardized on FF3.6. They've only been able to duplicate it on one computer running IE8 (as far as I know). And we did play with the compatibility mode, that wasn't it. So the FF3 one is more of a concern. @Pete: while the compatibility mode isn't the issue here (we tried it both ways), the compatibility mode issue has come up on other sites before, so that header is good to know about–thanks (I didn't know about that one before). I did know about the meta tag (below), but the header really may be a better solution since it catches IE before markup starts flowing. <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
  2. Can you paste in the exact text? I just want to try and see if I can duplicate locally. Though I was assisting someone else with Cyrillic text a couple weeks ago and everything worked well for me. It turned out that their PCRE version was from PHP 5.1 (even though their PHP version was 5.3), and didn't support Cyrillic. However, that doesn't appear to be the case for you as your PCRE appears to be up-to-date.
  3. I think that interpreting a license is kind of a tricky spot because lots of GNU software has components of other GNU software. And one author can't make the interpretation for another. So I think it may be best to take the license literally for what it says and the author has to accept it just like the users do. Though the copyright holder can always change the license, but then they have to make sure that's compatible with any other components in the software. For instance, if PW were to be MIT licensed, then I probably couldn't bundle in TinyMCE and Markdown with it anymore. I don't think there is anything in the GNU license that would lead me to believe that someone's original/custom plugin modules would fall under PW's license any more than your website itself would. The reason for this is that ProcessWire is a tool, like PHP is a tool. When you use the API to create your a website or supporting module(s), you are using that tool in the manner it was designed for. PW's license doesn't say what license your own code carries unless you go in and modify PW's code in the process. When you create modules or templates, you aren't modifying PW's code. After all, ProcessWire doesn't have to be released under the same license as PHP. I didn't think this was an interpretation of the GNU license, but I'm also not a lawyer, so somebody correct me if I'm wrong.
  4. Can you describe in more detail: what behavior are you experiencing and can you paste in the text/label that's causing it to hang up? Also, view your phpinfo(); and look under the "PCRE" section and let us know what it says the PCRE version is. Lastly, look in your MySQL database for the table 'field_title' and let me know if it's charset is not utf8.
  5. Yes, t-shirts, coffee mugs, and books too (books re-posted from another thread)
  6. Not ProcessWire related (other than the site was built in it), but also maybe not pub material. But I'm one of those people that goes to the pub and sometimes talks about work... I'll setup a "General Web Development" forum later. I've got a client that is telling me the site I launched a couple weeks ago (http://villarental.com) is not working in Firefox 3.5. They've sent me screenshots, and apparently lots of things are just breaking, layout-wise, and inconsistently at that. See the attached screenshots. The problem is that I can't duplicate it. I've borrowed an old Mac with FF 3.5 and installed FF 3.6 on a WinXP virtual machine, and everything displays just fine (minus no CSS3 round corners). The code also validates with validator.w3.org. Then yesterday, I got another email that it was now breaking in Internet Expoder 8 (see 3rd & 4th, smaller screenshots). Again, I can't duplicate it... everything displays just fine for me in IE8. So something is going on here, but I'm at a loss to determine what since I can't duplicate any of it. Just wondering if you've got FF3 or IE8 sitting around, can you try loading http://villarental.com and click around a couple pages and let me know what you see? Even if everything looks fine, it'd be good to know at least I'm not alone in being unable to reproduce the breaking layout.
  7. ryan

    Inside Job

    I haven't seen this one yet, but have it in my netflix streaming queue. The problem is, I don't think we've actually watched a full movie since we had a baby (now toddler), 16 months ago. Hope to get around to this eventually.
  8. I bookmarked that to read in more detail later, but I think they may be talking about the nested set model. There are a few reasons why this isn't a good model for PW (http://processwire.com/talk/index.php/topic,43.0.html), but I'll enjoy reading the article nevertheless. Also, what would make the sort routine fast is for me to just recode it to use SQL queries rather than API calls... that would make it lightning fast even with a thousand pages. But I'm trying to avoid going there except where necessary, because it means thinking about all the other stuff that happens when a page is loaded or saved, like hooks. If I go and manipulate the DB directly, I don't have to load or save any pages, but likewise none of the load or save hooks would get executed.
  9. I wasn't aware of Concrete5's marketplace–it seems like a good model. Thanks for posting this. ProcessWire is as much of a development tool as it is a CMS, so I think our audience is largely designer/developers–people that have their own clients to support and people that are strong believers in open source. I'd like to build the ecosystem in a manner that best accommodates this audience. In addition to providing high levels of support for those that want it, I think that marketplace for add-ons and services is also a good way to do that. Though I envision that most modules, templates, etc., in the marketplace would be free, but if somebody wants to make investments to build and support a commercial module or service, I would want to support their ability to do that. Like most open source CMS projects, ProcessWire is GNU licensed. Concrete5 is a little bit unique in that it's MIT licensed (I think), which is even less restrictive than GNU. It says you can take the code and do whatever you want to with it... you can go build your own commercial application around Concrete5 and then sell it. Whereas, the GNU license requires that forks also carry the GNU license. That makes it hard to sell something derived from GNU licensed software, unless your selling services related to it while making it clear to the customer that the software is free. But ProcessWire's module/plugin system maintains a strong separation between what is ProcessWire and what is the module. Like a web site built in ProcessWire, 3rd party modules are not derived from ProcessWire, they just implement the interface that ProcessWire requires and use its API. So 3rd party developers are welcome to commercially license their own modules if they choose to. At least, that's how I understand it (I'm no expert on licenses). If the module interface (Module.php) or starter modules (like Process.php, ModuleJS.php or Textformatter.php), or admin templates need to be dual MIT/GNU licensed, then I'm okay with that, but the core would stay GNU. I think our usage is probably far too small right now for there to be a market for commercial modules, but I also think we're going to reach that critical mass before long, so it's good to start talking about it now. Antti's ideas around the marketplace seem like a good direction for developers to make their PW-related products and services available.
  10. Adam thanks for the props but don't give PW too much credit in this area. To be fair, I don't think we've got the perfect sorting solution in place yet. The sorting doesn't scale particularly well because it has to load all the sibling pages to do it's thing. Depending on where you sort the page to, it might also have to save a boatload of pages. If we're talking about a few hundred pages, it's going to be slow. If we're talking about a few thousand pages, then it might just run out of memory. But who wants to manually sort thousands of pages? ... Luckily, most situations where you would have a lot of pages, you are also going to have a default sort setup (like name, title or date). Manual sorting is really only useful for smaller things like navigation. But I still want to make the manual sorting a lot more efficient at some point in the future. It's just not a major priority since the potential problems with it are unlikely to show up in regular use.
  11. Trying to keep a block of reserved IDs in the lower numbers for future use, probably going to change the starting ID to like 1000 or something like that.
  12. The 'sort' and 'move' are considered two different operations, and they each do their own save, so I think that's why you are seeing the save occur twice. Another thing to note is that when you change the order of a page, it also has to save all the pages that would have their order affected. Meaning, all sibling pages that appear above the original location and new location. Though if a the parent is set to automatically sort it's children by some field, then it doesn't have to do that. In your case, it sounds like you want to avoid the same page coming up twice in your hook. The best way to do that is basically what Adam suggested and keep track of what you've already saved. <?php public function yourHook($event) { static $saved = array(); $page = $event->arguments[0]; if(in_array($page->id, $saved)) return; // skip if we already saved $saved[] = $page->id; // your hook code here }
  13. Its not dead, it just means you need to delete some of your unicorn pics and clear up some space.
  14. Good question, and I'm not really sure about an answer. I do know that I want to find a way to dedicate as much time to PW as possible and that means being able to make a living from it. To a large extent, I'm already doing that as ProcessWire is the engine for most of my client projects... and it's driven quite a lot of business over the years, and continues to do so. So that's how I'll continue to proceed. Though that means that development is generally driven towards my own needs rather than those of the bigger ProcessWire community. I've always thought that one of the ways to support PW's growth is by offering enterprise support and consulting services for those that want it. Lots of companies don't want to be dependent upon software unless there's an official entity to support it. So I've thought at some point I would like to be able to provide enterprise level support, leading to higher profile projects and more exposure for the software and open source in general.
  15. I think that means that MySQL ran out of hard drive space ;D
  16. Thanks, you guys are too kind. Sinnut I had forgotten that you were the one that originally asked me to setup a forum–that was an excellent suggestion on your part! Thank you for that. I'm advising people to use 2.1 now unless they need to upgrade an existing 2.0 site. But once 2.1 is totally wrapped up next month, we'll start trying to get more exposure for PW on other sites like opensourcecms and others.
  17. This is actually a perfect case for the tree because you have so many options at your disposal, all which will be far better than the alternative. First off, if your products will have URLs that people can bookmark and search engines can index, then you cannot disregard everything having a fixed place (URL) in a structure (tree). A site without real locations for it's content is not an accessible or indexable site. So the idea of multiple parents per child, as it relates to a web site's URL structure, would be shooting yourself in the foot. But I think that you are actually talking about something different, and something that's very simple in ProcessWire. The tree hierarchy defines the primary home of content. It does not define all of it's other categories, connections or relations to other nodes (pages) in the tree or other pages of the same type. This is what page references and templates are for. So in your case, I would suggest the following structure. I'm assuming that there are multiple product types, in addition to toys. /products/toys/ /products/toys/some-toy/ /categories/wooden/ /categories/some-category/ /materials/wood/ /materials/brick/ /materials/straw/ Create page relations on your product template called "categories" and "materials" and set them to choose from the relevant parents. Now you can deduce any number of other relations on the fly, like: /categories/wooden/toys/ But no need to literally create that page, because the context can already be determined from the existing relations. So your 'category' template code might look like this: <?php if($input->urlSegment1) { // there is an extra component on the URL that doesn't resolve to a page, like /categories/wooden/toys // so we assume they are adding a product type filter $name = $sanitizer->pageName($input->urlSegment1); $type = $pages->get("/products/$name/"); $products = $type->children("category=$page"); } else { // just grab all products in this category $type = new NullPage(); $products = $pages->find("template=product, category=$page"); } echo "<h1>Products in category: {$page->title}</h1>"; if($type->id) echo "<h2>With type: {$type->title}</h2>"; foreach($products as $product) { echo "<li><a href='{$product->url}'>{$product->title}</a></li>"; }
  18. It's true that an interactive resize isn't all that valuable when working with just an image(s) field, because the site (via your template) is going to create it's own thumbnail automatically. While the resize may not be so useful there, the cropping still is, because the site will create it's thumbnail consistent with your defined crop. This is how you ensure that the auto-generated thumbnails aren't cutting off people's heads (as an example). But things change when you bring in TinyMCE. In that context, cropping is just as useful as the existing resize functionality already built into it. As a matter of simplicity, we'll probably set it up so that resize+crop are accessible in any context, but a copy of the original image will always be kept behind-the-scenes.
  19. Marty, thanks for making that video and posting. It was helpful to watch that, and I think it seems like a great jCrop implementation there. How did the thumbnails go from what you showed in the video into that grid of illustrations? Were they tagged to appear there, or are they somehow placed with a richtext editor? Thanks, Ryan
  20. The installer does check file permissions. But those directories don't need to be writable. Only the /site/assets/ needs to be writable (and PW's installer will tell you if it isn't). I'm wondering if maybe one of those dirs may have not been readable by Apache for some reason ... that's a permission we do not check for. I wouldn't have thought we would need to, but perhaps we should. Most likely the white screen was a result of the server having PHP's display_errors off (which is a good idea for production servers). Whatever error occurred likely ended up in your PHP error_log file. If it's easy to find, please post what it said. If it's not easy to find, don't worry about it, and I'll keep an eye out for similar issues in the future.
  21. There's been very little written about ProcessWire formally on other sites, so always glad to see someone write something about it and I'll try to post links here when they appear. Marc Carson (@circular on twitter) posted an article on his site titled "Thoughts on CMS packages, July 2011". In it he briefly covered Textpattern, ProcessWire and a couple others. I thought it was very complimentary to ProcessWire and Textpattern (one I've not tried before). Here's the link: friendlyskies.net/site/webdev/thoughts-on-cms-packages-july-2011 http://www.friendlyskies.net/notebook/thoughts-on-cms-packages-july-2011 I think we'll get a lot more written about it once get get 2.1 finalized and we start promoting it intentionally, like on opensourcecms, etc.
  22. The parentPrevious is only available until the page is saved, and it's a runtime thing, so it's not saved in the DB. Though a revisions module is underway that will be saving all previous states of pages, but we're a couple months away from that being ready. Of course, you can always save the previous parent info yourself if you need it. For runtime, you can set whatever you want to a page and it will act as a data container. It only saves data in the fields assigned to it, so there's no harm in setting some other random values to a page if you want to. So you could for instance set $page->parentPreviousPete = $page->parentPrevious and use it where you needed it. If you wanted it to save to the DB, then you would need to actually add a field to the page called parentPreviousPete.
  23. I see what you mean. If you are okay with setting it in your /site/config.php file, I can make it happen. This doesn't involve adding any real overhead or complexity to the system, because these types of config options are optional.
  24. While the PW core isn't built around the idea of rendering markup, I don't think there is any problem with other modules filling this need for those that want it. While we've got that now with modules (like Markup modules), we don't have a specific standard as it relates to markup rendering 'widgets'. I think all we need is a class that requires a render() method, so will plan on this to start. Most likely I'll round up the existing Markup modules behind a base Markup class that implements the Module interface, and we'll take it from there... If we need something more specific to widgets, then we'll probably make a MarkupWidget class to serve as a base for those modules.
  25. Here's how you can make a site profile to be installed somewhere else: 1. Export your database with mysqldump using this command, replacing [user], [pass], [database] and [host] with the ones you are using. You can probably duplicate this with PhpMyAdmin too, but note you'll want complete inserts and you don't want extended inserts. mysqldump --complete-insert=TRUE --add-locks=FALSE --disable-keys=FALSE --extended-insert=FALSE --default-character-set=utf8 --comments=FALSE --compact --no-set-names --skip-disable-keys --skip-add-locks -h[host] -u[user] -p[pass] [database] >install.sql 2. Move the resulting install.sql file to /site/install/install.sql. Of course, if the /site/install/ directory doesn't exist already, then create it. mkdir /site/install/ mv install.sql /site/install/ 3. Move /site/assets/files/ to /site/install/files/ mv /site/assets/files /site/install/files 4. Delete these dirs and files: rm -rf ./site/assets/sessions/ rm -rf ./site/assets/logs/ rm -rf ./site/assets/cache/ rm ./site/assets/installed.php 5. Edit your /site/config.php and remove these lines at the bottom: $config->dbHost = 'localhost'; $config->dbName = '...'; $config->dbUser = '...'; $config->dbPass = '...'; $config->dbPort = '3306'; $config->userAuthSalt = '...'; 6. Zip up your /site/ dir. zip -r -v ./site-default.zip ./site/* Now you've got a site-default.zip file that is ready to be installed somewhere else. All you need to do is download a fresh copy of PW, remove it's /site-default/ directory and replace it with the one you zipped up. Then run the installer. I may be missing something, but I think that's all there is to it. If anyone tries this and runs into any problems please let me know. The plan is to automate all this into a site-exporter module at some point. Edit: I forgot step 5, and just added it above. Edit 8/15/11: Updated mysqldump command above to new/better version
×
×
  • Create New...