Jump to content

bernhard

Members
  • Posts

    5,759
  • Joined

  • Last visited

  • Days Won

    273

Everything posted by bernhard

  1. 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?
  2. 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
  3. 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!
  4. 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
  5. 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?
  6. 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!
  7. thank you! i knew that has to be a little processwire trick that i didn't know yet
  8. 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.
  9. 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?
  10. 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?
  11. 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
  12. 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)
  13. 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?
  14. 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...
  15. 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?
  16. 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!
  17. aaaah, sorry... forgot to setup the domain alias for bio-fisch.zwergo.net
  18. hey blad, looks great from what i see in the screenshot! do you know nicos version? https://processwire.com/talk/topic/7666-getstarted-a-module-that-helps-first-time-users-to-understand-processwire-faster/ maybe you can also host one version of your module at lightning.pw for everyone to try?
  19. hello, I'm getting a 503 - service temporarily unavailable error with my latest multisite installation: on my domain zwergo.net i have the following structure site site-multisite1 site-multisite2 site-biofisch (copy of tmp/site) tmp |-- site |-- wire "site" works "multisite1+2" work "site-biofisch" throws a 503: http://bio-fisch.zwergo.net/ tmp is a fresh 2.5.0 installation my index.config.php is 'bio-fisch.at' => 'site-biofisch', 'bio-fisch.zwergo.net' => 'site-biofisch', ...just as i did with any other multisite! when i open the site from the tmp everything works fine: http://zwergo.net/tmp and so does http://zwergo.net/tmp/admin any ideas?
  20. then you would have URLs like domain.com/dontshow/sample that's why i don't like this approach. thank's for bringing up this post, just tried to exclude pages from nav using MarkusSimpleNavigation... something like 'selector' => 'template!=team' ...works like a charm you could also add a checkbox "hidenav" to your templates you want to be able to hide from navigation and then use a selector like this 'selector' => 'hidenav=0' its as simple as that - i'm amazed once more the complete code for my navigation, just for the record... <nav class="nav-main mega-menu"> <?php $treeMenu = $modules->get("MarkupSimpleNavigation"); // load the module $options = array( 'show_root' => true, 'outer_tpl' => '<ul class="nav nav-pills nav-main" id="mainMenu">||</ul>', 'selector' => 'hidenav=0' ); echo $treeMenu->render($options); ?> </nav>
  21. very nice as always! please correct me if i'm wrong, but i think it's not the best for SEO to have 2 domains showing exactly the same website (.com without /en = .de). maybe you could add a canonical link? any opinions of the experts here?
  22. hi siteaddict, welcome to processwire! i'm sorry that i can't give you an exact answer, but maybe this thread helps you: https://processwire.com/talk/topic/5941-state-and-cities/ good luck and have fun with processwire
  23. very nice site, i really like it! thanks for showing me yumpu - i was using issuu so far is it possible to get rid of the long and ugly filename? i also had one issue when resizing the viewport and using the mobile nav to "anwendungsgebiete"
  24. I'm also using dev with no troubles! you can get it here: https://github.com/ryancramerdesign/ProcessWire/tree/dev there's also a link on the download page, intentionally not very prominent
×
×
  • Create New...