- 
                Posts2,318
- 
                Joined
- 
                Last visited
- 
                Days Won2
Everything posted by pwired
- 
	  Which is the easiest way to setup an simple contact form?pwired replied to tires's topic in General Support Setting up a contact form is an ever returning question so here you go: https://processwire.com/talk/topic/2089-create-simple-forms-using-api/ https://processwire.com/talk/topic/3105-create-pages-with-file-upload-field-via-api/ https://processwire.com/talk/topic/407-processing-contact-forms/?hl=+create%20+simple%20+contact%20+form
- 
	  How do I "secure" the source to an iframe to prevent "hotlinking"?pwired replied to OrganizedFellow's topic in Dev Talk There exist a lot of htaccess rules for that. Example: Header set X-Frame-Options DENY Header always append X-Frame-Options SAMEORIGIN https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options
- 
	I don't think this is related to processwire but the environments you are using. What processwire version are you using ? This way of moving from dev to production is not recommended as it doesn't check your production environment. Install a fresh new installation of the same processwire version on the production server and see if this installation goes error free. This will tell you if processwire matches up with the production server environment. After that, replace the site folder on the production server with the site folder from the dev server. Empty the database on the production server and import your database sql file from the dev server. See how that goes.
- 3 replies
- 
	- 2
- 
					
						
					
							  
 
- 
	
		- iis
- windows server
- 
					(and 2 more) 
					Tagged with: 
 
 
