Jump to content

97s

Members
  • Posts

    21
  • Joined

  • Last visited

Posts posted by 97s

  1. This worked perfect for me. I build responsive websites, and basically I just took out the height parameter out of the tinyMCE. I left the width, as my clients can still use it to determine the maximum size they want the image to be, then with the CSS rules for fluid images it shrinks and automatically adjust the height on its own.

  2. So I am using TinyMCE for the body editor, and if I add an image, I need to be able to choose the width of the image, but not choose the height. My website uses fluid image re-sizing. Currently I am removing the height attributes that get inserted when I add the picture manually using the HTML button. I would however like to just have the option to hit like 0 for height and it just stops automatically adding the height into the html code. Is there a place in Processwire or in TinyMCE where I can change this setting?

  3. Just checked on this forum, as I like to see if anyone needed help with things I struggled with. This would be epic to have a cropping direction. I ended up using the modules and the crop tools, which worked great for my client. Thanks for all the hard work you & the others put into processwire. I hope one day to know enough about php and processwire to help the community as much as you guys help me.

  4. So I have a simple question. I am doing something very wrong I guess, I have two issues.

    Issue 1. When I go to hover over the thumbnail in the images field, it breaks. Not really sure what is going on here, but I can live with this issue. (found solution to this one.)

    Issue 2. I can't figure out how to pull the thumbnails, if they exist into my template. I am currently using this:

    <ul class='gallery'>
    <?php
    foreach($page->images as $image) {
    $thumb = $image->size(500, 400);
    echo "<li class='gallery-item'>";
    echo "<a href='{$image->url}' class='albumImageLinks fancybox-button' rel='fancybox-button'>";
    echo "<img class='gallery-image' src='{$thumb->url}' alt='{$thumb->description}' /></a>";
    echo "</li>";
    }
    
    ?>
    </ul>

    However, I want to pull a thumbnail if it exist for certain images which I need to crop using your module. I have tried everything in the directions, but I keep getting errors involving eq.

    Sorry I am not the best at php.

    ------------------------------------------------

    Solved my problem: for people in the future here is the code that worked for me:

    <ul class='gallery'>
    <?php
    foreach($page->port_images as $image) {
      $thumb = $image->getThumb('thumbnail');
      echo "<li class='gallery-item'>";
      echo "<a href='{$image->url}' class='albumImageLinks fancybox-button' rel='fancybox-button'>";
      echo "<img class='gallery-image' src='{$thumb}' /></a>";
      echo "</li>"; 
    }
    
    ?>
    </ul>

    Also you need to create a thumbnail settings that matches what you were going to use for the size parameters. For me I was using 500/400, if you describe these settings, they are defaulted, then you can crop to the size you need for specific pictures, the rest are center cropped, which is exactly what I needed! Thanks for this fantastic solution for cropping images!

    • Like 2
  5. Okay, so I completely missed this the first time I was looking over $image configurations.

    $image->size($width, $height, $options)Return a new $image with the given dimensions. By default it will get upscaled and center cropped with a quality of 90%. To resize and keep proportions you can 0 for height or width value. As third argument you can pass an array to overwrite the default settings: $defaultOptions = array( 'upscaling' => true, 'cropping' => true, 'quality' => 90 );

    If there was a 3rd option for cropping not to be center focused, and instead upward focused? or can I write one to be somewhere?

    So it would be nice if I could do a check for height, then if over a certain height I could do 'cropping' => upward or something.

    • Like 1
  6. So in general I really love how PW does its sizing and centers the focus on the picture so if you size it different that its true aspect ratio it focuses on the center of the picture, which in general is perfect for what we need.

    However, I was wondering if it was possible to change the parameters of where it focuses on. I am doing a photography website and I have some really awesome vertical images that are getting clipped at the top where the top is the most important part of the models picture.

    I am wondering if anyone has any good advice on how to best approach this issue inside of Process Wire Where does the magic happen and can I adjust it?

    You can see the issue here: http://peterson-medi...io/people/ Third row down, 3rd right picture(unless he moves it, or your browser is narrow in width, basically just any of the pictures with the heads cut off :-[ .)

    I would just make the layout different, but since this layout is fully responsive and changes sizes drastically I need to figure out how to do this.

    I was hoping to maybe write some php that would check to see if the height parameters of the picture were bigger than the width, then if so, focus on the top of the picture instead of the middle.

    Thanks a lot, and I hope someone can help me figure this one out.

  7. UPDATE:

    The jQuery .post() request broke in IE. IE is picky and has to have a value for the post, it doesn't use the current pages information like all the other browsers did. Thus my solution for a 1 page template did not work.

    Instead I did as you all recommended, made two templates, the form template for the public with the javascript included on that page, and some processwire php to get the url of the mailer page. Placed that php echo code inside the post request, then made a new template with the mailer php code. Added that template to processwire and created a page.

    IE now works as expected along with all the other browsers.

    I just wanted to let others know in case they come upon this same problem.

    HIGH FIVE TO PROCESSWIRE & FORUM MEMBERS!

    • Like 1
  8. OK! So I solved everything, and its all working perfectly.

    I ended up building one hell of a template page. All the javascript and php is contained in this one template page. The javascript ajax resubmits the information to itself, which clears the form, and spins out the email. The action goes to the payment processor's page.

    All of it works beautiful. Thanks for all the advice. I didn't think about just building it all into one template. I am so so at php, very beginner to advanced things. This is my first site with processwire and I love how smooth things are.

    • Like 1
  9. Guys I am just going to use a work around.

    I am just going to make a static directory, and then in processwire point my links to the static directory, thus solving my problem for now.

    Thanks.

    and you can delete/close this, unless someone wants to go crazy and figure it out.

    i really appreciate the help so far, ive spent 7 hours on this, and im just tired of trying to figure it out.

  10. So, I am doing something a bit complex here, but I have it working on a static site. So I know it all works as planned. However I can't get it to work inside of processwire, and I am not sure why.

    Let me explain what is going on.

    So I have built a template with my form code.

    Then I have a js file, that uses AJAX/php to mail me a copy of what the form contained upon submission. This is due to the fact the form is going to a third party processor. They do not send nice pretty copies, but they do send a confirmation, which is enough for me to match them later by hand.

    So my issue is lies here:

    I have created a template that contains this information, then I have included my javascript in the header.

    However, I don't know where to place the mailer.php and the other file that it calls.

    I have tried placing them in templates/includes/

    then calling them in my javascript like so.

    //code

    $.post('http://examplesite.com/site/templates/includes/donate_in_memory_mailer.php', $('form#donate').serialize(), function(data){

    });

    //code

    then inside of that donate_in_memory_mailer.php I have an include for another .php file.

    I have done it's include similar:

    //code

    include 'http://examplesite.com/site/templates/includes/memory_mailer.tpl.php';

    //code

    However, it appears this isn't working. I cannot get it to work, I have even tried putting this folder in my root directory. Does anyone have any ideas. I would assume it wasn't a processwire issue, but when I can make everything work the same exact way on another static site I get confused.

    Please I hope this is just a simple fix, its the last part of the first site I have ever built with processwire!

    Thanks!!

    -Joseph

  11. Thanks for the awesome replies.

    I pretty much am going to stick to just building a static html/css/js site, then once I have that how I like it, I will move to a dev.yaddayadda.com remote server for building templates and fields, cause it just doesn't make sense to redo things twice.

    I was just wondering if there was something I was missing that might have made it quicker, since processwire is so awesome.

    It appears this forums are equally as awesome as well!

    Thanks for the help.

  12. Hello everyone!

    First, I just want to thank you for processwire and all your hard work.

    I have a quick question that I figured would be ok to ask here, since its sort of a starter place for most people learning processwire like myself.

    What is the recommended way to develop for a real project for processwire. So I usually develop locally then port everything to my server, but processwire is a bit different in that fact. It seems I just need to develop templates, stylesheets, js, and images locally. Then once I have all that together start working on the live server, as the fields and such don't carry over directly when I upload the files.

    Is this pretty much how everyone else is developing with processwire? Or is there a better way?

    Thanks!

    -Joe

    • Like 1
×
×
  • Create New...