-
Posts
10,902 -
Joined
-
Last visited
-
Days Won
349
Everything posted by adrian
-
Hey Ryan, I have come up against that wireEncodeJSON issue with a leading 0 (that I had in the phone field module) again with this module. I guess I will need to implement the same workaround, appending a tilde and stripping on loading again. Any chance you could make that change to allow for leading zeros so we don't have to do this forever? Thanks
-
This is a very simple module that I put together for @Zahari Majini from a PM request. It allows you to enter a URL to a YouTube or Vimeo video in a specified field and when you save the page, it will grab thumbnails for the video and add them to a specified images field. Check the module configuration options for: the field(s) to search for videos name of the video images field which thumbnail(s) you want grabbed whether to grab the first available or all available thumbnails based on those that you list As always, an feedback for improvements is very welcome! Modules Directory: http://modules.processwire.com/modules/process-get-video-thumbs/ Github: https://github.com/adrianbj/GetVideoThumbs
- 138 replies
-
- 13
-
Hey diogo - I agree that could be an issue, but surely if pages are viewable then they will be indexed by search engines anyway. The module does check to make sure the page is not an admin page and that it is viewable for the user. Maybe that's not enough? I'd be happy to add the checkbox idea though if you think that would help. Perhaps a "disable if checked" approach, or maybe a module config setting to change the behavior of the page specific checkbox - either check to enable, or check to disable, so there is the option to go either way. Another option might be to require it to be enabled on a per template basis - an ASM field in the module config would allow you to specify templates that would work.
-
This module redirects ID based URLs to the full SEO friendly URL Modules directory: http://modules.processwire.com/modules/process-redirect-ids/ Github: https://github.com/adrianbj/ProcessRedirectIds Very simple module that alllows you to link to pages with their page ID in the URL. The ID can be in any location in the URL. There is a config option to simply load the content to the ID based URL, rather than redirecting to the original PW url if you prefer. If you use this option, the module adds a canonical link to the page to help identify the ID based URL as a duplicate of the proper PW url so Google won't penalize you for duplicate content. For example you could do any of the following, where 1058 is the ID of the page you want to load: http://www.mysite.com/1058 http://www.mysite.com/1058/this-is-the-fancy-title http://www.mysite.com/category1/category2/1058/any-text-you-want/ http://www.mysite.com/category1/category2/any-text-you-want-1058/ Any of those will redirect to the proper URL, eg: http://www.mysite.com/this-is-the-fancy-title/ At the moment for this to work, the page ID segment of the URL must be the only segment that is all numerical, otherwise, anything goes. The reason for this module is mostly as a way to have a very simple shortlink to any page on the site, but it also allows for structuring URLs however you want with any content you want. I guess this could be abused and potentially bad for SEO! I am not sure if this is a good way to do this, so I would definitely appreciate any feedback.
-
It will be somewhat slower, but unless you have a very large number of pages, I wouldn't worry too much about it. However, you might find that *= also works for you, and this doesn't have the speed issue because it makes use of the sql fulltext indexes. Experiment and see what works. Have a read here: http://processwire.com/api/selectors/#operators
-
Hey Marco, that revised post link doesn't work.
-
Are those search examples you gave complete, distinct "words", or are they part of a longer string of characters? If the latter, then try changing the selector in the search.php file to: $matches = $pages->find("title|body|sidebar%=$q, limit=50"); Note that I changed "~=" to "%=" Does that help?
-
So perhaps you need to look at the code of your search.php template and see if the selector is including the fields where these words occur on your site. $matches = $pages->find("title|body|sidebar~=$q, limit=50"); The default only searches the title, body and sidebar fields. Add any other relevant fields to that | separated list. Does that help?
-
I just searched for: 游览本站 on your site and it returned one result. Can you post the search term you are testing?
-
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!
-
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?
-
Does this help? http://processwire.com/talk/topic/4570-implementing-small-tweet-like-thoughts/?p=44925
-
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.
-
How to transfer Processwire from local installation to online?
adrian replied to ashrai's topic in Getting Started
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'; -
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.
-
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
-
This should do it assuming the current page is "Program Overview" foreach ($page->children("include=all") as $child)
-
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.
-
Inline mode: http://ckeditor.com/demo#inline
-
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/
-
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); }); */
-
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!
-
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?
-
Is this the post you guys are looking for: http://processwire.com/talk/topic/2960-upscalingfalse-not-working-when-one-dimension-set-to-0/
-
mike77 - can you show us the code you are using to change the template and the errors you are getting?