Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/15/2017 in all areas

  1. feuerwehr-teisnach.de ProcessWire 3.0.62 Screenshots show the management of operations, where they can choose the date, age-group, vehicles in operation and they can write a text and put some gallery into it. Modules: Uikit v3 admin theme Auto Smush Markup Sitemap XML Pagetree Add New Childs Reverse Upgrades Checker Simple Contact Form CSS (SASS) & JSS compression with: grunt-sass grunt-uglify grunt-contrib-cssmin Libraries: UiKit 2 jQuery Owl Carousel hamburgers
    8 points
  2. Wow, i'm having Déjà vu... http://modules.processwire.com/modules/selectize-image-tags/ Glad this is in the core now though; personally i couldn't have done without my module version for the past year (used on dozens of sites). Wondering if i can now remove the dependency for the jQuerySelectize module and load the core selectize js in the module init. Questions would be: 1) does the new integration allow you to select the Selectize skin? 2) will the core selectize interfere in case you upgrade and have image fields set to use the module selectize image tags 3) can the limit of what tags can be used be set on the field settings, and can those tags preferences be over-ridden per template, like the module.
    5 points
  3. This week's version includes some helpful UI updates to the tags feature available in our File and Image fields, which we'll be taking a closer look at in this post. Like many versions, this also includes some other updates consistent with submitted GitHub issue reports. Read on for all the details… https://processwire.com/blog/posts/processwire-3.0.67-upgraded-file-and-image-tags/
    3 points
  4. Eg upload a company logo to an image field that holds many images. Then add the tag "logo", and use it as the main brand logo. Then perhaps upload another one with tag "footer_logo", and so on. Or mark files for different languages as Ryan recommended lately in a blog post. Or mark images to skip, eg for a gallery. I guess you got the idea now.
    3 points
  5. @ryan Right now the view that shows translation files "Setup > Languages > German" is not very intuitive and confuses users and translators, because they are confronted with cryptic names (Textdomains) instead of clear to read names. How can we make it better? Add clear to read labels like the module name from modules and the filename without the path from other files (.php). The path information has to be more subtle, as it is not that important for most users Take a look at the first two entries compared to the lower two. This can be done very quickly by adding some styles. Either flexbox or floats would do the job. Here is what I did (just quick and dirty and not the best way) Changed order of the file path to last. Added CSS to InputfieldFileLanguageFilename description: <span class="InputfieldFileLanguageFilename description" style=" position: absolute; right: 0; padding-right: 10px; font-size: 13px; color: #ccc; ">/site/templates/main.php</span> What you think of that?
    2 points
  6. @clsource: sorry for the delay. Weekly.pw RSS feed should now work as expected
    2 points
  7. Welcom @AlyxGD! I recommend starting with these, in this order: https://processwire.com/docs/tutorials/but-what-if-i-dont-know-how-to-code/ http://www.how-to-build-websites.com/ https://processwire.com/docs/tutorials/hello-worlds/ https://www.youtube.com/watch?v=-3Fwyd5Okrg&list=PLXlVJXqzkgyqQJyxkb4hai3WgoPoD8osO&index=1 https://processwire.com/docs/tutorials/installation-moving-and-troubleshooting/ If after checking these above you still feel like diving into web development, I recommend installing ProcessWire on your own machine to play with it a little bit to get the hang of it. If you don't feel like dealing with all you've seen above, I recommend looking for a ProcessWire web developer: https://processwire.com/talk/forum/22-jobs/
    1 point
  8. it definitely helps with managing images in situations where you have a single images field on a page, and want to use some of those image in the RTE, while still specifying one to be used as the 'featured image', which might appear above a blog post. Using a tag like gallery on multiple images could then be used to output a carousel as that featured image, instead of a single image...
    1 point
  9. I think using $user->isLoggedin() should work fine. if(!$user->isLoggedin()) { $session->redirect('/some-url/'); } In what way is it not working like you expect?
    1 point
  10. Some links that may help you; https://github.com/processwire/processwire http://modules.processwire.com/modules/process-wire-upgrade/ https://processwire.com/download/ https://github.com/ryancramerdesign/ProcessWire/ https://github.com/processwire/processwire-legacy
    1 point
  11. I did something similar (if i understand your question correctly) on a calendar on this site: http://eketorp.se/evenemang/?datum=2017-09-29#pickedDate Only dates with events or opening hours are selectable. Active dates are json used by flatpickr: https://github.com/chmln/flatpickr
    1 point
  12. We aren't using a load balancer for this processwire.com server (just a single Amazon instance). But for the sites where we are (and running PW), there is a shell script that syncs /site/assets/ and /site/templates/, across the instances. I don't know exactly how it works, but can find out more. I know it runs every 30 minutes (cron job) and whenever a change is detected. Note that it also specifically excludes /site/assets/cache/ and /site/assets/sessions/, as those vary between the instances. Also important, is that when it comes to using the PW admin, we setup a separate hostname for that purpose (admin.domain.com) that always hits the same instance (which we call the "A" instance). This is the instance that the shell script considers the master when it comes to syncing files. That way, any changes that occur to the synced files always originate on the A instance. There is a setting in AWS that lets you lock a hostname to a specific load balanced EC2 instance. Then we keep any editing locked to that hostname by adding this to /site/templates/admin.php: if($config->httpHost != 'admin.domain.com') { $session->redirect('https://admin.domain.com/processwire/'); } And we keep non-authenticated requests out of the admin hostname by having this in the /site/templates/_init.php file ($config->prependTemplatefile setting): if($config->httpHost == 'admin.domain.com' && !$user->isLoggedin()) { $session->redirect('https://www.domain.com' . $page->url); } This ensures search engines don't get in and start indexing another copy of the site on the admin hostname.
    1 point
  13. yes it is doable however, you don't have to create a file anytime you create a new template in admin. you create a template file if you want to 'view' the page using that template
    1 point
  14. $coaches = $pages->get("/coaches/")->children($selector);
    1 point
  15. @Macrura, your Micro Contexts idea is clever. The approach you are taking here (effectively a single template where fields may be shown/hidden and labels/descriptions changed depending on context) is in fact exactly what is done in Repeater Matrix. Every matrix item (page) actually has the same fields, but the field visibility and labels etc are controlled by the matrix type context. So that got me thinking that all that is needed to do something similar with Repeater Matrix is to add some control that allows the user to change the matrix type of an existing Repeater Matrix item. The advantages over the Micro Contexts approach are: You don't have multiple templates that must be kept in sync if new fields are added - if you add a new field to any given matrix type it is added to the single Repeater Matrix field template. You can do all your field overrides (visibility, width, label, description, notes) from a single screen (the Repeater Matrix field settings). So as a result it's quicker to set up and easier to maintain. I have put in a request to Ryan to add such a control, but I had a play around and managed to get something working with a couple of hooks. To use this... Create a new text field named 'block_type' (best to create a dedicated field for the purpose). Set the field visibility to 'Closed' (to keep it discreet). In your Repeater Matrix field settings, add the block_type field as the first field in each matrix type. Add the hooks below to /site/ready.php... // Change the block_type inputfield to a matrix type select $wire->addHookAfter('InputfieldText::render', function(HookEvent $event) { $inputfield = $event->object; $field = $inputfield->hasField; if(!$field || $field->name !== 'block_type') return; if($inputfield->name === 'block_type') return; // in case field is not being rendered inside repeater inputfield $rpage_id = str_replace('block_type_repeater', '', $inputfield->name); $rpage = $this->pages->get($rpage_id); if(!$rpage->id) return; // just in case $matrix_field_name = substr($rpage->template->name, 9); $matrix_field = $this->fields->get($matrix_field_name); $raw_matrix_types = $matrix_field->type->getMatrixTypes($matrix_field); $matrix_types = []; foreach($raw_matrix_types as $key => $value) { $label = $matrix_field->get("matrix{$value}_label"); $matrix_types[$value] = $label ?: $key; } $if = $this->modules->get('InputfieldSelect'); $if->name = $inputfield->name; $if->label = $inputfield->label; $if->required = true; foreach($matrix_types as $key => $value) { $if->addOption($key, $value); } $if->value = $rpage->repeater_matrix_type; $event->return = $if->render(); }); // Change the matrix type on saveReady $pages->addHookAfter('saveReady', function(HookEvent $event) { $page = $event->arguments(0); if(!$page instanceof RepeaterMatrixPage || $page->block_type === null) return; if($page->isChanged('block_type')) $page->setMatrixType($page->block_type); }); If you wanted to remove certain Repeater Matrix inputfield controls then you would use a hook/module as discussed in earlier posts in this thread.
    1 point
  16. Limit Table works by hiding elements within the inputfield in Page Edit. You can make a custom solution for Repeater Matrix (or any inputfield) by using your browser tools to find the class/ID of the elements you want to remove, and hiding them with a display:none CSS rule. Add the custom styles selectively to Page Edit via a hook: $wire->addHookAfter('ProcessPageEdit::execute', function(HookEvent $event) { $page = $event->object->getPage(); $out = $event->return; // match to the relevant page(s) however suits you if($page->template->name == 'my-template') { $out .= " <style> /* Put your custom CSS here */ </style> "; $event->return = $out; } });
    1 point
  17. Thanks for the suggestion, I've added it to the original post.
    1 point
  18. just tried the new repeater updates and it seems like a perfect match for this request! almost. you would just have to hide the label of the repeateritem then it looks really nice! keep in mind that selectors could get more complex when using this approach!
    1 point
×
×
  • Create New...