Jump to content

melissa_boyle

Members
  • Posts

    41
  • Joined

  • Last visited

Everything posted by melissa_boyle

  1. Hi Guys, I am trying to implement a website that uses processwire as the content management system. I am trying to create a page where stars can be added to a christmas tree, each star is a repeater field and is associated to a modal pop up which displays a message. There may be more stars than what we can physically put on the tree so I have implemented the search function to allow users to search for a name or message in order to find their star. At the minute the search function is showing the results from the repeater fields, I have 2 stars at the minute however only one shows in the search results. 1 star has test in all the fields and the other has mel in each of the fields. I have no idea why only one result will show, any help would be greatly appreciated. The link to the page is as follows: http://www.friendsofthecancercentre.com/wish-upon-a-star/ <?php $out = ''; if($q = $sanitizer->selectorValue($input->get->q)) { // Send our sanitized query 'q' variable to the whitelist where it will be // picked up and echoed in the search box by the head.inc file. $input->whitelist('q', $q); // Search the title, body and sidebar fields for our query text. // Limit the results to 50 pages. // Exclude results that use the 'admin' template. $matches = $pages->find("star.message|star.who|star.from*=$q,"); $count = count($matches); if($count) { $out .= "<h2>Found $count fields matching your query:</h2>" . "<ul class='nav'>"; foreach($matches as $m) { $out .= " <li><p><a href='{$m->url}'>{$m->title}</a><br />{$m->summary}</p></li>"; } $out .= "</ul>"; } else { $out .= "<h2>Sorry, no results were found.</h2>"; } } else { $out .= "<h2>Please enter a search term in the search box (upper right corner)</h2>"; }
  2. Hi Guys, I have recently joined bloglovin and have implemented the RSS enhanced module onto my blog, encolsures for images are working ok but I was wondering if I can implement these to be wrapped in an image tag to allow blog lovin to be able to carry imagery through. Any help would be greatly appreciated. Thanks, Mel
  3. Hi Martijn, I need one image for each. Im not sure how to implement it. Sorry for my stupidity. Thanks for your reply, Mel
  4. Hi Guys, I have successfully implemented the RSS feed module, however I need to feed some images through can anyone help with this? At the minute I have: <?php // retrieve the RSS module $rss = $modules->get("MarkupRSS"); // configure the feed. see the actual module file for more optional config options. $rss->title = "Latest updates"; $rss->description = "The most recent pages updated on my site"; // find the pages you want to appear in the feed. // this can be any group of pages returned by $pages->find() or $page->children(), etc. $items = $pages->find("limit=10, sort=-modified"); foreach($items as $item) { $item->title = $item->title; } $rss->render($items); ?> The image field is called blog_images and I know I need to include it within the foreach but im a bit stuck. Any help would be greatly appreciated. Mel $item->blog_image = $item->blog_image;
  5. Hi Guys, Is there any solution to paginating repeater fields as of yet? Thanks, Mel
  6. Hi Kongondo, Its definitely a head scratcher, I have PW running on various sites on the same host. I will get in touch with them anyhow to see if they can shed some light. Thanks for the quick response, Mel
  7. Hi Guys, I know this issue has been covered alot of times and I have read through all the previous threads however none of the solutions seem to work for me. I have migrated processwire from a local server to a subdomain multiple times and have never faced this issue. Basically on moving all the files and uncommenting the #Rewrite option in the .htaccess file I am still getting a 500 internal error message. I can't even see the homepage Does anyone have any ideas? The link to the site is: http://friendsocc.3sixtynearlythere.co.uk/ Thanks, Mel
  8. Hi guys, I have literally just installed a new site with processwire. On creating a repeater field I am getting the error: Invalid value sent to Page::setTemplate and as a result can't add any fields to the repeater. I have installed it as normal through modules and have never faced this issue before. Can anyone help please? Thank you, Mel
  9. Hi, I have and deleted all sessions still no luck Thanks, Mel
  10. Hi Guys, I have processwire installed on a site which was working fine up until very recently. I am getting the error Unrecognized HTTP host: My config file is as follows; $config->httpHosts = array( 'localhost', // our primary hostname 'corrymeela-cms.3sixtynearlythere.co.uk', // staging server 'www.corrymeela.org' // Live server ); I have updated the htaccess file to the most recent. I cannot update any content at the minute I am getting this error: Cannot be published until errors are corrected Can anyone help please? Warmest wishes, Mel
  11. Hi, The issue only seems to be apparent on the home template, the settings are cache for guests. Would this be causing the issue? Thanks for your help, Mel
  12. Hi Guys, I have used Processwire a handful of times and never had this issue. Basically no forms throughout the site will submit unless you are logged into the CMS. For example if i am logged in on another tab I can submit a contact form however when logging out contact forms do not submit. Even when updating code via the ftp client I cannot see the changes take effect on the front end if I am not logged into the CMS. Can anyone help please? Thanks, Mel
  13. Sorry for the confusion this is perfect, Many thanks for your help!
  14. Hi Guys, I am trying to create an IF statement that will show text only if the parent exists. I have made a start to but when the page does have the third parent as such it still shows the else statement. Can anyone help please? $parents = $resort->parents; echo $parents[2]->title; if ($resort->has_parent[3]) { echo ", "; echo $parents[3]->title; } else { echo "test"; } Thanks in advance, Mel
  15. Hi Guys, My colleague has built processwire within an ftp folder when moving this to a subdomain all the css, images, url paths etc links are incorrect and going to the folder /projects/Processwire. This problem is only on the homepage. All internal pages are working ok. Does anyone have any ideas what is happening? The link is as follows; http://ultimatej.3sixtynearlythere.co.uk/ http://ultimatej.3sixtynearlythere.co.uk/about Any help would be greatly appreciated. Mel
  16. Hi Mike, They aren't they are done as follows; <?php echo $config->urls->root; ?> However I can't see anything within the site config file to determine these paths (projects/Processwire). Thanks for your help, Mel
  17. Hi Guys, My colleague installed processwire on an ftp folder however it needs to be moved to subdomain and all url's (images, links and text) are wrong. At the minute it is pointing to projects/Processwire instead of the root. Can anyone help me with this please. I have tried to edit the htaccess file but have had no luck Thanks, Mel
  18. Hi Guys, Thank you so much for your replies, unfortunately neither works- v strange. I have done this multiple times and it has never been an issue :-/. Gyan- Thanks so much for taking the time to recreate this. Many thanks, Melissa
  19. Hi guys, I have worked with pagination multiple times but seem to be having major issues as it is not showing at all. I have installed the module and selected page segments and allow page numbers within the template but still no joy. My structure is as follows; News Year Month Story My code is as follows on the news page. <?php $parent = $page->parent; $children = $page->children; $results = $page->find("template=news_story, limit=3, sort=-story_date"); $pagination = $results->renderPager(); ?> <?php foreach ($results as $child) { echo "<article><div class='blog-media banner-blog'> "; foreach($child->story_image as $images) { $images1 = $images->size(628, 227); echo "<img class='news-img' src='$images1->url' alt='{$image->description}'>"; } echo "<div class='tp-bannertimer tp-top'></div></div>"; echo "<h4><a href='$child->url'>$child->story_title</a></h4>"; echo "<ul class='no-bullet post-info'><li class='no-tag2'><i class='icon-clockalt-timealt'></i><span>$child->story_date</span></li></ul>"; echo "$child->story"; echo " <a href='$child->url' class='button small green'>Read More</a></article>"; } ?> <div class="pagination"> <?php echo $pagination; ?> </div> Any help would be greatly appreciated. Melissa
  20. No JS errors and the smaller maps do have a set height and width- nightmare
  21. Hey Mats, I have give that a go but again no map is showing with exception of the main map: I have explained in more detail below: Maps_left is the repeater with google_maps_left being the map marker. I have a main map followed by smaller maps which are in maps_left repeater field. I have included the full code below. <?php echo $page->location_info; ?> <h1> <?php echo $page->mainmap_title; ?> </h1> <p><?php echo $page->map->address; ?></p><hr> <?php $map = $modules->get('MarkupGoogleMap'); echo $map->render($page, 'map'); ?> <div class="location_others"><!-- open location_others --> <?php foreach($page->maps_left as $maps_left){ echo "<div class='location_box {$maps_left->left_or_right}'>"; echo "<h1>$maps_left->map_left_title</h1>"; echo "<p>{$maps_left->google_maps_left}</p><hr>"; echo $map->render($maps_left, 'map'); echo "</div>"; } ?> Thanks for all your help. Melissa
  22. Hi, Thank you for your response,unfortunately this approach didn't work. I have shown how I have applied it below, it doesn't bring back anything at all for the maps now . <?php foreach($page->maps_left as $maps_left) { echo "<div class='location_box {$maps_left->left_or_right}'>"; echo "<h1>{$maps_left->maps_left_title}</h1><p>"; echo "<p>{$maps_left->google_maps_left->address}</p><hr>"; $maps_left= $modules->get('MarkupGoogleMap'); foreach ($pages->get("/locations/")->maps_left as $m) { echo $maps_left->render($m, 'map'); } echo "</div>"; } ?> Thanks again for your time, Melissa
  23. Hi Guys, I have created a repeater area which outputs multiple maps. All works well bringing the different address etc in but each map displays the same data- only in the browser not within process wire. I assume its an issue with the way I have formatted it but am not sure. Does anyone have any ideas? Thanks, Melissa <?php foreach($page->maps_left as $maps_left) { echo "<div class='location_box {$maps_left->left_or_right}'>"; echo "<h1>{$maps_left->maps_left_title}</h1><p>"; echo "<p>{$maps_left->google_maps_left->address}</p><hr>"; $maps_left= $modules->get('MarkupGoogleMap'); echo "{$maps_left->render($page, 'map')}"; echo "</div>"; } ?>
  24. Thank you Joss, I can't use the below as it will show other category posts. I have changed the code as suggested to: if ($child->seasonal) but still get the "no posts" message even when their are posts for that category if (!$child->seasonal) { Nothing to see here }else{ all my lovely results } Thank you, Melissa
×
×
  • Create New...