Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/06/2015 in all areas

  1. This module creates a per-page activity log. It's not version control, but it is a history of changes made to all core field types. See the screenshots below for further explanation. It consists of 2 modules: MarkupActivityLog ProcessActivityLogService (handles ajax calls for show old/new values of textareas) More information on github Non-Superusers add an 'activity-log' permission. Thanks Nico, Netcarver, Ryan. MarkupSEO, Field Change Notifier, and FormBuilder where heavily referenced (*cough* copied) at points. Activity Log Tab Changes to textareas show in modal Module configuration
    12 points
  2. Howdey! Over the last weeks, I had some critical thoughts about processwires ui/ux feeling (relative sizing, overflow-x, hover-states, word-wrap:break-word) but also its stability. Last night I had the time to setup some new things. Good point for me to fiddle a bit around, with issues I've seen over the last months... ...short break: A lot of bugs, I've noticed earlier, are gone... @allcontributors I ♥ you! However, someone left over some bugs, for me ;-) I just ended up with an ugly and unstructured markdown file. No issues or pull-requests via git. The biggest reason, most things are between "bug" and "enhancement" or are just too platform specific. I think, it's better to talk about those stumbling blocks first. Ok, enough for now. As I said, it's markdown, to see the compiled thing, take this: https://gist.github.com/yckart/62b7b2ed9d0e3845cc4b # Bugs - Mobile (iOS 8) ## Navigation closes immediately **Description** Menu opens (for less than ~100ms) and closes immediately again. **Reproduce** Click on the upper left menu icon, scroll a bit down (~10px), click menu icon again. Try to open the menu. ## "Add New"-menu unclosable **Description** Shortcut-menu to add new pages, can not closed again with "Add Menu"-button. **Reproduce** Click on "Add New" (is open), click again to close (is still open). **Solution** It's something about the hover-state in mobile safari. Adding `ontouchstart` to `<body>` could help. Better, listen for events and change states via javascript. ## ProcessLister not reachable **Description** Lister (filter/related) is not "reachable". **Reproduce** 1. Open backend on iOS. 2. Try to find/reach "lister" and "recent-pages" **Solution** Add a dropdown-menu with infinite levels of nesting. See also [#show-fullpage](#show-fullpage) ## <a name="input-auto-zoom-bug">#</a> Input auto zoom bug **Description** If an input gets the focus, the page will zoomed in a bit. Causes horizontal scrollbars. See also [#horizontal-overflow](#horizontal-overflow) **Reproduce** Focus a text input element in the backend. **Solution** `html { text-size-adjust: 100%; }` **References** - http://stevenosloan.com/articles/2013/prevent-zooming-on-forms/ - http://stackoverflow.com/questions/2989263/disable-auto-zoom-in-input-text-tag-safari-on-iphone ## <a name="horizontal-overflow">#</a> Horizontal overflow **Description** Causes horizontal overflow on some pages, mostly because of long words/text. See also [#input-auto-zoom-bug](#input-auto-zoom-bug) **Reproduce** View "ProcessPageEditImageSelect"-configuration page **Solution** `word-wrap: break-word` ## SystemNotifications ghost doesn't break words **Description** Ghosts do not break long text on iOS. **Solution 1** It's something with `position: fixed; width: 100%` and `position: fixed; left: 0; right: 0;`. **Solution 2** I've seen some problems with `word-wrap: break-word`, I think there are some bugs related to this topic. See also [#horizontal-overflow](#horizontal-overflow) ## ProcessPageSearchForm too small **Description** Input field is a bit too small, for my eyes. --- # UI/UX ## ProcessPageEditImageSelect image not scaled **Description** The currently edited image in modal is not scaled down. We are able to define dimensions (e.g. 800x600), it seems that the image will get exactly this pixel-values as dimension-properties, makes the thing feel not that responsive as it could/should. **Reproduce** 1. Open page with image field attached 2. Click an image (larger than the device viewport) to open modal. **Solution** Haven't looked deep in it, but something like this should help: `img { max-width: 100% ...` ## PageTable ### Drag breaks layout **Description** Dragged item is not longer in box-model (due `position:absolute`) and visually breaks the table. **Reproduce** Move cursor over table item > hold mousedown and drag ~1px. **Solution 1** Create clone and move this instead of original PageTableField. **Solution 2** Save offset, before the PageTableField gets `position: absolute`. ### PageTable optional sorting **Description** Sorting via drag-and-drop should be optional. Currently we can say that items added to PageTable are "pre-sorted" with `Inputfield_sortfields`, but they are furthermore sortable via drag-and-drop. **Solution** Add "Sortable via drag-and-drop"-option to PageTable ## NotificationBug alignment/position **Description** It's annoying to have the NotificationMenu-toggler move always up/down (and it looks a bit too "floaty" in my eyes). **Solution** Move the NotificationBug right to search form and "fix" (not `fixed`) it at the top. --- # Feature requests ## <a name="show-fullpage">#</a> Show fullpage **Description** It could be helpful to be able to switch (on mobiel devices) between mobile- and desktop version. **Solution** Add "Show fullpage"-link to footer ## Inline time picker on datetime field **Description** If the date picker is inlined (always visible) theres no time picker available. ## <a name="line-trough-draft-pages-asmselect">#</a> Line trough draft pages AsmSelect **Description** In PageLister a page with status "draft" is striked (~~line-through~~), should be the same in asmSelect (if "Allow unpublished pages" is enabled). See also [#asm-page-state](#asm-page-state) **Reproduce** 1. Enable draft pages on PageTable. 2. Change page status to draft. 3. Open the referenced page and view select-field item. ## <a name="asm-page-state">#</a> Indicate page-states in asmSelect **Description** Each state could visualized with different styles. See also [#line-trough-draft-pages-asmselect](#line-trough-draft-pages-asmselect) **Solution** - draft > ~~line-through~~ - hidden > opacity - locked > *italic* ## Image-reference selection **Description** Selecting already uploaded images, from any page, is a must have! **Solution** Indri is one great tool for this, https://github.com/ikayzo/indri ## Create page once **Description** It should be a possibility to create pages (one the same tree-level) just once, instead of renaming to "duplicate-page-name-1". **Reproduce** 1. Create new page with name "foo". 2. Create another page with name "foo". 3. Now you have "foo" and "foo-1". **Solution** Add "Singular"-option to templates to let us decide what we want. If this option-field is ticked later, on page edition show notification if page with name "foo" already exists and don't save, or ask what todo. ## Pre-select site-profile **Description** If there's just one site-profile to install, use it. ## Show full version number on installation **Description** During installation the version in footer-section is trimmed e.g. 2.5.29 => 2.5 ## Dynamically enable field deletion **Description** Ajax-check to enable "Delete field" after valid change on "Action"-tab.
    7 points
  3. Thanks for all the input on this. The "mod" namespace is renamed to "module" already on develop branch, the "show" namespace in abandoned in favor of a more generic "status" command, also available on dev. I agree with Ivan when it comes to "general:specific" in general and the "backup" namespace in particular - although it's just the :db command right now, I plan to extend this namespace with :all (db and all scripts), :files (just /site/assets/files). But in the big picture I'll try to reach a naming scheme close to the API - modules will never by named plugins and I don't really know why exactly I shortened "modules" to "mods" down in the past...
    6 points
  4. @gazley, One possibility would be a process module that would handle the sending; for example, you would have a button on the page which would for example link to that process, even by ajax, and send the email. another way, in preserving your current method, would be to run some JS when the checkbox is checked, and display an alert "you have selected to send email on save - would you like to save the page now to initiate this action?" and then run a click action on the save button depending on their response, or even just run the click action on the save button after they select that checkbox - since it would save the page, i can't see any drawback to that...
    4 points
  5. You could just alter this to your needs. This adds a second button to the pageEdit, which then triggers an action if clicked. <?php class HookPageEdit extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'Hook PageEdit', 'version' => 1, 'summary' => '', 'singular' => true, 'autoload' => true, ); } public function init() { $this->addHookAfter('ProcessPageEdit::buildForm', $this, 'addButtons'); $this->addHookBefore('ProcessPageEdit::processInput', $this, 'addButtonsMethods'); } /** * Add a button besides "Save", which lets the user accept the application * */ public function addButtons($event) { $page = $event->object->getPage(); if($page->template == "application"){ $form = $event->return; $accept = $this->modules->get('InputfieldSubmit'); $accept->attr('id+name', 'hook_accept_application'); $accept->class .= ' ui-priority-secondary head_button_clone'; $accept->attr('value', $this->_('Accept Application')); $form->insertBefore($accept, $form->get("id")); } } /** * Triggers the pageAction of "PageActionAcceptApplication" if the page was * submitted via the added button. This won't save the page, because that only * happens if the button is named "submit_save" or "submit_published" * */ public function addButtonsMethods($event) { if($this->input->post->hook_accept_application){ $page = $event->object->getPage(); $event->replace = true; if(!$page->id){ $this->error("Invalid application to be accepted."); return; } $accept = $this->modules->get("PageActionAcceptApplication"); $accept->action($page); } } }
    3 points
  6. You can use the imagesizer class without the image being part of a field. I'll add a script I use for creating thumbs of form builder entry images. protected function getThumb($file, $formID, $entryID){ $path = $this->forms->get($formID)->entries()->getFilesPath($entryID); $fileParts = explode(".", basename($file)); $ext = end($fileParts); // Create thumbnail $basename = basename($file, "." . $ext); $basename .= '.0x150.' . $ext; $filename = $path . $basename; $exists = file_exists($filename); if(!$exists && @copy($file, $filename)) { try { $sizer = new ImageSizer($filename); $sizer->setOptions(array( 'upscaling' => false, 'cropping' => false, 'quality' => 90, 'forceNew' => false, )); if($sizer->resize(0, 150)) { if($this->config->chmodFile) chmod($filename, octdec($this->config->chmodFile)); } else { $this->error = "ImageSizer::resize(0, 150) failed for $filename"; } } catch(Exception $e) { $this->error = $e->getMessage(); } } if(file_exists($filename)) return $this->forms->getFileURL($formID, $entryID, $filename); else return null; }
    3 points
  7. You might be able to get some ideas from my Table CSV Import / Export module - even if you don't have Profields Table, you should still be able to grab the bits of code you need - take a look at the "Export as CSV" button on the screenshot in the first post: https://processwire.com/talk/topic/7905-profields-table-csv-importer-exporter/ In the repo you'll notice there is a helper Process module (ProcessTableCsvExport.module) for handling the action when that button is clicked. Hope that helps a little, although keep in mind that it uses a hidden iframe technique to spawn the download and as noted by others above, you will probably need an AJAX approach in this case.
    3 points
  8. In the specific case of the checkbox to send the email I think the best is to add a note instructing people to save the page. Something like "send email after saving this page. Don't forget to save the page or the email will not be sent". A quick hack would be to use Admin custom files module to add some JS magic (read "hack") to do this instantly. You could for instance capture the change event on the checkbox to trigger the save button: $(".checkbox").change(function() { if(this.checked) { $(".save-button").trigger("click"); } }); ...or even replace the checkbox by a copy of the save button and change the text to "send email". The possibilities are infinite. -- PS: notice my first sentence. I still would prefer the simple informative solution.
    2 points
  9. the best blog-post i found so far: https://megalytic.com/blog/how-to-filter-out-fake-referrals-and-other-google-analytics-spam i found out that segments are REALLY helpful! you can define filters and apply them also to your historical data. it's also very few clicking if you use REGEX like this (taken from https://github.com/piwik/referrer-spam-blacklist/blob/master/spammers.txt): 4webmasters.org|7makemoneyonline.com|acads.net|anal-acrobats.hol.es|anticrawler.org|best-seo-offer.com|best-seo-solution.com|bestwebsitesawards.com|blackhatworth.com|brakehawk.com|buttons-for-website.com|buttons-for-your-website.com|buy-cheap-online.info|darodar.com|econom.co|forum69.info|forum20.smailik.org|free-share-buttons.com|get-free-traffic-now.com|googlsucks.com|hulfingtonpost.com|humanorightswatch.org|ilovevitaly.com|iminent.com|kabbalah-red-bracelets.com|kambasoft.com|makemoneyonline.com|masterseek.com|o-o-6-o-o.com|ok.ru|priceg.com|ranksonic.info|ranksonic.org|savetubevideo.com|semalt.com|sexyteens.hol.es|social-buttons.com|theguardlan.com|webmaster-traffic.com you can then analyze what all the spam-bots are doing on your site: and you can easily switch your filter to EXCLUDE all spam-bots and compare your data: i've not found out how to deal with segments via ga-api. maybe some day i find the time. as a note for myself: https://developers.google.com/analytics/solutions/articles/hello-analytics-api i'll give a more detailed insight on my blog, when it is finished EDIT: it get's even better!! you can share segments and have it available in ALL your properties for ALL your data (also historical)! here is my segment: https://www.google.com/analytics/web/template?uid=ns25vIZpSj2NpRFk371g3Q just visit the link and enjoy spam-free analytics does it work for you?
    2 points
  10. Gazley, I think it's important to have something like a page save, or other button that actually triggers the send. You could trigger it to happen via ajax when the user checks the "send email" checkbox, but that doesn't give them an opportunity to change their mind. The send would be immediate, unless of course you ask for a confirmation in a modal.
    2 points
  11. Good Day, If I am understanding you correctly, you could have a text or textarea field that is only viewable by the Admin. From there you could use a Hanna Code to have a button "Send Email" that sends out the email. That's just one way to achieve this. i'm sure there are others that have a simpler, more streamlined or innovative solution to your problem. The great thing about PW is that there's multiple ways of getting things done. Good luck.
    2 points
  12. This module checks for changes on forms in the PW admin and throws a confirm dialog before leaving page without saving. Thanks to Ryan for the new module name suggestion. Much better choice I think. The module can be configured to switched on or off the check for each of these areas: - Page Edit - Field Edit - Template Edit - Access Pages - Modules Settings (may this not was neccessary, but just for the fun of trying to do a configurable module, well I just did it) ### update 1.0.3 - fixed issue with delete button throwing the alert ### update 1.0.2 - fixed issue with script adding (again) - updated some texts and documentation #update 1.0.1 - fixed issue with script adding - fixed subdir installation path - added script versioning Download: http://modules.processwire.com/modules/form-save-reminder/ Github: https://github.com/somatonic/FormSaveReminder
    1 point
  13. Hi all, A client needs 12x languages on Processwire - I've set this up and it works beautifully out of the box. Again Processwire is wonderful thing. One thing they've asked for a way that languages are shown on fields on a per-user basis. This is so translators won't be able to accidentally edit the wrong language. So for example: A German translator will only be able to edit the German version of the fields. Is this be possible? I know that you can set a default language for each user, but could there be a way to set this and therefore restrict their access to one language only. Any help here would be massively appreciated as always. Thanks!
    1 point
  14. So here we go, Manfred62 asked me to push the german translation fo this great addon for processwire...and deliver it with the PW language files on github. So i started tonight - and fin some little things here and there. Done a pull request on git for the first one i found: https://github.com/kongondo/Blog/pull/20 added two pics that show the difference... for the germant translation i'll take some free evenings since with the installer there is much more text than the first versions By the way install 2.3.4 runs great and module is for shure great, too!! Best regards to Kongondo for this big piece of work - glad to could contribute a little with some lang files!
    1 point
  15. This should do the trick! $f = $fields->get("body"); echo '<i class="fa '.$f->icon.'"></i>'; PS make sure you load this on the page: <link rel="stylesheet" href="/wire/templates-admin/styles/font-awesome/css/font-awesome.min.css" type="text/css">
    1 point
  16. For those interested, I have put my vector and bitmap versions on my (way-too-in-progress) website: http://plauclair.me/processwire/logos/
    1 point
  17. Hi Macrura, I have all my CSS files in a sub-folder in the templates folder. Is this reason I can't edit them? In fact, I can see all of them in the templates editor. Gideon edit: File permission problem. I change the permission of the CSS folder to 774 and it works.
    1 point
  18. I found the solution: you have to include $user->userimage->removeAll(); // wirearray before this line of code $user->userimage = $upload_path . $files[0]; This removes the image array in a first step and then loads the new image in the database.
    1 point
  19. But for what is the API call "setOverwrite(true)" ? It must be possible to overwrite the existing image by uploading a new image without deleting the old manually. In backend it works perfectly. Only one image is allowed: setMaxFiles(1) If I upload a new one then delete (overwrite) the old on and store the new: setOverwrite(true) This seems logical to me
    1 point
  20. I know... old... This is why I bought form-builder and actually never use it ...
    1 point
  21. The Google Trends analysis IMO isn't of much help, it doesn't show the inherent "value" of PW as a CMS/CMF, it just throws hard to analyze numbers at the wall. In sheer numbers, WordPress should be the "B357 3V4R" solution out there. WP also benefits from having a LOT of marketing and PR involved, which the PW community doesn't really have (yet?). Look at the ecosystem around Laravel.. Laracasts, dedicated podcasts and blogs, training sessions and communities all over. It didn't get to be known with no effort, there has been a lot of time (and money?) put into it, the creator and his team have explained this numerous times. On another note, I actually have a two-pager to introduce PW to clients, unfortunately it's in French and heavily branded and I don't have much time to translate it right now. But it might be of interest. The main selling points I see and discuss in it — and I'd be very interested to know what's your opinion on this and what has worked well or not so well for you — go like this: Ease of use (for users and devs alike) — self documentation, data validation, fast development cycle Extremely fast — w/o caching, it's fast. With caching, it's fast as hell. Still need moar speed?! Throw ProCache at it and bingo! Static websites with all the benefits of a dynamic system and none of the pain of static generators. And fast websites mean better SEO, better visibility and better conversion rates! Win-win-win! Scalability — Does small and large scale sites really well. Hierarchical structure, when necessary, make it easy to manage content (plus it's built-in search system). Stability and security — Costs less to maintain and isn't very prone to attacks due to its inherent architecture. You don't need to update it every other day. Efficient development — Up to date development paradigms, easy to maintain and develop with growth in mind, content "agnostic" (i.e. it not targeted at one kind of use/market). Most things are already in core, no need to extend the core to do things I consider basic in this day and age, and pay annual fees for them on top of that.. I prefer to invest that time and money helping PW the best I can, that's how open source is best IMO. Relational content — It's hard to explain to clients, but it's seriously what generally cuts in when I need to select a platform for a client and really, PW wins hands down on this. Everything is a page and a page can be related to any other page in the way that pleases you. This enables really powerful contextual information, advanced "member" sections and such. I think that sums it up, then I usually add one or two paragraphs at the end that describes further why PW is a good choice for this project. Most of these arguments have been working well so far.
    1 point
  22. Try this: $t = $templates->get("basic-page"); $nt = $templates->clone($t); $nt->save();
    1 point
  23. Hhm, it is still the same as before Have tried with IE, what I don't use normally and have the same behave. Also the site was newly setup today as a new (formerly not used) virtual host on my local machine. With FF I have cleared all browser cache and everything else, - completly and multiple times now. Wirefolder was switched, not merged. The old templates-admin folder was deleted after the first successful request with the new wire folder. That old colors came from a custom css file what was loaded with AdminCustomFiles module. But I have disabled that option and now it isn't loaded and the color isn't overwritten, but the behave is still the same. Hhm, so, what else can I check? EDIT: when hovering over the [ uninstall ] header I get lots of JS console errors: passing empty string to getElementById(), but now I can open it by click and can access the uninstall checkbox! But the behave of the pagination is still weird. EDIT 2: FINALLY SOLVED after dropping / refreshing all from browser cache and double checking the sites and wire folders etc. the only logical thing was that it must be something in the DB. And after dropping once all rows from the caches table it works fine now.
    1 point
  24. Totally agreed, great stuff. It is described in the docs as well: https://github.com/marcus-herrmann/wireshell#custom-profile-processwire-installation-%CF%80 On top of that i still think it would be a neat addition to be able to also choose from one of the bundled profiles: site-beginner site-blank site-classic site-default site-languages Once again, no critique, just an idea. Great work.
    1 point
  25. While it's certainly possible it's not as easy as you may think it is. Passwords are stored as hashes in the database. ProcessWire will never store the plain text password. The hashing is dependent on the salt value stored in the config.php. The salt is generated as part of the installation process and therefore your live installation may have another salt value as the dev one. If this is the case it means all the passwords of imported users would be invalid after moving them. What you can do is to copy the whole users database table and copy over the salt value, too. As long as all hashes of user passwords are generated with the same salt value you can exchange users as you wish. But if you have users in both installations, where the passwords where saved with different salt values, you can not move the passwords over from one installation to another. You would need to change/update the passwords by hand in this case. Everything besides the passwords shouldn't be a problem.
    1 point
  26. Nice one ESRCH, but that only affects the View tab on editing a page - I also like to change the view links on the page tree. Yours does cover the only critical issue as that is when it is possible to lose changes to a page (unless you have Soma's Form Save Reminder installed). I just posted this over at: https://processwire.com/talk/topic/7588-admin-custom-files/?p=89331 because it uses Martijn's Admin Custom Files. This version also changes the view links on the page tree. ProcessPageList.js $(document).ajaxComplete(function(){ $('li.PageListActionView a').each(function(){ if($(this).attr('target') == undefined){ $(this).attr('target','_blank'); } }); }); ProcessPageEdit.js $( document ).ready(function() { if($('#_ProcessPageEditView').attr('target') == undefined){ $('#_ProcessPageEditView').attr('target','_blank'); } }); Maybe someone else will also like this approach.
    1 point
  27. Feel being liked, for all the knowledge about pw I'd like to have
    1 point
  28. Shame I can't like myself.
    1 point
  29. $parent = $page->parent; $current = $page->id; $overviewchildren = $parent->children("id!=$current, limit=4"); Or maybe $overviewchildren = $page>siblings("id!=$page, limit=4"); Edit: oh and welcome!
    1 point
  30. Do you get paid for the sites that you would with PW? When you come to the forums to get help, do you limit your questions purely to development work that you are doing for free? I originally developed PW to help us all create better sites in less time, and with more fun. I'm hoping that PW is helping others to be more competitive in all ways, including financially. But recognize that PW did not come into existence on its own. Years worth of time and money has gone into making ProcessWire happen. If you are using ProcessWire to develop sites you get paid for, then you are profiting from ProcessWire. And that's fine with me, no ROI is expected or wanted--I've never asked anyone for anything. But it is disheartening to hear a user make a statement with the implications yours makes. Form Builder is not about making a profit. I don't expect that I will ever make enough on it to offset the actual time investment on it. My hope is that eventually it will be something where the community and myself have split the cost to create. If I wanted a profit, I would go make a Form Builder for WordPress or Drupal where the user base is large enough for that potential to exist. Form Builder is a tool that wouldn't exist if I had to fully self fund it. It's also an experiment to determine if I can reduce my client workload and substitute some of it with ProcessWire-related development that benefits all of us. But I can't substitute something that supports my family with something that doesn't. Form Builder is here to benefit you, not me. If you build sites for a living (or even a hobby) it's going to pay for itself the first time you use it. If you previously spent half a day building a form, now you can spend minutes and get a better, more secure and capable result that can do all sorts of things with the results it collects. Also want to note that Form Builder is something completely different from the original subject of this thread and I don't view them as similar products at all. Likewise, Form Builder is completely different from something like Zend Form or others like it. One does not preclude the use of the other and we should all keep more than one tool in our forms toolbox. I fully support Clinton's project and any others that benefit forms in ProcessWire. Forms are one of the most diverse and important aspects of web development. I feel very confident about the value of Form Builder in your toolbox, so have made it 100% refundable if you find it isn't for you (this type of return policy is pretty rare with digital products).
    1 point
  31. It's one of the statuses you see in the top of the Pages class. So you can set the status using it like: $page->status = Page::statusUnpublished; Edit: Have you looked on the Cheatsheet? For reference under "Page Status" http://processwire.com/api/cheatsheet/ BTW aren't you the guy with the processwiresexy, whatever? I'm kinda surprised you didn't know this.
    1 point
  32. I fixed some issue with the module not working on TinyMCE fields when editiing a page on deeper than 3th level. For some reason the FormSaveReminder.js which does the checks, was then getting applied after all the tinyMCE scripts and thus not working. (on higher levels it was appended before them) It took me many hours to realize this was the problem What's up with this Ryan? I did now change it to get inserted through str_replace just after JqueryCore script. I'm not sure how future proof this will be, but I guess the JqueryCore will never change. Latest version is now on github. Thanks EDIT: Just found that in Firefox it doesn't work with TinyMCE Fields at all... Firefox is almost like IE now, crap...
    1 point
×
×
  • Create New...