-
Posts
86 -
Joined
-
Last visited
Everything posted by martind
-
hi, we have a funny behavior with field dependencies here. inside a table-extended field, the corresponding template has declared field dependencies on a pages field (categories) with single select radio buttons. this works as expected for all the fields with dependencies, except for one of the possible selections, this switches a completly uninvolved CKeditor field on the template into rtl-mode (cursor jumps to first position after each keypress). Any idea whats going on? thanks, martin
-
ok, thats something i can live with, thank you. another question: when using something like $this->message($this->_("blabla...")); in the inputfield module we spoke about, shouldn`t this work?
-
ok, thank, that helped, declaring $inputfield->editPage = $page; in the Fieldtypes hookProcessInput function i have the page-object in the inputfield module. inside the ProcessInput function i create my image variants and with $this->editPage->app_img->add($this->destinationPath.$filename."-app-web.jpg"); $this->editPage->save(); ... i can copy the image to the app_img field in the background and it appears when saving the page. Is it possible to actualize the image-field after the add() is done?
-
https://processwire.com/talk/topic/2691-getting-current-page-in-a-inputfield-or-fieldtype-module/ ... in this post the behavour got discussed, but i cant get ryans solution to work.
-
no. i've cloned the inputfield-file module to InputfieldFileApp.module (and copied FieldtypeFile.module as FieldtypeFileApp.module inside the folder). The new filefield works, i can use some custom functions inside, this is good. But now, i want to copy a specific version of a new uploaded file to another field, an image field on the same template. inside InputfieldFileApp.module wire('page') is the edit page, not the page the field is on. thats logical, but doesn't help me out.
-
Thank you kobrakai, i`ve problems to get the $page varible in my inputfield module. i'm not really familiar with modules in general, so maybe i don`t understand someting common here.
-
is it possible, to add one of the generated images from the new file-field to an existing image-field on the same template?
-
no problem, your suggestion to do it by a new inputfield-file variant works perfect, i have a multiple-file field now, that executes the imagick scaling after upload und shows the generated thumbnail in the file-list. pretty good for the first step, as i think.
-
hello horst, thank you for the input. What i have now is: - this snippet that converts also really large files to needed downscaled versions without heavy load and pretty quickly. unfortunately your PageimageSizerImagick module won`t do this that way, it runs in heavy load and timeouts as with gd. $imagick = new Imagick(); $imagick->setOption('jpeg:size', '800x532'); $imagick->readImage("/var/www".$page->test_img->first()->url); $imagick->thumbnailImage(800 , 532 , TRUE); $imagick->stripImage(); $imagick->writeImage("/var/www".$page->test_img->first()->url."-imagick.jpg"); $imagick->destroy(); - and further the idea to hook into a file-field and execute this after InputfieldFile::fileAdded or whatever meets best; a kindly info about the existing versions of the image and a link to recreate it for every file in the field would be sweet. ... and now i'm on the road to create a buggy module that does this. we will see ...
-
for a common website case you are right, but here its a combined workflow for print/web publishing from a pr-agency, image data comes directly from organizers and phtographers and it is desired that they submit it in the highest possible resolution and quality. This works pretty well in most cases, but the time of 30+megapixel cameras brought up new requirements here.
-
ok, have looked inside a bit. The upload itself works without problems, as long as the preview-thumbnail option isn't set for the field. the calculation for imgmem in checkMemoryForImage() for the said 45mb image gets 1,39 gb (based on 21600x21600x3), so setting memory_limit to 2G clears this error. But, when uploading the 45mb jpeg, the process goes quickly up to 99%, sometimes it stops a bit earlier and restarts itself again, but it comes to 99%. Then, a corrupt jpeg, titled by the sanitized source-filename, gets created, its only about 17 Mb (a quick check in photoshop shows the right dimensioned image but only the first third of the pixels are viewable). A few seconds later, a second jpeg with the original file-size of 45mb is created, titled by the sanitized source-filename and -1, this is bug-free. So, from the side of the upload process everything seems to work fine, the problem occurs with imageSizer when calling imagecopyresampled the first time.
-
hello Horst, thank you for this, but no success with post_max_size 99M too. It seems to be a memory problem, there iss Zend Memory Manage installed on this php 5.4.42 build, but think thats pretty common, shouldn`t set any hardlimit.
-
hi, we have a similar problem here with the checkMemoryForImage() function on 2.6.10 dev. upload_max_filesize 50M post_max_size 50M memory_limit 1G ... on a 45mb jpg the - not enough memory to load error occurs. Any ideas? greetings, martin
-
hi, we`re actually running an announcement for a clients project with custom google map implementation (complex custom styles, layers, info-windows) on a pw-backend. So the project scope includes both, a custom input-module based on google-maps (multiple markers with icon-library, layers from svg-polygons, also some tricky stuff like jogging-trails should be possible to enter visually, ..) as well as the rendering-engine for output on the website. On a later expansion stage, offline ios and android apps of the maps should be possible, only to think a little bit further. our agency and the clients are located in east-austria/vienna but realworld meetings aren`t a must have, collaboration and papers are primary in german, english is possible but not fully desired. For a detailed briefing (in german) please contact *** - ideally 2 reference projects in the field of maps-api are welcome, closing date for offers is Saturday the 19th of July (just a few days, I know). greets, martin
-
hi, can this be an issue in 2.5.8 again? I have exactly the same behavior in a repeater which has dependencies from page-fields and url-field on another page-field. thanks, martin
-
thank you apeisa, I found ryans post about database vs. in-memory selectors a bit later. but the grouped selectors i can`t get to work. the [value=stp] is for quering a textfield "value" in the target-template of the adrdb_location pagefield. Maybe these new selectors do not work with repeater fields? I've read something about anywhere, pagetable fields work, repeaters not? these grouped- and subselectors would be a really benefit with in-repeater pagefields holding pages with page-fields and further values (example: a location from a page field and an amount of something in a textfield for the selected location), at the moment we query such things from the repeater-pages (under /pw/repeaters) and grab the relevant page-ids from their parents url-title or loop a few times through results of multiple queries, but with 10000+ pages this takes its time of course. thanks, martin
-
hi, in the 2.5 changelog there are some words about the new selector-features: ... what means "(database selectors only at present)"? And for the second point, shouldn`t somethin like this work ... $pages->find("template=address_abo, adrdb_multi.id=[adrdb_location.value=stp, anzahl>0]") // or both together $pages->find("template=address_abo, adrdb_multi.id=[@adrdb_location.value=stp, @anzahl>0]") // ok, had to read "can be used on the 'id' property of any field that maps to a page". // maybe this? $pages->find("template=address_abo, (@adrdb_multi.adrdb_location.id=[value=stp], @adrdb_multi.anzahl>0)") ...trying here to query a reapeater "adrdb_multi" which contains a page-field "adrdb_location" and a textinput "anzahl" which both should be true. thanks, martin.
-
thank you both, i could solve it with diogos advice, i think my attempt above wrecked more on my poor php understanding. this way it works perfect: $count = 0; foreach($v_array AS $v) { if($count === 0) $result = wire('pages')->find("template=xx, field_x=$v"); if($count > 0) $result = $result->import(wire('pages')->find("template=xx, film_id=$v")); $count=$count+1; }
-
thank you, seems promising. Now i`m struggling with dynamically build the query. this won`t work as one might wish: $q = "wire('pages')->find"; $count = 0; foreach($v_array AS $v) { if($count === 0) $q .= '("template=xx, field_x='.$v.'")'; if($count > 0) $q .= '.append("template=xx, field_x='.$v.'")'; $count=$count+1; } $result = $q; //unfortunately empty result while $q as string seems ok
-
hi. i have a selector like this: $result = wire('pages')->find("template=xx, field_x=439|417|456|402"); now i need the $result sorted exactly like the values are commited in field_x. How to do this? thanks, martin
-
ah ok, works this way. wire()->addHook("wireMail::sentLogReset", function(HookEvent $event) { $filename = wire('config')->paths->logs . 'wiremailsmtp_sentlog_' .wire('page')->name. '.txt'; @touch($filename); $res = file_put_contents($filename, '', LOCK_EX ); if(false===$res || 0!==$res || !file_exists($filename) || !is_readable($filename) || !is_writeable($filename)) { $this->logError('Cannot reset Content of the SentLog: ' . $filename); throw new WireException('You want to make usage of the SentLog-feature, but cannot reset Content of the SentLog: ' . basename($filename)); } $event->replace = true; $event->return = 0===$res ? true : false; });
-
hi horst, thank you for this module, works great. i'm interested in the "You can hook into it if you want use alternative stores for it" thing from a template to get a sentlog for each page, can you give me a tip how to achieve this?
-
ok, for my case it was possible to fix it by adding the categoryData array manually to the modules json via mysql. something like [{\"emailAddress\":\"my@me.com\",\"emailCategory\":\"1013\",\"emailTemplate\":\"46\"}]
-
hi kixe, i have problems to get the template-codes to work. 1st i see is that the moduleInfo shows version 101 where it should be 102, isn't it? ---> ah, ok, forget this. got version 1.02 from git, it's not linked on module sites download. while $page->player['title']; outputs the file-name or description ok, the $page->player['code'] does nothing. I get no errors, only notices for the undefined $titles and $string vars. am i doing anything wrong? thanks for looking into it, martin
-
is this great module working ok with the latest dev version 2.3.11 with default admin-theme? the problem i see is, that on module-admin page following fields can`t get saved: "publishDefault":"","emailAddress":"","emailCategory":0,"emailTemplate":"","categoryData":""