Maverick

Members
  • Content Count

    26
  • Joined

  • Last visited

Community Reputation

2 Neutral

About Maverick

  • Rank
    Jr. Member
  1. Maverick

    Hi guys, Do you have the map marker module working in version 2.8 or version 3? In processwire admin, I can see the map, but then when I go to the page where the map should be showing, I'm getting an error: " MarkupGoogleMap Error: Please add the maps.google.com script in your document head. The map is not showing on the page. " I have fresh processwire installation it seems that the module injects the google maps script before html tag, it seems to be causing the problem... I'm not sure how to solve this <script type='text/javascript' src='/site/modules/FieldtypeMapMarker/MarkupGoogleMap.js'></script><div id='mgmap1' class='MarkupGoogleMap' style='width: 100%; height: 300px;'></div><script type='text/javascript'>if(typeof google === 'undefined' || typeof google.maps === 'undefined') { alert('MarkupGoogleMap Error: Please add the maps.google.com script in your document head.'); } else { var mgmap1 = new MarkupGoogleMap(); mgmap1.setOption('zoom', 12); mgmap1.setOption('mapTypeId', google.maps.MapTypeId.HYBRID); mgmap1.init('mgmap1', 40.712776, -74.005974); mgmap1.addMarker(40.712776, -74.005974, '/en/about/', 'About', ''); }</script><!DOCTYPE html> <html lang="en"> <head> when I paste the code inside <head> manually, then I can see the map on the page where it should be visible. Any suggestions?
  2. Maverick

    Hi there, I was just testing the module out, very cool. I wonder, Is there any way to redirect the latest selection to it's page (on frontend using MarkupDynamicSelects)? For example you select continent, then country, then city and you click on "Go" button which redirects you to the city page you have selected.
  3. Maverick

    Thanks guys, I just saw it indeed. I think its exactly what Im looking for. Its for front end. I will just wait. Maybe kongondo will decide to release the front end possibilities. That would be amazing.
  4. Maverick

    $demand++ for use in the frontend
  5. Maverick

    Not sure what it was, but 1. Version 3 installed without problems 2. Restart helped installation of 2.7 3. I tried to use php 5.5 5.6 and 7 (no difference in working, but 7 gives better performance)
  6. Hi there, I'm looking for someone who could modify my current dropdown chain selection based on pages (parent (countries) -> child (country provinces) -> sub child (cities) ) or propose different approach. What I'm trying to do is display pages with cities description (including picture) based on selection country -> province -> cities About 50 countries, per country about 10/20 provinces and per province about 10/30 cities The only requirement for this is that it won't slow down the site. At the current moment the pages are loding quite long. If you are interested I'll send you the dev url
  7. Maverick

    Yes completly fresh install, fresh database, standaard template edit Im not using any domain though, so it uses IP instead but I think it shouldn't matter, should it?
  8. Hi there guys, I wonder if anyone had ever an issue like this with installation I was about to check something out quickly so I've set up a digitalocean with ubuntu 16 droplet and then connected it to servepilot where I made a database. So far so good but when I try to install processwire I get this Test Database and Save Configuration Database connection successful to pw2 Saved configuration to ./site/config.php SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'created' SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'created' SQLSTATE[42S02]: Base table or view not found: 1146 Table 'pw2.modules' doesn't exist SQLSTATE[42S02]: Base table or view not found: 1146 Table 'pw2.modules' doesn't exist SQLSTATE[42S02]: Base table or view not found: 1146 Table 'pw2.modules' doesn't exist SQLSTATE[42S02]: Base table or view not found: 1146 Table 'pw2.modules' doesn't exist
  9. Thanks for the suggestion Would this be something like this, just read about the markupcache in another thread: $cache = $modules->get("MarkupCache"); if(!$data = $cache->get("france_options")) { foreach($pages->find("parent=/continent/europe/france/") as $france) { $data .= "<option value='{$france->url}' class='france'>{$france->title}</option>";} $cache->save($data);} echo $data; if(!$data = $cache->get("usa_options")) { foreach($pages->find("parent=/continent/north-america/usa/") as $usa) { $data .= "<option value='{$usa->url}' class='1usa'>{$usa->title}</option>";} $cache->save($data);} echo $data; and so on for every country... Yesterday I was trying to run this chained selection with 193 countries holding about 300 cities (without markupcache), the page was loading 7/8 seconds So far, I realize my approach is very much inefficient (php/processwire newbie) The last selection seem to be the biggest "bottleneck" since I echo all possible country options (cities) at once, so that explains the high load time I believe Not sure how it's possible to render the right cities at the right time (only the cities that are child of a specific parent who has been selected in the second selection step).
  10. Hi guys, I am trying to make a dependent selection for list of cities (dependent on country and continent. So first you select the continent, then country and the city which redirects you to the city page What I have in my processwire Mainsitename -------Continent ------------Europe ------------------France -------------------------Paris -------------------------Marseille ------------North America ------------------USA -------------------------New York -------------------------Boston ------------Asia ------------------Thailand -------------------------Bangkok -------------------------Hat Yai I used so far this ajax plugin to make it all "chained" http://www.appelsiini.net/projects/chained In the template where I have the selection menu this is the code I'm using: <div class="form-group" > <select class="form-control" id="continent" name="continent"> <option value="">Continent</option> <option value="Europe">Europe</option> <option value="North America">North America</option> <option value="Asia">Asia</option> </select> <select class="form-control" id="country" name="country"> <option value="">Country</option> <option value="France" class="Europe">France</option> <option value="USA" class="North America">USA</option> <option value="Thailand" class="Asia">Thailand</option> </select> <select class="form-control" id="city"> <option value="">City</option> <?php $root = $pages->get("/continent/europe/france/"); $children = $root->children(); foreach($children as $child) { echo "<option value='{$child->url}' class='france'>{$child->title}</option value>"; }; $root = $pages->get("/continent/europe/usa/"); $children = $root->children(); foreach($children as $child) { echo "<option value='{$child->url}' class='usa'>{$child->title}</option value>"; }; $root = $pages->get("/continent/europe/thailand/"); $children = $root->children(); foreach($children as $child) { echo "<option value='{$child->url}' class='thailand'>{$child->title}</option value>"; }; ?> </select> </div> And it works all right, I can select the continent, then a country and then one of the available city of this country and it redirects me to the city page for example /continent/france/paris However, my concern is that if the lists gets bigger, this approach will make the site slow (not sure though), my question is, what would be a better approach to achieve this? or should this be ok?
  11. Maverick

    The lightbox effect which I use, is purely css, didn't want to use any javascript for this, but I guess this is the problem then? or can I still get it to work somehow? .lightbox { position: fixed; z-index: 999; width: 100%; height: 100%; text-align: center; top: 0; left: 0; background: rgba(0,0,0,0.6); display: none; } .lightbox img { margin-top: 5%; } .lightbox:target { outline: none; display: block; }
  12. Hi there guys, I'm trying to make a little gallery using simplel css lightbox effect. I'm able to display a single image, but I can't figure out how to make a gallery out of it. What I've already done to get the single image working: Created a filed image_single and added it to the template, uploaded an image in the field and then in my tamplate it looks like this: <div class="col-md-4"> <a href="#image_single"> <img src="<?=$page->image_single->url ?>" class="img-responsive center-block"> </a> <!-- this is the lightbox part, hidden with css --> <a href="#image" class="lightbox" id="image_single"> <img src="<?=$page->image_single->url ?>" class="img-responsive center-block"> </a> </div> I'm using bootstrap as my css framework For the gallery I have tried creating Image_gallery field and adding it to the template and then in the template file I've tried this: <div class="col-md-4"> <div class="row"> <?php foreach($page->Image_gallery as $image) { ?> <div class="col-md-6"> <a href="#image_gallery"> <img src="<?=$image->url ?>" class="img-responsive center-block"> </a> <!-- this is the lightbox --> <a href="#gallery" class="lightbox" id="image_gallery"> <img src="<?=$image->url ?>" class="img-responsive center-block"> </a> </div> <?php } ?> </div> </div> The result I'm getting is that I'm seeing all the pictures from Image_gallery field which is good, but it doesn't matter which image I click on, only the first image from the Image_gallery field shows up in the lightbox
  13. Hi there Thanks LostKobrakai how should $nav_2 be defined then? I might have described what I would like to achieve not corrently the first time btw ... I'm looking for a way to have all url like this: example.com/page1 example.com/page2 etc and still group page1 and page2 into About container in the navbar on the front-end (in a dropdown menu). In the current situation the urls are like this: example.com/about/page1
  14. Hey there guys, Current situation: The page structure looks like this: Home ->About ->->Page 1 ->->Page 2 ->Test This structure comes back in the navbar menu. I'm using bootstrap as css/js framework. "About" is the visible container for the dropdown menu of Page 1 and Page 2. I click on About and then I see Page 1 and Page 2 which is great. What I would like to have is this: Home ->About ->Page 1 ->Page 2 ->Test and still have "About" as the visible container for Page 1 and Page 2 in the navbar so it acts like it's parent (without being an actual parent). Is there any way in processwire to have such parent page without an actual page? To get the bootstrap navbar working with the processwire page structure I was following this tutorial http://wiki.processwire.com/index.php/Bootstrap_Navbar
  15. Maverick

    I have just installed the PHPMailer module https://processwire.com/talk/topic/5814-phpmailer-module/ and removed the require "PHPMailerAutoload.php"; part from the php code. Also as you suggested Wanze I've moved the code form "contact-form.php" into the template file and it's working Thanks a lot! Probably not the most "clean" way to do it, but it works