Jump to content

Michael Murphy

Members
  • Posts

    141
  • Joined

  • Last visited

Everything posted by Michael Murphy

  1. I am trying to import some events which have two date fields - a start and end date. I enabled the FieldtypeDate in the module as suggested by Ryan : protected $fieldtypes = array( 'FieldtypePageTitle', 'FieldtypeText', 'FieldtypeTextarea', 'FieldtypeInteger', 'FieldtypeFloat', 'FieldtypeEmail', 'FieldtypeURL', 'FieldtypeCheckbox', 'FieldtypeFile', 'FieldtypeDate' // add this line ); However there seems to be some odd results after importing. Some event pages have imported both start and end date. others have only a start or end date. and then some have no dates at all. I have tried various times and made sure that the dates are in the correct format (d/m/Y) but no luck. Here is the CSV file I was using http://db.tt/h0fGuBHU Was there any progress with the page field type import?
  2. Good point, I completely forgot about the SEO benefits of site comments as content. Thankfully I haven't noticed this 'instant personalization' yet. I just checked my Facebook privacy setting and it says Of course this will be turned on by default when it's available…
  3. Ryan, maybe those sites where you see your name and profile photo are Facebook comments? it's similar to Disqus but will recognize when you are logged into Facebook. I do find it a little creepy, when I land on a new site and there's my name and photo next to the comment field, but I imagine it's a useful feature for most people. Whatever encourages real people to comment must be a good feature. Speaking of Disqus, which I think is a good, simple solution if you don't want to develop and manage your own system - I just wanted to share this post by the designer Sacha Greif which shows you how to really customize the Discus comments to fit in with your own site. I never realized it was so easy : http://blog.disqus.c...squs-in-a-flash
  4. Thanks for the example Ryan, I got it working! Had to tweak the json output, but was much simpler than I thought. This method for creating basic json apis or any type of api could be very useful. One other thing I did was to use the if($config->ajax) method, so I could return a normal results page if not using ajax.
  5. Thanks for mentioning as I didn't notice those extra options. This is a really great addition for users managing lots of page references. Is there a simple way to integrate this field on the front-end of a website?
  6. Thanks again for the detailed explanation - always very helpful in understanding. You're right, the %= does work like a wildcard search. My main concern is that people might spell a street name differently to what we've stored in the database. I imagine a "search spelling suggestions" functionality would be difficult to implement - however the autocomplete search should get around this problem.
  7. I'm trying to work out the best way to implement an autocomplete search using this jqueryui plugin : http://jqueryui.com/demos/autocomplete I have over 1500 street names (sepearte pages in PW) which I'd like users to find via an autocomplete search. My first idea is to create a seperate search page which will return the results in json format (if called via ajax). Similar to this FAQ which explains how to work with ajax : http://processwire.c...__fromsearch__1 I'm currently using the %= like style selector which works well for the type of results I want. Just a little worried about performance hit when using this selector, especially if I have an autocomplete search - the number of documents I want to search should not be more than 1500. Is this a good approach? Any other ideas or suggestions? Also related to search, does anyone have any tips for improving the default search functionality? How about more advanced wildcard type searches? or maybe a google style "did you mean ______?" Thanks, Michael
  8. I would also like this! We were discussing how better to manage time fields on the iCal MarkupiCalendar module thread - http://processwire.com/talk/index.php/topic,574.msg4292.html The timepicker addon looks like the best UI I've seen for managing time values.
  9. was just testing and that was the problem. If you select Home as the parent - despite showing all the pages in the site, and allowing you to select any, it will only save the page value if they are direct children of Home which is a bit confusing. Maybe only show selectable pages (not sub pages) or change the description of the input field settings to something like this :
  10. Have you tried the ->prepend or ->append commands? I just noticed them today in the admin templates : $config->styles->prepend($config->urls->adminTemplates . "styles/main.css"); $config->styles->append($config->urls->adminTemplates . "styles/ui.css"); $config->scripts->append($config->urls->adminTemplates . "scripts/main.js");
  11. Hi Carlos, here is a quick idea - Create another template called "navigation_alias". Add a new field of type "Page" called "navigation_redirect". On the Details tab of the field choose : Single page (Page) or empty page (NullPage) when none selected. Leave the "Parent of selectable page" (input tab) empty (do not set). Add this field to the "navigation_alias" template. Now you can add a page (with template "navigation_alias") to any section and use the page picker to choose where it should redirect. In your "navigation_alias" php template file simply add a redirect to the selected page. Something like this : $session->redirect($page->navigation_redirect->url);
  12. Hi Soma - good point, thats a much simpler solution. I always get confused by the huge folder names that are auto generated by Github downloads
  13. Thanks again for another useful module. I've been testing this out and everything works as expected. Here is some initial feedback and a question. - Is it possible to distribute modules like this with additional files (css, js etc) already in a folder? It might save some confusion and make the install simpler - i.e just copy this MapMarker folder into the modules directory and press the check for new modules in the admin interface. - Add a link in readme.txt to this forum post (the instructions here seem more current) - Add an explanation of the status codes (OK Approximate, OK Rooftop etc) or maybe just a link to the google maps info on responses : http://code.google.com/apis/maps/documentation/javascript/services.html#GeocodingResponses - After saving a location, set the default zoom of map to be a bit closer (like 15) - It would be nice to update the map without pressing save (just being picky now - Will this module eventually replace or merge with the GMap Fieldtype module? The major functionality difference which I need, is being able to manually add a place on the map. I am using this for a Places directory and most of the locations cannot be geocoded or don’t have an actual address (parks, playgrounds, statues, points of interest etc.), so manually adding a point on the map is quite important. Thanks, Michael
  14. I never understood why uploading through the mobile safari browser on iOS is disabled. Must be to protect the mobile operators. Apparently you can get it working on a jailbroken iphone using an additional app. I researched ways around this limitation a while ago for another project, but never implemented it. The best solution I could find, was to use a native iPhone app that helps you with the upload process. The user will have to install the upload helper app first (they are all free). Then you will probably need some good knowledge of how Processwire handles uploads so you can configure the upload dialog to call the app using javascript. Here are some of those apps : Picup http://picupapp.com/ Aurigma Up http://www.aurigma.com/iphone/ cliqcliq Quickpic http://www.cliqcliq.com/support/quickpic/ (website seems to be down - here is the iTunes store app page http://itunes.apple.com/us/app/cliqcliq-quickpic/id347874926?mt=8 )
  15. I have been meaning to report this bug for a while. If you see the gray box, try resizing the browser window and the map should appear. All it needs is a slight resize of the window and it should work as expected (tested on processwire 2.1 with Chrome, Safari, Firefox). You have to do this every-time you want to use the map (little bit annoying). I have found this module very useful - would be nice if it was polished off and added as an official field type for Processwire. I'd be happy to discuss sponsoring the development if there was interest.
  16. Thanks Ryan, you are right. It was not TinyMCE interfering but the Markdown text formatter. Removing the Markdown text formatter so it's just a plain textarea field, and the standard check : if($page->summary_de) { ... } works as normal. If using the Markdown text formatter then the php trim function clears up any extra whitespace added, and the following test works : if(trim($page->summary_de)) { ... }
  17. It sounds simple, but I'm having some real issues detecting if a field is empty (has no content) I have two fields : summary - textarea summary_de - textarea I want to detect if $summary_de is empty if its empty show $summary if $summary is empty show nothing I have tried the following tests : // Test A if ($page->summary_de) { echo "Test A : True"; } else { echo "Test A : False"; } echo "<hr />"; // Test B if (empty($page->summary_de)) { echo "Test B : True"; } else { echo "Test B : False"; } echo "<hr />"; // Test C if (isset($page->summary_de)) { echo "Test C : True"; } else { echo "Test C : False"; } echo "<hr />"; // Test D if (isset($page->summary_de) && $page->summary_de === '') { echo "Test D : True"; } else { echo "Test D : False"; } echo "<hr />"; // Test E if (is_null($page->summary_de)) { echo "Test E : True"; } else { echo "Test E : False"; } The results on a published page when $summary_de is empty Test A : True Test B : False Test C : True Test D : False Test E : False adding some text into $summary_de and saving : Test A : True Test B : False Test C : True Test D : False Test E : False after removing the $summary_de text and saving again (so its empty) - same results. Test A : True Test B : False Test C : True Test D : False Test E : False So all the tests are the same. Any ideas where I am going wrong? Tried deleting cache, but still the same. I'm using latest version of 2.1 from github. Thanks, Michael
  18. Thanks Ryan, this is going to be a really useful module. With a system as flexible as PW, everyone will have their own ideas for how something should be built. It will be interesting to see what best practices and patterns turn up with the sharing of site profiles in the community. And of course it will be great for new users to get started with some ready made packages. I've just tested on my local machine exporting a 2.1 site. I had an issue with the modules which I did not copy over. All went well up to the "create admin" screen. After clicking create, it threw an error about the Gmap module. Copying the modules over did not fix anything, and I ended up starting again from a fresh DB. This time I copied all the modules folder first : site/install site/templates site/modules I then ran the install again and it went through fine. You also might want to remind users after the install / migration that all the user permissions will need to be updated again. Otherwise everything is working great. Thanks again, Michael
  19. @Ryan I would be very interested in that Google calendar module. Building an event system can get quite complicated especially when you add on all the extra features that clients normally request like repeating and multiday events. Google calendar would solve all these issues, and give them a highly functional and collaborative calendar. The pw site could then just display the upcoming events. nice and simple @ffub I am using two datefields - start and end time. Each field accepts a time string (d/m/Y H:i). I've not implemented "all day" events functionality, but i think If the date and times are the same, then this could indicate an "all day" event? Another idea might be to have an additional checkbox field which gets ticked if its an "all dayer". While we are the subject of time (maybe I should move this to another thread), I have been trying to extend the datatime calendar widget to include a nice Time picker. It's just a plugin for the existing jqueryui datepicker http://trentrichardson.com/examples/timepicker/ I managed to get it sort of working, but it was not saving the correct date. I was also hacking at the core module, which is probably not best practice. Any tips or advice on how to get this working would be welcome. Thanks, Michael
  20. I have found the import CSV module to be really useful, and has become a big part of my site building workflow with processwire. It's much easier to collect and manage lots of data in excel / numbers and then directly import into processwire. This is also great for updating content with a re-import. I think data journalists and data hackers will find this sort of functionality very useful for doing quick data visualisation mashups (especially when you add on the friendly pw api). I think content strategists will like this workflow as most of them use excel for collecting and organising site content at the start of projects. And of course the clients will like it - this will be a nice way to start a new project - once basic site structure is agreed, we can give the client an excel template (or google doc) and tell them to start adding content. Wouldn't it be great to start a project with actual real content! I hope you continue adding support for other pw fields like page-references and dates (I use pages extensively for category management). Could this module also work in the opposite direction and export the data to CSV? Then we just need to work out a way to import / export fields and templates as much as I admire the processwire interface, I still think managing data / settings / fields is much quicker and easier in text files, at least at the beginning of a project. Processwire - a CMS that gets out of the way.
  21. I also agree that a matrix style interface would be a very useful for content editors. I think @martinluff mentioned earlier in the thread, that the image field is actually very close to what we need. It's a repeatable element with a textfield. Maybe just take out the image part and call it a repeatable textfield. I am currently using a textarea to list opening times for museums. I want to show what museums are open today / tomorrow. I put each day of the week and opening times on a single row, separated by a semicolon ; In my template, I turn that into an array and parse thought it (if today > show museum). The textarea solution is fine for me to edit, but if I ask a normal user to do this, it won't be long before it breaks. That's where a simple repeatable element would be useful.
  22. Thanks, thats great timing, as I was just about to start hacking the rss module to do something similar for an events section. Can I also suggest another tip that I found useful . If you want the users to subscribe to the calendar, instead of just downloading it, use the webcal:// uri scheme - e.g. webcal://you.com/upcoming/ical When the user clicks on the link, it should open up in their default calendar application. Then whenever you update the events section, the users calendar will also get updated. Nice!
×
×
  • Create New...