Jump to content

webhoes

Members
  • Posts

    233
  • Joined

  • Last visited

Everything posted by webhoes

  1. webhoes

    Chrysemys nl

    Ofcourse I understand. Any help is appreciated very much!
  2. webhoes

    Chrysemys nl

    @AndZyk thanks for the remark. I noticed this only for the head banner and the footer background. Are there images where this occurs. What browser do you use? I do have the issue within the body. They won't take the size you give in the admin. This is because the class img is also used within the template for other images with a width of 100%. @szabeszthanks for the remark. I have noticed. It is on my todo list. I already took some eye candy out of the template. Mostly likely more will be taken out to get a better balance...
  3. webhoes

    Chrysemys nl

    The site now uses bootstrap 4 with a fixed with. I have seen a lot of increase in speed by resizing the images to there possible max within the bootstrap columns. The images will only be decreased of on a mobile device. All images use something like $item->images->first()->size()->url. Works like a charm. Also only loading needed assest when needed, specially heavy javascripts help a lot with the speed. I also try to keep the queries to a minimum. Every querie does add some additional time to the loading of the page. Tracybugger helped a lot with this.
  4. webhoes

    Chrysemys nl

    That is good to hear @rick specially since you are on the other side of the world ;). I will adapt the speed of menu animation. Thanks.
  5. webhoes

    Chrysemys nl

    Hello, I want to showcase my website made in processwire. https://chrysemys.nl/ Goal of the website There are quit some websites with information about turtles. Most of them are very limited in information. This website main goal is to be very complete in information. Information about turtles, there natural behaviour, detailed descriptions. Next is also associations ( (bi-)directional links) with caresheets, books, food, illnesses, etc... Second goal is to learn PHP as I started an education for application engineering 4 months ago. Setup It is build on the latest version (3.0.61) and makes use of the latest template strategy. I use the pw-append, pw-replace classes in combination with _main.php and several template files. Most of the rendering is done from custom functions in _functions.php. In the back-end the pages are styled with the options for visibility and group in logical blocks. This is a very nice feature with processwire and makes the pages easier to fill. Next to the core modules I have used the following extra modules: AIOM+ - obviously Connect Page Fields - This module is very important. The whole site is considered a relational database. The base is the enity turtle. This entity has bidirectional associations with books, caresheets, locations (voor google maps), regions (to group locations), the different classifications of the animal taxonomy, food, etc. To make these kind of associations it greatly simplified the output on the other templates. This module was a mandatory feature for being able to create a site as I wanted to. Otherwise it would it would be very inefficient to keep everything up to date. Now I can add a new book and connect it to one ore more turtles. After the save you can see the book also on the turtle page. This goes for all the bidrectional links. This page is about a species - https://chrysemys.nl/schildpadden/emys-orbicularis/ This species has several sub species (basicly the same turtle but live in another country/region and has some different charasteristics). I have decided to make no distinction between species and sub species (on a template level) and use this module to connect them to each other. One reason was that this way the url would not be too long. This turtle lives in several different habitats. These are also bidirectional associations. The same goed for food, books, food to mention some. The biological taxonomy is also build this way as entities that have no parent/child relation. They are connected to each other with page reference (in this case). Both methods (page reference or parent/child) have their pro's and cons, in the end this setup seemed to work best for me. Map Marker - This is used for the map marker field for the locations (verspreiding). Everyt turtle can live in one ore more locations and the will show up on the google map. Also I have the possibility to add location specific information about the climat on the pages (missing on almost all other websites). Map Markup (Google Maps) - For the output of the google map. The js script for this is only outputted on the pages where it is used (template strategy). Markup Sitemap XML - obviously Social Share Buttons - Added this as it is recommended for a better SEO score. Get Video Thumbnails - The blog story can have a youtube link. This module automatically grabs an image and places it as the image for the blog. No more extra steps needed. Video embed for YouTube/Vimeo - I slight changed the output for this module so it always is placed under the body. Datamaps.js - Also I had some very important help from @adrian with help of using datamaps.js. This page is a datamaps script that read all turtles that live in the US and shows them in the correct state. https://chrysemys.nl/kaart-verenigde-staten/ A php function renders the output for the script and fills the variables. These are added to te script on rendering the page. The website is not finished and probably never will be as new information and functionality will be added all the time. But it is finished enough to serve as a showcase. Roadmap There are several things I want to add in the future: A find selector for overview pages (select by size, region, family, etc). Worked on this but, could not get it working. Datamaps.js for all regions (also with a selector to select another region). Optimize the queries to make the site faster. Several front-end improvements (marging/padding/font-size, etc...)
  6. Hello, Is there a module of way to have the images that are added in the body (field) to popup when clicked on? I have made a fotogallery and implemented this as a function. But have no clue how to do this the other images. Sanne
  7. Has to go on the todo list, got 3 other sites to do first...
  8. Thanks for the update. I missed that article. However the old method still works... I have it in action on this website https://chrysemys.nl
  9. pw-append should be a class attribute. Assuming that you want to append to the div with id content-body, it should be lik this. <div id="content-body" class="pw-append"> <div id="contact-form"> // ... contact form details here </div> <p>&nbsp;</p> </div> In the config you also need to have set the following: $config->useMarkupRegions = true;
  10. I found a bug in 3.0.52. I got the following error when adding an url field type. Session: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'deb26781n3_TestWebhoes.field_website' doesn't exist (getNumRows) I tried it twice, both same result. Sanne
  11. Yes, I used the version 2 padloper version on a version 3 of processwire. If you use pw 3, download the version for pw 3 of padloper. The links are in the first post of this thread.
  12. Yes, Query Wrangler for WP. Great for quickly making lists. I don't have toolsets because it was too limited for me (especially in many to many relationships). I fixed that with ACF. Dive into PW, I just started 3 months ago with programming and 2 months ago with PW. It's great to learn PHP and get some shit done
  13. Your right WP movie libray is a bit more focues on the movies. You can add all other info with ACF if you want and output it in the theme. I first build that site in Drupal and was awesome but my friend wanted to have WP because he can do more with it himself. Check out the wp wrangler module that is basicly views for WP. I found this more flexible than toolset. Now my choise would be PW. You can build anything on your wishlist. If there is no significant need for WP I would go for PW. totf is also a niche movie site although sometimes going mainstream as distributors let them review films before they come out.
  14. there is a wp module that does all relationships. WP movie library. I have created this site with that for a friend. www.totf.nl As for PW use the page to page reference module. It works like a charm and you can make overviews of everything like @Robin S said. Similar example with use of page to page and higly clickable is here... chrysemys.nl (still in construction). I find PW to be much faster than WP and once you get the hang of it, it is much simpler to work with than to work around the wp_loop.
  15. @adrian, I don't fully understand the workflow (yet). This is an example what I would really like (they have taken it a few steps beyond my initial thoughts which is even nicer). https://theturtleroom.com/education/native-species-maps/ Can an array be populated with something pages->find() for a big map. And put the Datamaps code in the template for the big map. I have pages with turtles and linked them to other pages that are a country/state. Can I use the same method to creat a map with this instead of google like I have now? My working example - http://chrysemys.nl/schildpadden/trachemys-scripta-scripta/
  16. I found that @adrian, http://leafletjs.com/examples/choropleth/ . Can it work with this module? Second option looks great. How should that be implemented?
  17. Is it possible to make this module work like a Choropleth map? An interactive (vector based) map of all the regions in the world. The coloring should be darker as more pages (are linked) belong to a certain region. Sanne
  18. @Robin S, yes it is a string. Also it is build upon repeating pagearray which doesn't lead to an correct new array. 1 | 2 | 3 | 4 2 | 5 | 8 5 | 4 | 5... The 2 in 4 2 is the start of an new array, so is the 5 in 8 5. It can't find something with 42 or 85. It seems the output has to be made a new array explicitly and also with the correct setup. Tried that yesterday, could not get it figured out.
  19. I understand, but why does it work on page where I select children (array) but not on a page where I select certain pages as array that are the pages that have the 'map' field. An array is made on both occasions. The second array has duplicate items, could that be an issue? Sanne
  20. I have the big map working with this code (quite basic) $items = $page->children; $map = $modules->get('MarkupGoogleMap'); $content .= $map->render($items, 'map'); For the page with turtles I want to have the current turtle on that page to be visible on the map. I have made the following code: if($page->hasChildren) { $results = $page->children("limit=9, sort=-created"); $pagination = $results->renderPager(); $content .= $pagination; $content .= renderSchildpadden($results); $content .= $pagination; } foreach ($results as $result){ foreach ($result->verspreidingen as $verspreiding) { $out .= $verspreiding . "|"; } } //$item = $out; $sidebar_bottom = $out; $map = $modules->get('MarkupGoogleMap'); $sidebar_bottom .= $map->render($out, 'map'); The part for the sidebar_bottom gives the following error: Error: Uncaught Error: Call to a member function first() on string in /home/deb26781n3/domains/chrysemys.nl/public_html/site/modules/FieldtypeMapMarker/MarkupGoogleMap.module:209 Stack trace: #0 /home/deb26781n3/domains/chrysemys.nl/public_html/site/templates/schildpadden.php(32): MarkupGoogleMap->render('1213|1198|1199|...', 'map') #1 /home/deb26781n3/domains/chrysemys.nl/public_html/wire/core/TemplateFile.php(268): require('/home/deb26781n...') #2 [internal function]: ProcessWire\TemplateFile->___render() #3 /home/deb26781n3/domains/chrysemys.nl/public_html/wire/core/Wire.php(374): call_user_func_array(Array, Array) #4 /home/deb26781n3/domains/chrysemys.nl/public_html/wire/core/WireHooks.php(549): ProcessWire\Wire->_callMethod('___render', Array) #5 /home/deb26781n3/domains/chrysemys.nl/public_html/wire/core/Wire.php(399): ProcessWire\WireHooks->runHooks(Object(ProcessWire\TemplateFile), 'render', Array) #6 /home/deb26781n3/domains/chrysemys.nl/public_html/wire/modules/PageRender.mod (line 209 of /home/deb26781n3/domains/chrysemys.nl/public_html/site/modules/FieldtypeMapMarker/MarkupGoogleMap.module) This error message was shown because: you are logged in as a Superuser. Error has been logged. The input for the big map are the pages that contain the field 'map'. foreach ($results as $result) { foreach ($result->verspreidingen as $verspreiding) { $out .= $verspreiding . "|"; } } The code above produces also an array of pages that contain the field 'map'. But this time the same function strugles on this part of the code in the module: if($options['useMarkerSettings'] && (count($pageArray) == 1 || !$lat)) { // single marker overrides lat, lng and zoom settings $marker = $pageArray->first()->get($fieldName); << this line and on first() returns the error $lat = $marker->lat; $lng = $marker->lng; if($marker->zoom > 0) $zoom = (int) $marker->zoom; } What am I doing wrong here? Sanne
  21. Your right, my bad. I will make a new topic.
  22. Thanks @dab, I have the big map working with this code (quite basic) $items = $page->children; $map = $modules->get('MarkupGoogleMap'); $content .= $map->render($items, 'map'); For the page with turtles I want to have the current turtle on that page to be visible on the map. I have made the following code: if($page->hasChildren) { $results = $page->children("limit=9, sort=-created"); $pagination = $results->renderPager(); $content .= $pagination; $content .= renderSchildpadden($results); $content .= $pagination; } foreach ($results as $result){ foreach ($result->verspreidingen as $verspreiding) { $out .= $verspreiding . "|"; } } //$item = $out; $sidebar_bottom = $out; $map = $modules->get('MarkupGoogleMap'); $sidebar_bottom .= $map->render($out, 'map'); The part for the sidebar_bottom gives the following error: Error: Uncaught Error: Call to a member function first() on string in /home/deb26781n3/domains/chrysemys.nl/public_html/site/modules/FieldtypeMapMarker/MarkupGoogleMap.module:209 Stack trace: #0 /home/deb26781n3/domains/chrysemys.nl/public_html/site/templates/schildpadden.php(32): MarkupGoogleMap->render('1213|1198|1199|...', 'map') #1 /home/deb26781n3/domains/chrysemys.nl/public_html/wire/core/TemplateFile.php(268): require('/home/deb26781n...') #2 [internal function]: ProcessWire\TemplateFile->___render() #3 /home/deb26781n3/domains/chrysemys.nl/public_html/wire/core/Wire.php(374): call_user_func_array(Array, Array) #4 /home/deb26781n3/domains/chrysemys.nl/public_html/wire/core/WireHooks.php(549): ProcessWire\Wire->_callMethod('___render', Array) #5 /home/deb26781n3/domains/chrysemys.nl/public_html/wire/core/Wire.php(399): ProcessWire\WireHooks->runHooks(Object(ProcessWire\TemplateFile), 'render', Array) #6 /home/deb26781n3/domains/chrysemys.nl/public_html/wire/modules/PageRender.mod (line 209 of /home/deb26781n3/domains/chrysemys.nl/public_html/site/modules/FieldtypeMapMarker/MarkupGoogleMap.module) This error message was shown because: you are logged in as a Superuser. Error has been logged. The input for the big map are the pages that contain the field 'map'. foreach ($results as $result){ foreach ($result->verspreidingen as $verspreiding) { $out .= $verspreiding . "|"; } } The code above produces also an array of pages that contain the field 'map'. But this time the same function strugles on this part of the code in the module: if($options['useMarkerSettings'] && (count($pageArray) == 1 || !$lat)) { // single marker overrides lat, lng and zoom settings $marker = $pageArray->first()->get($fieldName); << this line and on first() returns the error $lat = $marker->lat; $lng = $marker->lng; if($marker->zoom > 0) $zoom = (int) $marker->zoom; } What am I doing wrong here? Sanne
  23. Hello, I installed the MarkupSocialShareButtons by @Soma. That made the site very slow. So I uninstalled it and removed the files. My site speed was for all pages under half a second. Now it takes up to 10 seconds to get a page or I get an ERR_CONNECTION_RESET . Also occasianlly pages don't render completely (missing images, or admin pages that look different). I cleared all the caches (all in one minify). Saved most of the templates again (some have caching on). What else can I do to get my site quick and stable again? site is http://chrysemys.nl Sanne
×
×
  • Create New...