Jump to content

apeisa

Moderators
  • Posts

    4,632
  • Joined

  • Last visited

  • Days Won

    55

Everything posted by apeisa

  1. Put your setoutputformattong false down one line. You don't have page object at that moment. (sorry for typos, I am on mobile).
  2. Yes, I think that would be better.
  3. I think that disabling should be fine. This is pretty hard one to solve if one doesn't know that this file has settings like that. (But it is great to have as a setting indeed!).
  4. If I remember correctly pw should show this only once. Try visiting admin side. Possible that this is totally different case.
  5. Ah, I somehow assumed that login in to subdomain expires the normal login. This is not the case. So after two logins no other logins needed. So no really need for this (and *.domain.com cookies are bad if you are using assets.domain.com for your static assets delivery).
  6. I am doing first multilang site, using languageFields. I decided to use subdomain for Spanish site and site defaults to English (pretty special site for us, no Finnish at all and true multilang). It all works nice, but when admin clicks es.domain.com link PW loses the session and he/she needs to login again. Is there any way to have *.domain.com session?
  7. There ain't any plug-in functionality for this (at least yet). What you need to do is to save image to your server (and make sure it is an image and not some script) and then replace the current image with that new one. So basically it is just regular php file upload and some API stuff afterwards. If you have multiple images: $p->images->add("path-to-image"); //Adds new image to Pageimages This is just a guess, but if images is actually "image" and only single file allowed: $p->images->filename = "path-to-image"; (might be that the first one works in this situation too and this doesn't)
  8. Olepas hyvä!
  9. if($page->footer) echo $page->footer; else echo $pages->get("/")->footer;
  10. It does. Problem comes later on. This is the scenario: I choose second day from January this year from datepicker: 2012-01-02 I save page, 2012-01-02 is rightly formatted to Finnish date02.01.2012 I click datepicker again. Datepicker believes it is first day in February... This leads to a mess
  11. That seems to be the issue, I tried this with AdminBar and same thing than with others. Modules seem to run fine from symlink, but multilang stuff fails then.
  12. Hmm.. Another lang issue, now with Shop module. I am sure it did worked before and on the same site. Only thing I can think of is that now I have module folder as symlink, and module files in totally different folder (in both of these, Schedulepages and Shop). Could this cause the issue? Translator finds the files ok and lets translate without problems.
  13. Hello and welcome to the forums. I think both approaches are fine here: custom php app or using pw-templates. I would probably use PW templates here myself. If you have very data heavy application (you need to load hundreds or thousands of rows in memory, calculate/manipulate them all etc) then using "pure" mysql would be probably better option then. Not sure how much you have to scale here (like how many records you will have on your date ranges etc). But if you decide to use PW-templates, here how it goes: You would have template called something like "travel". There you have fields like datetime, distance, type of travel (walk, bicycle, run). Type of travel needs to be Page field, so somewhere you keep those values as pages (walk, bicycle, run). Then you need to create page, which requires login, and has one form (log travels). This is where you build custom form where users can log their travels. Each time they fill the form you create new page using travel template. Creating pages from API is super easy and you can easily make form that creates multiple pages with one submit (or ajax form or whatever you need). Then the most interesting thing would be to create admin view, where those logs can be searched and filtered. That would be perfect as ProcessModule. Process modules are admin pages, and they have nice and simple url routing. See my redirects module as an example: https://github.com/a...rocessRedirects That would be it. It involves quite a bit custom coding (like with any system), but probably something that is pretty nice and easy to build with ProcessWire.
  14. I guess that just means that nick is reserved. Just login and choose whatever nickname suits you. No need to register anything.
  15. You have german TinyMCE? Translated this file: /wire/modules/Inputfield/InputfieldTinyMCE/InputfieldTinyMCE.module and set TinyMCE language code something else than default "en"?
  16. Latest PW, haven't tested this yet. I assume German works, because there probably is German lang pack in Codemagic. I get this error https://github.com/ryancramerdesign/ProcessWire/commit/a2aae40f313b7fd9a0a2ba0a17c32a52809660c0#commitcomment-1129888
  17. I translated this module, but it still uses default language. Is there some problems how I have coded those lang snippets: https://github.com/formmailer/SchedulePages/blob/master/SchedulePages.module#L116 (like user lang is not defined at that point?).
  18. Have we decided what to do with this? Trying to get dynamic JS/PHP date conversions or going with predefined date formats? Currently it is impossible to get date picker to work with Finnish date format: d.m.Y - it messes up months and days.
  19. If you use translations (TinyMCE in any other language than English) it might fail loading plugin and that prevents whole editor to load. Noticed this when trying to load new CodeMagic plugin on core.
  20. Wohoo! Others, come on, it's party time!
  21. It's actually http404 page that throws an error: http://www.stadtpirat.net/http404/
  22. I don't almost ever use the render method, but I assume it might be pretty quick way to get something visible while developing. What it does it outputs the page content. So if you have some templates that you want to use as a blocks for other pages, then render method would be super useful. That means that those blocks are never used as a single pages, but always as a part of another page. Truth is, that PW is very flexible tool. There is no "one true method to build PW-sites", like there is no "one true method to build PHP-applications". Some like to echo, others like to save output to variable to pass it around etc..
  23. foreach($page->tags as $tag) { echo $tag->title; }
  24. Yep. In pw you can (or you have to, actually ) to build your own taxonomy and logic what it means. It might be simple tagging system or something much bigger.
  25. No worries Soma, glad it was an easy fix.
×
×
  • Create New...