Jump to content

adrian

PW-Moderators
  • Posts

    11,185
  • Joined

  • Last visited

  • Days Won

    372

Everything posted by adrian

  1. Hi celfred, You could easily add the checkbox field to the page yourself. Create a new field called: "disable_comments". Choose checkbox as the fieldtype. Add this field to the required template. In your template have some code like this: if($page->disable_comments !== 1){ echo $page->comments->render() . $page->comments->renderForm(); } That should be close to what you need!
  2. Back again, I have implemented support for subtitles (v3 on Github), although I think the route I have gone will be problematic for multi-language versions. I am trying to keep all fields for each video as components of the video field itself. I think this is useful as it allows: $page->videos->eq(n)->url; $page->videos->eq(n)->poster; $page->videos->eq(n)->subtitles; etc, if the field is set to support more than one file. However, it does reduce the flexibility because the field_video DB table has these matching fields: data, poster, subtitles. I guess add other subtitle languages would require the addition of another field for each language - eg subtitles_xxxx corresponding to the ID of the language. Maybe this is simple to achieve - I'll investigate, but if anyone has any quick tips, that would be great. Also, not sure what you think about storing the subtitles primarily in a DB field and then writing to the file system. My reasoning came from the ability to index this information for searching the video content. I am also thinking of having an automated option for outputting a transcript of the video from the subtitles text, available from: Automated transcript generation from the SRT file is now available (v4) and can be accessed using: $page->videos->eq(n)->transcript; Any thoughts?
  3. Does this help? http://processwire.com/talk/topic/4570-implementing-small-tweet-like-thoughts/?p=44925
  4. Ok, A new version has been pushed to GitHub. This takes care of the first two enhancements mentioned in the first post There are a few new options in the field's Input tab: Number of poster images to generate Images will be captured at intervals from throughout the video. This determines how many will be created. The user can choose which one is available to templates via $page->video_field_name->poster NB - if you change this to more than one (default), I would recommend also checking: "Display thumbnails in page editor?" to keep things looking manageable. Copy poster image to dedicated image field? This will create a copy of the poster images in an image field of your choice. NB This is not necessary for accessing the image. Name of the field that you want to have the poster image copied into This is only relevant if you have the checkbox above checked. Lots more to do, but thought you might like to see the next iteration. I am not sure on some of the behavior regarding copying all created thumbs to an images field (if selected). It might be better to just copy the one selected by the user. Code is still a bit of a mess - want to get features created first, then will clean up.
  5. Your config.php file should contain something like this: /** * Installer: Database Configuration * */ $config->dbHost = 'localhost'; $config->dbName = 'dbname'; $config->dbUser = 'dbuser'; $config->dbPass = '123456'; $config->dbPort = '3306';
  6. bodhic, Can you show us the selectors exactly as you tried them? and also recreate your page tree again, this time with the names of the templates for each page in brackets after the names of the pages. In case you don't already know about it, you should install Nik's awesome Selector Test module: http://mods.pw/2r It will help you test your selectors in a very quick way.
  7. Oh, I understand now. Try this: foreach ($page->children("include=all") as $child){ foreach($child as $grandchild){ echo $grandchild->title; } } However there are other ways that might be cleaner. Perhaps you could use a selector to find all those pages like this: $grandchildren = $pages->find("template=template_name"); Or something along those lines, then foreach through $grandchildren Or maybe: $grandchildren = $pages->find("parent.template=template of the unpublished child pages"); So many options
  8. This should do it assuming the current page is "Program Overview" foreach ($page->children("include=all") as $child)
  9. Hey Soma, I just downloaded the latest dev right now. I am still learning about language support, but I have these modules installed: Languages Support 1.0.1 ProcessWire multi-language support. Languages Support - Fields 1.0.0 Required to use multi-language fields. Languages Support - Page Names 0.0.8 Required to use multi-language page names. Beta. My pages have two name options for two different languages. I set up a page field as you described and could select two levels down no problem. Maybe I don't have the language setup configured the same way as you? but it seems to be working fine.
  10. Inline mode: http://ckeditor.com/demo#inline
  11. Hi Sparrow, There is a module for using CKEditor instead of TinyMCE: http://modules.processwire.com/modules/inputfield-ckeditor/ It also has an inline mode which you might prefer. Also, take a look at this: http://modules.processwire.com/modules/inline-editor/ It is not production ready, but might give you some ideas of what is possible. You can get Ryan's form builder module: http://modules.processwire.com/modules/form-builder/ or look at some of these posts to build it yourself: http://processwire.com/talk/topic/2089-create-simple-forms-using-api/ Why not try some of the admin themes - there are some really great options in there: http://modules.processwire.com/categories/admin-theme/
  12. I can't see the vertical scroller pause at all. If you take a look at jacrousellite1.js you'll see the line: hoverPause: false That should be the setting you need to change. Also, regarding the image fading gallery below that - in the scrollimage.js script, there is this section commented out. Did you do that, or did the script come that way? Maybe try uncommenting and see how the performance is. /* //Usage of hover event resulted in performance problems scrollable.find('a').hover(function(){ tooltip .stop() .css('opacity', 0) .text($(this).data('tooltipText')) .animate({opacity: 1}, 1000); }, function(){ tooltip .stop() .animate({opacity: 0}, 300); }); */
  13. The site looks great - nice and clean, simple and bright! I do have quite a few issues I noticed though. Please don't take offense - I think most of them appear to have resulted when you migrated from your local development machine to live. Hope these observations are helpful to you. On this page: http://www.tourntrek.com/demo/nepal/everest-flights/ The image right below "A great experience of mountain flight in Nepal" is broken. The link is to: http://localhost/tourntrek_cms/site/assets/files/1035/nepalmountainflight.jpg - note the localhost link! The entire gallery page is currently broken: http://www.tourntrek.com/demo/gallery/ If I go to submit the inquiry form or the contact, they both return an error. On the hotel reservation form, the popup that says I haven't filled out required fields uses the field names, eg: "phno" - not very friendly for the end user. If I do fill everything out, I get the same error page as the other forms. Also, I think it would be good to have popup date pickers for the to and from date fields, or at a minimum an example of the date format that is required - at the moment it accepts any text you want. I think it would be nice to have a dropdown list of hotel names to choose from, or at least some info on where to find hotels that can be entered in this field. The link to "more info" in the left sidebar is broken I really do hope that helps!
  14. I just tested the latest dev with the latest version of Chrome and it seems fine to me too. Maybe an extra TinyMCE plugin you have installed?
  15. Is this the post you guys are looking for: http://processwire.com/talk/topic/2960-upscalingfalse-not-working-when-one-dimension-set-to-0/
  16. mike77 - can you show us the code you are using to change the template and the errors you are getting?
  17. Untested, but I think this should do the trick: $page->images->sort("title"); Then you can foreach through them. Although you might have some issues with the numbers in the filenames, in which case you might need to make use of PHP's natsort: $images = $page->images->getArray(); natsort($images); $reversed_images = array_reverse($images); $sortedImages = new WireArray(); $sortedImages->import($reversed_images); $page->images = $sortedImages;
  18. Firstly, check out this: http://processwire.com/talk/topic/4147-excel-like-crud-in-pw-using-handsontable/ As for selectors and pages/fields vs a dedicated table and direct SQL. I have taken both approaches with PW and will continue to use both, depending on the complexity of the data. You can do an awful lot with selectors, but I do think that sometimes it makes more sense and is in fact necessary to use a dedicated table/sql. Of course you can always load all the data into an array and use php to do your calculations - it really depends on the volume of data you are dealing with and also how often this data is updated. One approach I have taken is to have a script that runs after data is changed. This script calculates all the stats etc and populates PW pages/fields with the data that is to be displayed to the end user. One tool that might save you some time is diogo's custom admin pages module: http://mods.pw/4Y Hope that helps as a starting point. I am sure others will chime in with more ideas.
  19. Hi ssmith and welcome to the forums. How are you creating the dropdown menu? Are you using Soma's navigation module? Are all the children still published and not hidden? Did you by chance change their template to one that is excluded in the selector that grabs the items for the menu. Lots of possible reasons. If none of the above helps, could you post the selector you are using and also the outputted list that is being used to create the menu as well as the any relevant css classes that might be hiding the children.
  20. No worries teppo - things are always changing - even Flowplayer tries to use mp4 with native html5 players now. Unfortunately server-side conversion is a little tricky. ffmpeg can do it fine with exec calls, but that rules out servers with exec disabled, safe mode on etc. Antti - not sure about using a cloud service - they are both paid services - maybe if there was a free one available? Maybe I shouldn't worry about the format conversion at this stage - just make sure people know to only upload mp4s and maybe just make note that people can download http://www.mirovideoconverter.com/ which is free fore both Mac and Windows versions. I have found it fantastic - clients find it very easy to use - it really is a two click process. Maybe offer the option to also upload a webm version as well (also easy to create with Miro) if they want to make their videos play without a flash container in all browsers.
  21. Gespinha, Not sure that I understand exactly what your setup is, but you may need to change the rewrite base in the .htaccess file: RewriteBase /cms
  22. Hi benjaminE, Not sure what the problem was for you, although I have had some module issues in the past, so maybe something has been improved in a recent dev version of PW. Just in case you don't know about it, check out Soma's modules manager: http://modules.processwire.com/modules/modules-manager/ Will save the hassle of copying module files for anything that is in the modules directory.
  23. eincande, If you're not enjoying git on the command line, check this out: http://windows.github.com/ Even though I use the command line on my linux servers, I have been using the Mac version of this desktop client and it's pretty nice
  24. Hey Wanze, Looks like it is here: https://github.com/ryancramerdesign/ProcessWire/blob/a8024bb49785370aa2e3867bd683094663cfeabf/wire/core/PagefilesManager.php#L135 with $this->path() coming from: https://github.com/ryancramerdesign/ProcessWire/blob/a8024bb49785370aa2e3867bd683094663cfeabf/wire/core/PagefilesManager.php#L166 The createPath function is calling this: https://github.com/ryancramerdesign/ProcessWire/blob/a8024bb49785370aa2e3867bd683094663cfeabf/wire/core/Functions.php#L184 I guess it might need the mkdir recursive switch set to true in the wireMkdir function. Is that what you are looking for, or am I missing your point? I think maybe I am
  25. Hey teppo, Thanks very much for your input. I hadn't seen that OO port of ffmpeg-php. I'll take a look for sure, although if we end up having this module do format conversions, neither of these options will suffice as they can't convert, so I'll need to revert to exec calls to ffmpeg itself. Not sure if I am fully understanding your point about specific formats - mediaelementjs (http://mediaelementjs.com/) allows mp4 files to be played on all browsers (desktop and mobile). It uses the browser's HTML5 player if possible and flash for those that don't support it. If you provide it with both mp4 and webm versions, then all browsers can use their native HTML5 players. So if I was going to have the module offer conversion, I was thinking it would only be for converting from whatever gets uploaded into mp4 and maybe also webm. It's my understanding that FLV is no longer a format worth considering. I actually wish webm was better supported, but unfortunately I think at the moment and for the foreseeable future we won't see Apple support it in Safari. The chart of the mediaelementjs site says that Android won't play webm, but it does. Don't look at that code too closely right now - that initial commit really was put together very quickly and I ended up hacking the thumbnail creation - I couldn't figure out how to create a new Pageimage to use that for the resize, because it needs an image field on the page to work, but I didn't want to make that a requirement, so I just went with standard GD code to resize if the "Display thumbnails in page editor?" is checked. There is probably un-needed code in there still from the FieldtypeFile I started with. Hopefully I can find some time in the next few days to tackle some of the simpler enhancements/cleanup. Definitely appreciate any help you want to give.
×
×
  • Create New...