Viewing 5 replies - 1 through 5 (of 5 total)
  • Hey bud,

    At this time, Envira can only go up to 6 columns.

    Thread Starter dr.user

    (@druser)

    Yeah that’s what we see in the plugin but I’m sure the functions could be edited to allow for another column? Would hate to have to ditch the plugin over this…

    Regards.

    what’s up playboy.

    i got you. can’t guarantee the functionality because i don’t know your breakpoints if your design is responsive or not. i’m sure you’d be able to work with it tho. for mine, it works great after every breakpoint.

    follow these steps. all paths relative to plugin folder —
    pluginfolder\includes\global\
    edit common.php
    find the string “Six Columns (6)” (no quotes). paste another array val in there for seven columns (this is for the admin settings). don’t forget to include a comma between the 6 and 7 array definitions.

    mine looks like this….

    …starting at 5……
    array(
    ‘value’ => ‘5’,
    ‘name’ => __( ‘Five Columns (5)’, ‘envira-gallery’ )
    ),
    array(
    ‘value’ => ‘6’,
    ‘name’ => __( ‘Six Columns (6)’, ‘envira-gallery’ )
    ),
    array(
    ‘value’ => ‘7’,
    ‘name’ => __( ‘Seven Columns (7)’, ‘envira-gallery’ )
    )
    );

    return apply_filters(…..

    after that, there is a javascript file you need to edit…

    pluginfolder\assets\js
    the filename is envira-dev-holder.js
    open it. i recommend going to unminify.com, paste that bad boy in and spit it out into something readable. you can paste the reformatted version into the file and save. it’s only a couple extra KB.

    after that, do a search for “enviraGetColWidth” (no quotes) in that text.

    starting at case 6, here is my code (note, ‘break’ is no longer after 6, but after 7 instead) —

    case 6:
    if (c <= 480) {
    d = a.width()
    } else {
    if (c <= 768) {
    d = a.width() / 2
    } else {
    if (c <= 1024) {
    d = a.width() / 3
    } else {
    d = a.width() / b
    }
    }
    }
    case 7:
    if (c <= 480) {
    d = a.width()
    } else {
    if (c <= 768) {
    d = a.width() / 3
    } else {
    if (c <= 1024) {
    d = a.width() / 6
    } else {
    d = a.width() / 7
    }
    }
    }
    break
    }
    return parseInt(d – (e * (b – 1)) / b)
    }

    Obviously, the 768 / 1024 etc act as breakpoints. change the dividing number to the number of cols you want based on the width (1024/768/etc).

    If you’ve already given up, hopefully someone else will find this useful.

    word to ya motha.

    Thread Starter dr.user

    (@druser)

    May help for future projects… Thanks, appreciate it…

    AN EDIT to the ABOVE —

    The one file is NOT envira-dev-holder.js is is envira.js i believe, sorry, not sure how to edit it.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Add more columns’ is closed to new replies.