Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/03/2018 in all areas

  1. I chucked up a tutorial here: https://www.pwtuts.com/processwire-tutorials/making-a-custom-admin-theme-using-uikit-3-and-the-included-build-tools/ Hoping this method will become redundant though if I can get my head round building a module to change the colours etc. Something to work on in January (without distracting me from my JS which I should be doing...).
    4 points
  2. Hi - I'm Carlie, publisher of Linux Journal. It turns out we're not dead. In fact, we're more alive than ever, thanks to a rescue by readers—specifically, by the hackers who run Private Internet Access (PIA) VPN, a London Trust Media company. PIA are avid supporters of freenode and the larger FOSS community. They’re also all about Linux and the rest of the modern portfolio of allied concerns: privacy, crypto, freedom, personal agency, rewriting the rules of business and government around all of those, and having fun with constructive hacking of all kinds. We couldn’t have asked for a better rescue ship to come along for us. Read more about it over on the Linux Journal site and thank you, everyone, for your support. http://www.linuxjournal.com/content/happy-new-year-linux-journal-alive
    4 points
  3. It's even more impressive if you click on the curly braces icon in the bottom left "source" panel of the Chrome dev tools
    4 points
  4. Bernhard i wrote it and i repeat it you are really my hero - the admin/backend was always a ? to me since i was flashed about all the options on the frontendside with the API, creating some little modules or changing some or using small hooks to get some results are the level i was before i read your tutorials and examples...:) Wanna share a really cool example im playing with this responsive calendar plugin: https://tympanus.net/Development/Calendario/ in an easy process module i get some results like this (with some CSS tweaks): This is with the example data from but it works like a charm and is seemless responsive within the PW admin. Code i used on the PW side is really easy: now i'm getting hands dirty on trigger some booking data and some actionbuttons... Thank you for sharing your knowlegde! I wish you a healthy and successfull year - best regards mr-fan
    3 points
  5. I do not know what sort of wizardry you are practicing but I only spent half a day figuring out the setup I use all the time ever since. Note that I discard the UIkit theming feature (the so called included build process) as I find it useless. I prefer my simple method. In my site.less file I do: @site-bower-path: "../../../../"; @site-font-path: "../../"; @import "@{site-bower-path}bower_components/uikit/src/less/uikit.less"; @import "@{site-bower-path}bower_components/uikit/src/less/components/_import.less"; @import "site_conf.less"; //my configs, site specific CSS and other LESS stuff @import "uk_conf.less"; //changing UIKit variable values and adding UIkit hooks @import "site_utils.less"; //utility classes I'm not a CSS preprocessor expert so I'm sure there could be more useful setups but it already makes customizing UIkit 3 easy, like in the case of: https://www.szepelet.com
    3 points
  6. Hi guys. It's not necessarily PW related, but I do feature a project made in PW in this article. It's a short read challenging companies to think about their websites more like tools: https://supertiny.agency/en/blog/make-a-site-for-existing-customers/ Enjoy.
    3 points
  7. I am very glad that you have joined our ProcessWire community, however I'm wondering when are you going to author a post about your use of ProcessWire? You ask very good questions about PHP, other frameworks and other CMS platforms in comparison to ProcessWIre. Our community members have been extremely gracious in answering these questions. Don't get me wrong, these questions have merit, and as Off-topic conversations fit within what the forum is about. What I haven't seen is where you are asking for help building a ProcessWire site or having a problem with a ProcessWire module, inputfield, backup or anything website building related. That's just an observation that I have made over time in reviewing all of your postings so far. I look forward to your additional Off-Topic postings and please don't take this as a criticism. I enjoy the wealth of interaction on the ProcessWire forum regardless of the subject and have looked forward to reading everyone's comments for the last few years. Respectfully, Charles
    3 points
  8. Update: Image Marker 0.1.1 As of today and this version onward, ONLY ProcessWire 3.x is supported. Changelog Support for namespaced ProcessWire only (ProcessWire 3.x). Support for multiple ImageMarker inputfields in one page (using either different base images each [from different single file fields on the page] or one base image). Support for use in PageTable. Base Image select is now done using a pre-populated select inputfield. Pagination in marker table now resembles (CSS) the MarkupPageNav styles of the Admin theme in use. Improvements to marker table CSS to pick from the Admin theme (e.g. rows selected for deletion). Available now in the modules directory. Please note that this version does not address any PHP 7.x issues. Repeaters: Not fully compatible yet; I run into this issue (resources not loaded). Screens: Image Marker in UiKit
    3 points
  9. Hi @Carlie Fairchild, good to hear this. I have read that you want to rework the linuxjournal website. Have you already thought about to use ProcessWire?
    2 points
  10. Case in point: It took me all of 5 minutes to create a Google CSE with all of the URLs mentioned in the first post - plus Ryan's github repo: https://cse.google.com/cse/publicurl?cx=013706179141317928628:dendm4c3gpq
    2 points
  11. Ok just checked ASM inside an ajax loaded repeater with ajax loaded repeater items and this also works. Thanks for your example. That makes sense... Shouldn't it be possible to hook the buildForm method, check for your field and add scripts depending on the field settings there? A little This works: $wire->addHookAfter('ProcessPageEdit::buildForm', function($event) { $form = $event->arguments(0); foreach($form->fields as $field) { if($field->name != 'testasm') continue; if($field->inputfield == 'InputfieldAsmSelect') $this->config->scripts->add('/site/templates/scripts/alert.js'); else $this->config->scripts->add('/site/templates/scripts/otheralert.js'); } }); But I agree it would be nice to have this built into the inputfield somehow...
    2 points
  12. If you do try Dynamic Roles, please check out this: https://github.com/ryancramerdesign/DynamicRoles/issues/14 It's a super easy fix, but I don't really understand why no-one else seems to have noticed this - maybe it's just me somehow
    2 points
  13. Because there are lots and lots and lots of ready-made plugins/modules/forntend-themes they can install without writing a single line of code. Maintaining such a site is another story, of course... Oh, and they came first, not ProcessWire
    2 points
  14. Canvas has both kinds: Country AND Western! ahem... LESS + SASS
    2 points
  15. Hi everyone, Here's a new module that I have been meaning to build for a long time. http://modules.processwire.com/modules/process-admin-actions/ https://github.com/adrianbj/ProcessAdminActions What does it do? Do you have a bunch of admin snippets laying around, or do you recreate from them from scratch every time you need them, or do you try to find where you saw them in the forums, or on the ProcessWire Recipes site? Admin Actions lets you quickly create actions in the admin that you can use over and over and even make available to your site editors (permissions for each action are assigned to roles separately so you have full control over who has access to which actions). Included Actions It comes bundled with several actions and I will be adding more over time (and hopefully I'll get some PRs from you guys too). You can browse and sort and if you have @tpr's Admin on Steroid's datatables filter feature, you can even filter based on the content of all columns. The headliner action included with the module is: PageTable To RepeaterMatrix which fully converts an existing (and populated) PageTable field to either a Repeater or RepeaterMatrix field. This is a huge timesaver if you have an existing site that makes heavy use of PageTable fields and you would like to give the clients the improved interface of RepeaterMatrix. Copy Content To Other Field This action copies the content from one field to another field on all pages that use the selected template. Copy Field Content To Other Page Copies the content from a field on one page to the same field on another page. Copy Repeater Items To Other Page Add the items from a Repeater field on one page to the same field on another page. Copy Table Field Rows To Other Page Add the rows from a Table field on one page to the same field on another page. Create Users Batcher Allows you to batch create users. This module requires the Email New User module and it should be configured to generate a password automatically. Delete Unused Fields Deletes fields that are not used by any templates. Delete Unused Templates Deletes templates that are not used by any pages. Email Batcher Lets you email multiple addresses at once. Field Set Or Search And Replace Set field values, or search and replace text in field values from a filtered selection of pages and fields. FTP Files to Page Add files/images from a folder to a selected page. Page Active Languages Batcher Lets you enable or disable active status of multiple languages on multiple pages at once. Page Manipulator Uses an InputfieldSelector to query pages and then allows batch actions on the matched pages. Page Table To Repeater Matrix Fully converts an existing (and populated) PageTable field to either a Repeater or RepeaterMatrix field. Template Fields Batcher Lets you add or remove multiple fields from multiple templates at once. Template Roles Batcher Lets you add or remove access permissions, for multiple roles and multiple templates at once. User Roles Permissions Batcher Lets you add or remove permissions for multiple roles, or roles for multiple users at once. Creating a New Action If you create a new action that you think others would find useful, please add it to the actions subfolder of this module and submit a PR. If you think it is only useful for you, place it in /site/templates/AdminActions/ so that it doesn't get lost on module updates. A new action file can be as simple as this: <?php namespace ProcessWire; class UnpublishAboutPage extends ProcessAdminActions { protected function executeAction() { $p = $this->pages->get('/about/'); $p->addStatus(Page::statusUnpublished); $p->save(); return true; } } Each action: class must extend "ProcessAdminActions" and the filename must match the class name and end in ".action.php" like: UnpublishAboutPage.action.php the action method must be: executeAction() As you can see there are only a few lines needed to wrap the actual API call, so it's really worth the small extra effort to make an action. Obviously that example action is not very useful. Here is another more useful one that is included with the module. It includes $description, $notes, and $author variables which are used in the module table selector interface. It also makes use of the defineOptions() method which builds the input fields used to gather the required options before running the action. <?php namespace ProcessWire; class DeleteUnusedFields extends ProcessAdminActions { protected $description = 'Deletes fields that are not used by any templates.'; protected $notes = 'Shows a list of unused fields with checkboxes to select those to delete.'; protected $author = 'Adrian Jones'; protected $authorLinks = array( 'pwforum' => '985-adrian', 'pwdirectory' => 'adrian-jones', 'github' => 'adrianbj', ); protected function defineOptions() { $fieldOptions = array(); foreach($this->fields as $field) { if ($field->flags & Field::flagSystem || $field->flags & Field::flagPermanent) continue; if(count($field->getFieldgroups()) === 0) $fieldOptions[$field->id] = $field->label ? $field->label . ' (' . $field->name . ')' : $field->name; } return array( array( 'name' => 'fields', 'label' => 'Fields', 'description' => 'Select the fields you want to delete', 'notes' => 'Note that all fields listed are not used by any templates and should therefore be safe to delete', 'type' => 'checkboxes', 'options' => $fieldOptions, 'required' => true ) ); } protected function executeAction($options) { $count = 0; foreach($options['fields'] as $field) { $f = $this->fields->get($field); $this->fields->delete($f); $count++; } $this->successMessage = $count . ' field' . _n('', 's', $count) . ' ' . _n('was', 'were', $count) . ' successfully deleted'; return true; } } This defineOptions() method builds input fields that look like this: Finally we use $options array in the executeAction() method to get the values entered into those options fields to run the API script to remove the checked fields. There is one additional method that I didn't outline called: checkRequirements() - you can see it in action in the PageTableToRepeaterMatrix action. You can use this to prevent the action from running if certain requirements are not met. At the end of the executeAction() method you can populate $this->successMessage, or $this->failureMessage which will be returned after the action has finished. Populating options via URL parameters You can also populate the option parameters via URL parameters. You should split multiple values with a “|” character. You can either just pre-populate options: http://mysite.dev/processwire/setup/admin-actions/options?action=TemplateFieldsBatcher&templates=29|56&fields=219&addOrRemove=add or you can execute immediately: http://mysite.dev/processwire/setup/admin-actions/execute?action=TemplateFieldsBatcher&templates=29|56&fields=219&addOrRemove=add Note the “options” vs “execute” as the last path before the parameters. Automatic Backup / Restore Before any action is executed, a full database backup is automatically made. You have a few options to run a restore if needed: Follow the Restore link that is presented after an action completes Use the "Restore" submenu: Setup > Admin Actions > Restore Move the restoredb.php file from the /site/assets/cache/AdminActions/ folder to the root of your site and load in the browser Manually restore using the AdminActionsBackup.sql file in the /site/assets/cache/AdminActions/ folder I think all these features make it very easy to create custom admin data manipulation methods that can be shared with others and executed using a simple interface without needing to build a full Process Module custom interface from scratch. I also hope it will reduce the barriers for new ProcessWire users to create custom admin functionality. Please let me know what you think, especially if you have ideas for improving the interface, or the way actions are defined.
    1 point
  16. Moderator Note: Moved thread to Module/Plugin Development forum. The forum Modules/Plugins is only for support of existing modules
    1 point
  17. @joe72joe, moderator note: I had to edit your previous post to wrap your code in code blocks. In your last post, you are still not wrapping code in code blocks. Could you please wrap code in code blocks. Use the <> icon. Thanks.
    1 point
  18. It's the slow kind I use gulp to pull everything in usually which is relatively simple. I've found the included build tools with uikit super slow. I like with gulp that I can use autoprefixer etc. but I don't think uikit requires this actually, bs4 does. Still not sure how to use only parts of the uikit JS rather than a large fie with the kitchen sink included. The webpack instructions I found to be lacking somewhat. @szabesz how do you compile your less in your workflow?
    1 point
  19. In addition to what already has been said in this thread, I'd like to add this: Of all open-source projects I ever came across, PW is very well documented. I've seen commercial apps which are documented far worse. Can it be improved? Certainly. Will it ever be 100% complete and perfect - and suit everyone? I don't think so. But I found that I can easily get most infos with a "keyword site:.processwire.com" Google query. Building your own bookmark collection helps. Keeping up-to-date by signing up to the PW newsletter helps as well. Digging into the source code helps too (as @bernhard recently has shown with his module-tutorial, there are true treasures buried right inside core code). Having said all that, maybe it would be worthwhile to try and build a Google CSE (custom search engine), which should be free to use for non-commercial / open-source communities, at least last time I checked. That's not to say I would oppose a unified docs.processwire.com project; but the effort is not to be under-estimated.
    1 point
  20. You need to check / debug WireMailSmtp settings, (its module config screen).
    1 point
  21. Just like @3fingers found. Impressive how you've managed to find that on the compressed JS I don't actually name my vars a, b, c, but the scripts are all minified in the end and the names change. I have a script that listens to scrolling and when you go further than X pixels (don't remember the exact number) the "menu-collapsed" class is added to the document. That class will affect the menu, logo, and back to top button. The social sharing buttons are a plugin: http://tolgaergin.com/files/social/
    1 point
  22. As far as I can tell he is adding/removing the "menu-collapsed" css class through js based on user scroll. I've tried to figure it out searching into "main.js" and around line 143 there's what I think it's the trigger of it (but I found really hard to grasp it since @heldercervantes named every var and functions like "a, b, c.." and so on Probably on purpouse?).
    1 point
  23. Tons of reasons really. It comes down to what you're used to. A lot of the big 3 Devs I know are older, experienced PHP types. They started using Wp,J and D when the CMS market was a lot lot smaller. There was less choice and they used what was available. Over time newer CMSs have surfaced but transitioning to these represents challenges in re-learning, re-training etc. Even is a new CMS looks more elegant and a better fit, there's still a risk factor. Better the devil you know... as the saying goes. Even the ones who do make the change bring a lot of technical baggage and expectations. That's why you'll see a lot of posts starting with "Does PW have an eCommerce/SEO/ user/membership" plugin etc. They're looking for a familiar path to a new destination. In most of these cases, there are modules available but perhaps not the range of plugins etc they're used to. Looks scary..back yo WP, J, Drupal. There's also a lot of visibility for WP,D and J in the industry. Especially on the client side of things, a marketing manager writing a brief is more likely to request the big 3 because that's what they've heard of. If that's where the demand is and you don't feel you can argue a different platform, that's what developers will stick with or flock to. Lots more reasons. Don't forget the resources that these 3 CMS have behind them too. They have bigger marketing budgets, more developers, bigger social media presence too.
    1 point
  24. Just a quick follow-up to this - I have been importing more content in a tsv and ran across another issue. When the title of the page being matched contains a comma, the selector in the line above throws an error. $pageMatch = $this->wire('pages')->get("id=$options, title={$childFieldValue}"); An example page title is "Fixed Height, Loop Leg" - The error was from the Selector class, and the snippet included something to the effect of: "field: Fixed, value: Height " I think this was why I had used the selector value sanitizer method previously. I tried this: $pageMatch = $this->wire('pages')->get("id=$options, title={$this('sanitizer')->selectorValue($childFieldValue)}"); The import runs successfully, though I'm unsure if this might have knock-on effects elsewhere.
    1 point
  25. Yes. In our Image Marker Fieldtype module, there is a configuration for selecting pages to add as markers using either Asm or Auto complete. This works fine in normal pages and PageTable. In Repeaters though, the resources do not get loaded, so Asm or Autocomplete do not work. I have only tested with the Repeater set to load content via Ajax. Ideally, I would like to be able to check the Image Marker field setting in init() to see whether to load the Asm or Autocomplete resources. Loading both works, but it means we are always loading resources we are not using and populating $config with redundant stuff. It's not a big deal but it would be nice to load only what we need.
    1 point
  26. There's also this. Don't let the Alpha tag put you off. Go through the thread...
    1 point
  27. Problem (at least what I experienced) is that in an Inputfield, init() doesn't yet know about the Fieldtype it belongs to, i.e. you can't get info about $field. That means you cannot dynamically load scripts. It's all or nothing.
    1 point
  28. Did you check out Dynamic Roles? (PW3-compatible version here)
    1 point
  29. OK, I think I'm really confused right now. For some reason I was working with the default classic or Reno admin theme. h1 isn't used (or shown) there. With the latest UIKit admin theme, everything's OK.
    1 point
  30. No worries - thanks for reporting and helping to debug. I have committed a new version with this fix.
    1 point
  31. I've made a few migrations, not from WP, but the same method applies. First I copied the assets. Layout images, CSS, fonts, etc. Then I went to the site's homepage, copied the source, pasted on home.php and started cleaning up. With the code clean, I move the header and footer into separate includable files. You'll have to replace the menu links with a loop to grab those from the admin, change the path to the assets and so on. Then do the same for the next page. Copy from the source's frontend, paste on the template file, replace header and footer for the includes we've prepared when doing the homepage, and proceed cleaning up and replacing the hard-coded content with calls to the page's fields. It takes some time, but it's straightforward. As @lokomotivan pointed out, best is to start from an HTML template. Processwire is geared towards custom-made solutions, where as Wordpress, specially when using templates, is more about allowing the admin to customise the layout from within the CMS. There is no way of directly or automatically replicating the same features of a WP template in PW. But if you take an HTML template, trim it to your needs, then setup PW to have just the fields you need for what you're building, you'll get a much cleaner and easier to use CMS. You can do it in one or two days after you get the hang of it, depending of the site of course.
    1 point
  32. What data? Data in your new/old MySQL database or actual files and folders?
    1 point
  33. Not sure: http://www.linuxjournal.com/content/happy-new-year-linux-journal-alive
    1 point
  34. $wire->addHookAfter('InputfieldText::render', function($event) { $field = $event->object; if($field->name != 'title') return; $repeaterBtn = $this->modules->get("InputfieldButton"); $repeaterBtn->attr("value", "Generate something"); $repeaterBtn->attr("type", $submitID); $repeaterBtn->attr("id+name", "btn"); $repeaterBtn->attr("href", "/admin/page/edit/?id=1"); $repeaterBtn->attr("target", "_blank"); $repeaterBtn->addClass("customClass"); $event->return .= $repeaterBtn->render(); }); btw: panels are a great alternative for new browser tabs: https://processwire.com/blog/posts/building-custom-admin-pages-with-process-modules/#using-internal-components-modules
    1 point
  35. Welcome to the forum @FireDaemon Did you read this page? https://processwire.com/docs/security/admin/ Yes. In fact, during install process you are asked if you want to rename it. But you can do it later also. You could try this module. Yes That's already in core: see https://processwire.com/docs/security/admin/#preventing-dictionary-attacks In a test-environment, you can further add stuff like .htaccess allow/deny rules, i.e. only allow access from certain IPs.
    1 point
  36. There's also this module: I just installed it on a 3.0.86 site - it works as advertised
    1 point
  37. $wire->addHookAfter('Inputfield::render', function (HookEvent $event) { $field = $event->object; if (substr($field->name, 0, 13) === 'repeater_item') { $page = $event->arguments(0); $id = str_replace('repeater_item_', '', $field->name); $submitID = "submitRepeaterItem_$id"; $form = wire('modules')->get("InputfieldForm"); $submit = wire('modules')->get("InputfieldButton"); $submit->attr("value", "Edit this repeater item as page"); $submit->attr('data-href', wire('config')->urls->admin . "page/edit/?id=$id"); $submit->addClass('pw-panel'); $submit->addClass('uk-margin-left'); $submit->attr("id+name", $submitID); $form->append($submit); $myForm = $form->render(); $event->return .= $myForm; } }); I've got this in ready.php... seems to work.
    1 point
  38. it also depends on the budget of the project; for clients without a line item for frontend design, us developers have no choice but to use an HTML theme... and why deny some clients without large budgets the benefits of having a PW site... Sometimes these Themeforest and Wrapbootstrap themes are good, and have good integrations with plugins like tabs, slideshows, masonry etc. Having said that, i do find that i have to fix a lot of problems with these templates, remove as much CSS code as i can that i'm not using, and also write a lot of my own custom stuff on top of them; here is a site using Canvas: http://louiskarchin.com (recently relaunched/upgraded)..
    1 point
  39. This one I can't duplicate yet. I'm also running the latest Chrome, except in OS X rather than Windows. I also tested in Firefox and was not able to duplicate it there either. Maybe there is a platform difference I need to look closer at. But you mentioned that after saving the page, everything worked. I'm guessing a JS error is happening somewhere in the process. Try enabling debug mode $config->debug=true; in /site/config.php, and watch your Chrome JS console for any JS errors that might appear in the process, whether from the CKEditor field, or possibly another field in the page editor at the same time. Edit—see further down for my response to the JS error you found. Paste doesn't work in Firefox for me either. As far as I can tell, this CKE plugin doesn't support the paste action in Firefox. It looks like Firefox uses a different type of raw data when it comes to paste that might require Firefox specific code. I haven't looked very far yet though. Okay I think this may possibly be what the issue is with the first issue. Try registering under some name other than "mystyles", which is just what we used for example purposes, but better to choose your own name. It looks like it might be colliding with some built-in example and creating the JS error. The croppable image field is a 3rd party plugin, so I'm not sure to what extent it might support this feature. But if it extends FieldtypeImage, then chances are that it will work for uploads as well. I'm not sure I understand what you mean by "fetches all images"? This feature only uploads images. It sounds like maybe you are talking about the image insert dialog, where you can select from images that are already uploaded? If that's the case, go to Modules > Configure > ProcessPageEditImageSelect. In the settings, you can specify the images fields that it should ignore. You'll want to add your croppable image field there (if you don't want it available for CKE). This new CKE upload feature also honors the setting you specify there. I can't duplicate this one either, but since we know where it's occurring I can add some code to avoid it. What we're seeing there is a $page that has no template assigned, somehow. I'm guessing another module is triggering with a NullPage, which is why template is empty. I'll add a detection for that and commit it in a few mins. I'm pretty sure that'll fix it.
    1 point
  40. Radio Hala96 FM is a radio service that aims to promote the community through presenting a program map with creativity and thought for all groups. On March 15, 2014, Hala began a live broadcast with a unique programming program that brings you daily on a useful and exciting weekend trip. The Website Is Developed By I&S Group & Powered By The Great ProcessWire & It's Awesomeness That We All Love. .
    1 point
  41. 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.
    1 point
  42. I have a text area on a template that stores html. I think it would be a great addition if we could make the page save feature keep my spot in the text area and keep the spot of the scroll bar instead of taking me to the top of the page and starting the text area at the top. (I could have been editing a line in the middle of the box and then need to scroll down to find it again to make another change) Even better would be an update that wouldn't refresh the whole page at all but just the field contents! But a flash is ok as long as it remembers where I was at!
    1 point
×
×
  • Create New...