Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/28/2017 in all areas

  1. Hi Guys It would be awesome when all the resource about processwire (tutorials, docs, cheatsheet, recipes, videos, api, faq etc...) would be unified on one documentation website called "docs.processwire.com". The new site would gather infos & data from these resources: https://processwire-recipes.com/ http://processwire.tv/ https://www.pwtuts.com/ https://processwire.com/docs/ http://cheatsheet.processwire.com/ and would unified it on the final site https://docs.processwire.com. I think It is far more better to have one endpoint for all the processwire resources & wisdom then mutliple sites. This way it is far more easier to get into the processwire world and choosing processwire as the next main cms for further projects. The Documentation Site could perhaps look like this (it is just a mockup, so don't expect to much from me ):
    3 points
  2. This is what I'm doing, been on plain JS for months. Still trying to get my head round that damn prototypal inheritance. My JS progress is so slow it's unreal, I just don't seem to get it. If there was another option for web programming, I'd be skipping JS entirely.
    3 points
  3. Just do this: $pages->find("template=files, include=hidden");
    3 points
  4. In reality, the unified and structured content can be implemented in the corporate world, not really in the opensource community. In opensource community anyone only able to devote a few hours of their times, but it's already a valuable knowledge for someone else. Internet technology taught us to change our mindset from structured to unstructured content. From centralised to distributed information. The search engine and bookmark technology help us to manage the unstructured content on our part.
    3 points
  5. Hi @kongondo Sorry for late congratulations, but it's better late than never, so Merry Christmas! I should have thought about it, damn those projects without holidays I have figured it out, I didn't specify my email so It was using default email processwire@localhost, then when I have entered my own email it started to work! Thank you! and Merry Holidays!
    2 points
  6. Yes. There's this thing called Christmas that keeps coming back every year, followed by, er, another holiday, and.... Jokes aside, let's debug this. ProcessWire version? Any PHP errors (switch debug on + use Tracy debugger) Any JS errors? Does it only happen when you use star rating? I.e., if you do not star rate, does it work? That looks like the parameter string attached to the URL when a comment is submitted. Is that what you are seeing? If not, what do you mean by unknown page? Does PW throw a 404? What's the URL of the unknown page? Is this still about the Comments Field? If not, what preloader is this? How do you add it to your template file/page? What should (un)trigger it?
    2 points
  7. Hi @Hurme $pages->get() returns Page or Null https://processwire.com/api/ref/pages/get/ I guess that what are you looking for is $pages->find() https://processwire.com/api/ref/pages/find/
    2 points
  8. I had second thoughts about my disqus module because of privacy concerns. However, this sounds like a golden opportunity to make a different kind of module, one for changing the default theme colours. Could have a colour wheel, pick the colours for various elements, saving compiles it and spits out the new css to be included within admin (replacing uikit.pw.min.css). Something like that. Would be happy to work with you on this. I like @theoretics idea of being able to choose precompiled css, but much prefer the ability to customise via a third party module.
    2 points
  9. Maybe I am incorrect, but it seems like you are trying to WP'ize PW. I think that it makes more sense to educate the client that in PW the page tree is hierarchical and this makes much more sense than having Posts and Pages listed at the same level, with Home below Pages. Maybe if you need Posts, Categories, Media, etc to stand out you could make use of icons in front of those parent pages? It might give the visual cues that the client needs to find these easily amongst the other top level pages?
    2 points
  10. Thanks guys. Got it working. New to Cron but it was easy enough to figure out on a VPS ?
    2 points
  11. PwCron is not required anymore, you can set your job calling directly site/modules/Duplicator/cron.php https://github.com/flydev-fr/Duplicator#system-cron
    2 points
  12. Personally I wouldn't bother with PWCron - I would use a normal system cron (via crontab -e or similar). This is the simplest and most customizable approach.
    2 points
  13. @Macrura Just made pull request with some modifications to support ML and useLanguages. It's quite dirty, but works for me. Maybe you will find it useful.
    2 points
  14. Since no one tried to revive the "oldish" UIKit theme -- i did it. Moderate contrast Non-aggressive color scheme Light colors, no dark backgrounds Very close to the original UIKit design Feel free to replace the /wire/modules/AdminTheme/AdminThemeUikit/uikit/dist/css/uikit.pw.min.css with the file i upload here. Hope it will be useful for community.uikit.pw.min.css uikit.pw.min.css
    2 points
  15. Just something I was trying out recently that might be useful to someone... With the following hook added to /site/ready.php you can adjust the CKEditor toolbar that a particular role gets for a particular field. Use the name of your CKEditor field in the hook condition. $this->addHookBefore('Field(name=my_ckeditor_field)::getInputfield', function(HookEvent $event) { $field = $event->object; // Define toolbar for a particular role if($this->user->hasRole('editor')) $field->toolbar = 'Format, Bold, Italic, -, NumberedList, BulletedList, Outdent, Indent'; }); Or what I find useful on some sites is adding extra toolbar buttons for superuser only that you don't trust editors to use. $this->addHookBefore('Field(name=my_ckeditor_field)::getInputfield', function(HookEvent $event) { $field = $event->object; // Add extra buttons for superuser only if($this->user->isSuperuser()) $field->toolbar .= ', Table, TextColor'; }); You could use the same technique to selectively define other CKEditor settings such as 'stylesSet', 'customOptions', 'extraPlugins', etc.
    1 point
  16. This hard coded icon path issue of UIkit is a pita, it can be fixed by using symlinks (at least on *NIX systems) but that is a workaround and not a solution. So true! I've already raised the same concerns. Changing the logo and the colors should be built in. The former is already supported, sure. But what about the colors?
    1 point
  17. This bit didn't work for me as I don't use phpstorm. And there's some missing pieces to this puzzle. You can't compile without the necessary node modules (and you need nodejs and npm installed). I did the following: 1) Git cloned AdminThemeUikIt into '/site/modules/' 2) 'npm install' (gets the modules) in '/site/modules/AdminThemeUikit/uikit/' 3) Created a new less file '/site/modules/AdminThemeUikit/uikit/custom/pw/gray-theme.less' 4) Commented out reno and imported mine instead in '/site/modules/AdminThemeUikit/uikit/custom/pw/_import.less': // Theme @import "gray-theme.less"; // @import "pw-theme-reno.less"; 5) Then, 'npm run compile'. 6) Generates 'pw.uikit.min.css'. 7) Use AdminThemeUikit from /sites/ instead of /wire/. The option to choose which is in the config page for the module when you have the same module in sites and wire. My custom less file is attached if anyone wants to try it out. It has modifications so the login form themes correctly, can set global margins (a few other users were not keen on the large padding) and other small tweaks. gray-theme.less
    1 point
  18. I tried this with an (unlimited) images field just to see how it would work. <?php namespace ProcessWire; ?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title><?php echo $page->title; ?></title> <link rel="stylesheet" type="text/css" href="<?php echo $config->urls->templates?>styles/main.css" /> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous"> </head> <body> <div class="row"> <?php foreach($page->images as $image): ?> <div class="col-4"> <edit images> <img src="<?= $image->url; ?>" /> </edit> </div> <?php endforeach; ?> </div> </body> </html> (used Option C) I made a very rough video of it: You could just do what @flydev suggested with an overlay icon. They click on that, then can change images. It's not as user friendly as being able to just change one image at a time though, clicking on any of them brings up the entire field (as expected). Still pretty cool though! (this isn't a live site, nor do I use '/login/' on any live ones)
    1 point
  19. try this https://modules.processwire.com/modules/template-decorator/
    1 point
  20. @bernhard , @SamC , it's great what You're planning to do, but maybe it could be better just to provide some different compiled css files inside AdminThemeUIKit and to give users a possibility to switch between them?
    1 point
  21. @SamC great. Maybe you want to use less.js (http://lesscss.org/#using-less-third-party-tools) to show a very simple way of playing around with the admin themes LESS files? We could even build a theme generator using less.js and/or AIOM's php based less parser... Changing colors of the theme should be a lot easier than downloading source files, compiling everything, uploading...
    1 point
  22. @bernhard I’m working on a tutorial for this i.e. compiling from source with node/npm and editing the less files. I’ll include my starter (less) file which allowed me to easily change the colour schemes as shown in my vid: https://www.youtube.com/watch?v=cKlzg_kIi-w It’s pretty simple but the only problem I can see is that copying the module to ‘/site/modules/‘ means you have to keep the admin theme updated yourself. There appears to be no way to simply use a css file (in the module config) because the icons then don’t point to the correct locations and modifying the paths in the original less files for this module was a huge pita so I ditched that idea. The way @theoretic did it above means the icons point to the correct locations but (a big but) this means modifying a core module.
    1 point
  23. @Federico I am just curious - why do you need such a setup?
    1 point
  24. Hello, replace in your module $page by $this->page and everything should be fine. $form->attr("id+name",'$page->name'); // should be $this->page->name $field = $field->getInputfield($page); // should be this->page
    1 point
  25. @Zeka, many thanks - will accept PR and test asap...
    1 point
  26. I couldn't agree more Maybe that is why I already proposed: https://processwire.com/talk/topic/17348-is-pw-becoming-more-popular/?do=findComment&comment=150914 "...I propose to make 2018 the year of the documentation, so to speak. What if we could stop hunting for new features for a while and concentrate on the following in 2018..."
    1 point
  27. Do you have Tracy Debugger installed? That might provide some additional info; Usually when I'm doing a V2 -> V3 upgrade, i follow this procedure: 1) If I don't have the site already cloned locally, make a duplicate site on local machine to test the upgrade - make sure you have TracyDebugger installed, force development mode - put site into debug = true 2) check/repair permissions on files, and also check the chmod settings inside config.php (I've had upgrades seem to fail because of bad permissions).. 3) remove all modules that are known to not work on V3, for example legacy CropImage; - also remove all modules that are not necessary for the site to run - check which ones are in the modules folder, but are not installed and remove those. 4) Run the upgrades on the local version, and find issues, repair...; - view logs if you get errors - repair permissions if you get server errors but nothing in logs - Update .htaccess, add any mods that were made to the 2x version into the 3x version (such as www/non-www, force https, custom redirects, gzip etc). So far even on a really complex site, i've maybe found 4-5 things that needed to be fixed, and then i went to the live site, fixed those things before the upgrade, then ran the upgrade on live and it worked fine. Make a complete backup of the live site, as well as the database, using the database backup module, prior to running the upgrade Troubleshooting: - If you run into modules that seem to be broken, you sometimes have to trick the filecompiler to recompile the module, you can open the module file, create a new line somewhere, save, undo, save... (this happened on a few sites) - refresh the modules - sometimes you have to refresh modules several times to clear out errors
    1 point
  28. I will look at it tonight, its strange as I can't reproduce it. I set the same package name, same settings then the package is uploaded but nothing deleted ? Could you tell me if the bucket already contain other files ? Edit: my logs :
    1 point
  29. There are other ways, but check out the Request Info panel in Tracy when viewing the field settings in the admin. See that there is an "initValue" setting. This indicates that you can do: $fields->get("map_width")->initValue In the Tracy Console panel (again if you are viewing the field in the admin), you can do: This is because the Console makes available $field, $template, and $module when you're in the admin and viewing an individual field, template, or module.
    1 point
  30. Although Vue is being marketed as "incrementally adoptable" it is still aimed to become something react-like as I see it. That is a framework, that is to be used on a frontend, completely decoupled from the backend. In such architecture backend only serves data to a frontend via something like REST or GraphQL. And all the routing and markup generation is done on the frontend, in the browser. ProcessWire surely can be used in that scenario (just follow the provided links), but in 99% of cases I heard about it is used in an "old-fashioned" way, with routing and markup generation done on the server (backend) and served via page reload, not ajax+in-browser state change+framework like Vue. That means most examples here on the forums will be more relevant to such a usage. Ryan is building at least his demo sites this classic way. Vue is something from the new frontend oriented world. JQuery is something from that "classic" web-development world, which is still dominant. JQuery is used throughout the PW core and modules code. And that code is a very good manual in itself. So learning JQuery with PW will be easier. And (should it be first) PW API is known to be inspired by JQuery. Isn't it the ONE reason to learn JQuery first if going with PW? So, for now, I would say JQuery is a better start to be used with ProcessWire.
    1 point
  31. This is actually so useful that I need to add to AOS (if you don't mind) Removing toolbar items is easy with your code but AOS may add extra buttons via CKEditor plugins. I found out that listing them in "removePlugins" is enough, so this can be used to remove extra plugins with ease: $this->addHookBefore('Field(inputfieldClass=InputfieldCKEditor)::getInputfield', function(HookEvent $event) { // do not show modified data on Field edit page if ($this->wire('process') != 'ProcessPageEdit') { return; } $field = $event->object; if($this->wire('user')->hasRole('editor')) { $field->toolbar = 'Bold, Italic'; $field->removePlugins = 'div, justify'; // plugins to remove $field->formatTags = 'p;h2;h3;h4'; // allowed format tags, separated with semicolon } });
    1 point
  32. Sounds off topic but may not be so. As pointed out earlier and above, documentation is an important part of the success. Everyone knows that (probably...) And building front-end logins, forms, admins, dashboards, modules and stuff like that is not documented, except for module and core code comments and hard to scan blog posts, of course. But those are hidden bits of information and kinda time consuming to dig up. Also, basic frontend design tutorials are outdated. I propose to make 2018 the year of the documentation, so to speak. What if we could stop hunting for new features for a while and concentrate on the following in 2018: new processwire.com new UIkit admin theme documentation: updated basic frontend design tutorials and lots of real world form API tutorials for the masses. Just my two cents here
    1 point
  33. 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
  34. you can use Markdown or Textile: http://processwire.c...text-formatter/ or, if the only thing you want is the <br> where there is a new line; you can use "nl2br" on a regular text area: http://php.net/manua...ction.nl2br.php <?php echo nl2br($page->field); ?>
    1 point
×
×
  • Create New...