Jump to content

ryan

Administrators
  • Posts

    17,132
  • Joined

  • Days Won

    1,656

Everything posted by ryan

  1. Unless you prefer separate trees for each language, you might want to consider the new LanguageSupportPageNames module (included with the core), which will let you accomplish that URL structure pretty easily. If you try it out, use the one from the dev branch, which is a little more up-to-date, as this module is in development. To accomplish the structure, you would do this: In Language support, assume that "nl" is your "default" language. So edit the "default" language and change the title to Nederlands or whatever the right spelling is. Add another language and name it "en", with title: "English". Install both the LanguageSupportFields and LanguageSupportPageNames modules (in that order), as they are not automatically installed with LanguageSupport. Though they are included with the core, so all you have to do is click "install". Change title field to be of type "TitleLanguage" and all relevant text fields to use TextareaLanguage or TextLanguage. Edit your homepage and click to "settings" tab. Make the "name" field be blank for Nederlands, and make it "en" for English. Check the box to make English active, if necessary. Save. Edit your About Us page, and again click to the "settings" tab. Make the default page name "over-ons" and the English page name "about-us". Do the same with any other pages. Keep in mind that the "name" field is optional for all pages. When left blank, it will just use the default (nl) name instead. But it should still be able to determine the proper language based on the URL, so long as you've configured the language names at the homepage.
  2. No doubt. But pretty hilarious that they would use the same language that would be used to describe a web request, at least from a systems standpoint.
  3. Doesn't this literally describe a web request?
  4. What version of ProcessWire? (I couldn't tell from the screenshots). What are the steps to reproduce? For instance, after which action did the error start occurring? Thanks, Ryan
  5. If I'm reading it right, it seems to meet both criterion A and B. It is currently required by the system for "transmission of communication". And it is "strictly necessary" in order for the system to function. If I can find a way to make it optional, I will. But for the time being, it is required by the system.
  6. On a file system, you can't have two of the same filename in the same directory. Filenames as keys ensure that same remains true in memory.
  7. Based on the time of your post, I'm guessing you might have hit it when I was pushing updates (at exactly 6 am yesterday). I managed to break it for about 5-10 minutes before realizing it. Let me know if it still doesn't work for you. @nico I'd love to have a look. I need to setup something similar (outlining a route on a gmap) for another project.
  8. I don't often use that syntax, but if trying to make something consume as few characters as possible, it works.
  9. Actually in this case /cities/ is not just about admin organization, it's an important landing page in the site's navigation and breadcrumb trail: http://processwire.com/skyscrapers/cities/ In ProcessWire we really try to push that URLs are structure and should represent actual structure. What makes sense for the site's structure also makes sense for the URLs, because they are one in the same. If there's a strong desire to have actual city pages off the root level, then you can create them off the root level. While I would question whether that's really the best strategy for either side, there's nothing stopping you from doing it. You can always take the URL segments route too, but when URL segments are used as beginning points (foundations of structure) rather than ending points, you always have to question whether it's really what is best for structure and URLs, or whether it's giving preference to short-term style over proper structure.
  10. Never underestimate the importance of word separation. It's the difference in readability between "pen-is-broken" and "penisbroken". Beyond the potential misunderstandings is raw readability both to users and search engines. While I have a readability preference for underscores, my understanding is that hyphens are the best balance when all factors are taken into consideration. Lastly, this may be obvious, but what gets populated in that name box is only an auto-generated suggestion. After populating the title, one can go modify the name as they see fit (which I often do), before saving the page.
  11. I agree with AnotherAndrew. The indicated error line is the mysqli_connect function, which means it attempted to connect to the MySQL server and was denied. I don't see how the scope of this could go beyond your web host and their MySQL server. If it's only occurring to certain people, chances are they are seeing an error message that was cached somehow or another (perhaps via a proxy). I wouldn't look past the web host, the problem has got to be there.
  12. Tina your example also has an extra '$' before the session variable: $this->$session->redirect($pages->get(1)->url); that should be: $this->session->redirect($this->pages->get(1)->url); Make sure that you've got $config->debug=true; in your /site/config.php during development so that you get more verbose error messages, which should highlight these things rather than giving you a 500 error. I also recommend replacing your "init()" method with "ready()". Technically either should work here, but since $page isn't yet available at init() time, anything that inquires $page would be non-functional. There doesn't appear to be anything here that needs $page, but since you are making a $pages call, I think it's just a little safer to use ready() rather than init(). Note however that you'll want to keep the init() method around, since it is required. But just leave the implementation for it blank, while moving your code to a ready() method. Lastly, since this has to do with front-end, you might just want to make your own login form for the front-end. PW's login form is for login to the admin, but it wasn't intended to be used as a front-end login form (even if you can technically do it). You may find it a lot simpler and more flexible just to have a separate form for your front-end login: Here's a couple examples: http://processwire.com/talk/topic/2937-creating-a-front-end-admin/?p=28954 http://processwire.com/talk/topic/1716-integrating-a-member-visitor-login-form/?p=15919
  13. Template permissions can be inherited to other pages via their template, whereas family settings can't. So there can be a situation where you are dealing with a template that already has children, you change it to "no" to prevent further children, but existing children using inherited permissions should still have the "add children" permission.
  14. I don't think that particular setting requires advanced mode? It is on the 'advanced' tab of the Template editor though. But that tab is unrelated to $config->advanced (despite the name). Regarding advanced mode: I never use it, except when developing ProcessWire itself. I recommend people stay out of advanced mode unless temporarily needing to access some specific setting. The need for advanced mode never comes up in my own sites, at least. It can be dangerous to leave it on, just because some of the things you can "enable" (like 'system' status) are not easily reversible.
  15. That's correct. But it also allows it to be changed in the page editor. Here is the description field that goes along with it: "When checked, pages using this template will have an option to change the 'created by user' (for superusers only). It will also enable the $page->createdUser or $page->created_users_id fields to be saved via the API." Note that in order to access this setting, $config->advanced=true; has to be set in /site/config.php
  16. It looks good to me. I would probably compare the $user's id rather than name, but I don't think it matters here.
  17. I tried to reproduce that here, but it seems to be returning the expected result for me: $items = $pages->find("title|body|parent.title%=France"); Here's the results I got. The "title" matches the first item, and "parent.title" matches the rest of the items (which don't include "France" in any of their fields). They all have a blank 'body' field. /regions/europe/france/ /regions/europe/france/arles/ /regions/europe/france/avignon/ /regions/europe/france/beaune/ /regions/europe/france/blaye/ /regions/europe/france/bordeaux/ /regions/europe/france/cadillac/ /regions/europe/france/chalon/ /regions/europe/france/conflans/ /regions/europe/france/giverny/ /regions/europe/france/les-andelys/ /regions/europe/france/lyon/ /regions/europe/france/normandy-beaches/ /regions/europe/france/paris/ /regions/europe/france/pauillac/ /regions/europe/france/rouen/ /regions/europe/france/saint-emilion/ /regions/europe/france/strasbourg/ /regions/europe/france/tournon/ /regions/europe/france/vernon/ /regions/europe/france/vienne/ /regions/europe/france/viviers/
  18. The skyscrapers profile is available for download so you can see how it's put together. But for the most part, you would build these things the same way as if ProcessWire wasn't there. Then once working, take advantage of the fact that you can pull the data to populate these things from PW. This is not something PW will do on the front-end for you, since it's not generating markup. But this is something you can do very easily on your own… again set it up as if PW wasn't there, then modify it to pull the data to populate from PW. While we're probably not big enough to be a target, I feel good about the security of the core product and have always made security the first priority in development. But security is a factor that goes well beyond the core product. First, PW will only be as secure as the modules you have installed to it. I do my best to keep up-to-date with modules that go into the directory and notify the author if I find any potential security issues. However, this isn't guaranteed as I can't always keep up with everything. Secondly, PW is about as secure as PHP. Meaning, it can be very secure, or not secure at all, depending on how you code your own templates and use PHP. So if you get into handling user input, as you would with processing forms, search engines, etc., then you yourself have to follow PHP best practices towards maintaining good security. ProcessWire does provide several helper functions via the $sanitizer API variable, and I recommend using them when handling user input.
  19. Templates are the recommend way to manage access. While you can accomplish almost anything with this access control, sometimes you can find a more specific way better for your own needs by using PW's access control hooks. The most common being: Page::editable and Page::viewable. However, if you really are talking about only 4 section pages, I would save yourself the trouble and use the built-in recommend method with access control templates. Locking the section pages for edits (like Soma mentioned) is also a good way to keep them from modifying them outside of template access control. If the user doesn't have page-lock permission, then they won't be able to unlock the locked pages. If you ultimately decide you want the fine-grained control of access control hooks, let us know and we can post an example or two to get you started.
  20. I don't think we can do that because a parse error generated as a result of wrong PHP version will occur before ProcessWire can even perform a getModuleInfo() call on it. Module info would have to be stored in a separate file in order for PW to identify and prevent that sort of thing. Even that, or PW would have to file_get_contents() the PHP file and manually parse it looking for that info (which doesn't seem worth it). Though adding support for optional external module info files is something I would like to add at some point.
  21. I think the main value/intention of template labels is for language support. In this manner, you can have something that makes sense with the editor's language, even if different from the developers language. Most of the time, I do not use template labels, as I prefer to just have the template name. Though if I was doing a lot more multi-language sites, I would probably prefer template labels.
  22. I'm not sure that I follow exactly what you are trying to do. But one thing to keep in mind is that a Page can literally be mapped to anything. So while your form field may involve a page selection, you could then say "this page maps to this form" and "that page maps to that form". You could even make the template for that page load a specific form. In Form Builder, you can also specify defined lists of selectable items outside of Pages. So you might just enter each of your selectable items to be the same as the name of a form.
  23. You saw this when first starting the installer, or after completing the database config screen?
  24. How much do you need to know about the portal.domain.com authenticated user on client1.domain.com? Do you just need to know that they are logged in, or do you need to connect them with another account on client1.domain.com? I'm just trying to better understand the extend of access control needs at client1 and whether this is a simple authenticated "yes or no", or broader in scope.
  25. @chim77richalds do you have access to the Form Builder support board? If not, let me know your order number so I can update your access. Also, please post the exact text that you are pasting in the success box.
×
×
  • Create New...