Jump to content

bernhard

Members
  • Posts

    6,153
  • Joined

  • Last visited

  • Days Won

    302

Everything posted by bernhard

  1. +1 ImageFocusArea if you drag the area outside of the modal window it will close the modal. maybe you can handle this? besides that, cool module/idea. looks promising!
  2. https://processwire.com/talk/topic/1920-processwire-logos-download/?p=26899
  3. hey nico, i would be very interested in a showcase how you did that
  4. you mean you want to apply the "active" class only to the first item? maybe something like this <?php $active = ' active'; // set active for first item foreach($page->images as $img) { ?> <div class="item<?= $active ?>"> <img src="<?php echo $img->url; ?>" /> <div class="container"> <div class="carousel-text"> <h2><?php echo $img->description; ?></h2> </div><!-- /carousel-text --> </div><!-- /container --> </div><!-- /item --> <?php $active = ''; // remove class "active" for following items } ?> i like to use short tags <?= $var ?> instead of <?php echo $var; ?> maybe you have to change this depending on your server
  5. hi salles, welcome to the forum there's also a blog module - i have no experience with it, but maybe it fits more to your needs
  6. ok your question was some days ago but anyway: this post from ryan should give you an answere! as far as i understand, the main benefit is that you can define things wherever you want and then do the output at the right position. if you had a slider in a sidebar for example and needed a special stylesheet for that slider it would be too late to include that with a html-first approach. outputting everything afterwards lets you add $stylesheets[] = 'slider_style.css'; wherever you want and then put it out in your <head> right in place like this: <head> ... foreach $stylesheets echo <link ... stylesheet_name.css> </head> <body> <div id="main"></div> <div id="slider"></div> </body>
  7. Thanks,of course i know that but i want to do that 100% automatically
  8. Yes that's what i thought and why i dont want it left unchanged. Why not by site profile? Because i dont know how to do that programmatically
  9. what if i wanted to copy a complete site to eg site-copy for a multisite setup... would i have to change the value for userAuthSalt or is it ok to have the same value in multiple site instances?
  10. do you know this thread? https://processwire.com/talk/topic/740-a-different-way-of-using-templates-delegate-approach/ a lot to read i really like the structure with _func.php, _init.php and _main.php - very clear, very flexible. i'm doing it like this most of the time: https://processwire.com/talk/topic/740-a-different-way-of-using-templates-delegate-approach/?p=75853
  11. i just tried out your module, thanks for creating this! i had the warning that the site and root folder where writeable and should not be, so i set them to 0550. 1) is 0550 correct for these folders? 2) why does PW by default create its site folder with 0755? is your diagnostics warning just an additional security or should one everybody set site+root not writeable? thanks!
  12. hello, i came up a strange behaviour when playing around. i have this code: // create folder for new pw site mkdir('0777', 0777); mkdir('chmodDir', $config->chmodDir); and this is what i get: why is the 0777 folder not having 0777 permissions? and what strange permissions do i get when using $config->chmodDir ? echo $config->chmodDir shows 0755 thank you for your help
  13. i have a multisite setup (option #1) and wanted to get some config values (dbname + dbpass) of other instances. i tried this: $config_tmp = $config; // store current config to config_tmp echo $config_tmp->dbName . '<br>'; // says current_db_name include("../../site-xy/config.php"); echo $config->dbName . '<br>'; // says remote_db_name $config = $config_tmp; echo $config->dbName . '<br>'; // says remote_db_name -----------> why? why is the $config at the end still having the value of the included config?
  14. hi isag, welcome to the forum! your templates include what you tell them they should include... an easy example: template1.php includes style1.css <!DOCTYPE html> <html> <head> <link rel="stylesheet" type="text/css" media="screen" href="<?= $config->urls->templates ?>css/style1.css" /> </head> <body> <?= $page->body ?> </body> </html> template2.php includes style2.css <!DOCTYPE html> <html> <head> <link rel="stylesheet" type="text/css" media="screen" href="<?= $config->urls->templates ?>css/style2.css" /> </head> <body> <?= $page->body ?> </body> </html> ----------------------- or you can use a _main.php file and populate just the variable blocks/styles/values in your template: _main.php <!DOCTYPE html> <html> <head> <link rel="stylesheet" type="text/css" media="screen" href="<?= $stylesheet ?>" /> </head> <body> <?= $content ?> </body> </html> tempate1.php $stylesheet = $config->urls->templates . "css/style1.css"; $content = $page->body; include("_main.php"); template2.php $stylesheet = $config->urls->templates . "css/style2.css"; $content = $page->body; include("_main.php"); hope that helps remark: no correct code - just to clarify the principle!
  15. thank you! i knew that has to be a little processwire trick that i didn't know yet
  16. looks great! it seems you transformed into a module factory why are all the files deleted at 00:20 when you click on the first trash icon? thanks for the video (again) - saves everybody of us the time for installing.
  17. hi today i came up with a small problem with my multisite setup on my plesk vserver: if i ceate a "subscription" for a domain like example.com i can choose the favourite url (www.example.com or example.com) redirected by a 301. on multisite domains that does not work because they are "domain aliases" where i can't set up the favourite url. so i tried something like this: https://processwire.com/talk/topic/7705-website-for-german-investment-company/?p=74908 and realised that $config->httpHost returns example.com wheter you are requesting it with or without www whereas $_SERVER['httpHost'] returns the "full" url with or without the www. is there any reason for that? i solved it by uncommenting the 2 lines in the .htaccess RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] what leads me to my second question: i'm afraid when i upgrade pw some day i could forget to uncomment those 2 lines. is there any best practise or the like for this problem? how do you do that? do you add comments to all the changed lines?
  18. hi backes, very nice work! i would change the button colors as they are hard to read when not hovering why not let it be like this also unhovered?
  19. hi horst, thank you for the quick reply! i changed it to 2.0 and it worked! so to clarify... if i had a vserver with multiple sites it could be that the same image works once and doesn't work another time, depending on server load (curMem)? and regarding the error message: i'm quite new to github, where would i post request to return a more meaningful error message? especially for clients... thank you for your help
  20. hi horst, thank you for your detailed answer. hm, i forgot to mention that on an older installation (2.4.x) on the same server with exactly the same php settings it works wonderfully! first i thought it could have something to do with my multisite setup at the non functional 2.5 site, but a single-site setup showed the same result (also on lightning.pw) so the actual question is: why does it work on my some week old installation? (of course i used the same image) yes, that's clear to me - but tell that my clients... ps: memory_limit is set to 128M in all of the mentioned environments (one vserver)
  21. hi everyone, i just noticed the "max image dimensions" function of processwire image field (i thought it would reject images bigger than that size and not resize it to that maximum ) and tried it on several installations but unfortunately i get the following error on most of the new 2.5 ones: first i thought it was a server issue, but i tried it with a fresh installation on lightning.pw and there's the same error! i set 1920x1080 for the max dimensions. if i don't set a maximum i get this error on large images: did i miss anything? can anyone replicate that issue?
  22. maybe the 1-step-adding-of-pages helps? https://processwire.com/talk/topic/3768-processwire-dev-branch/page-9#entry58107 got the link from this thread: https://processwire.com/talk/topic/2106-creating-a-page-without-a-title/ didn't read this one, but could also be relating? https://processwire.com/talk/topic/1648-ok-to-change-page-name-path-after-save/ [edit] ok i think it's not exactly what you are looking for but maybe you can adjust the workflow with a simple hook (never done one yet but everyone says that's simple ) [edit2] here is the "more" link from ryans screenshot: http://processwire.com/api/modules/process-template/ you can also write "OP" in the "name format for new children" field and PW will automatically increment it to a unique url like OP-8, OP-9... don't know if that's ok for you or you have to define your project id manually...
  23. hey blad and nico, personally i like blad's implementation more than nicos - i think it's easier to follow because it's kind of a step by step guide. so i think it would be a pity to stop your work on this. maybe you can put best of both your versions together?
  24. thanks for the video - that's the most comfortable way to get a good impression i like your module a lot and think it would be a great addition to the basic profiles!
×
×
  • Create New...