We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

File

Development and Programming

RJB's avatar
RJB
35 posts
17 years ago
RJB's avatar RJB
What if you do as I said earlier– try to adjust it directly in the database.

I didn’t see your edited reply – sorry.

I manually edited the “resize_images” value in the database and changed it from “auto” to “no”.

When I view the preferences after manually editing the database, “Auto” still appears as the selected option. If I change it to any other option (i.e. crop / anchor_width / anchor_height / stretch) the setting is honored. Odd …

       
Matt Weinberg's avatar
Matt Weinberg
489 posts
17 years ago
Matt Weinberg's avatar Matt Weinberg

Very weird– are you sure it’s the same file upload location?

       
RJB's avatar
RJB
35 posts
17 years ago
RJB's avatar RJB
Very weird– are you sure it’s the same file upload location?

Yes, I’m only using one file upload location.

       
Matt Weinberg's avatar
Matt Weinberg
489 posts
17 years ago
Matt Weinberg's avatar Matt Weinberg

What if you just remove the resize_images record from the database? I’m finding that default values don’t have a record created.

       
simplyee's avatar
simplyee
104 posts
17 years ago
simplyee's avatar simplyee

Everything seems to work, but I have this notice on my custom fields page in the CP:

Undefined variable: field_type in /home/.../cp/cp.publish_ad.php on line 7311

Any ideas?

       
simplyee's avatar
simplyee
104 posts
17 years ago
simplyee's avatar simplyee
Everything seems to work, but I have this notice on my custom fields page in the CP:
Undefined variable: field_type in /home/.../cp/cp.publish_ad.php on line 7311
Any ideas?

I changed the field order and it is resolved.

       
Chad Clark's avatar
Chad Clark
20 posts
17 years ago
Chad Clark's avatar Chad Clark
All the code within the {self_mailer_preview} {/self_mailer_preview} tags is going to repeat for each image uploaded to the field. So if you have three images, that code is going to repeat three times. On the first loop, count will = “1” so the code won’t show. On the second two count will not = “1” so the code will show. By the way, you may want to use {total_results}, and not {count} for this (although there are some glitches with {total_results} and {count} and adding/removing files that I’ve seen): What about this code– not the neatest in the world, but probably workable:
<div class="preview">
    {self_mailer_preview}
        {if ({count} == 1) && ({total_results} > 1)}
            Click on image to see more views
            <ul class="gallery">
        {if:elseif {count} == 1}
            <ul class="gallery">
        {/if}
        <li>
            {file_url}
        </li>
        {/self_mailer_preview}
    </ul>
</div>

That code was close and definitely ended the multiple instances, but somehow disabled clicking through to the next image. This was my fix:

<div class="preview">
      <ul class="gallery">
      {self_mailer_preview}<li>{if {total_results} > 1}Click image to see more views{/if}{file_url}</li>{/self_mailer_preview}
     </ul>
</div>

Thanks for getting me on the right track!

       
Andrew Gunstone's avatar
Andrew Gunstone
101 posts
17 years ago
Andrew Gunstone's avatar Andrew Gunstone
Hi all… I love this extension, but have a small problem. I want to use the same file on multiple weblog entries. So basically what I need is to be able to upload the file using this fantastic extension, OR select a file from a list (drop-down?). Has anyone come across this issue, or better yet found a solution? Thanks in advance.

Hi again…I didn’t have any response to my question, so I thought I would try it again! Let me know if I haven’t explained myself properly, or if it simply isn’t possible with this extension.

Thanks again.

       
Matt Weinberg's avatar
Matt Weinberg
489 posts
17 years ago
Matt Weinberg's avatar Matt Weinberg

What you’re looking to do isn’t really supported by the plugin out of the box. Have you considered doing it with relationships? Upload it to the first one you want to use it on, and add an optional “File from related entry” field in the weblog so you can pull the image again from any other entry.

       
Andrew Gunstone's avatar
Andrew Gunstone
101 posts
17 years ago
Andrew Gunstone's avatar Andrew Gunstone

Thanks slapshotw. I kind of figured that it wasn’t an out of the box solution. Oh well. Best to be sure.

I think I might have to go with the same file being uploaded multiple times, but have it automatically re-named. Unfortunately I don’t think that your solution will work, as there are tons of entries, and finding the right one will probably be tricky (for the client).

If I do work out a solution, I will post it for all.

Thanks for the response thought!

😊

       
Matt Weinberg's avatar
Matt Weinberg
489 posts
17 years ago
Matt Weinberg's avatar Matt Weinberg

What about making a new Weblog for it, with a single custom field (the file) and naming the entries in that weblog to be the name of the file you want (or some other descriptive text)? Then, make the relationship only with that weblog.

       
Andrew Gunstone's avatar
Andrew Gunstone
101 posts
17 years ago
Andrew Gunstone's avatar Andrew Gunstone

Hmmm…interesting approach. This is what I love about EE…there are a million different ways of doing stuff. You just need to think “outside the box”.

I am in fact already using this approach with the “location” for each entry (they are services of a business, but spread across something like 20 locations)….therefore the client might be comfortable enough to go with this as well. It also means that I can use it in a specific ‘resources/publications’ list.

Cool. Thanks for your help slapshotw.

       
hothousegraphix's avatar
hothousegraphix
851 posts
17 years ago
hothousegraphix's avatar hothousegraphix

Anybody aware if the 3.X branch of Mark’s File extension supports thumbnail generation of png’s with an Alpha transparency?

If so, is there a trick to it? I’m unable to, from the uploaded source (a .png with w/transparency), generate a thumb that also contains the transparency. The resulting thumb converts the transparency to black.

Anyone come across this issue and come up with a resolution?

Thanks

       
Matt Weinberg's avatar
Matt Weinberg
489 posts
17 years ago
Matt Weinberg's avatar Matt Weinberg

The extension uses the function imagecreatefrompng to do the resizing. There’s more information about it here: http://us.php.net/imagecreatefrompng. If you look through the comments, people talk about getting it working with transparency. Perhaps you can modify the extension to use the changes they mention?

       
Studio Hert's avatar
Studio Hert
36 posts
17 years ago
Studio Hert's avatar Studio Hert

[solved]

       
First 35 36 37 38 39 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.