Jump to content

Search the Community

Showing results for tags 'images'.

  • 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. Hi Guys, So I am working on a project and wanted to get the best advice using the api on the next step. I have two image fields in one template. postimage which holds an image for the article and postimage2 which holds an image for the home page. Basically I want to make it so that when a user uploads postimage and not postimage2 the home page will just pickup postimage instead. If the user does upload postimage2, it should pick up postimage2. What I did: I did add a conditional statement to check if postimage2 was empty to simply default to postimage but I was not seeing any images display. Here is my code: <?php foreach($featured as $featuredp){ foreach($featuredp->postimage2 as $postimages2) { echo"<div class=\"row panel\" style=\"margin:20px auto;\">"; echo"<div class=\"large-4 columns\"><p> <a href='{$featuredp->url}'><img src='{$postimages2->url}' width=\"300\"/></a></p></div>"; echo"<div class=\"large-8 columns\"> <h4>{$featuredp->title}</h4> <p><em>{$featuredp->date}</em></p> <p>{$featuredp->summary}</p> <p><a href=\"{$featuredp->url}\" class=\"button tiny radius\">Read More</a></p> </div> </div>"; $found = 1; } } if ( ! $found ) { echo"<p>Sorry, no posts.</p>"; } ?> Any advice is appreciated? Also any suggestions or workarounds are also welcome!
  2. Hello All! This is my first post here and am a newbie with PW. So far I've been able to accomplish everything I've wanted to do dynamically in my first PW site, but ran into a big snag yesterday. Ok here's the setup: I have on my site 4 pages that deal with separate plumbing services. We offer a discount coupon for each service. For each service, I am displaying it's coupon image in the sidebar. Each coupon image resides in the images field of the individual rootParent parent services page, and each image has a tag of "coupon" assigned to it. So for example, I have a rootParent level "Drain Cleaning" page and it is in this page's images field that the Drain Cleaning coupon image resides with the tag "coupon." The next coupon resides in the images field for my rootParent "Sewer Cleaning" page, and so on. For each service page, I have some Hanna Code I wrote to include the coupon image in the sidebar of the rootParent and all of it's children: $coupon = $page->rootParent->images->getTag('coupon'); This works great! Now, here's my problem... For pages other than the service pages, like form confirmation pages, the Contact Us page, etc., I still want to display a coupon image in the sidebar, but I want to grab a random coupon image and display it. So far, I have not found a way to successfully scan all page's images field, grab the images with the tag of coupon, then display a random image. Here is the code I've come up with so far that is not working: First, build the array of pages containing an image with the tag of coupon (this works): $couponpages = $pages->find("images.tags=coupon"); Next, get the images tagged coupon from the array of pages containing them (this is where the code breaks and throws an error): $coupons = $couponpages->images->getTag("coupon"); The error reads: "Fatal error: Call to a member function getTag() on a non-object." Beyond that, I would then want to fetch a random image and display it: $coupon = $coupons->getRandom(); echo "<img alt='{$coupon->description}' src='{$coupon->url}' />"; If anyone can help me solve this it would be most appreciated! Thanks, Dave
  3. Hi guys I recently found Colors of Images, a php library for getting colors from images: https://github.com/humanmade/Colors-Of-Image That's the only thing that I'm missing from PW to get started on a project. As I'm no php developer (let alone module developer ), I was wondering if it's possible to use it in PW pages without having to create a module?
  4. Hey guys, Why does ProcessWire automatically creates folders for each page images? Is it possible to create and use my own folders for uploaded images? For example, I want a "projects" folder to store project images and a "blog" folder to store images from the blog. How can I do that?
  5. Hello! I have a cool upcoming project which its content will heavily depend on external images. Although I'd like to get rid of WordPress for this project and would love to use ProcessWire, WP has a great plugin called Grab & Save, that allows you to grab and save images from remote urls into your own WP media library. I was wondering if ProcessWire has a similar plugin or functionality, which it would be a huge time saver for these kind of projects!
  6. It would be great if PW would resize images using Imagemagick/graphicsmagick if one of those libs is installed as theyy provide far better quality and use less memory than GD or GD2. Just an idea.
  7. How to automatically rename the image files to a random string during the upload process? For example, I have an image named "big_poster.jpg" and I want it to be saved as something random, for example "2680542675157_cc7m541v_l.jpg"
  8. Hello ppl I'm trying to create an image banner to show in all pages of the site, and for this i created a page to hold multiple images in a field (latter im gonna deal with animating them). The page is published, So this is the tree of values i got: i can address the page with $pg_settings = $pages->get('name=settings'); it seem to be correct because print_r gets me a biiiig array if info now the problem is getting the array of images, with their respective url's. I tried: $pg_settings = $pages->get('name=settings'); // echo "<br />pg_settings: " . print_r($pg_settings->get("banners_slideshow")); // seems ok... $imgs = $pg_settings->get("banners_slideshow"); print_r($imgs[0]->get("url")); // i got nothing?? In this page i also have a non repeatable image field for the logo, so i think i cant use the images array from that page. the question remains: how do i address a field with multiples images, that is in another page? thanks for the patience!
  9. I made an image field name slider1 with max of 3 images. uploaded the 3 images for my slider to use on my slider in my homepage. but how do i call it one by one? for ex. ignore the code for my first item it doesnt work but how do i make my slider work? have 3 images uploded on a single image field called slider1 how do i call each of them , what is the code to be put on img src for each item
  10. Hello Everyone! I was trying to upload images into a page, and it gave me the "Is not a recognized image" error. Now every time i try to go into the page to edit it, it takes me to a screen where the page editor is missing and the error is showing on the top. I am attaching an image of the error. Any ideas?? THANKS!! Julian
  11. Hello, Not sure I'm in the right section. I've just noticed something. In site > assets > files, there are folders apparently named after the id of the page in which the images are inserted in the admin. I'm developping a website locally this time, with version 2.5.0 now after an upgrade. It is the same for the first gallery rendered (before the upgrade) on it's own page and for the second gallery that've I've just rendered on the parent page of the page in which the images are inserted in the admin. For the first "gallery", the code is: foreach($page->children('include=hidden') as $child) { $thumb = $child->images->first()->width(320); echo "<a href='$child->external_url' target='_blank' rel='nofollow'><img src='$thumb->url' width='$thumb->width' height='$thumb->height' /></a>"; } (I've just updated this gallery code from width='320' height='200' to width='$thumb->width' height='$thumb->height') For the second gallery, it is: foreach($pages->get(1032)->images as $image) { $thumb = $image->width(90); echo "<a href='$image->url'><img src='$thumb->url' width='$thumb->width' height='$thumb->height' /></a>"; } For the first gallery, there are these versions: the original version (640x400), the .320x0.png version (320x200), in two folders a .300x212.png version (300x187 - perhaps old images with dimensions that I tested...(?)), and a .0x100.png version (160x100). For the second gallery, there are these versions: the original version (640x480), the .90x0.jpg version (90x68), and again a .0x100.jpg version (133x100). Where can I disable the creation of this .0x100.jpg version, in which file, is it "normal"? Thanks in advance !
  12. I think it would be a nice idea to add an image/field count to these inputfields. Something like below, where it says '(12)'. For me this would be a handy little addition.
  13. Hey guys, I was wondering if you could answer a few questions of mine... - Does ProcessWire handle high traffic and large content sites? - Is PW a suitable choice for building an image-based site? Something like those inspirational Tumblogs we often see, for example: twotimeselliott.tumblr.com and bybuildshop.tumblr.com. If it is, what would be the best practices for building something like that? - Is it possible to create custom post types with PW? Like in tumblr we have text, link, quote, image, video... - How do we create "categories" and "tags" with PW pages? Any guidance will be appreciated!
  14. Edited: read this https://processwire.com/talk/topic/7379-module-altgrid/
  15. Can I suggest an improvement to the PW Manager. When editing a page, I should be able to mouse-over a fields label to display the actual field name as referenced in the API and templates. I just had a problem whereby calling a series of images onto a page was not working for me using the code example from the API docs. <?php foreach($page->images as $image) { echo "<img src='$image->url'>"; }?> This was because the field within my manager page was actually "blog_images" and not the regular "images" field. As both fields had a label of "Images" and the regular images field wasn't used elsewhere on my manager page, it took a while to realise my mistake. Better house-keeping on my behalf would definitely help but it's an idea that might make building sites a little quicker.
  16. Hey, guys. I'm having some difficulty in outputting an image description as alt attribute. I created a field called featured_image. Using foreach I list all articles that use a certain template. I can display the image normally using: $article->featured_image $article->featured_image->url, works just fine. But when i use $article->featured_image->description nothing happens =( I'm just learning php and have no idea what am I doing wrong. Any help? Thank you.
  17. Hi, I have been googling around like crazy to find a suitable very light-weight javascript library for showing a simple image gallery with one bigger main picture (just on the page, not in a lightbox), with clickable thumbnails that will show the selected image in a bigger version in the main image area when clicked. See the attached screenshot for an example! Most libraries out there seem to focus on fancy transitions, lightbox style image viewing, or don't include the thumbnail feature (just showing these dots, for selecting pictures) ... and so I haven't so far found what I'm looking for. Any hints? (Again, preferrably something super-lightweight, that is super-easy to integrate with pw).
  18. Hi Everyone, a quick and stupid question: how do I insert image description in images field when I set the default view to "grid" ?
  19. Hi, I'm getting some odd filesize issues with PNGs when uploading to Processwire. I've optimised a PNG down to 260kb using Save for Web + ImageOptim. Original image for upload Once it has been resized by Processwire the filesize skyrockets to 7mb+ Resized image by Processwire I've tried playing with the 'quality' setting but all it seems to do is degrade the quality of the image but the file size stays exactly the same. Does anyone know what might be happening here to make a resized PNG such a huge filesize compared to the original? Thanks!
  20. I have an issue where I want to have an image resized, but have both a cropped and non-cropped version available (of the same size!) The code to do this is simple: $imagefull = $image->size(320,320,array( 'cropping' => false); $imagecropped = $image->size(320,320,array( 'cropping' => true); However, this only creates ONE variant of the image: eg. imagename.320x320.jpg So the same image is shown twice in the output page, instead of the two options Can anyone suggest a clean way of doing this? (ie. not duplicating every base image) Is there a way of creating named Image Variations? And do these names go into the filename to guarantee uniqueness? eg. $image->addVariation($name,$size,$options) or similar Thanks
  21. Hi, I'm using the on the fly image resizing in Processwire to create suitable image sizes for different viewports (using Foundation's Image Interchange). All seemed to be working fine but I'm having real trouble with the quality of the outputted image. This is the orginal image: This is an example of a resized image: It looks like it's losing colour information in the process of being resized. I've tried setting the default quality to 100% (in the wire/core/ImageSizer.php) but to no avail. Could anyone share any light on what might be happening here?
  22. Using TinyMCE or CKEditor. Cant seem to find an option to float an image left or right. I can align but not float to wrap text or ad a margin? Am I missing something obvious?
  23. On this page we have allowed the customer to create their own Paypal cart button for a list of products http://www.inspirefit.co.uk/clothing/ Previously, we would use the image resize functions built in to Processwire (you know image->size(200,150) and all that) but to make an image work in Bootstrap 3 we need to allow it to do it's thing - ie remove this sizing statement. Bootstrap then applies its css: width: 100%; height: auto; But... as you see on this page, the client has uploaded massive images and the system has not cached anything. Giving us an undesirable pages of well sized but big image files. Is there a solution to this at all?
  24. I'm having a weird issue with images in TinyMCE. When adding images to the images field (the default one), I add a description. Then I add the image to the body field via TinyMCE. Then save and the image has the correct alt text. So far so good... But, if I reopen the same image with the image button, the description is gone from the modal window. If I re-save, the image is displayed without the description. Looks like the image it's not retaining the original description value when editing. Is this a bug?
  25. I have an area on a site currently where there's a series of portrait images that appear with a blend mode that was applied in Photoshop. As it stands, anyone adding a new portrait has to have Photoshop, download the source PSD, and export the new file. I don't think we'll need to add new portraits so often that this needs to be automated, but of course, that doesn't stop me from wanting to think about how to do it. What I'd like to do, ideally, is have the server apply the blend mode to the image either when it's uploaded or when it's rendered. I'm guessing I'd have to use GD to do this, and hook into image->size(), but I don't know exactly where I'd start.
×
×
  • Create New...