Jump to content

horst

PW-Moderators
  • Posts

    4,077
  • Joined

  • Last visited

  • Days Won

    87

Everything posted by horst

  1. horst

    ED DESIGN

    Great Site! I have chosen the german language on the desktop (win7 FF31) and mobile (iOS). Everything looks very good. My only thought: maybe the navigation arrows under the sliders should also be visible on the desktop? Have found 2 or 3 typos: not sure about a typo: "unter der Verwendung eines der fexibelsten Content Management Systems." => should it be "... Content Management Systeme." ? sure a typo at page signature: "komminiziert" => "kommuniziert", "Merzedes" => "Mercedes" typo (or not?) at http://ed-works.com/de/projects/small-mobile-big-hands/ : "wurden mehrerer Notizbücher" => "wurden mehrere n Notizbüchern" ? "Radaktion" => "Redaktion" I wish much success and good customer!
  2. @LostKobrakai: You are right, but only to, maybe 80 - 90%. I also can understand pwired a bit. Just imagine the client from your example chooses PW one day because it supports 1-click theme-switching for those who are willing to use it. Additionally to that he can import a whole WP-blogsite content by using the WP-migrator with only clicking two or three buttons. What do you think does this do to him if he later on want to extend his site with a cool shopping cart, a newsletter system and some other shiny things he has read from here? I bet he think that this can be done with just clicking some buttons, because he has changed to PW because he has heard this is better than XY before. Also his first steps really only needed some simple clicks. So why should he think that this cannot be done that easy? Also the community is so friendly and helpful. - If he has only little or no HTML/CSS skills and no PHP/JS skills, (and maybe he also has no interest in learning this), I only can say: good luck and a lot of patience with such new users. So, it will be different with those who are able and willing to understand the differences of application modules. We should do it in a relaxed manner. One of the best goods here (besides PW itself) is the helpful and kind community. And it takes time to "assimilate" new users from that spectrum. Also I think it only could be a small amount at a time. - The worst case would be if they try to assimilate us
  3. @reems: if there are all images already created, the imagesizer get not involved. I bet there are not all imagevariations created now. But 30 seconds is far to long for only 80 images. Maybe there is one corrupted image in or what ever. To get rid on it you may debug on which imagefiles it is called. This way you can track down the issue, I hope. If you have this on your local host you simply can add a line into the imagesizer file here, at the start of the resize function: $logentry = $this->filename; wire('log')->save( "debug_resizes", $logentry); This way you get a list in site/assets/logs/debug_resizes.txt with all filenames on which the imagesizer is called. (site/assets/logs/ must be writeable, what it should be by default) Just empty or delete the logfile if it contains previous entries and call your admin page that causes the issue only once and inspect the logfile afterwards. If you need further assistance come back please.
  4. Does it show this every time or only once or only sometimes? "2006 MySQL Server has gone away" can have different reasons. As it states there, it is a "General Error", not a specific. One reason can be that the MySQL server is very busy (shared host?) and you run into a timeout. Another reason could be that a previously used connection was lost and it couldn't be re-established. This was the behave with the PDO-class in the past, but this was fixed in early march this year. Which PW version have you installed now? If you use 2.4.0 (stable) you have this bug. Then you should go to the dev-branch and get the WireDatabasePDO.php file and copy this over your existing file from 2.4.0: wire/core/WireDatabasePDO.php If you have installed the latest dev branch allready, it has another reason.
  5. @Hari KT: In the whole time since your first patch (5 month until now), it occured max 2 or 3 times, not more, but also not zero. Thanks for sharing your code!
  6. maybe more is to read here: https://processwire.com/talk/topic/4792-festival-site-with-processwire-and-ajax-boom-festival/ ------ Edit: A very good site @benbyf. The only thing that I (personally) would change is the behave when clicking on a photographers name: one should get the "Main Gallery" directly, no need to click two times before seeing the first photo. / but also a bit nitpicking, I know
  7. http://processwire.com/talk/topic/771-is-there-a-way-to-get-a-db-backup-from-within-pw/#entry6452 http://processwire.com/talk/topic/3052-open-dynamo-webspace-backup-tool/ https://processwire.com/talk/topic/771-is-there-a-way-to-get-a-db-backup-from-within-pw/ https://processwire.com/talk/topic/4653-how-to-make-backup-of-database/
  8. You should use http://buildinternet.com/project/supersized/ or search for superbgimage and use that one. Highly customizable!
  9. Until then you may use the WireMailSmtp class. It has to, cc and bcc functions and I think Ryan will use the same names for the functions.
  10. This is an Error regarding "ProcessCropImage" = Thumbnails You should look there, I think it can belong to this: https://processwire.com/talk/topic/643-release-thumbnails/page-17#entry66437
  11. You should post this into the formbuilder forum (only visible for registered form builder users) because it belonges there and the post gets better recognition there. (I don't know form builder, so cannot help here)
  12. Ah yes, this one I have had sometimes with different text: "Undefined index: xyz". I've got this with modules on their first run.
  13. @adrian: doesn't you populate two times the value here? $f->attr('value', $data["allowedRoles"]); and: if(isset($data['allowedRoles'])) $f->value = $data['allowedRoles']; Which one should be used with the ASM ?
  14. You should check what you get with your find. For debugging you can drop in something like var_dump($slides); die('Manually debugged ' . __FILE__ . ':' . __LINE__); or inspect the $s and not the $slides, or both. EDIT: should have read more carefully before try to answer. Soma gave the right direction!
  15. You may try this module: http://modules.processwire.com/modules/service-pages/ and if you build it into your app with an abstraction layer, you may be able to change it with the new functionalities from PW 3 once it is available.
  16. @sins7ven: I'm a bit scared how you use the download filename concatenation with the user input. Maybe I'm wrong, but before you go online you should test if something like this can work: http://www.domain.com/download.php?pageid=../logs/&file=errors.txt or this one? http://www.domain.com/download.php?pageid=../../&file=config.php or this? http://www.domain.com/download.php?pageid=&file=../logs/messages.txt
  17. @Macrura: I think with a peak of 150 recipients you can go like in your second gist with the replacements (regarding personalization) and send them one after the other. But you need to use sendBulk(true) !! Has you tried to use gmdate? Did it solve the issue? // LOGGING: you need to add a field to the messages template / pages that can collect the successful used recipients emailadresses! (I use a textfield or simple textareafield named $message->recipientsSuccess in the following example) // at the top of the template add the hooks // the sentLogReset isn't needed to hook into. // If you want to reset it, just delete the value of the $message->recipientsSuccess field! // this hook read in all successful used recipients wire()->addHook("wireMail::sentLogGet", function(HookEvent $event) { $p = wire('page')->tmpMessagePage; // get the current processed message-page // read the emailadresses from the recipientsSuccess field $emailaddresses = unserialize(trim($p->recipientsSuccess)); // you may also use json instead of serialized code or any other solution if(!is_array($emailaddresses)) $emailaddresses = array(); // should return an array !! $event->replace = true; $event->return = $emailaddresses; return $emailaddresses; }); // this hook add recipients to the successful collection and log the success wire()->addHook("wireMail::sentLogAdd", function(HookEvent $event) { $p = wire('page')->tmpMessagePage; // get the current processed message-page $emailaddress = $event->arguments[0]; $logentry = "From: {$p->tmpFrom}; To: {$emailaddress}; Subject: {$p->tmpSubject}\n"; // here you need to add the recipient to the successfull recipients collection $tmp = unserialize(trim($p->recipientsSuccess)); // you may also use json instead of serialized code or any other solution if(!is_array($tmp)) $tmp = array(); // should return an array !! $newRecipientsCollection = array_merge($tmp, array("{$emailaddress}"=>"{$emailaddress}")); $p->of(false); $p->recipientsSuccess = serialize($newRecipientsCollection); $p->email_log = $p->email_log . $logentry; $p->save(); $event->replace = true; $event->return = true; }); When starting the wiremail instance, you need to setup it to use the sentLog functionality: $mail = wireMail()->useSentLog(true)->sendBulk(true); // don't forgett this !!! At the end of your $messages loop you need something like this: // Send // add some temporary vars to the current page, so it simply can be read within the hooked functions $page->of(false); $page->tmpFrom = $message->identity_select->email; $page->tmpSubject = $title; $page->tmpMessagePage = $message; $page->save(); $page->of(true); // send the mails $numSent = $mail->useSentLog(true)->sendBulk(true)->send(); // useSentLog: you also can set it here ! // ready with this $message page I haven't tested it but something like this should work & you get the idea I think.
  18. Have you tried to increase it in the .htaccess file? php_value memory_limit 128M #php_value memory_limit 256M
  19. ok, this way it could be that some different mails has to be sent parallel, right? You can go this way: (simplified) - sentLogReset isn't needed in your case, because you collect all recipients in the field $message->recipients. - you need to hook into sentLogGet, here you read all recipients from $message->recipients. - for each successfull sent message you should drop the recipient from the $message->recipients field in the hooked method sentLogAdd (don't forget to save the page) here you also can add a message to a textarea field Edit: striked the above, - see this post, it has a more correct solution This way it should be possible to add some hundred recipients to the initial collection and if a script execution got interrupted, it could be resumed with the next cron run. The only thing that you have to take care for is to determine if a page is allready sending. (no simultaneous sending of the same page!) Hhm, maybe also it should not send different pages simultaneous?! Only one page after each other? The used php libs allready provide personalized emailmessages in a faster way than to create and encode a new mail for each recipient. So, to use it in its meant fashion, it is needed to extend the current module. If you like and if it is possible that you can send me (only) the basic template code for the emailpages we can achieve that together. Edit: Oh, hasn't read your gists before. Some questions: - Is it possible to setup the cron to only start a new instance if the previous started one (5 minutes before) has allready finished? (but skip it if the previous one is still running) - What would be the max number of recipients you can think of you will be collect for a mail (in the next 2 years) using this approach?
  20. Ok, if I got it right, you create a new page for a new message (regardless of single or bulk) you select recipients via asm create text, attach files, etc. then at some point you need to save the page. And now, - how do you execute the send? (scheduled or not)
  21. @Macrura: regarding the logging, there are already functions that do the logging into files if you enable it like explained here. If you don't want use the default logging files, you need to hook into the logging functions by e.g. creating a module with your logging functions or by defining the hooks on a template like MartinD described here. But can you explain a bit more how you setup your mail recipients? How many recipients do you use (bulk or single)? If you use bulk sending, do you have an admin page where you initialize the mail sending? (add / select recipients to / from a collection?) Or do you prefer to do this ((partially) hardcoded?) in a template file only? I can write some lines of example code if I know a bit more of your setup. EDIT: regarding the Date Header: https://github.com/horst-n/WireMailSmtp/blob/master/WireMailSmtpAdaptor.php#L351 It simply uses the PHP date function to output the current date-time. But you may try using the php gmdate function instead and look if it solves the issue. You simply need to change date to gmdate in line 351 of WireMailSmtpAdaptor.php.
  22. How can this be done? Especially if the domains are used on a shared hosting and the hosting provider has done register it etc.?
  23. Hi @neeks, at first: I'm not really sure if you have the same effect as powerfulhorse has had, because he has used a loop through childpages and even has had large amount of processing times for cached images?! Doesn't make much sense, hhm? second: especially the watermarkText method never was meant to be used in bulk rendering. It uses much cpu and memory for calling many memory image copy operations and also inspect images by histograms to autodetect the best used color for the text, etc. So that is a lot of work it does and that is time consuming, - sorry I haven't noted this in the first post here. It was meant for something like showing thumbnails without watermark text on a page and only watermark larger (single) images when requested. Also its text output can be a bit (or very) ugly!?! - If you want add the same text to all images, you should create and use a transparent png with a nice (and maybe smooth) text together with the watermarkLogo method instead. third: you may use and inspect debug timers with your code. If there are no significant differences with images processed later (comparing to images processed first), everything seems to be ok. If you get significantly larger times only with later processed images in your loop, then this can be due to some (weird?) design in PHP? PiM uses the correct code to release and free memory (pointers) for all objetcs / instances, but the PHP interpreter internally only seems to set this objects to zero but do not really free the memory to the system site. Somewhere I have read about a discussion between the PHP Group and others and "the others" said that the PHP devs have said that it isn't necessary to release / free pointers because all pointers and handles will be released / freed at the end of every request, (because the complete php instance is closed / released then). I haven't investigated further on this, and maybe I have overlooked to release some objects. I will take a closer look to it when finding time for it. But don't expect it in the near future. --- On the other hand do I use the watermarkLogo method within a loop on a gallery site where it sometimes create 100+ watermarked image variations [2] at first call of an album page without any drawbacks: $gallery = "<div id='myGallery'>\n"; if(count($page->images)>0) { // display imageThumbs $num = -1; foreach($page->images as $image) { [1] set_time_limit(5); $imageName = pathinfo($image->name,PATHINFO_FILENAME); $imageDescription = strlen(trim($image->description))>0 ? ', ' . preg_replace('/[^0-9a-zA-ZöüäÖÜÄß -]/msi', '', trim($image->description)) : ''; $num++; [2] $gallery .= "\t<a id='uid$num' rel='nofollow' title='{$imageName}{$imageDescription}' href='{$image->pimLoad('full',false)->watermarkLogo($wmPng)->pimSave()->url}'> </a>\n"; ... ... } } $gallery .= "</div>\n"; set_time_limit(20); All source images are max 1000 px and as you can see in the loop I use a time_limit of max 5 seconds [1] per loop.
×
×
  • Create New...