Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/02/2017 in all areas

  1. Since I read about the new fieldsets I'm thinking if it would make sense to have some kind of fieldset library. Maybe export jsons in github gists? Or maybe collect them just in a forum thread here... This could make it more easy and more efficient to share common fieldsets, like SEO, person details or the like. What do you guys think?
    4 points
  2. @mauricemoss, @ukyo, @dreerr, @tpr I have uploaded an update to the github repo that fixed the PHP notices and added removal of CropImage children after creating a new CropImage.
    3 points
  3. @tpr: I added the tiny thumbs. One little downside is, when returning back from the Modal, after creating the new Cropimage, they are not updated automatically. Only after page refresh.
    2 points
  4. The originals timestamp gets updated because the new settings for the croprectangle (x/ypos & width/height), and sharpening & quality values get stored into dedicated IPTC-fields. (ATM, for jpeg only, what also is the reason for thinking about other solutions) Tiny previews is a nice idea. If you don't mind I will take your suggestion and bring it into the module. Will fix that asap. Many thanks for checking and suggestions! <3
    2 points
  5. 2 points
  6. Thanks @horst, just checked and I can verify it works as expected! A few things (nothing biggie): the original image seems to get a new modified date in the filesystem. Is it necessary or a bug? I would love to see a tiny preview of the cropped image (without hover). Would it be possible to append eg. a 0x48px (or so) thumbnail image to the crop size name? Just to have a small indication how it looks like. Tracy shows a PHP notice in the main module's settings page: "PHP Notice: Undefined index: sharpening in .../FieldtypeCroppableImage3ConfAdaptor.php:96" Anyway I'm happy this issue is fixed, now I can continue uploading images to a site that I put aside. Thanks again!
    2 points
  7. If $widget is a page object it should be possible to put outputformatting on just to grab the value and switch it of after. If not you can use the formatValue() function from the module. You need a page and a field object as arguments. $page can be any page in this case but $field should be the one where the OF type is stored. $FieldtypeColor = wire('modules')->get('FieldtypeColor'); $field = new Field(); $unformattedColor = "ff5a01fd"; $page = new Page(); $field->type = $FieldtypeColor; $field->outputFormat = 0; $color = $FieldtypeColor->formatValue($page,$field,$unformattedColor); var_dump($color); // string(7) "#5a01fd"
    2 points
  8. Hey @ryan loving these fieldset updates, keep them coming. I was holding myself not to start building a website until I can get my hands on these. Now having tried FieldtypeFieldsetPage, I've found it really useful for page meta (tags, categories etc) and SEO (seo title, desc) related fields. I also have a bug to report. ProcessPageEditLink crashes when it tries to get the list of files (when adding a link with CKEditor). It can handle basic repeater and repeater matrix pages properly but not FieldtypeFieldsetPage, and I get this error: Problem comes from this part. $repeaterPage is the id of repeater item, not a fully loaded Page instance. protected function getFilesPage(Page $page, $prefix = '') { $files = array(); foreach($page->template->fieldgroup as $field) { $type = $field->type; // ... } else if(wireInstanceOf($type, 'FieldtypeRepeater')) { $value = $page->get($field->name); if($value) foreach($page->get($field->name) as $repeaterPage){ // repeater page is page id, not a Page instance!! $files = array_merge($this->getFilesPage($repeaterPage, $field->getLabel() . ': '), $files); } } } return $files; } For now, I'm skipping FieldtypeFieldsetPage using: if(wireInstanceOf($type, 'FieldtypeFieldsetPage')) continue;
    2 points
  9. Last week we talked about new Fieldset modules for ProcessWire, and I was happy to hear about all the enthusiasm for these. In that post, we primarily looked at the new FieldtypeFieldsetGroup module in detail. This week we'll continue along a similar subject and look at the new FieldtypeFieldsetPage module. Actually we'll do more than look at it, we'll release it – it's now in ProcessWire core version 3.0.74, ready for you to use: https://processwire.com/blog/posts/processwire-3.0.74-adds-new-fieldsetpage-field-type/
    1 point
  10. @PWaddict My variations looks like imagename.-work-thumb.160x135.jpg, where 160x135 is added by me from api (markupsrcset module). It seems you have a different naming somehow. @horst You got a new PR - button preview update on new crop + prevent PW lightbox on preview img click (lightbox showed 'Error load image') + style updates Feel free to remove the new preview button styles if you don't like it.
    1 point
  11. @flydev: Really I'm not feeling in the right position to give suggestions here. I appreciate all the work and recherche you do here, so you should decide what is lesser work or fits better for you, for what ever reason. - If, at the end, a solution is available that let people login with their twitter account, it would be really great and is much more than there is atm.
    1 point
  12. Hi! I have this code in my page template file: <?php namespace Processwire; if($input->urlSegment2) throw new Wire404Exception(); if ($input->urlSegment(1)) { $pagename = $input->urlSegment(1); $p = pages()->findOne("template=knowledge-base-category|knowledge-base-item, name={$pagename}"); if ($p->id) { $p->render(); } else { throw new Wire404Exception(); } } else { $viewData["categories"] = pages("template=knowledge-base-category"); region("content", renderView("knowledge-base", $viewData)); } ?> Max urlSegments is set to 4. Should URL segments end with trailing slash is set to Yes. Everything works as expected until I try to access any URL which ends with any special character like: site.com/current-page/real-page/not-real-page) or site.com/current-page/real-page/not-real-page@ In those cases, I get rendered homepage instead of 404 page. Is there something obvious that I missed?
    1 point
  13. I have opened an issue for it. https://github.com/processwire/processwire-issues/issues/366
    1 point
  14. I strongly support it Some sort of organized way of doing it would be welcome. Maybe processwire-recipes.com could be used for this. processwire-recipes.com is not too updated these days and it has a somewhat confusing and "too many steps to follow" submitting+approval process. Quote: "In the near future we plan to implement a contribution form right here to sync back to the GitHub repo." Since the Universe is ageless, "near future" can be anything (in programming we call it Undefined ) however we could improve things a bit in this area.
    1 point
  15. Hi and welcome to the forums. Not sure this is the right forum for your question, but.. The same way you call the poster... ie wrap the code in php tags: The template will then render the $page->video within the javascript before outputting to the browser.
    1 point
  16. These are from May 2015 but I think they're still relevant. By using tabs in the Modal marked Choose and Upload, it clarifies the 2 distinct actions available Vs 2 options under one confusing heading. The thing is (and I've yet to resolve), should the Upload tab be the default active one? I think there's an alternative combined version there too (not attached)
    1 point
  17. @tpr's awesome Admin On Steroids (http://modules.processwire.com/modules/admin-on-steroids/)
    1 point
  18. @Roych You are only retrieving one BackgroundImages item with getRandom(). To get multiple items for your Wire Array you need to specify how many you want. https://processwire.com/api/ref/wire-array/get-random/ Alternatively to retrieve all BackgroundImages in random order you could try: <?php foreach($pages->get('/settings/')->BackgroundImages->shuffle() as $bck): ?>
    1 point
  19. Laragon allows for multiple virtual hosts so that you need not change your document root. If you do change it to your project's working directory, then it would be served via localhost. As such, the localhost domain should point to the default Laragon www directory, and any virtual hosts you define via the Quick Create method will create a new directory inside the localhost document root, and the virtual host will point to that new directory. So the setup looks something like this: localhost -> path\to\laragon\www (navigating to localhost should show a listing of your vhosts, just to test that it's working) - angie.local -> path\to\laragon\www\angie\ - test.something.local -> path\to\laragon\www\test.something\ - laravel.local -> path\to\laragon\www\laravel\public\ - (etc.) In my case, I have a separate drive just for my sites, and so my document root points to z:\sites. I'd suggest you do is open up the Laragon context menu and select Quick Create -> Configuration. Add the following to the file that opens in Notepad++: ProcessWire=https://github.com/processwire/processwire/archive/master.zip Then, when you go to the Quick Create menu again, you will see ProcessWire listed. Select it, and it will ask you for the name of the project, so just type in the name excluding the domain extension (TLD). It will automatically create the new virtual host that points to the subdirectory in your document root, and your hosts file will be amended automatically. In the case of ProcessWire, the virtual host that Laragon creates will automatically point to the subdirectory as its document root. If you Quick Create Laravel, however, it will point to the sub directory's public directory (as shown above). This is a little 'smart' feature that Laragon has to make peoples lives easier. Hope that clarifies everything for you.
    1 point
  20. Yep - another Captain Hook update. Often hookable methods for a class are derived from a parent class. Take the "Roles" class for example. It lists add, delete, & save as the hookable methods that are available. But because it extends the "PagesType" class, its hookable methods are also available from the "Roles" class, eg: Roles::deleted. To make these derived methods easier to find, I have added a new: ClassName extends ParentClassName line to each file section. Both names are also linked directly to the API docs so you can find out more info there as well.
    1 point
  21. Additional tip related to displaying placeholder images: Above I just hard coded a placeholder image to be shown which might be all what someone needs. However, there are times when we want to let the editors change that picture or we just want it to show up in the admin too. In that case we can use ProcessWire's "Default value (when empty)" setting:
    1 point
  22. And completely crashes my 2007 iMac at work. Which isn't a unique experience... Note to Self - Next time you change jobs, get one where they have up to date hardware.
    1 point
  23. You'd have to delete the variations. http://cheatsheet.processwire.com/files/image-methods/image-removevariations/ https://processwire.com/api/ref/pageimage/get-variations/ https://processwire.com/api/ref/pageimage/remove-variations/ @horst will probably give you more advice....
    1 point
  24. This week we added the new pages export/import feature to the core! In this post, we tell you how to install it and cover all of the new things added over the last week. https://processwire.com/blog/posts/processwire-3.0.71-adds-new-core-module/
    1 point
  25. Hi, this may help to start, however, most in Polish or German but easy to understand ... Watch and Learn ... ----------------------- LEONID LENZER => GOOD TUTORIAL ----------------------- XTRA-STRONA => 1 INSTALLATION METHOD 2 - Localhost to Internet 3 - PROCESSWIRE + UIKIT 4 - PLAYLISTS -- PROCESSWIRE &nbsp;STARTING -- PROCESSWIRE + UIKIT :) ( BEST SELECTION FOR QUICK START) -- CREATE SIMPLE TEMPLATE ( BUT NO USING NEW TEMPLATE STUCTURE ) -- PROCESSWIRE - NEW TEMPLATE STRUCTURE -- Processwire Great Multi Language Support
    1 point
  26. I feel like the "quiet" save option should also work for published. It works for created, but not modified or published. This SQL will do the trick though: $sql = "UPDATE `pages` SET `published` = '2015-01-01 12:30:00' WHERE `id` = '2101';"; $database->query($sql);
    1 point
  27. Making small steps with programming in ProcessWire. But thanks to guys like you (and Processwire itself of course) all the small steps take me further than I ever thought possible. Thanks again and have a nice weekend.
    1 point
×
×
  • Create New...