-
Posts
283 -
Joined
-
Last visited
Everything posted by davo
-
In the example below DMCstats_Language is a page select field which can contain multiple selections. I've cheated a little bit below just asking if the first selection in the array == english; it's likely but not always the case that english is in the first position. Is there an easy way to query the array to see if simply contains 'English'? $language = $page->DMC_select->DMCstats_Language->first()->title; if($language == "English") {$flying_message .= "English is one of the native languages of $country.";}
-
Thanks for all your help. After uninstalling and reinstalling it all worked well. Plus, I've uploaded the rest of the videos and the previously mentioned error didn't show. Awesome looking video gallery thanks to this module.
-
ok, thanks. i've got to nip out for an hour but will do this when i get back. if all goes well i have about 15 more videos to upload so i'll give you an update on how the new module performs. Thanks for all your help. db
-
Here is the information the module shows: Title Get Video Thumbnails Class ProcessGetVideoThumbs File /site/modules/GetVideoThumbs-master/ProcessGetVideoThumbs.module ID 156 Version 0.2.3 - check for updates Summary Automatically populates an images field with thumbnails (poster imagses) from YouTube and Vimeo The site is now working since deleting the new module directory. What is the safest way to uninstall the old module now? Just hit the uninstall link?
-
Resolved the site not working so back to this thread. You were quite right; the module had been installed in: GetVideoThumbs-master I did the upgrade via the link in the modules entry which caused the intial error (which in future i'll make note of!) When I looked back at the modules directory I noticed there was an additional module named : ProcessGetVideoThumbs which i'm assuming caused the problem. Since deleting this new module directory the site is back working again. What's the easiest way to upgrade the module without breaking the site?
-
Thanks Soma I had a look in the /site/modules directory and removed the newly installed module. After that, the site started functioning again properly. I have a suspicion this is something to do with something that Adrian mentioned. He said that when i downloaded the module from git hub it added -master to the module name. When i used the autoupgrade service for the module it installed it without this suffix on. I didn't know about the debug mode so thanks. I'll move this topic back to the module forum for further advice on how to upgrade the module. Thanks
-
I tried to do the upgrade an all went well until upgrading the module and now the site has gone off line. I've started a new thread here: https://processwire.com/talk/topic/6608-upgrade-issue/
-
I've just upgraded a site and now i'm getting: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Error has been logged. I'll try to retrace the steps I went through. I removed: /wire .htaccess index.php replaced all these with the latest stable versions. Viewed site: EVERYTHING GOOD so far. Went into admin area: EVERYTHING GOOD so far. Went to modules, ProcessGetVideoThumbs Clicked the upgrade to latest version. It through an error that I don't remember Now all the site produces is the internal server error. The previous version I was using 2.3.something so not an old one.. I'm sure this is an easy fix, but what is the likely cause and what should I do to repair it please? I've been talking previously with Adrian about the module here which might help work out what's gone wrong: https://processwire.com/talk/topic/4614-youtube-and-vimeo-thumbnail-grabber/page-3 David
-
ok cheers. I'll give it a try. As I'm obvioudly running an older version of pw, would it be best to remove the core pw files, add in the latest pw files. Then uninstall the module and reinstall it via the pw search and install method?
-
Unfortunately, I'd already gone past the offending video so can't recall which one threw the error. The thumbnail certainly downloads ok, I'll have to go back and check to see if all the titles have also been pulled. All the videos are youtube videos. It's only happened twice on about forty videos. I have about ten more to go so I'll let you know if it happens again. Have I installed the module in the wrong folder?
-
What a superb module. I'm using it conjunction with Ryan's youtube and vimeo module. I just thought i'd post this error message i occasionally get. However, it doesn't stop the module working and everything appears correct regardless: Error: Call to a member function children() on a non-object (line 145 of /var/www/clients/client2/web37/web/site/modules/GetVideoThumbs-master/ProcessGetVideoThumbs.module) This error message was shown because you are logged in as a Superuser. Error has been logged.
-
got there at last like this: $randogals =$pages->find("images.tags=fav"); $randogal = $randogals->getRandom(); $randomimgarray = $randogal->images->findTag('fav'); $randomimg = $randomimgarray->getRandom()->size($thumbWidth, $thumbHeight); $randogal2 = $randogals->getRandom(); $randomimgarray2 = $randogal2->images->findTag('fav'); $randomimg2 = $randomimgarray2->getRandom()->size($thumbWidth, $thumbHeight); I actually display two favourite images on the same page. I wonder if anyone can think of a simple tidy way to ensure that the same image isn't used twice on the same page at the same time?
-
First day back today and i'm not as quick as desired with the api, I've tried this: $randogals =$pages->find("template=gallery-album"); $randogal = $randogals->getRandom(); $randomimg = $randogal->images->first()->tags->size($thumbWidth, $thumbHeight); but that produced me a 500 error. What i'm trying to get is a random gallery with a random image where in each instance the tag contains the text 'fav'.
-
Thank you. I'll try this out
-
That sounds ideal. How do I access that property from the api please? I'm having trouble accessing other parts of the pw site to research ATM.
-
I'm creating a site that has a huge image gallery. I'm using the api to pull out randomised images from the gallery and display them on the home page. However, the client doesn't like all the images that are I'm the gallery. So I was wondering if there was a way could add an extra field property the the image to mark is as a favourite. Is this possible?
-
I forgot to name the field... oops. read on by...
-
Can anyone see something obvious why i don't get seem to be able to access the fields in post as below please? dmc.dudmc.com/destination-deal-finder-results/ <?php /** * Page template * */ include("./dmcheader.inc"); include("./myfunctionlib.inc"); $current_page = $page->id; $upperbudget = $input->post['upperbudget']; $eaddress = $input->post['eaddress']; echo " <div class='container' ><br /> <div class='row'> <div class='col-md-12'> <img class='img img-responsive hidden-xs mymargin ' src={$page->single_image->url}> </div> </div> <div class='row top-buffer'> <div class='col-md-6' >"; echo $page->body; foreach($input->post as $key => $value) echo htmlentities("$key = $value") . "<br />"; foreach($input->get as $key => $value) echo htmlentities("$key = $value") . "<br />"; ?> <form role="form" action="http://dmc.dudmc.com/destination-deal-finder-results/" method="post"> <div class="form-group"> <label for="exampleInputEmail1">Email address</label> <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter email"> </div> <div class="form-group"> <label for="upperbudget">Budget</label> <input type="text" class="form-control" id="upperbudget" placeholder="budget in euros"> </div> <button type="submit" class="btn btn-default">Submit</button> </form> <?php echo " </table> </div> <div class='col-md-6'>"; echo "<h3>Upper budget = euro $upperbudget $eaddress </h3>"; dealfinder($upperbudget); echo " </div> </div></div> </div> <!-- end container -->"; include("./dmcfooter.inc");
-
Your hunch was right. I'd called the images a totally different field name.. of course it was never going to work! solved like this: $testimonial_image_pages = $pages->find("parent=1088, Testimonial_image>1, limit=6"); $testimonial_image_pages->shuffle(); foreach ($testimonial_image_pages as $testimonial_image_page) { echo "<div class='col-md-2'><a href='testimonial-types/testimonials-from-event-companies/'><img class='img img-responsive' src='{$testimonial_image_page->Testimonial_image->url}'></a></div>"; }
-
hold that... beer is starting to wear off and i'm see sense.
-
I'm still learning the api and came across this issue. Maybe it's the bbq and beers that's clouded my head but here it is: $testimonial_image_pages = $pages->find("parent=1088"); foreach ($testimonial_image_pages as $testimonial_image_page) { echo "{$testimonial_image_page->images->first()->url}"; } You can probably see what i'm trying to do. I have a number of pages and I just want to use the 1 and only image on each of those pages to ultimately display in an img tag. I just get this back: Error: Call to a member function getRandom() on a non-object (line 222 of /var/www/clients/client2/web37/web/site/templates/home.php)
-
Thanks for this great tutorial. I also have a client that has a very large gallery. Because it's so large we'll be sharing the work of actually uploading the images. To help them i've made a quick and dirty screencast rather than trying to explain how to create the index, create the gallery and upload the images. http://screencast-o-matic.com/watch/c2hb6TnaT3 Some albums have sub albums so i've tweaked the code to show an album within an album. Also you may notice that the albums are linked to another page. The site represents event companies. This means each album can be associated with and event company on the site meaning users can browse the album and get to the event company that runs the events there. In reverse, the event company pages can call a set of random pictures from the gallery relevant to their destination. Hopefully good for SEO too! The site is under development at the moment and the url is likely to change but in it's current state can bee seen here: http://dmc.dudmc.com/
-
ignore post; me=idiot that should read prior posts and more carefully!
-
Just what it was after to take care of old seo incoming links. Cheers
-
I'm backing up a site to local and I've noticed an unusual amount of files in /site/assets/sessions/ There are literally thousands of files called sess_* Should these be in there by the thousnds?