Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by seddass

  1. Great! Thanks, Ryan! I am still amazed of the power of the selectors engine.
  2. Hi all, Hope that there is a quick tip that someone already know... Is it possible to search in multilanguage fields only in the current language values without to search in the default language as fallback? See the quote below. In other words.. I would like to search only in the current language (Dutch), no matter if some of the Dutch language values are empty. Is it possible? Thanks
  3. I am using: $config->styles->removeAll(); $config->scripts->removeAll(); on each template, before anything similar to yours snippet above, formmailer!
  4. Thanks, I think I am in the other 50% I have tried to find a quick fix.. The default language doesn't always return true when using $language->isDefault in LanguageSupportFields.module (around 322 row). I have replaced the row with if($language->isDefault || $language->id == 1012) and this allowed me to continue the work but it is not a good solution. I will attach the exception details, hoping they will help. Nothing is urgent. Thanks again. Hmm, probably I should use ... || $language->name == 'default') instead.
  5. I am using the latest PW commit. I will try to send a link to exported site profile by email, hoping it will make things easier. Thanks!
  6. I too get a similar error as Michael: Unknown column 'data1012' in 'field list' as 1012 is page id of my default language. I see it after I create & save a new page (with title, name, template fields), before the state when the page is editable with all input fields, before to be published. The error occurs only in pages using template with Repeater field. When i refresh the page after the error..all is fine, the title and all other fields were saved before the error. Hope this helps.
  7. Thats awesome feature! Cant wait to present it to the clients. I was wandering what are the Repeater disadvantages compared to the children model "used before" related to Search and selectors? Which template cache settings should to be used when updating Repeater field? - Clear cache for current page only - Clear cache for entire site * - Clear cache ... - ... BTW. The Repeater (tested without the columnWidth) is working flawless.
  8. Hello, I have received many emails with same error message and I am wandering how to change the code to get more meaningful errors. Hope someone know what could to be the reason for that exception or how to render more details in that exception. Аny help is greatly appreciated. Below is the error: Unknown User:/?/:ProcessWire Error:Exception: SELECT id, class, flags, data FROM modules ORDER BY class (in /var/www/my-domain/www.my-domain.com/wire/core/Database.php line 72) #0 /var/www/my-domain/www.my-domain.com/wire/core/Modules.php(142): Database->query('SELECT id, clas...') #1 /var/www/my-domain/www.my-domain.com/wire/core/Modules.php(79): Modules->load('/var/www/my-dom...') #2 /var/www/my-domain/www.my-domain.com/wire/core/ProcessWire.php(100): Modules->__construct('/var/www/my-dom...', '/var/www/my-dom...') #3 /var/www/my-domain/www.my-domain.com/wire/core/ProcessWire.php(45): ProcessWire->load(Object(Config)) #4 /var/www/my-domain/www.my-domain.com/index.php(167): ProcessWire->__construct(Object(Config)) #5 {main}
  9. ProcessRedirects.css is one of the preloaded css file names (not in home page). I am sure there were a few more in my older sites. Now when you have mentioned.. I have copied the method there on each PW release and in each new site and I am not 100% sure that the method was in FilenameArray before. Seems more likely that I have added it initially. Will be great if you could add removeAll() method to clear the previously loaded values. Thank you!!!
  10. Hello Ryan, When using $config->styles->... $config->scripts->... in front end templates, there are loaded some stylesheets from admin modules. Will be great if you return back reset() method in FilenameArray.php so prepending $config->styles->reset(); could clean the arrays before loading the frond end styles. I guess you have removed it for some reason. Hope it is not in conflict with other features. Thanks in advance.
  11. Hi, all. Sorry if this is already mentioned somewhere but i couldn't find it in the forum. There was an issue when clients updates the "title" field but forgot to update the "name" field. I think I have saw a way to move the "name" field from Settings to Content tab with a checkbox somewhere in template settings. Now it is gone. Is it still possible? Thanks in advance. P.S. I agree that it is not goot to change the page urls.
  12. Now I understand where my confusion is comming. I was trying to achieve the functionality without the new hook noted. Will watch for it in the commits. Thank you, Ryan.
  13. Thank you, Ryan. It all makes sense but I dont know how it will be implemented. A little more help will be much appreciated but if your really pushed don't bother. Lets asume I have added a new hook to the Page class and created the necessary code for null check in getFieldValue; This way in the templates I should change the $page->body and $page->get('body') to $page->getValue('body'), right? Is there a way to keep the $page->body, $page->get('body') syntax in the templates?
  14. Just an idea from the lazy man for future ProcessWire releases. I am just wandering, hoping it will be possible. In addition to the common scenario used in the current topic. 1) Lets asume we already have set a global variable like $session->language or $config->lang (like me) with the current language stored in a url segment, subdomain or etc. 2) Will be great if $page->get('body') returns the value of field {"body_" . $config->lang} if the field "body" doesnt exist in the current page template. I am not sure if this will lower the site performance but the code in the templates will be cleaner. Upgrading the site from one to more languages will be easier too. 3) Similar.. will be great if $image->description returns {'description_' . $config->lang} if {description} field doesn't exist. I have made a modifications to existing "FieldtypeFile" module with multiple "description" fields for each defined language. If the FieldtypeFile or FieldtypeImage are used in a multilanguage site there is a must to have separate description fields even the fields are used as shared assets or are attached to one page with all fields for all languages. Probably the first issue that have to be solved is the common scenario for storing the current language and an array with the site languages. So each new multi-language module will use them as system variables otherwise each module will be a custom solution.
  15. Ryan, you're right, no doubt. Thanks for pointing me to the LorGG's multi-language solution, which seems to be very promising.
  16. I dont think it is fairly custom as actually I was trying to limit the site translators permissions to save only the fields related to their language. Field level access control will be great and will do the job well. I will be glad to help with testing or whatever I could. Something else jump into my head... for future multi-language PW releases.. I am wandering if assigning the fields to specific language will be useful in fields edit, output or even permissions. Thank you, Ryan!
  17. I think he is trying to output all of the images from all of the child pages at once and later he is trying to paginate the $images array instead to paginate the child pages. Hope I am wrong here. Nikola, lets clear you mind. 8) 1) Try to create a "galleries" template with a few child pages with "gallery" template. You should to be able to paginate the child pages as described at http://processwire.com/api/modules/markup-pager-nav/. The pagination steps should to be one page per pagination step (i.e. limit=1). It should to be working. Haven't tried it. 2) In each "gallery" template with "images" field you could use your code below: foreach($page->images as $image): $thumb = $image->size(142, 92); echo "\n<a href='{$image->url}' rel='colorbox'><img src='{$thumb->url}' width='{$thumb->width}' height='{$thumb->height}' class='photo' /></a>"; endforeach; Hope i have helped.
  18. Try something like: $all_images = $page->images; $total = count($all_images); $images_per_page = 4; $all_pages = round($total / $images_per_page); $start = ($input->pageNum - 1) * $images_per_page; $images_limited = $all_images->slice($start, $images_per_page); foreach($images_limited as $img): $thumb = $img->size(200, 120); echo "\n<img src='{$thumb->url}' width='{$thumb->width}' height='{$thumb->height}' alt='' />"; endforeach;
  19. You should track the page number and have to adjust the "start" and "limit" selectors of images array using the find() or filter() methods. Instead: $results = $pages->find("start=0, limit=n"); You could use: $results = $images->find("start=0, limit=n"); to "paginate" the images on the page. And I hope that $pagination = $results->renderPager(); echo $pagination; will still work.
  20. Cool. Like the great ideas. 8) But there is something important.. the translators should read from the "hidden" fields and to write the translated texts in to the other fields. I was searching a server side solution.
  21. Hello all, I have a multi-language site with a separate fields for each language. They are named like "title_en", "title_fr". I have to give access to external translation agency that will translate the site. I would like to restrict their user to save changes only in the fields ending with some language string (i.e. "_es", "_fr", "_de"). In other words... I would like to allow the translators to save changes only in the fields "title_fr", "headline_fr" and not in fields like "title_en", images. I am not sure which is the best way. I am thinking that if in a hookBeforeSave I check the field names and change their "changed" state to not changed depending on their fields names. Is it possible? Has anybody have a better idea? Thanks in advance.
  22. Have you read the page at http://processwire.com/api/modules/markup-pager-nav/
  23. Well.. I think I have created a new Inputfield with multiple checkboxes and sort option based on asmSelect. I think there is room to improve and probably I will upload a new revision soon but it could to be used as it is now. The module cold to be placed in modules folder and after installation it should to be included in Page module => "Inputfield modules available for page selection". InputfieldAsmSelectCheckboxes_v1.zip
  • Create New...