Jump to content

Gena

Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Everything posted by Gena

  1. Thank you With the default image option, I think that would be very useful, especially with something like thumbnails or profile pictures
  2. I checked again, and with the slider, I found there was a bug that seemed to happen with not having any images loaded in the images field... I just need to write a default picture for the slider to default if there is none available or connected to the news piece/ video / article With some of the other problems, I *did* find some files that were changed between my local host and uploading it onto the live server, that was causing that one file wasn't being including, and that was the cause of the problems there But this has allready been a big help, with where I can get some 'temporary' sites live that people will be able to access Now I just need to try to get the Tera-Wurfl code working correctly so both the full and mobile site can be handled and redirected correctly Thank you so much! Hopefully I will be able to post a link to the completed site here soon, that you can see the finished project
  3. Video_poster is an image field that only receives/ stores a single image, yes... Is far as any changes between localhost and live between code and database, as far as I know they are the same (except for a couple of lines I commented out in some files to disable Tera-Wurfl, but that shouldn't affect the Slider for instance in any way.) So if there is still a difference between the two environments in code or database, I'm still trying to find it...
  4. Hey Wanted to add an example of the kind of problem I'm having. When I try loading my frontpage that has a featured contant slider, it uses a Slider module to generate the markup I need to use with the slider. The code works great on my localhost, but when I try it on my live server, I get this error: "Call to a member function width() on a non-object (line 53 of /var/www/clients/client220/web338/web/site/modules/Slider.module)" <?php class Slider extends ModuleJS { public static function getModuleInfo() { return array( 'title' => 'Slider', 'version' => 100, 'summary' => 'Generates Markup for Slider', 'autoload' => true, ); } function addPaginationLinks($slide_count) { $slide_links = ""; $count = 1; while($count <= $slide_count) { $slide_links .= "<li><a>$count</a></li>"; $count++; } return $slide_links; } function renderSlide($slide_page) { if($slide_page->summary) { $summary = strip_tags($slide_page->summary); if(strlen($summary) > 400) { $summary = substr($summary, 0, 320); // display no more than specified length $summary = substr($summary, 0, strrpos($summary, ". ")+1); // and truncate to last sentence } $summary = trim($summary); } if ($slide_page->template == "video") { $img= $slide_page->video_poster->width(300); $width = $img->width; $height = $img->height; $slide ="<div class = 'media slide'> <a href = '$page_address' ><img src = '".$img->url."' class = 'rounded-img img' width = '$width' height = '$height'> </a> <div class = 'bd'> <h1><a href = '$page_address' >".$slide_page->title."</a></h1> <p>".$summary." <a href = '$page_address' >... <span class = 'strong secondary'> Watch video </span> </a></p> </div></div>"; } else { $img= $slide_page->images->first()->width(300); $width = $img->width; $height = $img->height; $slide ="<div class = 'media slide'> <a href = '$page_address' ><img src = '".$img->url."' class = 'rounded-img img' width = '$width' height = '$height'></a> <div class = 'bd'> <h1><a href = '$page_address' >".$slide_page->title."</a></h1> <p>".$summary." <a href = '$page_address' >... <span class = 'strong secondary'> Read More </span> </a></p> </div></div>";} return $slide; } function render($slide_pages, $p_class) { $slides_mu = '<div id="slides" class = "unit size1of1 man"> <div class="slides_container">'; $num_slides = count($slide_pages); foreach($slide_pages as $slide) { $slides_mu .= $this->renderSlide($slide); } $slides_mu .= '</div> <div class = "slider_nav"> <a href="#" class="prev">Prev</a> <ul class = "pagination">'; $slides_mu .= $this->addPaginationLinks($num_slides); $slides_mu .= '</ul> <a href="#" class="next">Next</a> </div>'; $slides_mu .= '</div>'; return $slides_mu; } }
  5. Thank you for the advice When I had problems with moving my pw site from local host to liver server along the guidelines given in the forum, I did set it up manually with the installer for both the sub domains. Its still giving problems however... Ryan, I will send the phpinfo to you in a pm after this And if needed, I will post examples of the errors coming up and the source code later Thank you for the help - I really appreciate it!
  6. Hey I want to start by saying thank you for the work that has gone into Processwire... I have come to appreciate it some much as I have been working with it the last couple of weeks! I would like to ask for some help... the site I have been working on was working well on my localhost, but I have been having a lot of problems with setting things up on our live server... Somewhere things are not initialising correctly in the setup, and again and again I am finding the message "Call to a member function xxxxxxx() on a non-object" popping up, for code that worked great on local host. Please, is there any advice or guidelines for things to possibly look for, or what I should possibly change to fix it? Please, all help would be appreciated, as I need to get this site up ASAP! Gena
×
×
  • Create New...