Jump to content

Search the Community

Showing results for tags 'Image'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. Hey guys, I'm really really desperate for help at this stage, for my own sanity mostly. I've been trying to set up a form that requires several fields one of which is a file upload, the user can upload max 10 files with extension jpg/png/jpeg and these are sent to the admin email as attachments. Currently this i am using the InputfieldFile module, I have moved it over to /site/modules because hooking the return html wasn't enough for my needs. So basically I have this. $images = $modules->get("InputfieldFileCustom"); $images->attr('label', "Upload your images"); $images->required = 0; $images->maxFiles = 10; $images->attr('id+images','image'); $images->attr('placeholder','no file selected'); $images->attr('extensions','jpg'); $form->append($images); I expected output that would allow me to upload and delete files. Except right now my biggest issue is the fact that the remove button isn't being displayed because the ___renderItem method isn't being run and I have no idea how to make this work. I'm going to have to do a lot of fun stuff with the markup for the majority of the render methods but I can't do anything until I get the remove button to display. I also made a inputfieldfilecustom.js which is imported on the page. I've renamed all instances of InputFieldFile to InputFIeldFileCustom (in both js and module) Begging for help around now. it would be incredibly appreciated if someone can give me any direction.
  2. After i upgraded from 2.4->2.6 using the upgrade module my image field on new templated say invalid image and gets a redbackground when i try to add images. My old templated still work when i try with the same image.
  3. I am trying to figure out how to add a class to an image. The image would be uploaded into the image field on a page and then placed into the "body text" of the page (ckeditor). I dont' see any place to add class tags to an image. Am I missing it somewhere? Module not installed correctly?
  4. Far

    Image crop

    Hi, Recently i came across a strange behaviour of core image cropping function. My Core version is Dev 2.6.17, OpenServer (Apache 2.4, PHP 5.4 and PHP 5.6) I have an image like that: And when i try to crop it with that code: for($i=0;$i<=9;$i++) { $img = wire('pages')->get(1850)->page_header_images->eq(1)->crop(0, $i*80, 1280, 80); // crop($x, $y, $w, $h) echo "<img src=\"{$img->url}\"><br/><br/>"; } I get always get the same peaces of picture though it has different $y I also have a problem when i use resize/crop interface in modal window in page editor. I wanted to post n issue to github, but would like to ask you to check if you can reproduce this behavior
  5. Hello, I'm using the multiple images in image field for the gallery setup. There problem is that I can't find how to remove already uploaded images in the image field. There is no remove icon or menu function. Or I just can't find it. How to remove the images? My image field with uploaded images in admin looks like this:
  6. Hi folks, I know how to get ONLY the first image from an Image field, but how to you exclude the first image? <?php foreach ($page->project_images->not()->first() as $image) : ?> Any thoughts? Sorry... just noticed slice in the cheatsheet... <?php foreach ($page->project_images->slice(1) as $image) : ?>
  7. Hello, I have a problem with the GD library on the server. When I upload an image I get this error below and half grey images. When I checked the original image it seem to be half uploaded half empty and resized images are grey like in the attachments. Server is ubuntu 14.04, with php 5.5.9 and GD 2.1.1-dev installed. I already tried gd.jpeg_ignore_warning = 1 that I found on many sources. Anyone have any idea? Thanks ahead Parse Error: imagecreatefromjpeg(): gd-jpeg, libjpeg: recoverable error: (line 330 of wire/core/ImageSizer.php) EDIT: Uninstalling GD then restarting server and reinstalling again somehow worked.
  8. So I have an odd feature to tackle. I want to include an image in the template (aka a header), but want to implement a function to set a time in the future. Once the time was met, the image will automatically come down (if possible switch to another image, but that is not something Ill worry about now). Now, I set up an image field "timed_image", and I set up the date/time field "select_timed_expire". I also know how to echo the information on the page, but where I am finding issue is actually how to implement this. I could use javascript and pass the date/time to it, but from there I am quite lost on how to implement this. Has anyone done something like this before?
  9. i am using CKEditor and want the design to be like the image below is there a way to get rid auf the <p>-tag around ther inserted image and also keep the <p>-tag around the text? <p>text</p> <p><img></p> <p>text</p> to <p></p> <img> <p></p>
  10. Hi folks I recently put a site live and in the last stages of the project decided to do some image optimisation. $options = array( 'quality' => 70, 'upscaling' => false ); $pageImageLargeDesktop = $pageImage->size(960,720,$options)->url; The thing I love about ProcessWire is that you can change the size here and the new images will be generated across all pages. It's such a time saver. However after adding in $options parameters I expected the quality of the images to reduce on a page refresh, howeever the quality settings only seem to be applied during upload. This meant I had to re-upload all my images again into ProcessWire for the changes in quality to appear. Is there a way of getting round this? It wasn't a massive problem for this particular site but I'm thinking more along the lines of a larger site with hundreds or thousands of images. You just couldn't go back in and re-upload every image unless you had a lot of time on your hands. Am I missing a trick? Thanks in advance for any help.
  11. Hi. i can not upload any image to pages. No error in error log. There is "Uncaught SyntaxError: Unexpected token <" error in Js. i searched all forum, but no result for my problem
  12. Hi all, I need to loop over several images with an ordinary foreach - nothing fancy. However, each image needs to have a unique css class name attached. Here is a simplified example: <ul> <li><img class='mac' src='#'</li> <li><img class='ipad' src='#'</li> <li><img class='ipod' src='#'</li> </ul> and so on. My array of images will be a collection from several pages. So the information about the required class needs to be "attached" to the image somehow. Sure I could use the description field for that, but that's kind of a hack I would like to avoid for the sake of unexperienced editors. My PW skills got a bit rusty the last time. Maybe an easy way to achieve that as been already introduced into the core and I missed it. Apologies in advance if this is a silly question than ... Ideas welcome! Thanks.
  13. Hi all! My first post here, and I'm pretty new to the PW thing, even if I'm falling in love with it . Currently, I'm making a portal with PW and trying to add a few custom fields to the users' profile (image, socials, etc.). The issue here is that I'm able to add custom fields to the user profile, but PW doesn't save the values into these fields. It does let me insert the text or upload the image, but doesn't stores them into the database. And no error is printed out. By looking into the network traffic I did find that in some case it returns a JSON response: {"error":false,"message":"AJAX Page not saved (no changes)"} I've searched/googled about this particular issue but didn't find anything about it. I also have tried the solution described in this other topic (https://processwire.com/talk/topic/1002-cant-upload-imagefiles-problem/) to try in solving the image issue at least, without any good result. I thought the problem was maybe connected to the file permissions on the local installation, but the same situation has verified on remote test installation. I'm using latest stable PW version on WAMP: Apache v2.4.9 PHP v5.5.12 MySQL v5.6.17 Any idea, friends? Thanks.
  14. Hello all, I have a frontend form with a CKEditor textarea and an image upload field. The image upload is working fine. But when I want to insert an image through the PWimage plugin, I get an error inside the modal window This is happening on a page that has already been saved after adding the image. A forum search for that error revealed only this post and it's related post. Nut they don't seem to offer a solution to my problem. Line 179 in ProcessPageEditImageSelect.module says $images = $this->getImages($this->page); I'm not a coder, but I guess this means that $this->page returns a nullpage and thus the error. I read quite a few posts about frontend image handling but didn't find anything related to my problem here. Is it not possible to use the PWimage plugin on frontend forms? Or could this be related to permission settings for my frontend user? EDIT: I changed the title of this post from "CKEditor..." to "PWimage plugin...", because the problem is not CKEditor specific, it seems.
  15. Hello everyone! I’m starting my PW journey and I’m enjoying it so far However, I’m having the exactly same problem as posted here https://processwire.com/talk/topic/10073-image-not-showing-up-in-tutorial/?hl=%2Bimage+%2B403 I’m running MAMP 3.2.1 on OSX 10.10.3 The issue is that the image doesn’t load on the page. It just gives me a broken link. If I click on the broken link I get: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>403 Forbidden</title> </head><body> <h1>Forbidden</h1> <p>You don't have permission to access /site/assets/files/1015/ on this server.</p> </body></html> Here is my PHP code: <img src="<?php echo $page->promote->url; ?>" /> And my field to showed that I used the same name for it. More info: I changed the assets/file permissions to 777. It didn’t work. I changed MAMP user. It didn’t work. There is no error.txt under logs folder. There is no mod_security module. I hope I can get some help here. Regards, Daniel
  16. Hi, I'm doing the "But what if I don't know how to code?" tutorial. I'm at the section labeled: Just one image mate. I can't get the image to display. It's showing the small broken image icon instead of my image. Thanks, Thuy
  17. Hello there. Since this is my first post in these forums: Thank you Ryan for ProcessWire and thanks to everyone that is supporting him or other users. I'm having a strange problem using $image->description. When I'm logged in as the default user I registered during install everything's working as expected. $image->description returns the string provided in the backend. Anyways if not logged in, an empty string will be returned resulting in <img src="url-is-still-working" alt="">. I don't really know whats going on. Might be a bug? Here's some code: $slides = ''; foreach ( $page->slideshow_images as $image ) { $slides .= '<li><img src="' . $image->url . '" alt="' . $image->description . '"></li>'; } I'm running ProcessWire 2.5.3.
  18. Hi, I'm just trying to delete file field via API. I want to delete it completely without concerning which pages is using it. I found this code: $fields = wire('fields'); foreach ($fields->find('name=field_name') as $field) { foreach ($field->getFieldgroups() as $fieldgroup) { $fieldgroup->remove($field); $fieldgroup->save(); } $fields->delete($field); } This removes the field from database it is OK. But it doesn't remove the files (from filesystem) that ware added to pages. As I was going through PW source code I've found that I have to save the page also, but it really complicates the thing. The problem starts in FieldtypeFile::___deletePageField method where the $pagefile is handled differently according to field output formatting. If the $pagefile is PageFile, the unlink is called which also deletes the file from filesystem. If the $pagefile is PageFiles the deleteAll is called which only adds hooks on page save. Why is it done this way? This makes inconsistency when deleting the field. Is there some better way to delete the field without caring about pages?
  19. Hi, I have strange behavior with the standard imagefield resize. I use in a template the following: $options = array( 'quality' => 100, 'upscaling' => false ); $img = $image->width(900,$options); My client has some images uploaded that are 1920 pixels width and one is 374 kB. After downsizing to a width of 900 the quality is much worse then experienced with other uploaded images while the original was oke. But the most strange is that the downsized image is now 522kB instead of 374 kB. Another goes from 211kb to 291kB. While afcourse we expected a much lesser filesize. Any ideas how this can happen and what to do about it? Maybe putting in some extra options? Thanks.
  20. Hi guys! I'm working on several processwire 3d wallpapers. Hope you like it. I will upload more soon. Wallpapers: Signatures:
  21. My client is saturating the server capacity with tons of images, the images are resized but the original still on the server. How can I use the resized images and delete the original? I use the following module created by @soma: The post here <?php class ImageCreateThumbs extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'ImageCreateThumbs', 'version' => 100, 'summary' => '', 'href' => '', 'singular' => true, 'autoload' => true ); } public function init() { $this->addHookAfter('InputfieldFile::fileAdded', $this, 'sizeImage'); } public function sizeImage($event) { $inputfield = $event->object; if($inputfield->name != 'prop_imagen') return; // we assume images field $image = $event->argumentsByName("pagefile"); $image->size(120,120); $image->size(1000,0); } } Thank you in advance.
  22. Hello and thanks in advance, I've just started work with the new client using PW. So far, it looks great and I've made a few edits. I am trying to update an image for their BBB logo (to make it live from BBB, not static) and can't figure out how. I did look for an answer before posting. The key here is that the image is hosted on the BBB site. The entire goal of this badge system is that the image is hosted by the BBB itself. Therefore, I cannot upload it. How can I show an image without uploading it?
  23. Is PW capable of uploading already uploaded image on image field? Just like like a feature that editor using.
  24. I am trying to get an image to go along with my search results. I can create the image as a file but of course the path is incorrect as it refers to the search page itself. Any idea how I can reference the relevant assets file folder? foreach($matches as $m) { $img = $m->images->last->width(200); $out .= " <li> <img src='{$img}' /> <h4><a href='{$m->url}'>{$m->title}</a></h4> <p>{$m->summary}</p> </li> "; } Thanks again
  25. Hi, I have a simple content structure like this: - A page -- title -- content (repeater field) --- headline --- body --- images (image field) -- (…) - Another page (...) Is it possible to not only upload images via the "image" field, but let it select already uploaded images (in other "content" repeaters or on other pages)? (Kind of how the image thing inside the wysiwyg works - I don't want to have the image selection inside the "body" field and disabled the image option in the wysiwyg editior setting). Or do I need to introduce a new field alongside the regular mage field? The actual scenario is like this: With the above structure, the editor created three content sections on one page a, b, c. In each section, he uploaded one image. After a whle he decided that the section c is in fact part of section b, and deletes it, after appending it's "body" content to section b's body field. Because now the text of section c is in section b, he also wants to have section c's image go along with section b and the image there - but the image field seems to only offer a new upload of the image - or am I missing something? thanks, Tom
×
×
  • Create New...