Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/07/2018 in all areas

  1. It works here. Did you try this? $label = $templates->get("employee")->fieldgroup->getField('body', true)->label; echo $label; // displays "Zusätzliche Informationen" instead of the default "WYSIWYG Editor" label = tpl override
    3 points
  2. The Module Blog for ProcessWire replicates and extends the popular Blog Profile. Blog is now in version 2. Please read the README in the Github link below in its entirety before using this module As of 20 December 2017 ProcessWire versions earlier than 3.x are not supported Blog Documentation is here (Work in Progress!) See this post for new features in version 2 or the readme in GitHub. To upgrade from version 1, see these instructions. ################################################## Most of the text below refers to Blog version 1 (left here for posterity). Blog version 1 consists of two modules: ProcessBlog: Manage Blog in the backend/Admin. MarkupBlog: Display Blog in the frontend. Being a module, Blog can be installed in both fresh and existing sites. Note, however, that presently, ProcessBlog is not compatible with existing installs of the Blog Profile. This is because of various structural and naming differences in respect of Fields, Templates, Template Files and Pages. If there is demand for such compatibility, I will code a separate version for managing Blog Profile installs. In order to use the 'Recent Tweets Widget', you will need to separately install and setup the module 'MarkupTwitterFeed'. Please read the README in the Github link below in its entirety before using this module (especially the bit about the Pages, etc. created by the module). I'll appreciate Beta testers, thanks! Stable release works fine. Download Modules Directory: http://modules.processwire.com/modules/process-blog/ Github: https://github.com/kongondo/Blog You can also install from right within your ProcessWire install. Screenshots (Blog version 1) Video Demos ProcessBlog MarkupBlog Credits Ryan Cramer The Alpha Testers and 'Critics' License GPL2
    1 point
  3. I'm glad it's MS buying it and not some other company. (Imagine FB or Apple with their recent track record ..) Their track record with Developers for most part has been pretty good especially of late, and I hope their involvement means more features that developers ask for (e.g. Folders to organise repos) will actually get delivered. I wouldn't be worried about MS stuffing this up unless it's people involved in Windows 10 and/or Skype are being transferred to work on Github. There's been a bit of knee-jerk reaction with some devs jumping ship for Gitlab already but there's far too many Open Source projects on Github at the moment and I can't see any of them jumping ship to Gitlab, at least in the near future.
    1 point
  4. Created and sent action module to @adrian via PM if he would consider including it in Admin Actions module. Thanks @Robin S!
    1 point
  5. PHP probably runs under the user configured in your anonymous authentication settings. In IIS manager, click on your website, then on "Authentication". Select "Anonymous Authentication" and click "Edit" in actions bar at the right. There you will see the user (default: IUSR). Grant this user modify permissions on the assets folder.
    1 point
  6. Dear All, I'm really proud to show you my first site done with ProcessWire! ❤️ It's called "In bianco e Nerd" and it's the official site of a very active italian nerd community. This is the url: https://inbiancoenerd.com/ Actually it's a quite complex website, I'm using different templates for almost every section and a huge part of the code is dynamic (for example on the single posts i can choose from the backend to move down the title, i can change completely the header, the colors and the featured image). Then there's a special section (https://inbiancoenerd.com/links-fighi/) that is a link gallery where i post cool stuff and you can filter the results using Algolia. And...it's full of easter eggs too ? HOMEPAGE LINK GALLERY SINGLE POST SKILLS Right now i'm using these modules: - AdminOnSteroids - ColorPicker - ProFields - Social Share Buttons - And the wondeful ProCache (it works like a charm) ❤️ - And soon I'll use ImageOptim too ? Server/hosting: Cloudways (DigitalOcean) + Cloudflare ProcessWire: 3.0.105 Hope you like it! Please let me know your thoughts! Right now i'm trying to promote ProcessWire in Italy because, in my personal opinion, it's one of the best CMS i've ever tried in the last 15 years of my career. So, thank you so much for this fantastic tool and thank you all for this amazing community.
    1 point
  7. I cannot install the module. Seems version 2.8. is left out in the compatible versions? Thx! edit: Nvmd, Manual Install works. Install via Classname didn't.
    1 point
  8. The core inputfield dependencies feature doesn't support this. It works via Javascript and can only read field values that exist in Page Edit - the published status is not one of those field values. But the Custom Inputfield Dependencies module can help you out here.
    1 point
  9. The Inputfield Dependencies page doesn't say anything about the published status so I guess it isn't possible. You might be able to do what you want with a hook.
    1 point
  10. @asilentwish - please take a look at the AdminRestrictBranch module that @bernhard mentions - it takes care of these menus and all sorts of other issues. Obviously it doesn't hide the pages you want, but you'll be able to grab the bits of code you need from that and add it to one of those gists I listed. But please also read thoroughly through that forum thread - there are issues with what you want to do - what if a parent is hidden, but the user needs access to the children?
    1 point
  11. In your .htaccess file, have a look at "11. OPTIONAL: Set a rewrite base if rewrites aren't working properly on your server." Uncomment the line "RewriteBase /".
    1 point
  12. Just a guess but when your ProcessWire instance is in /pw/ your URLs are probably www.blahblah.de/pw/something/. Why did you place ProcessWire in a subfolder? Why not in DocumentRoot?
    1 point
  13. Yes, it can be done. The documentation for the Repeater fieldtype shows API code for adding repeater items. The general approach is that for every row you will look for a "group" repeater item by title and if no item matches that group name you create one. And for every row you create a "photo" repeater item inside the relevant group item. Not tested but it should work once you have changed $page and any field names to suit your setup: // Parse the CSV data $handle = fopen('/path/to/your/file.csv', 'r'); while(($row = fgetcsv($handle)) !== false) { // Columns (maybe there are actually more of these) list($group_name, $image_name, $price) = $row; // Get the group item for this $group_name /* @var RepeaterPage $group_item */ $group_item = $page->groups->get("title=$group_name"); // If no such item exists, create one if(!$group_item->id) { $group_item = $page->groups->getNew(); $group_item->title = $group_name; $group_item->save(); $page->groups->add($group_item); $page->save(); } // Create a photo item for this row /* @var RepeaterPage $photo_item */ $photo_item = $group_item->photos->getNew(); $photo_item->title = $image_name; $photo_item->price = $price; // If there are more columns deal with them here $photo_item->save(); $group_item->photos->add($photo_item); $group_item->save(); // Perhaps not needed, but save the page for good luck $page->save(); }
    1 point
  14. Take a look at these: https://gist.github.com/adrianbj/e391e2e343c5620d0720 https://gist.github.com/adrianbj/e391e2e343c5620d0720 https://gist.github.com/somatonic/5595081 and this conversation: https://processwire.com/talk/topic/1176-hiding-uneditable-pages-from-users/?do=findComment&comment=84916
    1 point
  15. hi @asilentwish, not sure, but maybe this module can help you? https://modules.processwire.com/modules/admin-restrict-branch/
    1 point
  16. The InputfieldImage::getAdminThumb() method with the "remove legacy thumbnail file" argument is what you want to use. You'd loop over all the images in your site and call that method on each one. I think this will do the job... $if_image = $this->modules->InputfieldImage; foreach($fields->find('type=FieldtypeImage') as $field) { foreach($pages->find("{$field->name}.count>0") as $p) { foreach($p->getUnformatted($field->name) as $image) $if_image->getAdminThumb($image, false, true); } }
    1 point
  17. Such a setup might now be even more flexible (and even easier) with the use of markup regions. You could populate regions with widgets easily just by doing something like this: foreach($page->getVisibleWidgets() as $widget) { echo WireRenderFile("widgets/{$widget->name}.php", ['page' => $page, 'region' => $widget->region]); } And the widget something like that: <div pw-append="<?= $region ?>"> my great widget </div> Only thing to do would be the user interface for defining the visible pages, I've done that once like this: https://processwire.com/talk/topic/8635-simple-example-for-widget-management/?do=findComment&amp;comment=148216 Would be nice to put that into a module to make it reuseable! And to add a simple API just like $page->getVisibleWidgets(). If you want to sponsor/outsource that just send me PM. If you want to do it on your own I'm happy to share what I have so far and help wherever I can. Edit: Or maybe just use the selector fieldtype?
    1 point
  18. Same here: I think they are really great! It makes the setup so much cleaner and more readable and also more flexible. For example I'm using a region "scriptsbottom" at the end of my <body> and whenever an included section needs some javascript I just write the markup and append the script to that region: // _main.php <region id="header"></region> [...] <script><region id="scriptsbottom"></region></script> // slider.php <section id="header">... my great slider markup ...</section> <region pw-append="scriptsbottom"> $('#slider').init(); </region> IMHO this is much more readable than using delayed output with php variables and then "messing" around with $config->scriptsbottom .= '$(\'#slider ... ' (doing some crazy escaping or ob_get_clean() or the like.
    1 point
  19. just wanted to share a screencast of one old website with a kind of widget-visibility-ui that could serve as inspiration. it's not good enough to share as a module, maybe someone wants to take it further -> pm
    1 point
  20. @ryan thanks a lot! I had a little use case where I couldn't resist to use the new feature. It was only for pages with text fieldtypes. I used two little bootstrap scripts to export & import some pages. export.php import.php
    1 point
  21. a simple way of caching (nearly) everything using wirecache and 2 page render hooks in site/ready.php // the next ensures that the following code will only run on front end (otherwise back end would get cached, too which results in problems) // make sure to place anything you need in the backend before this line or change it to your needs.. if ((strpos($page->url, wire('config')->urls->admin) !== false) || ($page->id && $page->is('parent|has_parent=2'))) return; $cacheName = "prefix__$page->id-$page->template-{$user->language->name}"; if ($urlSegment1) $cacheName .= "-$urlSegment1"; if ($urlSegment2) $cacheName .= "-$urlSegment2"; if ($urlSegment3) $cacheName .= "-$urlSegment3"; if ($input->pageNum > 1) $cacheName .= "-page$input->pageNum"; // if already cached exit here printing cached content (only 1 db query) $wire->addHookBefore('Page::render', function() use($cache, $cacheName) { $cached = $cache->get($cacheName); if ($cached) { exit($cached); } }); // not cached so far, continue as usual but save generated content to cache $wire->addHookAfter('Page::render', function($event) use($cache, $cacheName) { $cached = $cache->get($cacheName); if (!$cached) { $cache->save($cacheName, $event->return); } unset($cached); }); of course not the same as a proper flat file cache like procache but at least saving many database queries make sure to adjust the $cacheName as needed, you can even cache query strings, almost everything you'd like and you could wrap everything in a condition to only run if no incoming post or query strings so form submits keep working example if (!count($input->get) && !count($input->post) && !$config->ajax) { // cache logic from above } have fun
    1 point
  22. Couldn't you also use the code in the basic PW installation site where the sub nav gets generated by: <?php // Output subnavigation // // Below we check to see that we're not on the homepage, and that // there are at least one or more pages in this section. // // Note $page->rootParent is always the top level section the page is in, // or to word differently: the first parent page that isn't the homepage. if($page->path != '/' && $page->rootParent->numChildren > 0) { // We have determined that we're not on the homepage // and that this section has child pages, so make navigation: echo "<ul id='subnav' class='nav'>"; foreach($page->rootParent->children as $child) { $class = $page === $child ? " class='on'" : ''; echo "<li><a$class href='{$child->url}'>{$child->title}</a></li>"; } echo "</ul>"; } ?> So in this case it's checking if the section has sub-children rather than the page itself (plus there's an extra check in there for homepage that you don't really need I think. Anyway, hope that makes sense...
    1 point
×
×
  • Create New...