Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/25/2016 in all areas

  1. I needed to create some Fields and Templates via API and it was always a pain to get the right settings (like columwith, field context settings and so on). With the brand new (and ALPHA) RockSVN Module you can create your fields via the backend and then show a diff of your changes. Please see the comments on top of the module for todos and limitations. I'm not totally happy with the diff tool, so if anybody knows a better one or knows ho to change the behaviour to line-based diff (that would be better in this case i guess) feel free to comment. As @ryan is using the same diff tool in ProDrafts i guess there's not too much hope... anyway - i think the module can be a big timesaver and also help you to keep track of changes - an often requested feature and maybe also a good companion for @LostKobrakai s Migrations module! (Benjamin, jump in ) The module will create some Fields, Templates and Pages for you. All properly tagged and hidden, so it should not mess up things more than needed. Caution: Currently the module removes all those pages, templates and fields on uninstall! Requires my new basemodule called RockTools RockSVN.zip
    8 points
  2. I just found a small article on LinkedIn Pulse (via Google) posted a few months ago by Goran Djuric: ProcessWire CMS. It seems to be written by a consultant, which I like since most articles seem to be written for developers.
    4 points
  3. @pwired and all forum members I decided to put together my own bash script because I did not find what I was after. I am not a bash pro nor a linux/unix guru, so there might be better solutions using standard system tools, but I like the result so I thought I share it with you. You might also find it useful. Here is a short demo: https://youtu.be/V6eF4NBNDbc Please read the instructions (located in the script itself) if you happen try it out! Any constructive criticism is welcome. pwdiff.sh 0.0.8, (2016-10-25), initial public release:
    4 points
  4. Cool! That immediately comes to mind is some wild wishes: add a generation script @LostKobrakai's Migrations and we got a nice GUI-based migrations for PW; add comparison to remote installation. Big thanks!
    3 points
  5. So, this is kind of a heads-up: I've just pushed version 1.3.2 of ProcessChangelog to GitHub, and this version includes a bunch of UI changes. Hopefully they make as much sense to you folks as they do for me. To be honest the old look of the module was a bit too ProcessWire 2.0'ish, and I've also been meaning to add clickable action/template links etc. for a while now.
    3 points
  6. Thanks to you it works now this time I explicitly set tables to backup for both while disabling caching like so $backup = new WireDatabaseBackup($backupPath); $backup->setWire($wire); $backup->setDatabase($database); $backup->setDatabaseConfig($config); $backupFile = $backup->backup(['description' => 'saludos your Cron', 'tables' => $backup->getAllTables(false, false)]); if ($backupFile) { wireZipFile("$backupFile.zip", $backupFile); exec("ln -sf $backupFile.zip {$backupPath}newest.sql"); $log->message("linked $backupFile"); unlink($backupFile); } $backupMeta = new WireDatabaseBackup($backupPath); $backupMeta->setWire($meta); $backupMeta->setDatabase($meta->database); $backupMeta->setDatabaseConfig($meta->config); $backupMetaFile = $backupMeta->backup(['description' => 'saludos your Cron', 'tables' => $backupMeta->getAllTables(false, false)]); if ($backupMetaFile) { wireZipFile("$backupMetaFile.zip", $backupMetaFile); exec("ln -sf $backupMetaFile.zip {$backupPath}newestMeta.sql"); $log->message("linked $backupMetaFile"); unlink($backupMetaFile); } I saw this caching but didn't really noticed it's turned on by default and might be responsible..
    2 points
  7. I would say depends on your skills and preference. You could code all the logic right into your template files that's how I started, and still start some things until I figure the task get's more complicated and needs to be in a function or own class/module stuffing all in template files feels faster in the beginning but can be a little harder to maintain depending on the complexity Another thought, if you plan to trigger certain tasks from one point or can easily direct to one location (like setting all form action to one page) just put everything in templates otherwise, or if there is enough evidence that you might add calls from other places, then maybe better split tasks in classes I wouldn't put to many things in one module, for me it always got messy, so if you choose the modular way put mailchimp and freshbooks each in one module and maybe the user stuff in a separate and maybe split even user tasks in different modules if it makes sense you could even create a new page type e.g. "member" https://processwire.com/docs/tutorials/using-custom-page-types-in-processwire/ I don't think there are existing modules, that's because the tasks are fairly basic (create user, add role, remove user etc) and mailchimp/freshbooks depend on their own api's.. If you got more questions on this let us know
    2 points
  8. Just uploaded v089 with a few improvements to the filter boxes. Now it supports ajax tables and "input" texts are also considered on filtering. As a result you can search for page title in Batch Child Editor module for example, which wasn't possible earlier: Table columns don't jump on filtering anymore. Furthermore the "body" was set to "overflow: scroll" so it doesn't jump when its height changes (which often happens filtering a long table).
    2 points
  9. v088 is up with the AdminDataTables filter box which enables quick filtering of most lists in the admin. The filter box is autofocused by default and hitting Enter will trigger a click event on the first matching item so it can really speed up navigation in the admin. I've also set 'AdminOnSteroids' to the module config page title to make it identifiable from the browser tab (instead of reading "Modules"). Is there a simpler way than this? if ($this->wire('input')->get('name') == 'AdminOnSteroids') { $this->wire('page')->title = 'AdminOnSteroids'; } Update: here is how to set browser tittle title using a hook:
    2 points
  10. Hi, perhaps Latte is not the best choice for beginners in PW but I guess you have some programming background judging from your questions 1. You can use ready.php for example for such purposes (or init.php, _init.php, perhaps _main.php). Or you can add two blocks to the layout, one for the site header and one for the logged in user. You can leave the block you don't need empty and it won't be rendered. I sometimes use PHP logic in my view files but it's rather because my lazyness 2. Well you do your logic in {template}.php and set variables to output in {template}.latte. You can use another .latte file in {template}.php, so eg. you can include login.latte or register.latte if you need that. You can even render a chunk in the php (controller) file to a variable and use in the final view file. 3. Could you provide more details? I've done all my PW multilanguage sites with Latte and haven't encountered such an error. I think Latte is just as good as Twig or others, maybe a bit more forgivable in some cases. So I think the question for you is perhaps to use a template engine or not.
    1 point
  11. 1 point
  12. It could be server issues, so looking at the logs is indeed logical. Also I've encountered 500 issues when the encoding isn't properly set. First thing I read: we need more info to help, therefore my question
    1 point
  13. Hi Zahari, The JS I posted above is in a custom field type , so it's included in the admin if that field is present in the template. You don't need to have a custom field type to do use this though. I would do this. Create a new date field that you want to only show the time picker. Let's say you call it "timepicker". Use Martijn's Admin Custom Files to add that JS to the admin. Make sure your JS targets the correct class for your field name — probably something like: $(document).on("focus", ".Inputfield_timepicker .datepicker", function() { $(this).timepicker({ timeFormat: 'h:mm tt', ampm: true }); });
    1 point
  14. Your true is probably being converted to an integer 1. The second parameter of json_encode is $options and it expects an integer representing a Bitmask of JSON constants.
    1 point
  15. made a note in issue tracker https://github.com/processwire/processwire-issues/issues/59
    1 point
  16. 1 point
  17. v1.4.0 is at https://github.com/matjazpotocnik/ProcessFileEdit Changes: - removed ProcessWIre namespace, module should work from PW 2.5.5 and up - edit file in modal window
    1 point
  18. You should file a bug. WireDatabaseBackup::getAllTables() caches the list of tables in a static variable $tables across instances when it is called without parameters like WireDatabaseBackup::backupPDO() does. Since getAllTables() is only called once in the file (and not called by any other core file), I'm not sure if the caching option is necessary at all.
    1 point
  19. Can it help in this case? 500 is an internal server error (provided it is what we are talking about) if I'm not mistaken , so it is probably a server setup issue I suppose, in which case I would start troubleshooting by looking at the Apache log file. However, I have never used this script so I might be easily mistaken.
    1 point
  20. Should you have any questions, do not hesitate to ask
    1 point
  21. Hi @apeisa, today i send you a mail with the same problem - can i also have access to the support forum? Thanks! Okay - i see i have access... i will try the new version
    1 point
  22. Hi. Szabez, thanks for putting this script together and the youtube. Lets see how to get this to work on windows but the code already is great for me to learn from.
    1 point
  23. Hoping so I've found a few incorrect placements of the filter box so I quickly fixed them. Now it's placed correctly here in diferent circumstances (inside tabs, single filter for multiple tables, etc). Here you can see it in action in many page types, including the Lister, which is special because there are two filters on a single page. Currently this exception is handled individually in the code because I don't think there will be more cases like this.
    1 point
  24. @adrian's gonna love it
    1 point
  25. i don't think it's too verbose as you should always be aware of the context where the change happened. maybe some collapse feature would be nice, though. but looking at the markup i have no idea how to implement that shortly. the problem is that it sometimes creates not so good readable results. i'll paste one when i have a good example. maybe thats already fixed by using the module's initialization feature that i added later.
    1 point
  26. Not really, I'm afraid, but I have just found this one: https://github.com/gorhill/PHP-FineDiff It has an online test site: http://www.raymondhill.net/finediff/viewdiff-ex.php It generated this nice, one liner for a one line change, eg: c270d30i34: "label": "Location Eng", c583 The output of the diff tool you use is "too" verbose, is it what you do not like about it? It is probably enough to see what is different, and not the complete json string.
    1 point
  27. Hi. First of all, thanks for this great module! I do have one question: Is there a reason why this module is not "singular"? To be clearer: adding ""singular": true" to the jsonfile. I am having the automatic send option enabled, and use some custom api code to add new users in frontend-scope and backend. According to the json info file the module gets autoloaded on "template=admin". So in Frontend I have to use $this->modules->get("EmailNewUserPortal"); Because my custom code gets executed in frontend and admin, I would have to check where I am, because if I do $this->modules->get("EmailNewUserPortal"); in backend there are two instances of the module running. This results in sending the NewUser Mail twice. After adding the singular Option to your module, this issue has gone. Perhaps there is another need to be not singular here wich I didn´t see? Just wanted to ask... Thanks...
    1 point
  28. Option #1 Just copy the "pwimage" folder from wire\modules\Inputfield\InputfieldCKEditor\plugins\ to site\modules\Inputfield\InputfieldCKEditor\plugins (create if doesn't exists), so PW should pick the latter. Now you can modify it without worrying of the updates. Option #2 If you're using less or sass you can extend the bootstrap CSS like this: .align_left { @extend .pull-left; } Of course you need to import bootstrap first to work. Edit: just read that you are aware of #1, I think it's fine, though #2 is less hassle provided if you use a preprocessor.
    1 point
  29. @Gideon So....any reason why this thread is self-titled?
    1 point
  30. It's working now, all I have to do is restart server Thanks everyone
    1 point
  31. This Module is a Baseclass and Foundation of (hopefully) lots of Modules that will come in the future. Early ALPHA release just to give you a Preview of my new RockSVN Module and keep things organized Please see the comments on top of the module for todos and limitations (for example it does NOT remove the created pages and templates for now). Of course github will come, but i have to tidy things up a bit before i make them public. RockTools.zip
    1 point
  32. Ok I have figured it out - the code works but the Json Array made problems (json_encode doesnt work correctly in this case). So here is the complete code as inspiration for all who want to use UIKit Ajax search function in processwire. <?php if ($config->ajax) { require_once('inc/func.inc'); require_once('_strings.php'); include('paginator/Paginator.php'); include('paginator/PagesPaginator.php'); $numberofitems = 3;//How many items should be displayed $search_array = array(); $q = $sanitizer->text($_REQUEST['search']); // did $q have anything in it? if ($q) { $input->whitelist('q', $q); $q = $sanitizer->selectorValue($q); $templateselector = "template!='profile', template!='activation', template!='privacy-policy-item', template!='serviceitem', template!='single-event', template!=productpricelistitem', template!='partner'"; if ($user->isLoggedin()) $templateselector .= ", has_parent!=2"; $paginator = new PagesPaginator(); $searchresults = $paginator(array( "headline|title~=$q, $templateselector", "introtext~=$q, $templateselector", "body~=$q, $templateselector", "summary~=$q, $templateselector", "firmennameslogan|firmenwortlaut|street|postalcode|place|region|country|geschaeftsfuehrung|vertretung|registergericht|inhaltverantwortung|fachgruppe|subgroup|geldinstitut|ecgbehoerde~=$q, $templateselector", "position~=$q, $templateselector", "privacytable.title|privacytable.body~=$q, $templateselector", "partnertable.title~=$q, $templateselector", "downloadrepeater.downloadfiledesc|downloadrepeater.downloadfieldtitle~=$q, $templateselector" ), $input->pageNum, $numberofitems);//show only 3 items $resultjson = ""; foreach ($searchresults as $key => $result) { $title = $result->title; $summary = $result->summary; $link = $result->url; if($key == $numberofitems - 1){//last item $resultjson .= '{"title":"'.$title.'", "url":"'.$link.'", "text":"'.$summary.'"}'; } else { $resultjson .= '{"title":"'.$title.'", "url":"'.$link.'", "text":"'.$summary.'"},'; } } } header('Content-Type: application/json'); echo '{ "results": ['; echo $resultjson; echo ']}'; } else { //put here the standard search code for non Ajax }
    1 point
  33. Something to consider: if Redactor can be bundled and distributed with open source software, why not use it as a basis for a third party inputfield module instead? InputfieldCKEditor itself started out as a separately distributed module, and considering the way ProcessWire works, this doesn't really need to be part of the core package. While Redactor seems like a decent editor, personally I would be against bundling a closed source application with an unclear license into ProcessWire. Judging from various posts out there, no one is entirely sure how the license works (not even the Craft people), and to me that is a huge red flag.
    1 point
  34. the solution provided here did not work for me! i'm using pw 3.0.36 and this worked and is even easier $fg = new Fieldgroup(); $fg->name = 'rocksvns'; $fg->add($this->fields->get('title')); $fg->add($this->fields->get('rocksvn_version')); $fg->save(); // set version field visible for this template $fg->setFieldContextArray($this->fields->get('rocksvn_version')->id, array( 'collapsed' => 0, )); $fg->saveContext(); $t = new Template(); $t->name = 'rocksvns'; $t->fieldgroup = $fg; $t->save(); tracy helped a lot here again
    1 point
  35. And here we go again - general filter for AdminDataTables:
    1 point
  36. thanks to the hard work of @ethfun, the module is now better than before, it will init on the fields that are closed by tab or accordion; The latest version separates the plugin files so those are easy to update to the latest version by just copying them into the module, instead of having to edit the module assets. @ethfun sorry about the confusion with the pull request etc, Friday was a bit hectic, and thanks again.
    1 point
  37. As far as I tested it, this GitHub pull request should fix the bug when using the module with PW 3.0.32+: https://github.com/kongondo/MenuBuilder/pull/30
    1 point
  38. An article from April describing a strategy for deploying PW using Robo task manager http://antonioandra.de/articles/deploying-processwire-with-robo/
    1 point
  39. To expand on arjen's answer: I had use cases where I had to add more than one tab to several templates. To avoid creating too many individually named fields of type FieldsetTabOpen, I did the following: Create fields of type FieldsetTabOpen with generic names, like tab1, tab2 etc. Apply the field to template A and in the template override for the field label name it e.g. "Sidebar Left" Apply the same field to template B and in the template override for the field label name it e.g. "Sidebar Right" This way you only have one field of type FieldsetTabOpen but can use it for differently named Tabs in different temp[lates.
    1 point
×
×
  • Create New...