Jump to content

Adam Kiss

Moderators
  • Posts

    1,303
  • Joined

  • Days Won

    7

Everything posted by Adam Kiss

  1. Also, you are not first to notice that. Unfortunately, thanks to tiring conversations about this feature, we know that this is 50/50 behavior – some prefer to get back to list of fields (or pages after page save, templates after template save), some prefer to be back at edit. Some would actually love to be able go straight to new page (again, the same in other data where applies) and view the frontend. But since it's 50/50, those of us who love to get back to lists have suck it up (at least until somebody doesn't come up with better system with polished details. ahum ahum
  2. I've never tried, just shooting blind, but there is a difference between how many places you round to and how many digits you show – maybe four digits is default length of the part after the comma (I'm not completely sure how do we call it in english in formatted output? A. Edit: and just in case I'm right and you're outputting the float via simple echo (not sprintf('%.2f')), there might be an bug – no correlation between rounding and number of floating decimals or something.
  3. OT for giggles: Call Japan and tell them to change their alphabet, because current is hardly translated into ASCII
  4. That actually won't work at all, unfortunately, because on at least one place, I have no exec rights. UPDATE: How can I tell PW to crop the image, rather then resize the image? Because I figure I can crop, resize and just hide the bottom part below certain height with CSS. Old questions: Would be possible to create some 'EnhancedImageField' object maybe? with some advanced (little advanced) cropping functions? Or maybe, get the old file, push it into some PHP image library and get back some object, which will be stored via processwire?
  5. Hi all, I would like to do resizing/triming on some pictures, but due to nature of the pictures, I need quite exact procedure: Trim image to 1020px width resize image to have 200px width trim anything below 180px Is it possible via image API? Or is there any way I may connect straight to ImageField and do all this with the script Image API is using? Adam
  6. I think you want $this->pages instead of just $pages A.
  7. Hi Peter, that link (or at least going to the live site) won't be there forever – we've already discussed this and Ryan actually agreed that having multiple location links in one menu might be confusing but now, I'll let Ryan post some custom code, as I have no idea how to do it (probably edit site administration templates, though)
  8. re" Highlighter: I've seen just a minute or so from the video, so this may be little away: I thought about this before, but, ended in the same moment this plugin does for me – engagment & discussion is becoming a little too fragmented to my taste. Now, let's say that you're okay with 4 comments on page in two blocks. But what will happen if you have 100+ comments in ten places with 4 or 5 'ideas' or 'topics' in each thread? How do you stay current and reply as much people as possible?
  9. Awesome Although I might not particulary like this plugin itself, I love the ease of the creation of something like custom tag parser
  10. Then by all means, create your custom templating language. I don't know how many these custom PHP codes you needs in your templates, so this might not be the best way, but if you need just a few, you can do: IN body, just add something like {{submenu}} into place where submenu should be generated in your template foreach($custom_tags as $tag){ str_replace('{{'.$tag.'}}', custom_tag_code($tag), $page->body); } I know. Not the most clean code, but currently probably the best solution if you don't want to have dozens of custom templates Note: Some people actually really dozens of templates, and the system works just fine. so 1. it's subjective or 2. it really might be the way to work with this CMS.
  11. 1: Try to add [L] after the redirect. 2: Or, let's forget about .htaccess for a minute. Maybe, you could do this: create template 'redirection.php', that has one field called 'newUrl', that's used for new url [textfield] <?php $session->redirect($page->newUrl); and create few pages you want to redirect: name: '6-amicizie.html' with the latest code this should be possible and it also gives your visitors and google the right 301 redirect.
  12. Hm, I would try to move the # I also added 301 HTTP status Redirect 301 /6-amicizie.html http://www.soddisfa.com/amicizie/ Before the non-www -> www part
  13. You need to post your .htaccess here, it sounds, like you have something wrong there. (Some could probably tell you what it is at this point, but I would rather see your .htaccess before I give you any tip)
  14. Hi ryan, as I wrote you, every directory along the path [/site/, /site/assets/, /site/assets/files, ...] has 777 as mod [set via FTP app], so I'm positive, that I did everything I could. Isn't there something in my code I can do to turn on some 'moar' error messages, e.g. more detaild description of what happened? Adam
  15. Hi, I have a problem with one of my servers, which is running PW2. I want to upload new picture, but system gives me: Unable to move uploaded file to: /var/customers/webs/brroc/ozzo/site/assets/files/5844/think.png Even though every directory in path /site/assets/files/5844/ is chmodded to 777? It was previously set to 766, but during testing I set every one to 777. I already wrote to server guys to check if we didn't ran out of server quota or do not have some very restricted access on our user. If it's not it, what may I do? Adam
  16. deandre: I apologize for being obvious when it was needed: I personally never heard of RDFa before, but since it seems to be in XHTML, you have total control around id. You may want to: add RDFa support to all custom fields. simply add RDFa tags to titles, and all custom generated markup. create included file RDFa.php (or whatever the name) in that file, create function RDFize() (or whatever the name), that you will call on fields with markup, so instead of echo $page->body you will do echo RDFize($page->body); I believe that's currently only solution [or add RDFa tags via HTML section in TinyMCE, however there will be probably some hacking involved]. Adam
  17. re: include template in template: <?php include('another-template.php'); ?> That's all you really need. re: designer friendly: (subjective) if designer needs to edit code, learning a little PHP needed might only help him. However, there probably will be later (currently isn't) some template language re: editable partials/chunks: currently, there isn't one place, where you could easily manage it. However, I solved it twice so far – once I did another PHP file included, and once I did another page template, consisting of fields like 'footer', 'advanced_headline', etc. Adam
  18. @piranha: just as was said before: it's nice feature, I agree. However, it's not important enouhh to be pushed to the top of the list current one and only lead programmer needs to do. Also, it will probably never be part of core – however it will be available as a module [probably], and as a module, there is nothing stopping you from doing it yourself.
  19. Hi Piranha and welcome to the forums First things first: You're doing it wrong. You, sir, are thinking in terms of classic CMS, where page = one and only template. However, it's very easy to just create another template, call it "my-content-with-list" and put something like this into it: [include header] <div id="content"> echo $page->body; <div id="list-o-pages"> [php code for listing pages] </div> </div> [include footer] very simple. If you have any other questions 'how I do this', that documentation or faq section hasn't answered yet, please post it into API & templates or faq section, describe what you need and we'll help you find the right solution. Adam
  20. RDFa are basically tags&parts of xhtml. There is nothing stopping you from just adding into your templates. Also, RDFa put on page [XHTML betwenn body & /body] can be done via html editor in tinymce, no sweat. So? A.
  21. Ryan, now you're saying out loud what I totally believe in: If it's not major thing, don't add it to core! Anyway, I still think that slash setting should be site-wide – I can't see any reason now for it to be template setting, I mean: If you prefer no-slash urls, you prefer it on every page you have, not on some only.
  22. Ryan: I know, I saw the commit [already patched my fork] I just think that the slash/noslash is matter of personal preference – I actually feels like pages shouldn't have slashes [that's highly subjective] However, people often have these things – and if it's quick hack for you [e.g. one text field and something], why not do it that way, so even heavily biased people want to use PW? I remember, that when I started doing websites, I preferred .htm over .html. Then I preferred .php over .phtml or .php3. Everyone has these little preferences, nobody is saying that either slashes or noslashes question has some huge SEO impact.
  23. re: categories: You can simplify the array generation with: $validC = array(); foreach($pages->find('template=categoria') as $c) $validC[] = $c->name; //or id, title, whatever... Regarding errors: I once somehow replaced: $var = ('this: $foo='.$foo); with $var = ('this'); $foo='foo'; Because it seemed right (I was debugging and I had some wrong values, and somehow, I thought that that echo should have been actually something else. Took me 3 hours to figure that out.) Also, listen to Ryan V he sometimes sounds like madman ;D when it comes to safety, but his [even large ones] pages are safe.
  24. Sevarf2: This is just a start, I believe different endings will come too.
  25. Great stuff! But if I may add something, template setting only is bit redundant here isn't it? Is there site-wide setting too? So you set it once and set something different only if you overload wite-wide setting?
×
×
  • Create New...