Jump to content

Leaderboard

Popular Content

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

  1. Earlier this week i noticed one of our sites (tools) had the following URL while working in the manager /processwire/page/edit/?id=1257390 Then i realized there where already more then 1.2 million pages, and processwire still running smoothly like a charm. I just wanted to share it here, and that i'm realy happy with ProcessWire. Thanks go to Ryan and all contributers for creating and maintaining this wonderfull piece of software!
    18 points
  2. http://fooexperience.com/ This is a site i actually did last year, thought i would share my one and only processwire site. Unfortunately im stuck using other tools at work where processwire would be a better fit!
    9 points
  3. What is possible is to use a concat field to "save" the count of the images field and then use that for the visible dependency selector. Create a concat field "imagescount" and enter "images.count" as the value. Add that field to the template. And enter "imagescount>0" in the textfield's dependency. This works after only after you uploaded images and saved the page.
    4 points
  4. 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">
    4 points
  5. 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.
    3 points
  6. 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
    2 points
  7. What else is there to remove? 5¼-inch floppy, serial ports, 3½-inch floppy, CD-rom, DVD-rom, most video outputs, trackpad buttons, ethernet and finally USB. Hopefully power will be next...
    2 points
  8. CPU GenuineIntel, Intel® Xeon®CPU L5506 @ 2.13GHz OS CentOS Linux 7.1.1503 (Core) Memory 16GB Disk 120GB SSD RIAD1 Its running Parallels Plesk v12.0.18_build1200140811.16 os_CentOS 7 with ngix caching turned on
    2 points
  9. This looks pretty relevant
    2 points
  10. Ok, images and files fields aren't supported. It's not a matter of the textfield being multilanguage or not, it's how file fields and dependencies work. images.count>0 on a text field will only work if you upload a image via the dialog upload, cause that <input name="image[]"> is the one observed checking for its count. Once you save the image and reload the page that input is again 0. So it's not a bug but a "not supported" thing.
    2 points
  11. The modules directory now has an option for PW 3.0 compatibility. Please test your modules with the latest dev version of PW and tag your modules with the new 3.0 option if everything works as expected. Thanks for all your contributions which help make PW what it is! For those who haven't discovered it (it's not terribly obvious), here is a list of all the modules that are currently tagged as being compatible with 3.0: http://modules.processwire.com/versions/3.0/
    1 point
  12. Since I've been working on a few projects where I used Bootstrap 3 and will be using it for future projects, I put together a blank site profile with Bootstrap 3 Sass, Fontawesome and a few markup render functions for Bootstrap dropdown menu, image carousel and accordion. You can find it at https://github.com/gebeer/site-pwbs Features bootstrap-sass-official font-awesome SASS version jquery modernizr render functions for:BS3 dropdown menu BS3 accordion from PageArray BS3 carousel from PW images array Prerequisites compass bower How to install from zip: download the zip extract the folder "site-pwbs" into a clean ProcessWire install's root folder during install of ProcessWire choose the profile "bootstrap-sass-official fontawesome blank profile" After installation The last step after installing the profile is to install all assets with bower: open a terminal in site/templates and execute "bower install" How it works The profile is based on the blank site profile that comes with PW 2.5 and uses the delegate template approach. It comes with a top navbar, a main container and a footer section. Rest is up to you. CSS gets compiled through compass. You can easily override BS variables and exclude BS components that you don't need. I intentionally did not add structure to the sass folder so you can structure your partials yourself as you please. There is only one folder "generic" with _mixins.scss whith a very lean and flexible breakpoint mixin that I discovered here. JS Since I only use the BS javascript plugins I really need, I usually copy them over to my plugins.js file. I use bower to install bootstrap-sass-original and fontawesome because it gives more flexibility than requiring them through ruby gems. This way you can tweak the BS and FA partials to your liking (of course only if you don't intend to do "bower update" further down the road) Enjoy!
    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. watch this insight first: Very much off topic, I know. But, hey, it's the pub!
    1 point
  15. On wordpress.com, it is claimed that "WordPress powers 23% of the internet". We can't know for sure if this figure/percentage is real/realistic. But it's so easy to claim this when a lot in fact only exist because they are created via this website, and probably cannot be said to be "professional" and/or of professional quality. And they are perhaps not "active" anymore. One question is if it powers them efficiently. And now also, the Joomla! website proposes this: demo.joomla.org "Try Joomla! Fall in love! Get a 90-day free Joomla! demo account"... And "Keep your site after 90 days!", "Quick Joomla! Test Drive" (that doesn't seem to work currently) and "Multilingual websites in Joomla!". So the figures/percentages... Another question is if these CMSes empower the developers to create websites efficiently. Because I made 2 websites with ImpressPages CMS (in fact I wanted to create the second with ProcessWire but was a total beginner at that time), I know that there is also "ImpressPages Cloud". "Use ImpressPages cloud to gain maximum simplicity. Add your own HTML, CSS or even PHP code. It is free in development mode. Pay just $4.99 when you ready to go live." "Register" "Try without registration" ("Try on The Cloud" link on the homepage). And we know it also exists for other CMSes, for instance Concrete5: www.concrete5.org/trial "You can point a full domain at this demo when you purchase a hosting plan." "Create a concrete5.org Community Account" "My Website Needs I need a website for myself I build many websites for a living."
    1 point
  16. There's a real security concern to just having the one USB Type-C port and no other way of charging the device. It means that just to charge it you are connecting a fully-enabled data port to a potentially hostile connection - especially if you leave your own charger at home or plug into a charging port integrated into a power socket. How do you know that all your machine isn't being compromised as well as charged?
    1 point
  17. The retina screen will be replaced by a projection on the retina
    1 point
  18. someone knows the movie "Groundhog Day"? https://blog.sucuri.net/2015/05/jetpack-and-twentyfifteen-vulnerable-to-dom-based-xss.html
    1 point
  19. Currently: https://soundcloud.com/dummejungs/bringdatnoize-mixtape-1
    1 point
  20. For me it works just fine "image.count>0" to show a textfield only if images has images. But not positive this was always the case with using Dependencies and subfields. image_field != false image_field.count = 0 Aren't valid selectors. It has whitespace. image_field!=false image_field.count=0 For image fields it only would make sense to use image_field>0
    1 point
  21. No problem at all - there is nothing wrong with the approach you took - completely valid code and appropriate in many cases so long as you don't need additional logic. Since you're new to PHP (and maybe other scripting languages?), you may not have seen ternary operators before, so here is a great explanation: http://davidwalsh.name/php-shorthand-if-else-ternary-operators They shouldn't be used instead of if/else in all situations, but in many cases they can make code simpler. If used incorrectly with too much nesting, they can become horrible to read If you want to stick to the style you have, you could do this: $staticPages = $about->children("sort=name"); foreach($staticPages as $staticPage) {?> <li class="list-group-item<?=$page == $staticPage ? " active" : ""?>"><a href="<?=$staticPage->url?>"><?=$staticPage->title?></a></li> <?}?> I find it messier, but others may prefer it. Also be warned about php shorttags: <?= vs <?php echo - not all servers will currently support shorttags, although it is the default in more recent versions of PHP.
    1 point
  22. 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
  23. 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); } } }
    1 point
  24. 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
  25. 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.
    1 point
  26. I know... old... This is why I bought form-builder and actually never use it ...
    1 point
  27. Try this: $t = $templates->get("basic-page"); $nt = $templates->clone($t); $nt->save();
    1 point
  28. Made my own ProcessWire T-shirt: http://i.imgur.com/FBWb59Q.jpg
    1 point
  29. Until last week Hooks were mostly a mystery to me too...until I did this and this and got this
    1 point
  30. Here's how it worked for me in CKEditor (in case you persist on this route - but I would go for Hanna Code as Adrian suggested. As usual, the "culprit" is our friend HTML Purifier (read from here up to and including Ryan's comment here about its pros and cons before deciding whether to implement #5 below!) For iframes, the Extra allowed content seems to have no effect - btw, the correct syntax here is for example, div(*) not div[*] Add 'Iframe' (note the spelling) to your CKEditor Toolbar Leave ACF on No need to switch the field's "Content Type" from "Markup/HTML" to "Unknown" Turn HTML Purifier off (gasp! ) Enjoy your embedded video
    1 point
  31. Shame I can't like myself.
    1 point
  32. Changing core modules is never an option. Not even consider it temporarely. But there's plenty of ways and hooks you can change behaviour of core modules. There a couple ways to do that, in templates consider this // current viewed language $viewLang = $user->language; // clear user page cache $pages->uncache($user); // saved user lang echo wire("user")->language; // set back viewed language $user->language = $viewLang; Or there would be a ways to handle it with a simple autoload module. Since the language is set after the init() you can get the stored user language there. Then Language support sets the language on the ready() method, so you could get the currently viewed language in the ready() of your module and compare.
    1 point
  33. You can catch exceptions before Pw does, but I think the problem with your code is the include. Try writing the 'try' and 'catch' block inside your $file. In a project I have to import users with a cronjob and I'm doing something like this: try { $user->save(); } catch (Exception $e) { //.. write a Log with the Exception }
    1 point
  34. 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
  35. I think commercial modules are appropriate and should be encouraged. I suspect there are a large number of us that utilize Processwire (and other open source products) to make a living. I think collectively we are fortunate (and spoiled) by the myriad of software available at no cost. Processwire has made a massive impact on my productivity and ability to deliver complex products. If Ryan can develop some commercial modules that allow him to spend more time developing PW (and make a profit on all the work he's put into this truly amazing system), I am happy to support that effort — and if there's a place to donate to the cause directly, I'll be glad to do that as well.
    1 point
  36. @ClintonSkakun, thankyou for posting. @AnotherAndrew, ryan is helping users whenever he can. Sometimes I think there are 2 of them. There's a lot of time spend on building the cms, community & modules. PW without formbuilder is fantastic on its own. You don't have to use it. It's good that there are more possibilities. For me buying formbuilder is next to the usefulness also a way to say thank you to ryan.
    1 point
  37. You could output a json config object using php , then it will be available in your js. before your scripts in the header: <?php $jsconfig = array( 'root' => $config->urls->root, 'domain' => $config->httpHost ); echo "<script>var config = " . json_encode($jsconfig) . ";</script>"; ?> this will output an json object <script>var config = {"root":"\/","domain":"pw2-dev.ch"};</script> you can access in js like this <script> $(document).ready(function() { $('#header').click(function(){ window.location = "http://"+config.domain;; }); $('#search_form').click(function(event){ event.stopPropagation(); }); }); url = config.root; </script> This is the most easy and convenient way for me.
    1 point
×
×
  • Create New...