- 
	@Sérgio, I just added your code but still the same problem. Only the start page opens in the default language. server { # access from localhost only listen 127.0.0.1:80; server_name localhost; root www; location / { try_files $uri $uri/ /index.php?it=$uri&$args; } location /template1 { try_files $uri $uri/ /index.php?it=$uri&$args; }
- 
	I have installed processwire version 2.7.2 with multi language on a Nginx server on windows 7. I have installed processwire inside a subfolder templates1 During the processwire installation I had 2 issues with gd 2.0 missing and mod_rewrite but I could solve them this way: Removing the ; in front of "extension=php_gd2.dll" inside php.ini Adding the line The only thing that I still have not working is the multi language. Nginx let's me open only the start page in the default language (english) http://localhost/template1/ If I try to open the start page in another language it throws a 404 not found. http://localhost/template1/de/ Also if I click on About in the top menu in the default language it throws a 404 not found. http://localhost/template1/en/about/ This is what the first part of my nginx.conf looks like: server { # access from localhost only listen 127.0.0.1:80; server_name localhost; root www/templates1; Any ideas what is missing ? I also tried and installed processwire directly in the root www but had the same multi language problems. Only the start page in the default language worked.
- 
	I'm using pocketgrid effectively for everything I do but have played around a bit with susy and jeet. Depending on the sass that is used every mixin adds x ms to the compile time. Seems that the amount of spans you are using in susy affects noticeably, even with libsass. Susy has many different angles and it quickly starts to do far too much than is necessary. I would prefer jeet as it's really fast and makes much more common sense even with basic sass experience. http://jeet.gs/
- 
	Pictures are saved in sub folders inside the folder assets. The first check you can do is to see if they are there in those subfolders. Then you can compare if they also exist as data in the database. This will tell you if it can be traced to a storage or a database problem.
- 
	I have good experience with electret microphones. You also need a good equalizer and a background noise quencher.
- 
	@benbyf What point are you making there ? Your boom css skills not needing a css grid ? We'll there's whole threads in this forum about using css grids with processwire and which one is used and why. Pocketgrid happens to be one of them, using it for years and could do everything with it until today. Honestly, did you know about using padding-bottom (image height/width x 100)%; ? We'll I didn't but now I know thanks to helpful people in this forum.
- 
	Ok thanks to the link from Kongondo I followed: http://www.outsidethebracket.com/responsive-web-design-fluid-background-images/ and found the solution there: use padding-bottom and give it the following percentage: (height/width x 100) In my case I have it now like this: div#top{ background-image:url(banner4.png); background-repeat: no-repeat; width:100%; padding-bottom: 26.2793%; background-size: cover; background-position:center; } Background picture is showing up correctly and all responsive now
- 
	% does not work because like you mentioned: it distorts the ratio of the background picture. The block-group div needs a fixed width and height ratio in px the same ratio as the background picture, and the css rules apply different for a background picture: div#top{ width: 1075px; /* block-group div needs fixed ratio width and height in px */ height: 280px; /* or the background picture will not show correctly */ background-size: 100% 100%; /* you have to put this rule to cover the block-group div with the background picture */ } 1. So far so good but of course, now that one block-group has a width in px, this breaks auto responsive resizing for all the other block-groups in pocket grid, so to try to escape from setting fixed ratio widths and heights in px for different screensizes: if there is a class block inside the block-group with content the background picture resizes depending on the height of the content. 2. I will try to make a transparant png with the same size as the background picture and put that inside a class block and see if the block-group background picture resizes correctly and responsive. This could be an all in one solution. 3. Giving the block-group div a default width of 100% then you only have to change it's height according to the ratio of the background picture. You only have to do this for 4 or 5 different screen-size devices with @media rules. This is a workable solution. 4. Another way to escape from setting fixed ratio width's and height's in px would be not to use the background picture property but to put the picture directly inside a class block. Then it will be directly automatically responsive for all screen-sizes but the disadvantage of this is that you have to use different negative top margins for the other class blocks to position them correctly over the picture used as background picture. I told you that a background picture is a different cookie from a "regular" picture. Im not sure if other css grids handle this more easy, I guess this will be the same in any one of them.
- 
	Thanks for the link kongondo but if I set width and heigth for the div holding the background picture it won't autoresize anymore. Then I would have to change these values for each device screen-size with @media rules. It seems to be the only solution. Does anyone know if susy css takes care of this ?
- 
	By the way this is the background picture, and over it I want to show: on the top left a little banner, on the top right a horizontal navigation menu on the bottom left and right 2 pictures. So easy with plane html and css but a block-group and class blocks of pocket grid is making stacking different div's over a parent block-group div a pain.
- 
	Thanks for your replies. I know all that but the problems arise as soon as you want to give a block-group, or a class block (column) a background picture for all the other parts. The background picture will not show up correctly unless there is other content present with a specific height.
- 
	The problem I have with pocket-grid is to show different div's over a parent div that has a background picture. I don't like to have to fall back to work arounds by giving class blocks negative margins. If I would not use pocket-grid at all for this I could do this with giving the parent div a position relative and the other div's that has to show over it position absolute.
- 
	This is the last I tried by giving the parent block-group the background image <div id="top" class="block-group" style="background-image:url(<?php echo $backpicture->url ?>); background-repeat: no-repeat; background-size: contain;"> <div id="banner" class="c20 block"> <?php echo "<img src='$banner->url'>"; ?> </div> <div id="horizontalplacer" class="c30 block"> </div> <div id="topnav" class="c50 block"><?php echo "<ul id='' class=''>"; echo "<li id=" . '"gastenboek"' . ">" . "<a href=" . '"' . $pages->get('/gastenboek/')->url . '"' . ">" . $gastenboek . "</a>" . "</li>"; echo "<li id=" . '"videos"' . ">" . "<a href=" . '"' . $pages->get('/videos/')->url . '"' . ">" . $videos . "</a>" . "</li>"; echo "<li id=" . '"fotos"' . ">" . "<a href=" . '"' . $pages->get('/fotos/')->url . '"' . ">" . $fotos . "</a>" . "</li>"; echo "<li id=" . '"intro"' . ">" . "<a href=" . '"' . $pages->get('/intro/')->url . '"' . ">" . $intro . "</a>" . "</li>"; echo "<li>" . "<a id=" . '"start"' . " href=" . '"' . $pages->get('/')->url . '"' . ">" . $home . "</a>" . "</li>"; echo "</ul>"; ?> </div> <div id="picture1" class="c50 block"> <?php echo "<img src='$pic1->url'>"; ?> </div> <div id="picture2" class="c50 block"> <?php echo "<img src='$pic2->url'>"; ?> </div> </div>
- 
	In the top part of my website, I want to have a background image and then over this image, I want to show a little banner, a navigation menu and at the bottom 2 small images. I have always used pocket-grid css for everything but now I face a few problems that I could not solve so far. If I put the background image for the block-group in it's own first row (class block) it will be responsive but then I have to use negative margins for the rows holding the other parts to give them the right position over the background image and everything will move away on different screen-sizes. Another solution would be to give the parent block-group directly the background image like this: <div id="top" class="block-group" style="background-image:url(<?php echo $image->url ?>); background-repeat: no-repeat; background-size: contain;"> But then the problem is that this div needs to have a content with a correct height for every screen-size or the background image will not show up or only partly show up. I was wondering if you could accomplish this more easy with another css grid e.g. with susy or maybe there is another css way that would still make this work with pocket-grid.
- 
	Processwire already has all core functionality to begin with. It's decoupled and api first, leaving it up to you what you want to build. To answer the question I could think of modules like hanna code, ImageMagick, TracyDebugger. http://modules.processwire.com/modules/process-hanna-code/ https://processwire.com/blog/posts/processwire-3.0.10-expands-image-resize-options/ http://modules.processwire.com/modules/tracy-debugger/
- 
	  configuration of Extra Allowed Content of ckeditor is difficultpwired replied to adrianmak's topic in General Support Why do you want to do this ? Inline css lowers the security and breaks the consistency of the website. In CKEditor you should not go any further as allowing html tags but keep the css inside your templates folder. Anyway: Admin => Setup => Fields => Your field => Input scroll down to Format Tags and add div to it: div;p;h2;h 3;h4;h5;h6;pre;address scroll down to Extra Allowed Content and add wildcards for the <a> and <div> tag: a[*]{*}(*) div[*]{*}(*) Now your <a> and <div> tags won't be stripped off anymore. The CKEditor forced <p> tags are still wrapped around your html tags, this is how you can get rid of them: (body field example) Open config-body.js in your Editor (site\modules\InputfieldCKEditor\config-body.js) and make it look like this, to prevent the forced <p> tags: CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration here. For example: // config.uiColor = '#AADC6E'; config.enterMode = 2; config.shiftenterMode = 1; }; Now you have your html tags free from wrapped <p> tags.
- 
	Seems that concrete api calls between html tags look the same as with processwire http://documentation.concrete5.org/tutorials/create-custom-hello-world-block-visual-guide
- 
	Since the introduction of the delayed output I use this a lot: https://medium.com/@clsource/the-wire-render-pattern-806bf6d6097a#.t3ohgu0h3 You can make your own <?php echo $layout; ?> in the _main.php and feed it any blocks you want https://processwire.com/docs/tutorials/default-site-profile/page3
- 
	Install adrian's debugger module http://modules.processwire.com/modules/tracy-debugger/ that'll show you a whole lot more what is going on.
- 
	  Unable to edit links in CKeditor getting 403 errorpwired replied to jsantari's topic in General Support I reproduced what you did with processwire 2.7.2 and edited both an internal and external link but no 403 error. Everything works fine here. It must be something else in your case.
 
         
                 
					
						