-
Posts
436 -
Joined
-
Last visited
-
Days Won
17
Everything posted by jploch
-
Hey guys, Just launched a new project called Fabricius: fabriciusstrasse31.de Fabricius is a new building thats being built in Hamburg (Germany), that offers modern living comfort in a green environment. I developed the whole brand strategy and visual identity for the website and some printing materials. The logo mark is derived from the silhouette of the building, which is surrounded by trees (circular shapes) and green areas. More details here The website is build with PW 3.0 and uses Modules like Map Marker, Pages2PDF (to generate the apartment exposes) and MarkupSrcSet. Thanks for the awesome support here and the development of PW and the modules!!
-
I just testet it and now it seems to work fine! Thanks for your support! I have deactivated the SessionLoginThrottle module. Is this bad for security reasons or is it save to leave it deactivated?
-
could this be a problem with to many people logging in at the same time? The customer had send a newsletter with the frontend Login, so there could be multiple people accessing the login at the same time. Also the error happened everytime the customer or I tried to login.
-
Thx for your quick reply! For the frontend I created a new user with just the guest role assigned. I can't test the Login right now, I had to disable the page protection, because the website is live and the customer is a little nervous right now I will test it later in the evening. Iam still a newbi. Where can I find the session_login_throttle database table and how can I empty it?
-
jep. its only when I try to login on the frontend
-
I use this on a site. It used to work fine. Now when I login on the frontend, I get this error with debug on: Fatal error: Exception: Please wait at least 35 seconds before attempting another login. (in /kunden/348019_70794/rp-hosting/14027/64026/fabriciusstrasse/wire/modules/Session/SessionLoginThrottle/SessionLoginThrottle.module line 97) #0 /kunden/348019_70794/rp-hosting/14027/64026/fabriciusstrasse/wire/modules/Session/SessionLoginThrottle/SessionLoginThrottle.module(65): ProcessWire\SessionLoginThrottle->allowLogin('kunde') #1 /kunden/348019_70794/rp-hosting/14027/64026/fabriciusstrasse/wire/core/WireHooks.php(619): ProcessWire\SessionLoginThrottle->sessionAllowLogin(Object(ProcessWire\HookEvent)) #2 /kunden/348019_70794/rp-hosting/14027/64026/fabriciusstrasse/wire/core/Wire.php(373): ProcessWire\WireHooks->runHooks(Object(ProcessWire\Session), 'allowLogin', Array) #3 /kunden/348019_70794/rp-hosting/14027/64026/fabriciusstrasse/wire/core/Session.php(712): ProcessWire\Wire->__call('allowLogin', Array) #4 /kunden/348019_70794/rp-hosting/14027/64026/fabriciusstrasse/wire/core/Session.php(712): ProcessWire\Session->allowLogin( in /kunden/348019_70794/rp-hosting/14027/64026/fabriciusstrasse/index.php on line 64 Error: Exception: Please wait at least 35 seconds before attempting another login. (in /kunden/348019_70794/rp-hosting/14027/64026/fabriciusstrasse/wire/modules/Session/SessionLoginThrottle/SessionLoginThrottle.module line 97) #0 /kunden/348019_70794/rp-hosting/14027/64026/fabriciusstrasse/wire/modules/Session/SessionLoginThrottle/SessionLoginThrottle.module(65): ProcessWire\SessionLoginThrottle->allowLogin('kunde') #1 /kunden/348019_70794/rp-hosting/14027/64026/fabriciusstrasse/wire/core/WireHooks.php(619): ProcessWire\SessionLoginThrottle->sessionAllowLogin(Object(ProcessWire\HookEvent)) #2 /kunden/348019_70794/rp-hosting/14027/64026/fabriciusstrasse/wire/core/Wire.php(373): ProcessWire\WireHooks->runHooks(Object(ProcessWire\Session), 'allowLogin', Array) #3 /kunden/348019_70794/rp-hosting/14027/64026/fabriciusstrasse/wire/core/Session.php(712): ProcessWire\Wire->__call('allowLogin', Array) #4 /kunden/348019_70794/rp-hosting/14027/64026/fabriciusstrasse/wire/core/Session.php(712): ProcessWire\Session->allowLogin( This error message was shown because: site is in debug mode. ($config->debug = true; => /site/config.php). Error has been logged.
-
I think a have a problem related to this. Iam running PW 3.0 and loading content from a php file, that is located at my site root, into one of my template files (under site/templates). So in my PHP File I have this (like Ryan suggested): include('./index.php'); // bootstrap ProcessWire So this works now: <img src="<?php echo $config->urls->templates?>img/image.png"> But when I try to save pages in an array like this for example: $wohnungen = wire("pages")->find("parent=/wohnen/, template=wohnungen, sort=sort"); I get this Error: Error: Call to undefined function wire() (line 8 of /www/htdocs/w00dd152/projekte/fabricius/wohnungen.php) Any Ideas? I figured it out. I had to use $wohnungen = $wire->pages->find("parent=/wohnen/, template=wohnungen, sort=sort");
-
Now I have a new Problem. I have several pages I just use for data storage (no template file associated). The pages are all children of a page called "wohnen". The data of those pages is used on the page home. Now I want to create a PDF from all these pages (of parent "wohnen"). To let the module know wich PDFs to generate I used a session. In my template for generating the PDFs I have something like this: session_start(); $wohnungsnr = $_SESSION['wohnungsnr']; <?php $targetPage = "/$wohnungsnr/"; $wohnung = wire('pages')->get($targetPage); $out = " <h1>{$targetPage}</h1> "; $out .=" <div id='{$wohnungsnr}-content' class='fbox-content'> <div class='grid'> <h1 class='size1of1'>{$wohnung->headline}</h1> "; foreach ($wohnung->grundrisse as $grundriss) { $out .= "<img class='size1of3' src='{$grundriss->url}'>"; }; $out .= " <div class='size1of3 wohnung-content'> <table> <tr> <th>Wohnungstyp</th> <th>Etage</th> </tr> <tr> <td>{$wohnung->options_zimmer->title} Zimmer</td> <td>{$wohnung->options_etage->title}</td> </tr> <tr> <th>Grösse</th> <th>Kaufpreis</th> </tr> <tr> <td>{$wohnung->size}</td> <td>{$wohnung->preis}</td> </tr> <tr> <th colspan='2'>Ausstattung</th> </tr> <tr> <td colspan='2'> <ul> "; foreach ($wohnung->ausstattung_repeater as $item) { $out .= " <li>– {$item->headline}</li> "; } $out .= "</ul> </td> </tr> </table> </div> </div> </div> "; echo "{$out}"; ?> <?php include("_footer.php"); ?> On the page home I have a function that shows all the data from the children of the"wohnen" page with a download button for every page. My Idea was to change the session variable on click of the download buttton to let the pdf template know wich page to render. Any Ideas how this works? You can delete this post I figured it out. I send the variable with the URL like this: <a href='$page->url?pages2pdf=1&wohnungsnr={$wohnung->title}' class='button' id='{$wohnung->title}'><img src='http://projekte.janploch.de/fabricius/site/templates/img/icon-download.svg' class='button-icon'>Download Exposé</a>
-
Hi! Thanks for this great module! This is probably easy, but I cant get it to work (Iam a PHP noob). I want to generate two PDfs (with different templates) from the same page. I have two files in the pages2pdf folder under templates (expose_preisliste.php, expose_wohnung.php). If I understand correctly I would set it up like this: $preisliste = $modules->get('WirePDF'); $preisliste->markupMain = $config->paths->templates . 'expose_preisliste.php'; $preisliste->save('preisliste.pdf'); $wohnung = $modules->get('WirePDF'); $wohnung->markupMain = $config->paths->templates . 'expose_wohnung.php'; $wohnung->save('wohnung.pdf'); Now I want two links on the frontend to download the files. How do I call the variable for the Link? I want the PDFs to be generated when clicking the link. Thx for your help! I managed to get this working.
-
Thanks for your reply. You are right the icon variable only allows a single value. The post from nghi helped me to get it working with custom icons for each marker. Here is the code I used in the MarkupGoogleMap.module: /** Custom Fields */ foreach($pageArray as $page) { $marker = $page->get($fieldName); if(!$marker instanceof MapMarker) continue; if(!$marker->lat) continue; $url = $options['markerLinkField'] ? $page->get($options['markerLinkField']) : ''; $title = $options['markerTitleField'] ? $page->get($options['markerTitleField']) : ''; $icon = $page->marker_icon->url ? $page->marker_icon->url : ''; $map_location_name = $page->map_location_name ? $page->map_location_name : ''; $out .= "$id.addMarker($marker->lat, $marker->lng, '$url', '$title', '$icon', '$map_location_name'); "; } Maybe this will help someone.
-
you mean without the '' ? That didn't fix it.
-
Hey folks! I managed to get this working with multiple markers (using a repeater). Following this thread, I even got the hoverBox with a custom field working. Only Problem I have now, is that I need different icons for each marker. With my noob developer skills I can't get it to work. Here is what I tried: <?php $map = $modules->get('MarkupGoogleMap'); $options = array( 'height' => '100%', 'width' => '100%', 'icon' => '$page->map_repeater->marker_icon->url', ); $items = $page->map_repeater; echo $map->render($items, 'map', $options); ?> "marker_icon" is an image field in the repeater I want to use for the Icons. Can someone please help me with this? Thanks for this awesome module btw.!
-
is it possible to use an image filed for the markers instead of the fontawesome option? my code looks like this (it works with the FontIconPicker): <?php $options = array( 'height' => '100%', 'markerIconColour' => 'black', 'popupFormatter' => function($page) { $out[] = "<p>$page->headline</p>"; return implode($out); }, 'markerFormatter' => function($page, $marker_options) { $marker_options['icon'] = $page->marker_icon; // Override the default icon for this marker. return $marker_options; } ); $items = $lage->map_repeater; echo $map->render($items, 'map', $options); ?>
-
Thx for your quick reply! I made a custom.php file in MarkupFontIconPicker/Icons/ Now I have this in the admin.php in templates folder: wire()->addHook('InputfieldFontIconPicker::beforeRender', function($event) { if(!$event->return) return; // Get Input Name (For specified input hook, if you want apply all InputfieldFontIconPicker remove inputName check) $inputName = ""; if(isset($event->object->attributes['name'])) $inputName = $event->object->attributes['name']; // Get Input Name (For specified input hook, if you want apply all InputfieldFontIconPicker remove inputName check) if($inputName == 'icon_picker') { /** * Load your custom icons function file * Your array need to be same format with Icons/FontAwesome.php or Icons/Ionicons.php * Also you can pass directly an array */ wireIncludeFile('http://projekte.janploch.de/fabricius/site/modules/MarkupFontIconPicker/Icons/custom.php'); // Set icons as $icons variable $icons = MyCustomIconsArray(); // Set your options $return = array( 'attributes' => array( 'category' => '', 'theme' => 'fip-grey', 'empty-icon' => 1, 'empty-icon-value' => '', 'icons-per-page' => 20, 'has-search' => 1 ), 'icons' => $icons ); // Return the event $event->return = $return; } $event->return; }); In the Backend only the FontAwesome and Ionicicons library is showing. Custom File looks like this: <?php function InputfieldFontIconPickerIcons() { $icons = array( 'title' => 'Custom', 'version' => '2.0.1', 'css' => 'http://projekte.janploch.de/fabricius/site/templates/fonts/icomoon/style.css', 'categorised' => false, 'prefix' => 'icon-icon-', 'icons' => array( 'doctor', 'kita' ) ); return $icons; }
-
Hi! Thx for this cool module! I want to use this with a costum Icon-Set and need some help. I did put an URL in the custom css field, but my Icons dont show up in the backend. Is there anything else I have to do to get this to work?
-
I reinstalled the module, and now its working. When I setup the repeater to allways open the items the map and magnifying glass icon seems to work. Thanks for your help!
-
is there a trick, when using this with a repeater for multible markers in PW 3? Here is my code, but thats not working: <?php $lage = wire('pages')->get("/lage/"); $items = $lage->map_repeater; echo $map->render($items, 'map'); ?> Also in the backend, the Address field is not clickable, when I use the Map Field in a Repeater Edit: It seems that the files for the module are not loading. I get an error in the console that the files are not loading.
-
thx! I just figured this out, when reading the documentation, I must have missed it.
-
Hey guys! I have a problem with this. When I put the <?php echo $map->getLeafletMapHeaderLines(); ?> in the header of my template a get a Error: Call to a member function getLeafletMapHeaderLines() on a non-object (line 34 of /www/htdocs/w00dd152/projekte/fabricius/site/templates/_header.php) I have checkt the permissons on the module files, everything is on 777. I also pressed the reload button (as suggested) on the module page in PW but still no luck. Iam running PW 3.0.30 devns
-
I don't know the exact sizes of the images thats why I just set the width. But thanks for your explanation. I will test it on different devices and see if its working
-
Hi! I have another problem with this. When I test my images on different resolutions, there seems to be a problem with loading the correct resources. The images that are created in the assets folder are fine, but most of the time just the biggest image gets loaded. I testet this with resizing the browser, reloading the page and saving the image and looking at the size. Here are my module settings in PW: "albumimage": [ [360, null], [720, null], [1300, null], [1600, null] ] This is the generated markup: <img src="/website_susannerudolf/site/assets/files/1184/logo_wirtschaftsclub-stuttgart.360x0.jpg" data-srcset="/website_susannerudolf/site/assets/files/1184/logo_wirtschaftsclub-stuttgart.360x0.jpg 360w, /website_susannerudolf/site/assets/files/1184/logo_wirtschaftsclub-stuttgart.720x0.jpg 720w, /website_susannerudolf/site/assets/files/1184/logo_wirtschaftsclub-stuttgart.1300x0.jpg 990w, /website_susannerudolf/site/assets/files/1184/logo_wirtschaftsclub-stuttgart.1600x0.jpg 1300w" data-sizes="(max-width: 1600px) calc(100vw - 20px), 1600px" class="inline-block lazyloaded" alt="" sizes="(max-width: 1600px) calc(100vw - 20px), 1600px" srcset="/website_susannerudolf/site/assets/files/1184/logo_wirtschaftsclub-stuttgart.360x0.jpg 360w, /website_susannerudolf/site/assets/files/1184/logo_wirtschaftsclub-stuttgart.720x0.jpg 720w, /website_susannerudolf/site/assets/files/1184/logo_wirtschaftsclub-stuttgart.1300x0.jpg 990w, /website_susannerudolf/site/assets/files/1184/logo_wirtschaftsclub-stuttgart.1600x0.jpg 1300w"> Thanks for your help!
-
Hey! I just finished working on a website for a client. To restrict the use of PW for the client (so he can't brake the website), I created a new User and asigned some permissions. The problem is, that the link to the page tree is missing, when I login with the new user (see screenshot). Only the "Add New" shortcut works. When Iam logged in as admin, everything works fine. I never had this problem before. Iam using PW 3.0.25 Any Ideas? THX!
-
I forgot the "echo $out;" at the end. Now I feel a little stupid. My only excuse is that its monday morning without coffee Everything is working now! Thank you for this module and your patience with my problems!!
-
Its still not working. No images or html gets rendered from this function (rest of the page looks fine). There are no error messages (debug mode turned on), so I guess the syntax is fine. I use the image extra module with this. Could this be a problem?Anyway thanks for your help! Here is the complete code: // album list function ---------------------- function albumList(){ // Get the list of albums $albums = wire("pages")->find("parent=/work/, template=project, limit=100, sort=sort"); $out =" "; //Loop through the pages foreach($albums as $album){ // if there's no thumbnail no need to do anything if(!$album->thumbnail) continue; // save srcset tag to a variable $srcset = $album->thumbnail->srcset('thumbnail', 'lazyload my-class inline-block', array('quality' => 80)); $out .="<a href='{$album->url}' class='item {$album->thumbnail->tags} {$album->thumbnail->orientation}'>"; if($album->images){ $out .="<img $srcset alt='{$album->thumbnail->Alt}'>"; } $out .="<div class='item-info'><h3>{$album->title}</h3><h4>{$album->thumbnail->tags}</h4></div>"; $out .="</a>"; } }
-
it holds multiple images. I tryed using first(). Now I get this: Error: Exception: Method Pageimage::first does not exist or is not callable in this context (in /homepages/11/d86659974/htdocs/website_susannerudolf/wire/core/Wire.php line 409) #0 [internal function]: ProcessWire\Wire->___callUnknown('first', Array) #1 /homepages/11/d86659974/htdocs/website_susannerudolf/wire/core/Wire.php(347): call_user_func_array(Array, Array) #2 /homepages/11/d86659974/htdocs/website_susannerudolf/wire/core/WireHooks.php(548): ProcessWire\Wire->_callMethod('___callUnknown', Array) #3 /homepages/11/d86659974/htdocs/website_susannerudolf/wire/core/Wire.php(370): ProcessWire\WireHooks->runHooks(Object(ProcessWire\Pageimage), 'callUnknown', Array) #4 /homepages/11/d86659974/htdocs/website_susannerudolf/wire/core/Wire.php(371): ProcessWire\Wire->__call('callUnknown', Array) #5 /homepages/11/d86659974/htdocs/website_susannerudolf/wire/core/Wire.php(371): ProcessWire\Pageimage->callUnknown('first', Array) #6 /homepages/11/d86659974/htdocs/website_susannerudolf/site/temp This error message was shown because: you are logged in as a Superuser. Error has been logged. sorry my bad, it was a long day, its just an image field with a single image. And it works when I use it without the module syntax like: // album list function ---------------------- function albumList(){ // Get the list of albums $albums = wire("pages")->find("parent=/work/, template=project, limit=100, sort=sort"); $out =" "; //Loop through the pages foreach($albums as $album){ $out .="<a href='{$album->url}' class='item {$album->thumbnail->tags} {$album->thumbnail->orientation}'>"; if($album->images){ $out .="<img src='{$album->thumbnail->url}' alt='{$album->thumbnail->Alt}'>"; } $out .="<div class='item-info'><h3>{$album->title}</h3><h4>{$album->thumbnail->tags}</h4></div>"; $out .="</a>"; } echo $out; } but still no luck using the module syntax