Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/01/2018 in all areas

  1. Thanks @adrian, issue should be fixed right now.
    4 points
  2. Hi everyone We've just upgraded the forum software to the latest version. There were a few tweaks that needed to be re-applied to the templates but I think I've got them all. If you do notice anything out of the ordinary, please let me know here. EDIT: The forums may run slower than usual for the next couple of hours as part of the process re-indexes all of the post content.
    3 points
  3. It all depends on your workflow. Also, Duplicator is not just about cloning a site but for creating backups. Normally I use it for daily backups and/or for quick backups before "performing sensitive changes", just to be on the safe side...
    3 points
  4. I have just released an updated version without autoload. I also added a few helpfull closures to the readme, as well as hook-able methods: https://github.com/noelboss/PageQueryBoss#helpfull-closures--tipps
    2 points
  5. OK, thanks for testing this. I will give it a look and upload a new file. :)
    1 point
  6. Hi @joshuag I am working on the same project with Adrian using your Recurme module. I've used the updated files you provided. rrule-gui.js and MarkupRecurme.module. Using the $event->timeEndUnix; that you have added is working for New and Imported events. However, both New and Imported events have an issue when changing the Date (non repeating events) and displaying the $event->timeEndUnix. On first save, the $event->timeEndUnix continues to display the old end date. But if I go into the event a second time, and save once again (with no changes), the $event->timeEndUnix is updated correctly.
    1 point
  7. @Macrura - ordinarily I would do that, but this is a little freebie site for a group of very non-tech savvy people (a favour for my mother). I feel it would be much easier for them to drag-n-drop their photo gallery pics into a single field, then edit the photo info and press save once. Even a repeater would be a bit too much. I will monitor the siutation though and if I think they can deal with it, will switch to a one-page (or repeater item) per photo (thanks to the API, converting will be no problem!). @dragan - I wonder if you see a label because you are using multi-language? It is definitely not visible in my single language version, althpough it is present, just hidden with CSS ('pw-hidden' class). In fact, if somebody is happy with the default label "Description", then it would be possible to override it in a custom admin CSS file, but I want to change the text itself. However -- ta daaa! -- after digging around Captain Hook, I have found a simple solution using a hook in ready.php This is very specific to my needs -- but it could be made more generic. $pages->addHookAfter('InputfieldImage::renderItem', function (HookEvent $event){ $obj = $event->object; if ($obj->name != 'quilt_images') return; // stop if the field isn't the specific one we want $rtn = $event->return; // get the return value // The string we are looking for (regex because the unique ID part in the label's 'for' attribute) $regex = "/<label for='description_quilt_images_([^']+)' class='detail pw-hidden'>Description<\/label>/i"; // What we want to replace it with (remove the 'pw-hidden' class and change label text) $replacement = "<label for='description_quilt_images_$1' class='detail'>Give a brief description/title for the quilt.</label>"; // Do the replacement $newRtn = preg_replace($regex, $replacement, $rtn); $event->return = $newRtn; // replace return value with new string }); And the result:
    1 point
  8. Thanks @Pete, Stuff on the left side seem a bit squished?
    1 point
  9. @szabesz Probably you remember my "special" setup. I had some problems before 1.1.6 in the area of mod_userdir and this: Maybe the current problem is related?
    1 point
  10. I have completely uninstalled and deleted it, even checked in the db for the module entry, then downloaded and installed the latest version (1.2.9) and no, it does not work as before. The wire folder is not included etc. The package is only 2.11 MB instead of more than 20 MB before. Thank you.
    1 point
  11. Happy Friday! Just a short update this week. This latest version of the core on the dev branch contains a whole lot of commits, mostly related to GitHub issue resolutions. See April 23–27 in the dev branch commit log. Thanks for all the continued testing, reports and discussion. I don't have anything new to report other than that, but am working to have another master version here shortly. Thanks and have a great weekend!
    1 point
  12. That makes me thinking about writing your own scripts that drive cPanel SSH Commands. Maybe with AutoHotKey for windows. That would be a cool way to automate and task schedule backups, down and uploads.
    1 point
  13. Also, I forgot to mention the upgrade seems to have disabled everyone's avatar if you were using Gravatar. To re-enable Gravatar avatars, click on your name at the top-right of the screen, click Profile, then click on this little icon as shown the screenshot below to re-enable it.
    1 point
  14. I always insist on having SSH no matter what because BASH is also in my toolset. I either clone a complete site with my own script or just the database. I make admin changes in production (if I'm not sure about the results in advance, then I perform tests in dev first) and after that I use my cloning script to replace the dev database from prod which takes only a few (4-7) seconds to do if one does not have to deal with a huge dbs (which I currently don't). https://processwire.com/talk/topic/14837-best-practise-to-implement-changes-in-pw-from-development-to-production/?do=findComment&comment=133726 https://processwire.com/talk/topic/14837-best-practise-to-implement-changes-in-pw-from-development-to-production/?do=findComment&comment=133741
    1 point
  15. Maybe I still haven't enough websites on my shoulders to see the use of it, so I should install and evaluate it. What about scripting your cpanel over the web ? Does anyone know if there exists a scripting language for automating cpanel tasks ? I don't mean cronjobs but something like cUrl.
    1 point
  16. I am running version 1.2.9 without issues on two sites. You might want to double check and re-save your settings. There might have been changes regarding the way the module stores what to include and what not to.
    1 point
  17. Hello, First of all, thanks a lot for your great answer. You took the the time to post nice explanations and this will help me a lot to improve. No problem of course. This is exactly what I expected : general comments about some newbie mistakes you can quickly notice in my code. Well, maybe this sounds obvious to a a lot of readers, but I guess I needed to be reminded of that advice I do that sometimes because I feel better this way. I'll re-read my code and try to think differentely in the future by applying what you explain afterwards. Thanks for your nice example. It is very much inspiring to me. I feel like understanding things better thanks to your reply so again, thanks a lot @Robin S for your help ! It's not always easy to learn coding by yourself and every time I end up asking the PW community for help, I get a nice answer that cheers me up and makes me understand things better. That's really cool !
    1 point
  18. I see the issue now. It's not related to PageTable fields as such, and it affects both the "Restore the previous value" and "Unpublish the page" options. I'll add a comment in the GitHub issue.
    1 point
  19. Latest version of all modules have the fixed version compare, and the inputfield now also has the Ajax version included, but that one is still beta; it is largely a copy of the core inputfield, so shouldn't exhibit any errors, but may need work to make full use of the possibilities.
    1 point
  20. try this... this is better.... $str=""; foreach($pages->find("parent=/Availability/, include=all,Studio=$page->id") as $e){ $str.= "{$e['Studio']},{$e['Date']},"; foreach($e['ta'] as $selected){ $str.= "{$selected->title}|"; } $str.= "\n"; } echo $str;
    1 point
  21. Doing something similar right now and using this excellent module: http://modules.processwire.com/modules/fieldtype-fields/
    1 point
  22. That's why you should use switch() instead Do you only have text and textarea fields? How would you deal with radio buttons and checkboxes? This would be no easy task, because the editors would want to define those labels and values. Also, one author would want to make one field mandatory, while another won't. These are things you couldn't accomplish with the page selector route. Furthermore, thinking about layout - I'd expect that you could somehow define width of each field ( with percentages or a grid-like system). What's the reason you don't want to enable your client to use FormBuilder?
    1 point
  23. I'm not sure I understand this part. Can you elaborate? Do you fear that over time you'd end up with too many forms, and everything becomes chaotic? (endless variations)
    1 point
  24. Use the fields import / export functionality and respective the same for templates. Go to admin fields and click export, then select all the fields you need. Go to admin templates and click export, then select the template(s) you need. Edit: Additionally you may use the API: https://processwire.com/api/ref/templates/get-export-data/ https://processwire.com/api/ref/templates/set-import-data/
    1 point
  25. Hey guys, FYI I got this fixed finally. Main issue was that I have PW installed in a subfolder and so my .htaccess was not being seen by the web server. I moved the file up a folder, and now I am good. Thank you all for you help!
    1 point
  26. I found by accident, trying to find out why my Chrome does this, that the Chrome "use Hardware acceleration if possible" enabled in settings is the Problem. It seems to have problems then rendering the CSS filter used there.
    1 point
  27. 1 point
  28. This may help others. You're going to get labels for this field's output that you probably won't need (no fault of this module). This CSS .InputfieldMarkupCKEditor .InputfieldHeader { display: none; } will hide them visually, while this JavaScript function (function () { var labels = document.querySelectorAll('.InputfieldMarkupCKEditor .InputfieldHeader'); for (var i=0; i < labels.length; i++) { labels[i].setAttribute('aria-hidden', 'true'); } })(); will hide them from screen readers.
    1 point
  29. @celfred, I don't think I'll be able to get my head around all the facets of your PW-based game, so will just answer in general terms. First thing is that, broadly speaking, there's no reason to avoid using plain PHP arrays, functions, etc in your development if that is easier or clearer for whatever you're wanting to achieve. Behind the scenes PW will be using these native PHP types and functions anyway. So it comes down to choosing whatever you find easiest or most transparent. So by all means use WireArrays/PageArrays where you find that easiest - in most circumstances that will be the way to go. But in your code I saw some places where you are creating new Page objects that are not actually going to be saved in the page tree anywhere. As if you are just creating these pages as a way to temporarily store some data. That doesn't make much sense to me and leads me to think there is probably some better way to do it. And it also pays to think about creating some structure to your data so that if you need to debug it or come back to the code in six months time you can dump things and understand what is going on from the dump. So that's why I suggested using a PHP array where the key names and array structure reveal the purpose of what you're doing. But if you need to take the 'players' element and do other things with it in the PW API then you're right that it would be easier if it were a PageArray rather than a plain PHP array of Page objects. So you could make that element a PageArray and then add pages to it... //... foreach($allPlayers as $player) { // Define the $groupId // Use an underscore (or other non-integer) in the $groupId to force it to be a string, not an integer // That way when array_multisort() is used later the keys will be preserved $groupId = $player->team->id . '_' . $player->group->id; // Optional: add $groupId to $player as a custom property in case you need it later $player->groupId = $groupId; // Add player to a PageArray in $uniqueGroups using $groupId as key if(!isset($uniqueGroups[$groupId]['players'])) $uniqueGroups[$groupId]['players'] = new PageArray(); $uniqueGroups[$groupId]['players']->add($player); } //... Then when you later need to work with the 'players' element it is a PageArray that you can use methods like sort() on. And while looking into the issue I discovered something new: although you cannot create a nested PageArray, you can create a WireArray of PageArrays. So you could think about taking this approach if you are more comfortable sticking with PW API methods rather than doing sorting etc in plain PHP. An example of what I mean about a WireArray of PageArrays... // Create a new WireArray to hold the PageArrays $my_wirearray = new WireArray(); // PageArray number 1 $pa1 = $pages->find("template=foo"); // PageArray number 2 $pa2 = $pages->find("template=bar"); // PageArray number 3 $pa3 = $pages->find("template=baz"); // Attach some custom data to the PageArrays $pa1->data('karma', 25); $pa2->data('karma', 13); $pa3->data('karma', 37); // Add the PageArrays to the WireArray $my_wirearray->add($pa1); $my_wirearray->add($pa2); $my_wirearray->add($pa3); // If you need to sort the WireArray by the custom data $my_wirearray->sort('-karma'); // Or maybe you want to explode on that custom data $karma_values = $my_wirearray->explode('karma', ['getMethod' => 'data']);
    1 point
  30. Thanks, I appreciate that. While I can understand being displeased that we are no longer powered by Processwire, I don't think it's reasonable to request that I update this community every time I make a change. It is my job to try out various systems repeatedly and our site has been powered by more than one CMS (pw and wp aside). Do take this nicely but the entire reason for CMS Critic is that we are not accountable to any one CMS and that is how we maintain our integrity. It's been amazing using PW for the period for which we have but we WILL switch it up and we ARE open to change. To name a few, I've run the site on WP, PW, Serendipity and Agility CMS. Also, realize that we have been sure to promote PW heavily and continue to think it's an excellent CMS, regardless of whether we run it on our site. I think realistically, we have and continue to give back in spades. Feel free to ask questions if you wish, I'm always willing to answer.
    1 point
  31. @maxf5, I have just removed certain remark from your earlier post as a moderation action. Also my apologies to @cmscritic – you definitely shouldn't have to see that kind of language here. A friendly reminder from the moderating team: please keep the tone of discussion polite. Crude or discriminative remarks and insults of any kind will absolutely not be tolerated on this forum. As a community we're committed to keeping this forum a safe and welcoming place for everyone. Think before you post.
    1 point
  32. If you just want a notification that a page is currently being edited by another user (like the default behaviour of Page Edit Soft Lock) then the optional core System Notifications module also has that feature. But if you want a "hard lock" option then I think Page Edit Soft Lock is the only option currently.
    1 point
×
×
  • Create New...