-
Posts
10,912 -
Joined
-
Last visited
-
Days Won
349
Everything posted by adrian
-
Thanks for the feedback. I may not have time to look into the ios issue today, but will get to it as soon as I can. Could you please let me know the actual filename of that image in the 1283 folder? Regarding the behaviour of images and whether they should automatically end up in the body field or not. My thought was that if they were attached images, they should just end up in the images field and not embedded into the body field, but if they were embedded in the email text (html), then they should be embedded in the body field, just as they were in the email. Perhaps I could add an option to control this behaviour. The complication to all this seems to be that Mac Mail always sends images inline within the message body, which being relatively new to Mac, is still a mystery to me. I think we can end up with something pretty robust here, but it might take some testing with different email clients and some tweaking to get everything always working as expected.
-
If you need to offer a user a forgot password reset, there is this module included in the core: http://modules.processwire.com/modules/process-forgot-password/ If you need to do it for frontend users, then this post from our fearless leader should get you going: http://processwire.com/talk/topic/1716-integrating-a-member-visitor-login-form/?p=15919
-
It should work fine the other way, but if you are using the time() function you need to format like so: $newsposts = wire("pages")->find('parent=/news-articles/, $category, template=TUT_news, Datum>'.time().', limit=10'); Note the single quotes and concatenation with periods.
-
Ok, I have just added support for images that are embedded into the text within an email. These images are now added to the page's images field and then embedded into the body RTE field, just as they appeared in the email. Minimal testing so far, but seems to work great even with multiple images. Would appreciate some testing of the attached version before I submit to Pete. My forked version ProcessEmailToPage.zip
-
Did you try: Datum>date('Y-m-d')
-
joe_ma, I think the cleanest option would be to limit posts by date in your initial selector. That saves the resources of getting all the posts and foreach'ing through all of them. Something like this should work for you. $newsposts = wire("pages")->find("parent=/news-articles/, $category, template=TUT_news, Datum>time(), limit=10"); foreach($newsposts as $newspost){ $out .="<hr><div class='clearfix'>"; if($newspost->Artikelbild){ $out .="<a href='{$newspost->Artikelbild->url}' class=''>"; $out .="<img class='align_left' src='{$newspost->Artikelbild->url}'>"; $out .="</a>"; } $out .="<p>{$newspost->Datum}</p>"; $out .="<a href='{$newspost->url}'><h3>{$newspost->title}</h3></a>"; $out .= $newspost->body; $out .="</div>"; } I am not sure if that selector is exactly what you need - I grabbed most of it from the tutorial, just adding in the date check. Also, it will depend on how the date is stored. You might need to change time() to something like date("Y-m-d"). Let us know how you go.
-
I am curious as to the name of your images field. That error you are getting makes me think you don't have a field called "images". The module currently has the field hardcoded as "images" so clearly that needs to be made flexible so that other fields can be used. Not sure the best approach for this though. If there is only one image field in the selected template, it's easy, but if there is more than one we'd have to either just choose the first, or ask what field to use in the config settings, which might be best. Also, if there is more than one image attached, and the chosen field is set to only store one image, then there is also an issue. Also I see that there isn't anything to determine if the attachment is in fact an image which is something that should also be checked, and if it's not should the file be added to a files field on the page? Anyway, please check that your images field is in fact named "images" and see if that helps. I am curious about nothing showing up in the body of your page though. Do you have a "body" field in the selected template? Sorry, I see that you didn't enter any text in the body of the email, so this is expected. Regardless, I think this is something else that needs to be made configurable - at the moment the body field must be named "body" as this is the hardcoded name. EDIT: I haven't narrowed down why yet, but if I send the email from Mac Mail, no attachments get converted to images, but if I send them from gmail from within the web interface, everything works perfectly - maybe there is some limitation with flourish and its ability to detect attachments in some case, or maybe it is the crazy way Macs attach files ANOTHER UPDATE: I just sent an email with an attached image from MS Outlook and it also works perfectly, so I am beginning to think there really is something amiss with attachments and the Flourish/Mac Mail combination. Can anyone else confirm this with the version of the module attached to my previous message? AND ANOTHER: I have added support for inline attachments and this seems to be helping with Mac Mail. I had also been using this setting: defaults write com.apple.mail DisableInlineAttachmentViewing -bool yes on my Mac, but reversing that (change yes to false), along with the new inline support and images are now being added. The one outstanding problem I can see at the moment is that if a Mac Mail message also has text in it, the image won't work, so test without anything but the image for now if you are using Mac Mail. Turns out this needed "related", not "inline". I have added support for this in the new version attached this morning. One other thing I think might be a nice addition to this module is support for embedding images into the body field if they were embedded inline in the email. I need sleep now, but might look into this tomorrow! My forked version
-
Here is Ryan's take on the matter: http://processwire.com/talk/topic/4417-password-field-required-compatibility/?p=43615
-
Just added a new forceSecure option to the config. Also made sure that if port is left blank, that it sends NULL, rather than blank which seems to be a requirement. Also added a fix for the HTML vs text email issue reported by @martind All these will go to another PR for Pete in a few minutes. Please let me know if the attached version works for you now. My forked version
-
I just discovered this myself last week - great to have a cleaner way to present this type of logic.
-
Hey diogo - not sure, but I don't think that works in php <5.4 does it?
-
Ok, I decided to do some testing at my end on the connection issue. I was trying with a gmail account using imap and found I needed to force a secure connection: http://flourishlib.com/docs/fMailbox It seems to me like this module should have an config option to define this true/false, but for the moment I just changed this line in the .module file from: $mailbox = new fMailbox($this->emailType, $this->emailHost, $category->emailAddress, $this->emailPassword, $this->emailPort); to: $mailbox = new fMailbox($this->emailType, $this->emailHost, $category->emailAddress, $this->emailPassword, NULL, TRUE); I was having connection or username/password issues until I made this change, but now it works perfectly and pages are created as expected. Can you let me know if that works for you and if it does I'll add a config setting for it and add that to the pull request to Pete.
-
Glad that sorted out the category adding issue. I'll submit that pull request to Pete. As for the server connection issue - I am really not sure, but I don't think it is related to this module. Perhaps there are some issues with the Flourish library (included in this module) and your pop/imap server, or a firewall issue. Maybe someone who has been using the module more might have a better idea.
-
Moving website from local server to a sub-domain
adrian replied to benjaminE's topic in General Support
The last two RewriteBase options are just examples really. You need to enter the subdomain path and use that and it should work. -
I have attached a revised version of the module. I know Pete is pretty busy with other things at the moment, so I thought I'd try to help out. I haven't tested this thoroughly, but I think it should take care of things. It also includes a few other fixes, like adding delete buttons for each category and also fixing a bunch of PHP warnings. If you could test and let me know if everything is working fine and then I'll submit a pull request for Pete. My forked version
-
Agreed - the logo doesn't look great for me either. An SVG version with PNG fallback would be nice. You might even make use of my rasterizer module for generating the PNGs on demand at the size needed
-
Nice catch horst Can I go one simpler: $pids = array(1010, 1011, 1022); if(in_array($page->id, $pids)) { echo $pages->get("1114")->body"; } or even just: if(in_array($page->id, array(1010, 1011, 1022))) echo $pages->get("1114")->body";
-
Hey kongondo - no worries. Maybe it will be ready for the modules directory sometime soon. I just need to find the time to get back to it - maybe this post will get me motivated to find the time - I do think it has lots of potential and most of the hard work is already done
-
It sounds like you have given the editor edit permissions, but you might need to check the Access tab for the template in question to make sure that role has editing permission.
-
Check out this module: http://processwire.com/talk/topic/4420-page-list-migrator/ It is still in development, but it allows you to export a hierarchy of pages, templates and fields from one PW installation to another and import them into another PW installation. It currently doesn't copy the actually template.php files, but that is the easy part really A blog setup is definitely one of the uses I am thinking of for this module, but at the moment you will find on the import page of the module the ability to import/create the pages/templates/fields for lists of countries and a few state lists. I really do want to get back to finalizing this module, but it is in a usable state already although I would definitely recommend running it on a test installation of PW and not one with data that you care about first. If it works for your needs then use it wherever.
-
No problem, another alternative would be: $pids = array(1010, 1011, 1022); $downloads = $pages->get("1114"); if (in_array($page->id, $pids)){ echo "$downloads->body"; } This would be cleaner if your list of pages started getting longer.
-
$downloads = $pages->get("1114"); if ($page->id == '1010' || $page->id == '1011' || $page->id == '1022'){ echo "$downloads->body"; }
-
The key is find vs get: $downloads = $pages->find("id=1|1114|1452"); foreach($download as $p){ echo $p->body; } EDIT: Actually I am not quite sure what you are trying to achieve. I left out the check for whether the current page is id=1011, but you can easily add that back into my code. Am I on the right track with grabbing the content of pages using multiple IDs in the find, or am I off track completely with what you want?
-
Wow, speedy service! It shouldn't be that complicated to get imagemagick compiled with rsvg. I have certainly had my issues with dependency conflicts over the years, but two weeks is a lot of debugging time Anyway, great to hear you have it working now and the conversion results are good. I am really excited to have someone else using this. I wish there was an easier way to make these conversions, but unfortunately there is nothing simple. There are options that use batik (needs java) and some php classes that make use of running inkscape via the command line (relies on exec which is often disabled), so the imagemiagick / rsvg combo seems to be the best option and gives great results. That latest version should have fixed a few dimension calculation issues from the previous version, but please let me know if you come across any issues or have any ideas for improved functionality.
-
It isn't always as simple, but in the case of this module with the way that statement is structured, you can simply replace "live" with "on". If you want you can file an issue over at: https://github.com/NicoKnoll/ProcessPageDelete/issues/new and ask Nico to make the change. I don't think there is any need to worry about detecting the availability of "on" anymore with a "live" fallback, because PW is using jQuery 1.8 which supports "on".