-
Posts
16,772 -
Joined
-
Last visited
-
Days Won
1,531
Everything posted by ryan
-
I can upgrade this when I get back, but if you want to upgrade on your own it's really easy. Just download the latest jQuery and save it to this file (overwriting the old version): /wire/modules/Jquery/JqueryCore/JqueryCore.js That's all there is to it. Though if you want to make it official, then edit the jQueryCore.module file in that same dir, and set it to have the correct version number. If you opt to upgrade your jQuery, let me know how it goes. If all seems good, I'll commit the upgrade when I get back (or do a pull request if you prefer). I will probably look at the jQuery UI version at the same time, just to see if there are any upgrades there we should include as well. Thanks, Ryan
-
You guys give me way too much credit. If you saw how many clips were recorded and how many umms and uhhhs were edited out, you'd laugh. I eventually realized that I had to write down whatever I say on the video, and just read it off the screen. Luckily the macbook has a camera built into the screen, so it doesn't really look like you are reading off the screen. There's a reason why I don't make many of these videos... it takes half a day just to do a short one. But it is true that I can build skyscrapers with my bare hands– as long as I've got enough legos to do it. ;D
-
I'm responding from phone so keeping it short: $image = $pages->get("template=page-headers, sort=random")->images->getRandom();
-
Thanks for letting me know – Looks like I had "allow URL segments" turned on in the homepage's template. I don't need that on the homepage, so turned it off, and problem solved.
-
Looks like your server is forcing a Windows-1251 charset header, overriding ProcessWire's UTF8 charset setting. Try the following: Add this to the top of your .htaccess file: AddDefaultCharset UTF-8 If that doesn't fix it, try adding this to the top of your /index.php file: <?php header('Content-type: text/html; charset=utf-8'); Hopefully we can override the Windows-1251 charset that the server is forcing in Apache.
-
Thanks all for testing this! Next round of drinks is on me. @Sinnut, thanks for posting this .htaccess directive. I am going to try it out and take a closer look and perhaps look at including this in my sites, if not PW. I didn't realize it could be defined at this level, which is pretty awesome. That /regions/ page just has a blank template. I still need to do something with it (along with a few others) but hasn't yet been a priority since it's not a functional page on the site. But I agree that sooner or later people will test it out in their address bar... I'm prone to doing this on sites as a form of navigation myself. I'm getting 404s for all non-existing regions off of /regions/, like http://villarental.com/regions/lajelakjelj (which is what it should do). What's an example of a URL that's giving you a redirect? @Adamkiss, you are the man. Thanks so much for all your testing here! This is really helpful. Now I'm off to try and reproduce it myself. That "0" was not supposed to be in the masthead.css–that's an error, just fixed. Thanks for finding it. The -moz-border-radius is intentionally excluded. I don't want it to render the rounded corners unless the browser actually supports the native border-radius. The reason is that -moz-border-radius (in FF3 at least) only rounds actual borders, and not the boundaries of images. So when I was using it, I was getting some things rounded and some things not, and it just looked inconsistent in a bad way. I figured it looked better if everything was either rounded or not rounded in a consistent manner. Btw, you are the man.
-
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" />
-
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.
-
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.
-
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.
-
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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 }
-
Its not dead, it just means you need to delete some of your unicorn pics and clear up some space.
-
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.
-
I think that means that MySQL ran out of hard drive space ;D
-
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.
-
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>"; }
-
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.
-
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