Coded something up in Couch in an interesting way? Have a snippet or shortcode to share? Post it here for the community to benefit.
56 posts Page 2 of 6
Previous 1, 2, 3, 4, 5, 6 Next
This is really a very nice addon you've created. Well done Bartonsweb!!!

Just like cl I also found out using this plugin didn't work with the <cms:get_custom _field /> but I found a little workaround by using a bit of php that fits my needs based on the info on this http://www.hackingwithphp.com/4/7/2/replacing-parts-of-a-string

Code: Select all
<?php
    $string = "An infinite number of monkeys";
    $newstring = str_replace("Monkeys", "giraffes", $string);
    print $newstring;
?>


I'm using it to replace a css background-image through javascript which looks like this in Couch code:

Code: Select all
$('header').css('background-image', 'url("<cms:php>
    $string = "<cms:get_custom_field 'header_image' masterpage='header.php' />";
    $newstring = str_replace(":", "<cms:show k_site_link />couch/uploads/image", $string);
    print $newstring;</cms:php>")');


I'm not a programmer so if a php guru could spice it up a bit feel free. ;)
Hi, I just want to report that I had problems with the addon on the page I'm currently working on at my testserver. Everything worked fine with the first picture. Then I tried to replace it and had problems with the upload and the thumbnail did not update. After hitting the crop button several times the thumb apears in the backend. But after saving the page the whole backend of couch crashed.

Only a white screen with the html of the admin box (where you can change the date and the admin rights) was visible after login.

I reinstalled couch 2 times and registered all pages again untill i figured out how to solve that by deactivating the addon at kfunctions file and deleting the entries manually from the database - not that smart :? .

How ever, maybe i did something wrong or it has something todo with the last update. For now I returned to standard thumbnail tag.

best Christoph
Hi Christoph,

Sorry to hear about that.
I cannot figure out how the addon could possibly cause such a disruption. Would want to take a look at the problem first-hand but your setup is on a local machine.

Local stacks (WAMP/XAMPP) are known to be flaky so if you could try using the addon once your site goes live, it'd be great. Chances are you won't hit this problem and if you do atleast I'll be able to properly investigate into it.

Thanks.
First of all very nice plugin that saves lot's of time by not having to crop each image in a separate editor. I have a question: I would like to have 3 thumbnails of the same image. First a thumbnail that doesn't have fixed dimension (for showing on a single portfolio page). Then a rectangle for displaying it in the slider thumb of the portfolio. And a square one for the "most recent"-section. But I can't seem to get it to work. The first thumb works, but the second and third seem to disappear every time (in the back-end and in the front-end) .

This is my code:
Code: Select all
<?php require_once( 'c2manage/cms.php' ); ?>
<cms:template title='Portfolio' clonable='1' executable='1' commentable='0' dynamic_folders='1' gallery='1'
folder_masterpage='portfolio-folders.php' hidden="0">
    <cms:editable name='portfolio_image' label='Image' type='image' quality="100" show_preview="1" preview_width="250" ></cms:editable>
    <cms:editable
        name='gg_thumb'
        assoc_field='portfolio_image'
        label='Regular thumbnail'
        type='jcropthumb'
        show_preview='1'
    />
   
    <cms:editable
        name='square_thumb'
        assoc_field='portfolio_image'
        label='Square thumbnail'
        type='jcropthumb'
        width='300'
        height='300'
      show_preview='1'
    />
   
    <cms:editable
        name="rectangle_thumb"
        assoc_field="portfolio_image"
        label="Rectangle thumbnail"
        type='jcropthumb'
        width='300'
        height='200'
        show_preview='1'
    />
       
    <cms:editable label="video-url" name='portfolio_video' type='text' ></cms:editable>
</cms:template>
@cowgirl, I tested out your code and it seems be working just fine for me (all thumbnails get created).

If your site is online, please allow me temporary access to it if you'd want me to take a look at the issue for you. Thanks.
@KK, not at the moment but I think I will create a dev environment since I've been working on my personal portfolio for over a year now and it still isn't finished.

This has nothing to do with couch itself, I just had other priorities (personal & professional).

I think this is the first CMS I encounted that is finally allowing some more flexibility for the designers themselves without going through to much coding and allow customers to edit front-end, and I couldn't say it enough how well it's made and how helpful this forum is!
I've found the solution. I had gallery enabled, when I've disabled it the problem was solved.
I have noticed if the original uploaded image, which jcropthumb is associating, doesn't have any height or width parameters, there may be an 'invalid parameter' error when trying to save. I fixed this by adding height and width. I wanted to upload the raw image, but I realize uploading a 5k+ wide image probably shouldn't be done on the web anyway for a blog. :?

Hope this helps anyone experiencing this issue!

This is a super-great addition to this incredibly awesome package! Thanks to the whole community!! :mrgreen:
So I've just installed the script in my "couch" folder, and everything seems to be working great.

My only problem is that for some reason, my thumbnails just disappear once I hit the "Save" button on a post. It doesn't save along with the rest of everything, and I end up getting my original image squished to the frame of the <div> it's in for my thumbnail.

I have no clue what's causing this, and I don't have a gallery enabled on my site.

Does anyone have any clue as to what's causing this?
@jsonicx9, could you please check and see (e.g. using Chrome devtools console) if any JS error is being thrown?
Previous 1, 2, 3, 4, 5, 6 Next
56 posts Page 2 of 6

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 1 guest