doolak
Members-
Posts
323 -
Joined
-
Last visited
Everything posted by doolak
-
Search template and Repeatable fields – not returning search result
doolak replied to Alex's topic in Getting Started
In fact it's a little confusing: In the module settings you can define the default fields to search and the default field names which should be displayed in the results. In the search template both parameters are defined again - do the module settings make any sense then? -
Search template and Repeatable fields – not returning search result
doolak replied to Alex's topic in Getting Started
Hi there, I ran encountered exactly the same problem a few minutes before - now I had a look at the original search template: $matches = $pages->find("title|body|sidebar~=$q, limit=50"); Does this mean that the selectors above overwrite the module settings? Cheers, Christian -
I guess I found a solution to combine the code snippet for the gallery with the sorting by selectors: $images1 = $page->galerie_fotos->find('sort=filename'); $images = $images1->slice($start, $items_per_page); As far as I can see this works fine. LOL - seems to be sort of the same solution! Yours does the same in one step like mine in two steps ;-) Thanks for your help!
-
@kongodo: Thanks for your help! Usually I am using selectors exactly in the way you described it - in this case I am not sure how to use it, because the code snippet I am using for the gallary uses this code in the relevant part: $images = $page->galerie_fotos->slice($start, $items_per_page); and I don't know if it's possible to use a selector within this code...
-
Thanks for your answer, ryan! So if I just don't care about the order of the images in the backend and want to display them ordered on the website, how can I do this sorting within the following code: // get the images you are going to display $items_per_page = 18; $start = ($input->pageNum - 1) * $items_per_page; $total = count($page->galerie_fotos); $images = $page->galerie_fotos->slice($start, $items_per_page); // make this to give MarkupPagerNav what it needs $a = new PageArray(); // add in some generic placeholder pages foreach($images as $unused) $a->add(new Page()); // tell the PageArray some details it needs for pagination // (something that PW usually does internally, for pages it loads) $a->setTotal($total); $a->setLimit($items_per_page); $a->setStart($start); // output your images foreach ($images as $image) { echo "<div class='galerie_image'>"; echo "<a class='fancybox' rel='fancybox' href='{$image->url}' title='{$image->description}' >\n"; $thumb = $image->size(220, 150, array('upscaling' => false, 'cropping' => true)); echo "<img class='galerie_thumb' src='{$thumb->url}' alt='{$thumb->description}' />"; echo "</div>"; } echo "<div class='clear'></div>"; // output the pagination navigation echo $a->renderPager(array( 'nextItemLabel' => "»", 'previousItemLabel' => "«", )); How can I use a selector to display the images sorted by name? Cheers, Christian
-
Hi there, is there any possibility to control the order of the images which are uploaded as a Zip archive? At the moment it seems to be rather randomly - if I have different images e.g. 001.jpg, 002.jpg, 003.jpg, they appear in a random order after they are uploaded and unzipped. Would it be possible to have them sorted by name? Cheers, Christian
-
Thanks a lot - i will have a try.
-
Where do I find the images manager?
-
But if each gallery is a page and has a lot of images - it wouldn't be possible to choose one of the images, right? I would have to use a seperate page for each image.
-
Yes, if there would be an option to choose one the existing images. This would be very useful e.g. for an image gallery. I want to make it possible to select one of the existing images as the gallery thumbnail. Fot this selection a WYSIWYG field will be a bit "oversized"...
-
Works great, thanks a lot!
-
upscaling=>false not working when one dimension set to 0
doolak replied to adrian's topic in API & Templates
I found the information I was asking for: http://processwire.com/talk/topic/2287-image-size-configuration-questions/?p=22535 Maybe it would be fine to have all available options somewhere available at one place - the thread above would be a nice place to collect them ;-) -
upscaling=>false not working when one dimension set to 0
doolak replied to adrian's topic in API & Templates
What is the current status of the availabe options for resizing an image? Can I find some information about this somewhere? I usually use e.g.: $detail = $project->project_image->size(800, 600, array('upscaling' => false, 'cropping' => true)); $thumb = $project->project_image->size(250, 175, array('upscaling' => false, 'cropping' => true)); Is there any option now available to set cropping to center or top? Edit: Ahh, forgot to mention: HAPPY EASTERN !!! ;-) -
That's exactly what I was looking for - thank you, Soma!
-
I am using the Form Builder - the form is embedded via iFrame so including the script in the template or as hook after page::render would not work. That's why I would like to change the module itself - but this would be nice with a hook, not by changing the modules files.
-
Hi Ryan, the problem is that I want to use the localized datetime field in a form, so I have to get the output on the frontend side. And, as it's embedded via iFrame I thought it may be the best possibility to hook directly into the module itself - is this possible?
-
Yes, that's were I got the code above ;-) I am just looking for a possibility to embed both codes into the Datetime module without changing it - so what I need is a hint how I could do a hook into the module ...
-
Hi there, I need to show the Date/Timepicker in German, so I am using the jQuery UI/Datepicker/Localization like below: $.datepicker.regional['de'] = {clearText: 'löschen', clearStatus: 'aktuelles Datum löschen', closeText: 'schließen', closeStatus: 'ohne Änderungen schließen', prevText: '<zurück', prevStatus: 'letzten Monat zeigen', nextText: 'Vor>', nextStatus: 'nächsten Monat zeigen', currentText: 'heute', currentStatus: '', monthNames: ['Januar','Februar','März','April','Mai','Juni', 'Juli','August','September','Oktober','November','Dezember'], monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun', 'Jul','Aug','Sep','Okt','Nov','Dez'], monthStatus: 'anderen Monat anzeigen', yearStatus: 'anderes Jahr anzeigen', weekHeader: 'Wo', weekStatus: 'Woche des Monats', dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'], dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'], dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'], dayStatus: 'Setze DD als ersten Wochentag', dateStatus: 'Wähle D, M d', dateFormat: 'dd.mm.yy', firstDay: 1, initStatus: 'Wähle ein Datum', isRTL: false}; $.datepicker.setDefaults($.datepicker.regional['de']); This works fine when it's added into the InputfieldDatetime.js - but just for the date - for the time (which uses the Timepicker addon) one should be able to use this code: $.timepicker.regional['de'] = { timeOnlyTitle: 'Zeit wählen', timeText: 'Zeit', hourText: 'Stunde', minuteText: 'Minute', currentText: 'Jetzt', closeText: 'Schliessen', timeFormat: 'HH:mm', amNames: ['AM', 'A'], pmNames: ['PM', 'P'], }; $.timepicker.setDefaults($.timepicker.regional['de']); ... but I could not get this work when including it into jquery-ui-timepicker-addon.js - so I just changed the options in that file. As it's obviously not recommended to change the code in the modules files, I would like to add the localization by a hook. How could I load a hook always when the datetime module is called? It would work fine with Page::render, but in use with the Form Builder it wouldn't work then, when the forms are embedded by iframe. So it would be great to add the javascript by a hook "into the datetime module"... Would be great if somebody could show me the right direction. Cheers, doolak
-
@thingstodo: Maybe you made the same mistake like I did: Check if you are trying to get the thumb from Pageimages (one ore more images) instead of single image - this does not work. Edit the image field and set it to allow only one image and look if it works then.
-
I know this too well...
-
Hi arjen, the parent page will have the "has_children_class" and if it's the actual parent it will have the "parent_class", too. So it can be styled with CSS through: li.parent.has_children { color: #fff }
-
Ok, got it: it has to be: echo "<img class='mitglied_image' src='{$thumb}' alt='{$page->mitglied_foto->description}' />"; not: echo "<img class='mitglied_image' src='{$thumb->url}' alt='{$page->mitglied_foto->description}' />";
-
Thanks, apeisa - you were right. I have set the field to allow just one image and the error is gone. Now i have just to find out why it is displayed now as a 1x1 Pixel image ;-)
-
Hi there, i receive the following error: Error Exception: Method Pageimages::getThumb does not exist or is not callable in this context (in /home/xxx/public_html/xxx.de/wire/core/Wire.php line 232) I am calling the thumbnail as follows: $thumb = $page->mitglied_foto->getThumb('thumbnail'); echo "<img class='mitglied_image' src='{$thumb->url}' alt='{$page->mitglied_foto->description}' />"; Am i doing something wrong? I am using one of the latest dev versions of PW.
-
PageField: Switching from Checkboxes to Page Autocomplete does not work
doolak replied to doolak's topic in Modules/Plugins
So if "FC" stands for "ü" this would be fine - but does not work here...