Soma

Moderators
  • Content count

    6,638
  • Joined

  • Last visited

  • Days Won

    154

Soma last won the day on January 23

Soma had the most liked content!

Community Reputation

6,278 Excellent

2 Followers

About Soma

  • Rank
    Dreamer
  • Birthday 03/31/1975

Contact Methods

  • Website URL
    http://soma.urlich.ch

Profile Information

  • Gender
    Male
  • Location
    SH, Switzerland

Recent Profile Visitors

36,583 profile views
  1. For me the first code works perfectly also for alternative languages, but only if you're viewing the correct language ofc. The second example one doesn't work for alternative language with names that are "empty" in DB.
  2. Soma

    It's not the Browser cache or something, but the PW page cache in memory. You'd need to reload the $user after your upload and saving image... $u = $users->get($user->id); if($u->profile_picture) { $userImg = $u->profile_picture; echo '<img src="'.$userImg->url.'">'; } Anyway I would recommend to redirect to the page after submit, but then you need to handle errors differently. Like this you would upload the form with a refresh or going back. Also I would rethink the upload folder to be in a folder not accessible from public for security reasons. You can simply use a folder in "site/assets/cache/.uploads" as . folders will get blocked by PW .htaccess. Also you could move the part with the WireUpload into your if($input->post->form_submit) { .... as it's not needed before that.
  3. Soma

    It's ?u= not ?url=
  4. Soma

    Thanks for the link. I looked at it and it's clear why it's not working. You're not only sharing the url but a lot more like title and text. Have you modified the config for Facebook? This is the share link: https://www.facebook.com/sharer/sharer.php?url=https%3A%2F%2Fwww.playwood.it%3A443%2Fplaywood%2Fen%2Fblog%2Fitaly-is-a-door-the-design-is-the-key-4-9th-april-fuorisalone-zona-lambrate-milano%2F&title=Italy is a door. The design is the key | 4-9th April%2C Fuorisalone – Zona Lambrate%2C Milano&text=PlayWood will be present at Fuorisalone 2017%2C presenting an innovative product that allows you to join different panels of any material to create furniture and modular structures. The PlayWood connector has been thought for temporary spaces%2C… Facebook only allows for an url. Facebook then parses the url and gets the content from your og tags on the page.
  5. Soma

    Yeah nice they works so well. But doesn't help why yours isn't.... So do you have a link to yours or not? Otherwise I can't try to help.
  6. Soma

    I'm not sure, but this has always been like this not something new. However, maybe you have an example of that so we can take a look at? Also maybe this is of interest: https://developers.facebook.com/tools/debug/
  7. Soma

    Ask Facebook. As far as I understand it, it's because FB caches the data and on first call it sometimes doesn't show in the dialog (but when posted or shared again the same url).
  8. Soma

    1. There's a example in the code itself with email: if($email && (strpos($email->value,'@hotmail') !== FALSE)){ // attach an error to the field // and it will get displayed along the field $email->error("Sorry we don't accept hotmail addresses for now."); } Anything the API provides is possible. I can't go into details as there's too much and don't have any examples ready. 2. Of course an array is possible, input->post is also and array. You just have to make it a WireInputData array. https://github.com/processwire/processwire/blob/341342dc5b1c58012ae7cb26cffe2c57cd915552/wire/core/WireInputData.php 3. "Validation" is per Inputfield and it depends. Some inputfields do some sanitations to make sure an expected format or type of value is given (for example email https://github.com/processwire/processwire/blob/341342dc5b1c58012ae7cb26cffe2c57cd915552/wire/modules/Inputfield/InputfieldEmail.module) but most do nothing at all. You can look at all the Inputfields processInput() method to see what it does. Text and Textarea have some Inputfield settings to strip tags for example. It depends also on what the Form is used for and where you use the data afterwards. It's never an issue to save data to DB ie Pages, it's always about what and where you output the data (website, email, ...).
  9. Soma

    I found by accident, trying to find out why my Chrome does this, that the Chrome "use Hardware acceleration if possible" enabled in settings is the Problem. It seems to have problems then rendering the CSS filter used there.
  10. Soma

    It depends on your image field. If it's multiple you need to select one first. ie $page->images->first->httpUrl():
  11. Soma

    "media" can (as any) or must be set by the options array you give the render() method. $options = array( "media" => $page->image->httpUrl() ); echo $modules->MarkupSociaShareButtons->render($options);
  12. Soma

    It's vanilla install. Yes there seems to be some css filter that breaks the rendering/layout.
  13. Soma

    Yes, even if I install a new version. It's a Chrome "bug" most likely.
  14. Soma

    Yeah same version Chrome on OSX. Can nobody see this is broken?
  15. Soma

    Yeah new master! (Upgrading from my local install doesn't work anymore) Installs manually... opens ProcessWire backend. Editing Page, images in grid view in Chrome is broken (seems to be ok in FF). Well done and tested!