Jump to content

suntrop

Members
  • Posts

    328
  • Joined

Everything posted by suntrop

  1. The documentation is a little short on this topic … there seems to be only a getTag() and findTag() No way to check if there is a tag at all? The hasTag() method seems to be not allowed on image fields. I want to use an existing image field (something like WordPress’s featured image/post thumbnail) to gather images for a gallery as well. Problem is … <?php if(count($page->images)): ?> <img class="pull-right thumbnail" src="<?php echo $page->images->first->height(300)->url ?>" alt=""> <?php endif; ?> … there are thousands of pages/images without any tags and I can’t tag them all with »featured« to use them as now. Thus I have to tell my template to only use the first image without a tag to use as the featured image. Sounds complicated Hope you know what situation I am in
  2. Thanks, I knew of the SQL »hack«. And I think I’ll have to change it that way. I thought there is some kind of workaround, but as LostKobrakai said there are situations where it doesn’t work well with hooks. I can’t get my head around that limit in PW. Anyway, thanks for the help!!
  3. Hi all I have some kind of blog setup and need to change the page date with a custom date. Since there is no ‚official‘ way to change the created date, I put in a new date field and I want this field – if not empty – always replaces the created date. I could use this hook $this->addHookBefore('Page::render', $this, ‚changeDate'); public function changeDate($event) { $page = $event->object; if($page->template == 'admin') return; if ($page->divergent_date) { $page->created = $page->divergent_date; } } But this only affects the blog article itself. My search page and others seem to »ignore« my overwrite function. Do you know a better hook or way to overwrite entirely the created field for every use case?
  4. I couldn't find any options to configure HTML purifier. Maybe there is nothing like that I need to add data attributes and keep them after saving a page.
  5. Thanks! I haven't thought of that. 177 images and 5 languages and some extra fields … default was 1000 for that domain. Raised it and now it works! Great help!
  6. I've got a photo album with 177 images, but I can upload only 161 of them. Image field limit is set to 0 (tried 177 and 200 as well) In the first place I could upload all my images, but not all showed on the front-end. After reloading the back-end I got this message: 2015-12-21 13:00:03 admin https://www.update27.example.com/processwire/page/edit/?id=2069 Removed 'images' temp file(s) for page /photos/ski-2011/ - ski2011-151.jpg, ski2011-154.jpg, ski2011-156.jpg, ski2011-155.jpg, ski2011-157.jpg, ski2011-159.jpg, ski2011-152.jpg, ski2011-161.jpg, ski2011-158.jpg, ski2011-153.jpg, ski2011-160.jpg (Pageimages) After that I tried to upload only a small bunch of photos. Until photo #161 it worked that way … but now I get a message, that the request seems to be forged. When I delete any image I can upload a new one. But 161 images seems to be some kind of limit. Files are created (original and resized) in the page folder. There is enough disk space checked permissions for folder and files there is no memory error there is nothing in my Apache log tried a newly created page, but same error (uploaded all at once and all got delete after reloading the page, if I only upload 161 images everything is fine) Using PW 2.7.2, PHP 5.6 with FASTCGI
  7. Maybe I could ask in this topic if PW can handle URIs with special characters? I get a 404 error when I try to open example.com/downloader/file%20with-space.txt or example.com/downloader/file-with-á-special-character.txt or example.com/downloader/Champs-%C3%89lys%C3%A9es.txt
  8. Thanks. How did I miss this?
  9. Hi all! I need to pass a filesystem path (eg my/files/here) via URL and access the full path (URL segments) in a template. I am wondering if there is some way to use PW built in input/url segment functions? Currently I am using ltrim($_SERVER[REQUEST_URI], $page->path)
  10. Ok, thanks for your effort!!
  11. Thank you. This changes the title – but it also changes the URL. Thus I always will get the link to my default language.
  12. Well, not everything I am not talking about UI or ProcessWire phrases. I am talking about the text editor and on how to insert links/select pages. Those titles depends on the language you are editing and do not change with your user profile settings. I am wondering if nobody else came across this I have about 70 links per language and no idea how to insert them. I am afraid the only way is to go to a language I can read, change from the front-end the language and copy paste the URL.
  13. I've got a website with multiple languages and two of them are Chinese and Russian. Since both use characters nobody of us can read we have some big problems to insert links from the editor. If we want to pick a page we can't see what page to select. Is there any way to display the page titles in another language? How do you select a page from a language you can't read? Thanks!
  14. You could upload a bunch of images and use them on any other page/field. That missing features bugs me all the time and kept me using WP.
  15. If charset is a problem, passwords must rely on ASCII only. Accidental whitespace before/after could be stripped out easily, without touching whitespace within the password. I for one like the ability to use "limitless" passwords
  16. Thanks. Problem was, I thought I could get inherited roles as well. Perhaps I forgot access was managed by the parent page/template. diogo's method works fine
  17. Hi all. I have pages (templates) that are only accessible to certain users. Now I need to get all users that have view access to specific pages (they will get email when page updates). I thought of something like this: $template = wire('templates')->get($p->template); $roles = $template->getRoles(); $users = wire('pages')->find('template=user, roles=' . $roles); But it looks like getRoles() doesn't returns the roles for that template. Roles is an empty PageArray. What is wrong or is there another way to get those users?
  18. I just created a page and its folder is created anyway. Is that feature gone? Using PW 2.5.17 I'm planing a site where users can create content (saved as PW pages). If it doesn't flop, there is a big chance I need more folders than my managed server is able to handle (they say it is good to keep files/folders under 20K per directory). Any news on $config->pagefileExtendedPaths? Is it save to use it on a live site? I am worried to rebuild my app after 12 months, because there are too many users
  19. Nothing special about your module, but I think twitter only uses https. You can avoid a redirect, if you replace the http://. And – maybe its just me – you could add a config where users can choose whether links will open in a new window or not. Ahh … one more: adding a css class will make it possible to address those links. However, thanks for that module. I'll use it in an upcoming website
  20. I had similar effects about a year ago. It wasn't clear what the problem was, but I had to put in some content in all language fields (content in my case). Perhaps, try to change/add content. Is there anything inside your error log about the homepages?
  21. I subscribed to the forum RSS feed – link at the bottom of this page. It is a nice way to follow along. But it does always show me the first post of a topic, not the latest one. Is there any feed to show just the latest ones? Like the list on the upper right here https://processwire.com/talk/
  22. I just installed a new version and encounter the same problem. If the field (in my case 'body') has the Hanna Code Text Formatter enabled it'll replace everything with that field's content. I think in your case you didn't had the Hanna Code Text Formatter active for your newly created field. But your body field had – thus you got the same error. At the weekend I have some time to check where this comes from. I don't think this is "normal" behavior.
  23. I thought it would be nice not to have two fields with the same function. It adds more work at the end.
  24. Currently there is no way for an editor to change those fields. Both are static. Even from the API. But sometimes – especially when using a news site or some kind of blog – you have to use those fields a lot. It would be nice if the fields become editable, so you can change the creation date for example.
  25. I think it is the Hanna Code text formatter I have enabled for the body field. I just enabled it for the other field and it outputs the complete body (instead of my truncated text). For the body field I cannot disabled it. Seems I can't use the body variable inside a HC if the field uses HC itself. Once there is $var->body inside the HC it replaces everything else. I think I'll stick with just the title That works.
×
×
  • Create New...