-
Posts
17,241 -
Joined
-
Days Won
1,704
Everything posted by ryan
-
Good catch, I've updated the original code example too.
-
Great feedback, thanks Maruchan! It's interesting to see that ready-to-go site profiles and training materials are your top two. Both of these appeal to me a lot, definitely something to think about more. I might have to test the waters with a ready-to-go site profile to gauge interest. Beyond those that you mentioned, are there any other ready-to-go site profiles that you think there would be good demand for? With regard to books, I'd love to have two "abookapart" sized/styled ProcessWire books: one for developers, and one as a user guide that we can provide to our clients after building a site for them. Though even if not full-blown references manuals, such books would take serious time and resources to create. But I've got two things working for me on that front: my brother designs books and my dad owns a book publishing company. I'm going to have a little chat with them this weekend. However, with family in the book publishing industry, I'm well aware that one does it for the love and not the money... most books lose money. Still, I think ProcessWire book(s) might do well, so I'm going to find out how much it'll cost for the production.
-
Currently that's not possible, but I think it would be easy for us to add an nl2br() function to convert newlines to <br /> tags in the field description output. Let me know if that's what you are looking for and I can add it.
-
Progress on ProcessWire 2.2 and overview of multi-language support
ryan replied to ryan's topic in Multi-Language Support
Thanks for the updated French translation! I pushed an update this morning that changes one aspect with regard to the 'default' language selection. Now you no longer select a default language from the LanguageSupport module config screen. Instead, the default language is the one installed by the module. Previously it was called "English". Now it's just called "Default" and you rename it to whatever you want. If your default language is French, then you rename it to French and upload your French files there. The reason for this is two-fold: 1) Lots of sites don't need English; and 2) The default language is not deleteable. So I figured it's better for those that just need French (for instance) to only have French and not bother with having some non-deleteable English language installed in the system. Besides, since PW is in English when untranslated, any language that you create is already using English until you put in translation files to change it. So there's no reason to have a permanent English placeholder language. Also, I've added a new module to the system and it's ready for translation. To translate it, click 'new' at the bottom of your translation files and paste this in: /wire/modules/Process/ProcessPageClone.module Don't worry about updating your translations just yet because there are still more modules being translated. So you may just want to wait and do them all at once. But I just wanted to mention that one above because it's a new one rather than one that's already in the system. -
Nobody's said anything about making PW commercial. It is a "truly" open source project in every way possible and that's not going to change. I don't want any implication of anything other than that. I don't personally have any commercial aspirations with ProcessWire. My interests are in helping it to grow as an open source project and meeting the needs of the community. I'm not here to make a buck. People don't get into open source for the money (there's no money in it). Instead, I'm here to put money and time in it – I saved for a few years to pay for the time it took to make ProcessWire as an open source project. I did it for the same reason that one would invest a lot of time and money building model airplanes or trains… it's what I enjoy doing. Especially now that there's so many of us. I find the work and community here hugely rewarding, surpassing anything I could have ever been paid. There's no expectation of making money here. But now that we've got a dedicated community, I do think we've got a responsibility to chart a path forward for growth so that the product can grow with the community and continue to meet their needs. My financial resources are not unlimited and I've got a family to feed. I can do that by taking on more client work, and just work on PW on my spare time. But my preference would be to find a way to make ProcessWire self-sustaining, so that it can grow on it's own funds more than mine. I'd also like for myself and others to be able to afford to put more and more time towards it. Actually, I'm determined to put more time towards it even if it means going without sleep. While I'm not sure if it's the right path or not, I do like aspects of the idea of having options for commercial modules. I think it could help us to attract high-profile and mission critical websites, and service-oriented module developers that can bring more exposure to ProcessWire… increase its audience and help it grow. I also think that providing a centralized gateway for modules (free and commercial) serves our community a lot better than the alternative. Whether anyone will actually build any commercial modules remains to be seen, but I'd like to encourage high quality 3rd party module development, free and commercial. I have no problem if someone wants to make a buck on creating a commercial module, so long as they make it good and support it well. If we don't serve as a gateway for this stuff, then we have no means of effecting the quality and service to our community. Perhaps C5 is making some mistakes in the manner in which they are doing this, and it would be good for us to study what they are doing right and wrong. If its really hurt their community there, and that's a widely held opinion, then that would be a good reason not to use them as a potential model. I like Symphony's model of making commercial support options available. I think this is another thing that attracts high-profile and mission critical websites, while also supporting development of the CMS. Though I have no idea if it's been successful for them or not. Correct me if I'm wrong, but the WordPress business model is primarily centered around hosting. I'm not sure this model translates to ProcessWire very well, because our audience is more web-professionals than bloggers and writers. It would be interesting to know more about why WordPress supports commercial themes but not commercial plugins. I am wondering if their plugin system is such that anything built on it has to be GPL. Whereas ProcessWire's templates and modules are using the same interfaces and API. What are other ways that WordPress or other open source CMS projects are growing in a self sustainable way? Some other ideas are books, commercial tutorials and training (videos or in-person), commercial site-profiles (ready-to-go school website, or the like), custom module development (for individuals), selling advertising (though not very interested in this), coffee mugs and t-shirts. Please throw some more ideas into this if you have them. Ultimately if the community isn't supportive of any specific business-models, then we'll throw the ideas out because the project will grow and move forward either way. But I'd like to get to the point of being able to put more and more time towards the project, so just looking for ways to do more PW work and less client work.
-
I'm not sure that I understand your setup well enough to be able to provide a good answer on how you should change it. So I'll just mention some general guidelines. For sites where you need to maintain multiple points of access, t's best to narrow in on your primary points of access change in your site, and use a unique template to serve as the access parent. Then let everything below it inherit that access, and control what can go where with family settings in the templates. To get template selection of new pages per role, you would give the role edit access to that template (or let it inherit it from another). Then in family, select the allowed parent templates. You've now defined what roles can create new pages using that template. To keep it simple, inheritance is all or nothing in 2.1. You don't inherit some things from one parent and others from another, like in PW 2.0. You inherit everything from the access parent's template, which helps to reduce confusion (relative to 2.0). 40 templates is a lot even for a large site (more than I've ever used) so I do wonder if that is necessary, though I'm sure there are cases where it may be, but it's something to look at.
-
Antti I think you are right, that must be what he's talking about (fieldgroups). From the admin side of things, Fieldgroups and Templates function as one component. While you can maintain separate Fieldgroups from the API side, you don't have a way to manage them separately from templates in the admin.
-
Stop using Firefox 3, we're on version 8 now. But if you find there is still an issue in newer browsers, you might also want to check your post_max_size in PHP settings. That has to be a number at least as large as your max_upload_size.
-
Also check that the template you are using with this (contact) doesn't have caching turned on. If you need to use caching with the form, you'll want to specify a POST or GET var that must be present to disable the cache (see the cache settings in the template).
-
I'm not sure why they wouldn't be showing up in your fields list, unless they somehow got system flags. Try clicking in the filter options and 'show built-in fields', to see if they show up there? Another question: what is the name of the fields that you created via the API?
-
You can also detect if a hook is coming from an admin save by checking the value of wire('process') in your $pages->save() hook: <?php $process = wire('process'); if($process && $process->className() == 'ProcessPageEdit') { // this is an admin save }
-
Take a look in /site/config.php. A few lines down you'll see this line: <?php /** * sessionExpireSeconds: how many seconds of inactivity before session expires * */ $config->sessionExpireSeconds = 86400; Change that to adjust how long you want sessions to last.
-
I'm not quite sure I'd want to delegate all my file management over to Git. That seems like a major sacrifice relative to having SSH, but maybe I'm just not used to the idea yet. I'll have to try it at some point before I judge it. But you are right that the provided resources just don't seem to be a good enough of a deal to motivate one to try something new. I need to check out the Storm on Demand that you mentioned, that sounds interesting. Their 2GB plan looks nice and sounds like a better deal than the VPS I've got now. Though I can't determine if it's fully managed (they list 3 tiers of management, but don't say what applies) and I can't tell of it comes with cPanel?
-
Slkwrm, thanks for your kind words, glad you are enjoying ProcessWire. With regard to flexibility, I would just say that I prefer to let the project dictate the best way for things to go together rather than the platform. I think that comes from being a bit old school about design/development and not wanting CMSs interrupting the design/development workflow. I've written a few CMSs already over the last 10 years, several custom platforms and a couple previous products (Dictator and ProcessWire 1), so I guess I've had plenty of time to make mistakes, learn from them, and hopefully ProcessWire benefits from that. But don't give me too much credit, because it's mostly just trial and error, and time. Give credit to yourself and the community here– ProcessWire is far better as a result of the community. Everyone here is helping to make it a much better and more flexible product than I ever could have on my own.
-
This looks very interesting, and I like the sound of anything that would let us be able to scale to handling high traffic out of the blue. But I'm completely lost once I get to either site–I'm going there looking for hosting, but they are just talking about developing applications and using Git. Even after reading and watching the videos, I'm not clear about what exactly these services are – I must be having a dumb moment today. I found something I could relate to on the pricing page but it's all pointing to really expensive shared hosting. Has anyone used these are knows what they are? Do you get SSH and root access? I see lots of talk about scalability, but relatively limited resources called out on the pricing page. What advantages and disadvantages does this have over having your own dedicated server or VPS?
-
That's good to hear, I wasn't aware of that. I just remember using C5 and seeing scalability concerns and client support nightmares all over the place. But that was awhile ago. Based on how they are growing, I think their business model is one we can learn from, especially with regard to the marketplace they have there.
-
That's correct. The 'modified' field is meant as a system field and nothing else in the API has access to change it (or prevent changes to it). I'm thinking I can provide an override for cases where we are just saving a field ($pages->saveField($page, 'field') or $page->save('field')) as opposed to the whole page. I can set it so that if $page->modified < 0, then it'll ignore it when doing the save, leaving the existing modified time in place. Then a module like the Comments module could feasibly tell the $page not to update it's modified date.
-
Thanks for this info and link–that's a great reference. It looks like the language codes generally line up with the codes we're recommending people use for their language names (at least for the first 2 characters), but I don't think we can count on that. I think what we'll do is have this module's installer add a field to the 'language' template (when present) that lets one specify the Google Maps language code for each language. Then this module can just get the language code from $user->language->gmap_lang; or something like that.
-
This has been added in the latest commit of the 'dev' branch (for 2.2). You'll see the Field duplicate/clone option under the 'advanced' menu when editing a field. From there, you just check the box asking you if you want to clone the field and click save. You can also access it from the API like this: <?php $field = $fields->get('title'); $clone = $fields->clone($field); The new field that is returned ($clone) has already been saved, so you don't need to save it again. Also note that it automatically assigns a new name to the field to ensure it's unique. Like with cloned pages, it adds an incrementing number to the end of the name: <?php $clone = $fields->clone($field); echo $field->name; // would print 'title'; echo $clone->name; // would print 'title_1'; You can of course go back and rename it to whatever you want. <?php $clone->name = 'something_else'; $clone->save(); Template duplicate/clone An identical clone() function was also added to the template editor. You'll see it in the 'advanced' menu when editing any Template. When you clone a template, the Fieldgroup is cloned and the template-file is also cloned if /site/templates/ is writable. Using it in the API is exactly the same as with cloning a field, and the behavior is exactly the same: <?php $template = $templates->get('basic-page'); $clone = $templates->clone($template);
-
Nice job with the new site! Glad you found ProcessWire to be flexible with the development. Did you develop the blog section in ProcessWire too? What did you use for the contact forms?
-
Can you post what you found with how to localize Google Maps? I've not looked into this yet, and just wanted to have a starting point. I'll update the module to support PW 2.2 languages.
-
This one was easy to get fixed. Once I saw the 500 error page was from Apache and not PW, I knew it had to be something in the htaccess file. I've not had to use the "RewriteBase /" before, but knew there were some situations where it was necessary–glad we found one. Good to hear you are doing a rollout of a new PW site. Be sure to post in the Showcase when you launch. Your module idea sounds like a great one–I'll be glad to help when the time comes, just let me know.
-
Minor bug with templates and children and acces in the mix
ryan replied to vknt's topic in General Support
That "can't have children" isn't enforced by the API. That's just enforced in the admin control panel. It's perfectly valid to have a page with children and then change it's template to "can't have children" just to ensure that no more are added. Likewise, you can set it that no new pages using a given template can be created, but that doesn't mean that the existing ones have to be killed off. Glad you got it working. What you probably needed in your selector was "include=all" or "check_access=0" to ensure that it would include pages the user didn't have access to. See the Selectors section at: http://processwire.com/api/cheatsheet As for the Chrome vs Firefox and Safari thing, I have no idea. But Chrome is trying to one-up everyone, I know that. -
I have seen that before, though not in ProcessWire. But feasibly it can happen anywhere. It's what happens when MySQL gets abruptly killed when it's writing data or building an index (like if your webhost did an emergency reboot of the server or the process). You need to run a 'REPAIR TABLE field_body;' in a MySQL client. If you've got PhpMyAdmin, just check the box next to that table and click repair.
-
I actually have no idea what Microsoft's Web Matrix is... I'll Google it. I didn't realize there were any similarities between C5 and PW. I used C5 a year or so ago and thought it was a fun system to test, just not a system I'd want to develop in. A very different approach they've got going there with C5. But I agree about their marketplace is a great model and one that we need to look into more.