• Content Count

  • Joined

  • Last visited

Community Reputation

10 Good

About Hurme

  • Rank
    Jr. Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi, I solved the issue by making using the tags option in the files field and by disabling the multi language description altogether. I had read about the language-alternate fields, but had forgotten about them by the time I was doing this site. So cheers for the reminder. I still think the file fields description is behaving in a not so logical way. Luckily it's a problem you can easily get around in multiple ways.
  2. Hi, I was making a multi language site with download section that would automatically list files based on language. I was going to check if $file->description had any content on current language, but this does not work as it always returns the default language even when different language is selected. Example: Site has three languages, english (default), french and german. document_en.pdf | en desc "lorem ipsum" | fr desc "" | de desc "" document_fr.pdf | en desc "" | fr desc "lorem ipsum" | de desc "" document_de.pdf | en desc "" | fr desc "" | de desc "lorem ipsum" It would iterate through all of these and only return the documents that had description in current language. Problem is it will always return document_en.pdf no matter which language is selected. For french and german it correctly only shows them according to the language. Currently using PW version 3.0.95.
  3. Hi, Thanks for the answer! I'll try this later this week, once I continue working on the site. I do have ProFields and I understand what you mean. It might very well be worth doing it like you suggested.
  4. I've added language support to a website. Language switching works and fields that have content in the second language show up correctly. But none of the translated strings work. As I've understood, the most simple way to add translated string is: <?php echo __('This will be translated'); ?> When I go to the second language in backend, it correctly finds this string in the file it was used, and I can write the translation below it. How ever in frontend nothing ever happens, and the website always shows "This will be translated" instead of the translation itself. Also a curious note, backend will find translated strings from template files, but if I add string to a file starting with underscore, _main.php for an example, it's unable to find those translations even when I write the file path manually. Am I missing something here? Where could I start looking for answers? I've read through the language docs and browsing old topics, but I haven't been able to solve this problem on my own.
  5. Hurme

    Eventually I'll look into it if no one gets to it first. I considered it at some point, but I've been too busy with more important things. I'm not really a programmer but I took a look at the interceptor earlier and it seems doable for me to modify the code enough to get it to work. ;-)
  6. Nothing fancy, just solid basic sites for two different companies. Both happen to work mainly in construction sector. Both sites are only in finnish, but feel free to browse around. After a decade of Joomla I'm quite taken with Processwire, although having no background in any sort of programming the dive into PHP felt akin to jumping from 10 and landing on your stomach. ;-) Site 1: site 2: If the sites look somewhat similar, it's on purpose. Some structural pieces are being recycled to make work more efficient. Aside from Processwire we started using UIKIT and it's been a pleasant experience. Although I'd love to have automated way of using UIKIT lightbox for images added with CK editor.
  7. Well, in our case all the settings were all correct. We solved the problem by switching to an another web host, and it started working right away. Was the problem because of poor work on facebook's end or the host's is anybody's guess.
  8. Hurme

    Hi, I'm running into this error: AutoFbPost: post failed; click here to log in with Facebook. I'm already logged in with facebook, and if I click the provided link I get: Can't load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and sub-domains of your app to the App Domains field in your app settings. How ever we're using the login-facebook module with same settings, which is working just fine. Are we supposed to manually add the Open Graph meta information for this module to work? Anything else that could be wrong?
  9. I'm having hard time getting this to work. I've setup the module with App ID and App Secret. The needed script is added in the _main.php. The App itself is public and both the Site URL and App Domain match. Yet all I get upon entering the "" is: I've setup multiple Facebook Apps before, but I've never run into this problem before. Does anyone have any experience with this?
  10. I would, but this is used mostly for news feed with text and other stuff too so I need to get more than the images.
  11. Everything is working again. Nothing to do with PW version. It was all down to the children with no images after all. After doing better job with checking if the images exist it started working. if (count($child->images)) { // Original code here } Interesting that the width() crashed PHP but without it everything worked fine. Anyway, I'm little bit wiser now. Thank you for your help everyone, and sorry if you had a spend a lot of time mulling over this.
  12. Thanks rafaoski, Maybe it's down to the PW version then. Mine is 3.0.88, I'll update it when I have a moment and report what happens.
  13. In the real deal it does get tested, in this stripped down version I'm just trying to find out how to get the width to work.
  14. Hi guys, I didn't try rafaoski's code yet, but I did try everything else you suggested. It all runs into the same error. Below is a stripped down version of the function I'm using for claritys sake. function test($selectTemplate) { $pages = wire('pages'); $children = $pages->find("parent.template={$selectTemplate}, include=all, limit=3"); $out = ''; foreach($children as $child) { $image = $child->images->first; $out .= '<img src="'.$image->width(50)->url.'">'; } return $out; } It works if I remove the "width(50)" part. I've also tried putting the width in different places, as suggested.
  15. Hi DaveP, I also tried this, but got the same result. Any time I used width php runs into a wall.