Jump to content

Leaderboard

Popular Content

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

  1. https://www.typografics.be/nl/blog/processwire-bigger-stronger-faster-en-easier
    5 points
  2. My company is hiring two full time positions that might be of interest to members of this forum as we build out our UX team. Among other things, we will be migrating a number of sites over to ProcessWire, developing a UI pattern library, and establishing a continuous improvement process for them. Lots of front end work but also some API development, PDF generation, and other fun stuff. These are multilingual sites (currently English, German, and Chinese, more languages to come) for a global company, but these positions are on site in our Cincinnati, Ohio corporate HQ. For more information, or to apply, see the following links: Web Developer http://www.michelmancareers.com/Opportunities/Americas/?gnk=job&gni=8a7880665cc36d5a015cc69d9b170b1e Digital Designer http://www.michelmancareers.com/Opportunities/Americas/?gnk=job&gni=8a7880665cc36d5a015cc69aa93008dc Thanks, Jason
    4 points
  3. Just for the record, we used to see similar issues, and the easiest solution was to convert all instances of \r\n to \n. Can't remember all the details, but this tweak has been in use at least for a year or two now, and so far we haven't encountered any additional issues. I know that the RFC specifically demands \r\n, but for some reason certain recipient systems seem to mess up HTML emails with that in place. It is my experience that \n works much better, regardless of the standard. And yes, we use a separate SMTP server (which in turn uses another SMTP server). Obviously it could be something about that setup, but if you google around a bit, \n instead of \r\n is a surprisingly commonly used solution
    4 points
  4. Take a look: best regards mr-fan
    3 points
  5. If you host is tampering with emails I'd really suggest you to send mails via an smtp server – could be installed on the same host as well. Trying to fix such issues can easily cause you a lot more trouble as you can see and it's not even garanteed you can fix it from php.
    3 points
  6. https://deliciousbrains.com/craft-cms-self-hosted-wordpress-alternatives/ This article came out today. Delicious Brains is known for some popular plugins. I dropped a reference to PW in the comments. Perhaps others here can add to the discussion.
    3 points
  7. FieldtypeColor is on github Fieldtype stores a 32bit integer value reflecting a RGBA value. Input 5 types of Inputfields provided Html5 Inputfield of type='color' (if supported by browser) Inputfield type='text' expecting a 24bit hexcode string (RGB). Input format: '#4496dd'. The background color of the input field shows selected color Inputfield of type='text' expecting 32bit hexcode strings (RGB + alpha channel) Input format: '#fa4496dd' Inputfield with Spectrum Color Picker (Options modifiable) Inputfield type='text' with custom JavaScript and/or CSS (since version 1.0.3) Output Define output format under 'Details' tab in field settings. Select from the following 9 options string 6-digit hex color. Example: '#4496dd' string 8-digit hex color (limited browser support). Example: '#fa4496dd' string CSS color value RGB. Example: 'rgb(68, 100, 221)' string CSS color value RGB. Example: 'rgba(68, 100, 221, 0.98)' string CSS color value RGB. Example: 'hsl(227, 69.2%, 56.7%)' string CSS color value RGB. Example: 'hsla(227, 69.2%, 56.7%, 0.98)' string 32bit raw hex value. Example: 'fa4496dd'(unformatted output value) int 32bit. Example: '4198799069' (storage value) array() array( [0] => 0-255, // opacity [1],['r'] => 0-255, [2],['g'] => 0-255, [3],['b'] => 0-255, ['rx'] => 00-ff, ['gx'] => 00-ff, ['bx'] => 00-ff, ['ox'] => 00-ff, // opacity ['o'] => 0-1 // opacity ) The Fieldtype includes Spectrum Color Picker by Brian Grinstead SCREENSHOTS Input type=text with changing background and font color (for better contrast) Input type=color (in Firefox) Javascript based input (Spectrum Color Picker) Settings Output Settings Input
    2 points
  8. Quick workaround... in _main.php add <region id="dummy"></region> in basic-page.php add <region id="dummy"></region> Seems PW needs a region in the page template to kick-start the process.
    2 points
  9. Rather than edit the DB for an existing field, you could make a simple fieldtype module that extends FieldtypeTextarea: <?php class FieldtypeLongTextarea extends FieldtypeTextarea { /** * Module information */ public static function getModuleInfo() { return array( 'title' => 'Long Textarea', 'version' => 1, 'summary' => 'Field that stores multiple lines of text in a MySQL LONGTEXT column type.', ); } /** * Get database schema used by the Field * * @param Field $field * @return array * */ public function getDatabaseSchema(Field $field) { $schema = parent::getDatabaseSchema($field); $schema['data'] = 'longtext NOT NULL'; $schema['keys']['data'] = 'FULLTEXT KEY data (data)'; return $schema; } }
    2 points
  10. Hej, A module which helps including Photoswipe and brings some modules for rendering gallery markup. Feedback highly appreciated (Also pull requests are appreciated ? - have a new Job now and don't work a lot with ProcessWire anymore, yet, feel free to contact me here or on GitHub, Im'm still "online"!) Modules directory: http://modules.processwire.com/modules/markup-processwire-photoswipe .zip download: https://github.com/blynx/MarkupProcesswirePhotoswipe/archive/master.zip You can add a photoswipe enabled thumbnail gallery / lightbox to your site like this. Just pass an image field to the renderGallery method: <?php $pwpswp = $modules->get('Pwpswp'); echo $pwpswp->renderGallery($page->nicePictures); Options are provided like so: <?php $galleryOptions = [ 'imageResizerOptions' => [ 'size' => '500x500' 'quality' => 70, 'upscaling' => false, 'cropping' => false ], 'loresResizerOptions' => [ 'size' => '500x500' 'quality' => 20, 'upscaling' => false, 'cropping' => false ], 'pswpOptions' => (object) [ 'shareEl' => false, 'indexIndicatorSep' => ' von ', 'closeOnScroll' => false ] ]; echo $pswp->renderGallery($page->images, $galleryOptions); More info about all that is in the readme: https://github.com/blynx/MarkupProcesswirePhotoswipe What do you think? Any ideas, bugs, critique, requests? cheers Steffen
    1 point
  11. So, the quest to become proficient at one the skills I should have learned years ago continues. And it gets boring at times. So I went looking for IoT/robotics and stumbled across this: https://cylonjs.com/documentation/platforms/sphero/ Computer (check) Sphero (check) JS skills (hmmm kind of) Can't wait though, to write some code and see something actually move is like magic to me. Anyway, thought I'd share.
    1 point
  12. @bernhard, I've struggled with this in the past too inside ProcessModules. Didn't find another solution but to use " die()". Feels awkward
    1 point
  13. Update is out: https://github.com/blynx/MarkupProcesswirePhotoswipe Also removed the Pwpswp class alias, because it was pretty pointless. Processwire does not recognise it as a module and I don't really use static methods in that class. 0.5.1 - 2017/07/06, fixes removed: Removed pointless shortcut alias class fixed: Use of correct module/class name for file paths fixed: Configuration instructions for file paths other: Updated readme
    1 point
  14. Hello! Yes, I think something like this on your page template should work. $page->addHookBefore('render', function($event) { if(wire('input')->get->myvar) { $emo = wire('modules')->get('EmailObfuscation'); $emo->mode = $emo::modeManual; } });
    1 point
  15. Hi folks, My department is planning to move up to five of our employer's websites in-house and onto ProcessWire from a CMS which has not seen much development in the last few years. They're B2B magazine websites and we feel that ProcessWire would be a great fit. But there are concerns over support. I'm the only server side programmer, so what would happen were I to leave or be hit by the proverbial bus? So we're looking for some kind of insurance. Thinking along the lines of a support contract, covering maybe 2 hours of support time per month. With a commitment to become more involved should the need arise, so providing more support if needed to someone who takes over my role, or in the 'bus' type emergency, be willing to take over full support duties for a limited period of time. The 2 or so hours would be used for providing advice if I were to really get stuck. But I'm happy using the forums for help, and I've built a prototype of one of the sites without huge difficulty (go ProcessWire!), so under normal circumstances they probably won't be used. The five sites are all quite large (the prototype site has 40 templates and 95 fields), consisting of news sections, a jobs section, a business directory, reader polls and social media integration. Some of the sites allow membership for the business directory, so companies can login and manage their listing and upload press releases, via a custom dashboard (implemented as a Process module). All code will be commented and held in a git repo. We're located in the UK. Email support would be sufficient I think. If you're interested, please PM me with a rough estimate of costs for: The ~ 2 hours per month standard support. Full 'emergency' support of all 5 websites. Any one-off setup costs. And/or suggest an alternative pricing structure / proposal. Again at this stage we're just looking for a rough idea of costs and who would be available, so ballpark figures would be fine If you could also provide a link to your website please. Please let me know if you would like any further information. Thanks
    1 point
  16. It's a bug: https://github.com/processwire/processwire-issues/issues/302
    1 point
  17. Simply do not blindly do that. PHP_EOL is using the linebreak of the OS your running the code on, whereas things like the email rfc do define a fixed linebreak notation, which can differ from your OS selected one.
    1 point
  18. I am not sure if WireArray::sort() handles runtime vars. Try it out. foreach ($page->listing_images as $image) $image->aspectRatio = $image->width/$image->height; $page->listing_images->sort('aspectRatio');
    1 point
  19. You could skip the removal with most WireArray instances, as duplications are prevented by the item keys (filename in this case). There's also insertBefore() and insertAfter() and you could use all the array sorting functions if really needed: $a = $wireArray->getArray(); sort($a) $wireArray->setArray($a);
    1 point
  20. Heads up: after going through all the posts here I still couldn't get german month names to work. Reason for that was the configuration of the output formatting WRONG: date output format j. F Y results in 18. July 2017 RIGHT: date output format %e. %B %G results in 18. Juli 2017 The field description also states »Alternatively, you may use a PHP strftime format if desired for localization.« So I guess RTFM :-/
    1 point
  21. Dear Robin and BitPoet, Wow!! This is why I love ProcessWire. The details above are exactly what I need. And of course it was already there --- I just hadn't kept up to date with all of the new documentation, during the last couple of years when I was focused on other projects besides PW app development. So... gotta catch up. Thanks to you both! Peter
    1 point
  22. You don't need to touch any core files, just create a file named "ready.php" in the site folder and put the code there. You can read up on the files for site hooks here.
    1 point
  23. I just meant that you can use the css from this module with the stock nette Tracy if you would like to have the new design (in non-pw projects).
    1 point
  24. Here is an example - change the template name to suit. Assumes three integer fields: quantity, unit_price, order_total. In /site/ready.php... $pages->addHookAfter('saveReady', function(HookEvent $event) { $page = $event->arguments(0); if($page->template->name !== 'your_template_name') return; if($page->quantity && $page->unit_price) { $page->order_total = $page->quantity * $page->unit_price; } });
    1 point
  25. Hey Blynx, Thanks for the nice module Not sure, it's probably just me, but to get this working (local MAMP setup) I had to use the full module class name (MarkupProcesswirePhotoswipe) (not the alias Pwpswp) and the css/javascript etc paths were incorrect , so instead of MarkupPwpswp/path-to-files within the .module file, I had to change these to MarkupProcesswirePhotoswipe/path-to-files After this all worked nicely Thanks again!
    1 point
  26. You can create a new integer field, add it to your template, and update the value based on other values in the page with a hook to Pages::saveReady. No need for a new fieldtype I think because it would have to use a hook like this anyway, because by themselves fields don't know anything about other fields that might be in the same template.
    1 point
  27. Then they are not a company that deserves your money. Time to vote with your wallet and move to a new host.
    1 point
  28. Hi @kixe - thanks for all your thoughts here. Hopefully you know that I have been away and not just ignoring your post! The latest version has the getBranchRootParentId function hookable. The reason I did this is because when a user is restricted to a branch of the page tree, there is no "Home" breadcrumb, so I added this to give them easy access back to the root of the pages they have access to. I am curious about the working solution you have though - maybe it takes care of what we both want? I think that regardless of the interaction with this, module those "1" values shouldn't be hardcoded in the PW as you noted - maybe you could submit a PR to Ryan to fix those? As for the actual prepending of BranchRootParent to the Pagetree under PagesTab, do you mean here: Test One and Test Two and children of the BranchRootParent and as you note, the BranchRootParent itself is not shown. Not critical, but I agree it would be nicer if it was, but from some quick looking around I don't think it's going to be possible at the moment without manually prepending the BranchRootParent to the markup returned by ProcessPageList::executeNavJSON - certainly possible, but not pretty. Any thoughts on my comments? I'd certainly like to help as much as possible for you on this, so just let me know. Cheers, Adrian
    1 point
  29. That, and it should be $image->size(), not resize().
    1 point
  30. This should work $ctas = $pages->find("id=1|2, id!=$page->parents->append($page), sort=sort"); (Completely untested.)
    1 point
  31. See the "https" property of the Template class: https://processwire.com/api/ref/template/ $t = $templates->get("name=admin"); $t->https = 0; $t->save();
    1 point
  32. http://foundation.zurb.com/get-involved/support.html I could e-mail - or tweet - them. Perhaps there's a better chance if it's not the creator of the website who is contacting them (?). Perhaps we should make a "contest" or poll here, choosing which one should be proposed (first)? By creating a new topic and a poll. NB: not sure now they would accept it at Foundation - as it is - as the neophobia background image is "frightening" and the other one is too much "advertising".
    1 point
  33. http://zurb.com/responsive CMS sub-link: ProcessWire is missing @Sérgio Jardim [ https://ricardo-vargas.com ] and others, please propose your foundation website there. Some of the other CMSs have a tag but without any website there... or with just one displayed. (By the way, if you click on more than one tag, you always have 0 websites as a result.)
    1 point
  34. My new blog post on setting up a Blank Proflie: http://szabesz.hu/blog/my-basic-setup-of-processwire/
    1 point
  35. Don't forget about $this->halt() rather than using exit/die https://processwire.com/blog/posts/processwire-2.6.8-brings-new-version-of-reno-admin-theme-and-more/#new-this-gt-halt-method-for-use-in-template-files
    1 point
  36. I know I had some confusion with checkboxes in PW and I think I tried several things to get them working as expected. I think since then I have been blindly copying existing code. Point noted though and just to confirm. This actually works just fine $f = $this->modules->get('InputfieldCheckbox'); $f->attr('name', 'input_country'); $f->label = 'Country Code'; $f->attr('checked', $this->input_country ? 'checked' : '' ); $f->description = 'Whether to ask for country code when entering phone numbers.'; $inputfields->append($f); No need to set the value at all - just like you said
    1 point
  37. Martijn, This is working for me: public function ___getConfigInputfields() { $inputfields = parent::___getConfigInputfields(); $f = $this->modules->get('InputfieldCheckbox'); $f->attr('name', 'input_country'); $f->label = 'Country Code'; $f->attr('value', $this->input_country ? $this->input_country : 0 ); $f->attr('checked', $this->input_country === 1 ? 'checked' : '' ); $f->description = 'Whether to ask for country code when entering phone numbers.'; $inputfields->append($f); Maybe you can see something in there that's different to what you are doing? Sorry, I can't think of anything else to try!
    1 point
  38. Yeah, always likes that! I remember the original by Trent Reznor
    1 point
  39. most of the time I end up wearing my earbuds for two hours, but forget to turn any music on *edit: Martijn, love that Lollywood song and video
    1 point
×
×
  • Create New...