-
Posts
6,626 -
Joined
-
Last visited
-
Days Won
358
Everything posted by bernhard
-
When i try to edit entries of a pagetable on my tablet i have the problem that it thinks i want to move the row instead of opening the modal. it does only work after zooming in (00:43): have you ever been struggling over this? should i report this on github? looking forward to hearing your opinions edit: i think the sort/move-feature should also be locked somehow on mobile devices because when scrolling down is has often made me move some entries accidentally
-
not urgent at all, as it works once updated manually - i just wanted to report it to further improve the module
-
HermodBB - Basic BB/Forum/Comments module
bernhard replied to GuruMeditation's topic in Module/Plugin Development
Looks really great I would love to see the possibility to subscribe to a topic and get notified by email when an answer is posted -
hi diogo, thanks for the great module! i just moved a site from dev to live server and got an open basedir restriction error. it looked for the template file unter /var/www/site/... instead of /var/www/vhosts/xyz.com/site/... i had to go to that page and assign the template again. maybe you can change this to use relative paths down the PW rootpath? thanks PS: no problems with the scripts and styles paths!
-
hi adrian, that is great!! i was also a little uncomfortable with the pagetable and external parent setup. are there any issues regarding pagination or will this also be solved when numChildren is hookable?
-
Import images from file system using the PW API
bernhard replied to seddass's topic in Getting Started
hi naldrocks98, on the api side image fields are always multi no matter what the settings say! $society->society_logo->removeAll(); // add this line $society->society_logo->add("http://www.thefilipi...ogo/accp.jpg"); $society->save(); explanation by ryan: https://processwire.com/talk/topic/2597-multiple-image-bug-when-using-api-resolved/?p=25452 -
ah, of course! thank you changed it to this: $form->insertAfter($button, $form->get($field)); edit: got an error on unpublished pages so i excluded the button there: $process = $event->object; $form = $event->return; $page = $process->getPage(); if($page->is(Page::statusUnpublished)) return; // added this line
-
hi LostKobrakai, thanks for that cool snippet of code! I will use it on my next project. unfortunately the button appears an all tabs of the admin (also on children, delete, settings...). how can we hide the button on the other tabs?
-
thank you soma, that's a quite recent post - don't know how i missed that! it's not exactly what i wanted but as i'm thinking a bit of it i think sorting by filename makes possibly more sense than sorting by upload time. images from cameras will always be named ascendingly and with your linked solution also the manual sort feature is preserved! thank you
-
hi soma, of course i've already searched the forum: https://processwire.com/talk/topic/5362-explicitly-set-image-sort-order/ https://processwire.com/talk/topic/5168-zipupload-images-and-sortorder-in-imagesfield/ especially this one: https://processwire.com/talk/topic/4587-sort-images-by-title-in-image-inputfield/ but i don't think that's a really good solution because you would totally lose the manual sorting feature from the backend if i am right?! wouldn't it be better if the images were stored in the same order they were uploaded? the problem is, that the images are different in filesize so on upload some images will be faster on the server than others and therefore "overtaking" them during ajax upload. i think the core image field should somehow store the initial order on the client side and map that on the server side. what do you all think? have you never had issues with changed sort order in your image fields?
-
this is a general question to core image field usability what i have always found a little bit annoying was that on uploading images via ajax the sort order is changed: any ideas how this could be fixed? it is not really nice if one uploads images from an event and the closing ceremony appears before the event's beginning... uploading files as zip would work, but that's no option if you want to upload files for an image gallery as the zip would likely grow over the maximum allowed filesize rapidly.
-
You can also do a var_dump($event); die(); in the module to see its content or use $event->return or $event->arguments if $event alone does not work
-
hi roman, welcome to the forum sorry i forgot to update the description after updating the module to version 2!
-
Please share how you got slick to slide your images permanently like shown in the example
-
i offered msummers to take a look at his files and i think i got everything working. thats what i did: did a clean 2.3 installation copied the old site-folder to the new installation (overwrote existing files) replaced the database looked up admin url (db table "pages" id = 2 showed "sample" so admin url was example.com/sample/ ) find out username of superuser and reset password $admin = $users->get(41); $admin->setOutputFormatting(false); $admin->pass = 'admin'; // put in your new password $admin->save(); echo $admin->name; die(); backup working 2.3.0 site (files+db) copied ProcessWireUpgrade to modules folder and installed it... error: Error: Cannot call constructor (line 85 of /var/www/html/site/modules/ProcessWireUpgrade/ProcessWireUpgrade.module) renamed wire -> wire2.3.0 index.php -> index2.3.0.php .htaccess -> .htaccess2.3.0 downloaded pw 2.6.1 and put into old site: wire index.php .htaccess installed processwireupgrade module installed site profile exporter and exported 2.6.1 site profile with data from old page old version had a custom admin - don't know how/where to activate this in 2.6.1 as it shows the standard admin again. have no more time to investigate further, sorry.
-
Very interesting Adam do you have any benchmarks compared to the standard template cache or to no cache?
- 6 replies
-
- cache
- built-in template cache
-
(and 3 more)
Tagged with:
-
database backup/restore seems to be 2.5+ so it could get a little tricky to get the old data into the new installation. i would go with kixes solution but start over with a blank profile i'm still confused what was the problem with only using all the files + db dump... good luck and also welcome to the forum
-
I would do a blank Installation of a pw 2.3 (you find the old versions on github) and change the site folder like explained above. A new installation is a matter of minutes. Trying to replace the profile is more pain I think. When you have your 2.3 site running I would install http://modules.processwire.com/modules/process-wire-upgrade/ (it says it is compatible with 2.3) and let it do the upgrade for you
-
i think he wants to get the version of the old installation which is not running (only html + sql, right?)... you can find the old version number here /wire/core/ProcessWire.php: 32 class ProcessWire extends Wire { 33 34 const versionMajor = 2; 35 const versionMinor = 6; 36 const versionRevision = 1; was also my guess but i don't know to be honest. i would try it with blank-profile. good luck! edit: in admin you see the version on the bottom left corner
-
today i had the problem that loadHTML added doctype, html and body elements to my modified string. see http://stackoverflow.com/questions/4879946/how-to-savehtml-of-domdocument-without-html-wrapper this worked for me: if(!$str) return; $dom = new DOMDocument(); $dom->loadHTML(mb_convert_encoding($str, 'HTML-ENTITIES', 'UTF-8'), LIBXML_HTML_NODEFDTD); $div = $dom->createElement('div'); $div->setAttribute('class', 'table-responsive'); foreach ($dom->getElementsByTagName('table') as $item) { // clone the wrapper div $div_clone = $div->cloneNode(); // replace the table with the div $item->parentNode->replaceChild($div_clone, $item); // put the table into the div $div_clone->appendChild($item); // set table class $cls = $item->getAttribute('class'); $item->setAttribute('class', 'table table-striped ' . $cls); } $str = $dom->saveHTML(); $str = str_replace("<html><body>", "", $str); $str = str_replace("</body></html>", "", $str); i'm wrapping all tables inside responsive divs and making them look nicer with the "table-striped" class
-
can't replicate it google maps api response is also ok: https://maps.googleapis.com/maps/api/geocode/json?address=S6%201ND
-
have you added google maps to your frontend <head>? <script type='text/javascript' src='https://maps.googleapis.com/maps/api/js?sensor=false'></script> if yes: maybe you can show us some code?
-
Thank you! 1) thanks, did read it and together with the blog post it was very helpful: https://processwire.com/blog/posts/new-module-configuration-options/ 2) thank you! 3) damn... i looked at this file but didn't see the info in the comments
-
thank you mike! where would i find this info on my own? i looked into several modules on github but didn't find it anywhere... i knew i've read it somewhere but couldn't remember... are there any docs? or in which file would i have had to look into to find all available options? or could i've done a var_dump() or something?
-
thank you mike! does anyone know how i can define the minimum processwire version? is it possible? i used the new config method from pw 2.5.5 https://processwire.com/blog/posts/new-module-configuration-options/ so i guess it's only compatible for PW2.5.5+ and i would like to add this information somewhere...