-
Posts
6,671 -
Joined
-
Last visited
-
Days Won
366
Everything posted by bernhard
-
hi thetuningspoon! thanks for this module! unfortunately it does not work properly on frontend: i included styles and scripts like this (using AIOM): $config->scripts->add("../modules/AdminModalception/AdminModalception.js"); $config->styles->add("../modules/AdminModalception/AdminModalception.css"); any idea what could be the problem? any easy fix? the files are definitely loaded, but the first modal gets 100% width and height as you can see in the screencast. thank you for your help!
-
thank you, looks great!
-
@tpr would you mind adding a screenshot how this looks like? never thought of using columns in admin but i guess it could be a good possibility and would love to get some inspiration
-
thank you @Francesco Bortolussi munin looks really powerful (and overkill for my situation), but that does not sound very trustworthy?!
-
@szabesz haha actually the idea is not mine but it was easier to find the snippet in my github repo as there are only very few modules in it and other user's github would have taken me hours to search through @horst thats easier and better of course @tpr ah i see, thanks for clarifying and thanks for adding it in the future
-
awesome update with ckeditor, thank you! would not have known about the theme without you and the justify installation via checkbox is also very welcome is it intentional that in default admin there is only one column whereas in reno there are two? aos 061, pw 3.0.30 btw: i had some display glitches after update. i switched to reno to check, switched back to default, then everything (besides the issue mentioned above) seemed normal. maybe you can add version numbers to the css tweaks to prevent cache-issues automatically? like here: https://github.com/BernhardBaumrock/TemplatePreviewImages/blob/master/TemplatePreviewImages.module#L54-L60 no necessity of course! enough info?
-
Module Profile Export module (also upgrade PW 2.0 to 2.1)
bernhard replied to ryan's topic in Modules/Plugins
-
so i _guess_ it does not really matter until that date. but i would choose the new one right from now...
-
hi tpr thats a great idea and has always annoyed me to need so much effort for only enabling justify buttons... thanks a lot, looking forward to it
-
Copying pages or content from one Processwire instance to another
bernhard replied to FrancisChung's topic in General Support
PS: see how i did it this with my body field // get body html and remove root node $p->body = substr($page->body->asXML(), 6, -7); PPS: i had problems with the umlaut complaining about UTF8 but i had this problem on another spot and think that might be a problem with my setup and not related to this topic or tracy... -
Copying pages or content from one Processwire instance to another
bernhard replied to FrancisChung's topic in General Support
i would recommend using @adrian s awesome tracy console: $items = simplexml_load_file('https://www.your-old-website.com/?export=blogitems'); foreach($items as $page) d($page->yourxmlnode->whatsoever); on the other site you can easily see what's happening like this: $p = $pages->get(2427); // your-test-page-id $p->of(false); $p->eventcancelled = 'your_console_output_from_other_site'; d($p->eventcancelled); as this field is a checkbox it would modify the '<p>test</p>' to 1 and you would know on which side the problem exists: but still i have to add that i have no experience with more complex import/export scenarios. for example multilanguage. maybe that's already possible with the other solutions -
thanks, it's fixed
-
sorry i'm very busy atm and thought that's enough info for you that's how it should look like: all the tabs are on top. in my other screenshot the grey bar on top is fixed and overlaps all other content. the tabs have some margin to the modal top. regarding the ajax issue: it's somewhere on my todolist if i find more time, sorry
-
i'm using modals for page edits a lot and have this issue. i had to switch AOS off completely. don't know when this error occured the first time (pw 3 and latest aos)
-
cool, thank you that's one of the uncountable things i read in the blog and did not remember as it was not interesting enough to me at that time... @console i really love it. i use it not only for learning (try&error, checking things) processwire but also PHP in general (the usual stuff i can't remember by heart like strftime, substr and all that..)
-
Copying pages or content from one Processwire instance to another
bernhard replied to FrancisChung's topic in General Support
i think what COULD make sense is some kind of helper module that makes it easy to handle some more advanced features (sometimes necessities) like deviding the import in chunks or providing some helper functions like handling pagename collisions, importing images and so on. but i don't know if there are better solutions already providing such things like using lister pro or batch child editor, import csv and so on. for me it was just the quickest solution to code it on my own. i had only 168 pages in the blog and 165 persons to import and that went without even increasing execution time -
Copying pages or content from one Processwire instance to another
bernhard replied to FrancisChung's topic in General Support
a module would be cool. but i think it will be difficult to handle all situations... the freedom of processwire will make it difficult to find some common standard in all installations / setups... i guess it will almost always be faster to use some simple unique script like mine above but i'm happy if you prove me wrong good luck with your import! -
Copying pages or content from one Processwire instance to another
bernhard replied to FrancisChung's topic in General Support
i had this problem some days ago and wrote a simple script on both websites. both online on different domains: export on old website: <?php $export = false; if($export AND $input->get->export == 'blogitems') { echo "<?xml version='1.0' ?>"; echo '<pages>'; $parent = $pages->get('/blog'); $results = $parent->children(); //$results = $pages->find('id=3198'); // ohne pic //$results = $pages->find('id=3204'); // mit pic foreach($results as $p): $p->of(false); ?> <page> <title><?= $p->title ?></title> <date><?= $p->blog_date ?: $p->created ?></date> <featured>1</featured> <pic><?= $p->main_slider_coverpic->first()->httpUrl ?: '' ?></pic> <body><?= $p->body ?></body> <images><?php foreach($p->images as $image) { echo '<image>' . $image->httpUrl . '</image>'; } ?></images> <files><?php foreach($p->files as $file) { echo '<file>' . $file->httpUrl . '</file>'; } ?></files> <gallery><?php foreach($p->gallery as $image) { echo '<image>' . $image->httpUrl . '</image>'; } ?></gallery> </page> <?php endforeach; echo '</pages>'; die(); } and then the import: <?php $import = false; if($import AND $input->get->import == 'blogitems') { $items = simplexml_load_file('https://www.your-old-website.com/?export=blogitems'); foreach($items as $page) { $p = new Page(); $p->template = 'blogitem'; $p->parent = '/news'; $p->title = $page->title; $p->name = $sanitizer->pageNameUTF8($page->title, true); while($pages->find('parent='.$p->parent.',name='.$p->name)->count() > 0) $p->name .= '-1'; $p->date = $page->date; $p->featured = $page->featured; // get body html and remove root node // $p->body = substr($page->body->asXML(), 6, -7); // ###### update: it's better to use base64_encode($page->body) in your export and then base64_decode($page->body) in your import ##### $p->save(); // add images if(strlen($page->pic)) $p->pic->add((string)$page->pic); foreach($page->images->image as $image) $p->images->add((string)$image); foreach($page->files->file as $file) $p->files->add((string)$file); foreach($page->gallery->image as $image) $p->gallery->add((string)$image); $p->save(); echo 'new page <a href="' . $p->editUrl . '" target="_blank">' . $p->path . '</a><br>'; } die(); } of course that is not bulletproof but it's really simple and you can do whatever you want (export junks by adding start=0, limit=10 or the like to your selector) you can also try adrians batch child editor. or csv importer. but for me the example above worked like a charm ps: try it with limit=1 for testing -
thank you very much flydev, but they have a demo have you had any issues or drawbacks so far? what linux distro are you using it with?
-
https://vestacp.com/ any experience with that? looks really nice! i think i'll give it a try this week but wanted to hear if anybody has some experiences/hints for me? the plan is to use it with a digitalocean droplet. i am not totally satisfied with other solutions like cloudways and serverpilot...
-
-
very nice!
-
just tried it on another site, so i consider this as a bug. can anybody confirm, please, then i will create an issue on github...
-
hm... i guess yes, as it works correctly when i save a standard page with pagename äöü... edit, yes .../site# file -bi config.php text/x-php; charset=utf-8
-
yesterday i imported some blog-posts from an old pw version to a new one. worked like a charm, but today i saw that the url does not show german umlauts. the pagename is created from the title automatically after sanitization, so i tried this: and after researching i found out about the new function: https://processwire.com/api/ref/sanitizer/page-nameut-f8/ As you see, the result is not right! my config says this: $config->pageNameCharset = 'UTF8'; $config->pageNameWhitelist = '-_.abcdefghijklmnopqrstuvwxyz0123456789æåäßöüđжхцчшщюяàáâèéëêěìíïîõòóôøùúûůñçčćďĺľńňŕřšťýžабвгдеёзийклмнопрстуфыэęąśłżź'; and trying lowercase letter it got even worse! am i missing anything? pw 3.0.30