WordPress.org

Ready to get started?Download WordPress

Forums

Collapse-O-Matic
[resolved] Changing default behavior to reduce use of attributes (13 posts)

  1. rodmusic
    Member
    Posted 1 year ago #

    Great plugin, just what I needed! In an effort to use fewer attributes in shortcodes (to reduce visual clutter in the WP edit screen) I have made a couple changes to the default behavior. Since I don't really know what I'm doing, I wanted to see if I've gone about this the right way. It seems to be giving me the desired result, but I don't know if my edits will cause problems somewhere else.

    http://fgmea.org/test

    To replace tag="strong" in the shortcode, in collapse-o-matic.php I changed 'tag' => 'span', to 'tag' => 'strong',

    Instead of using trigclass="noarrow", I changed

    .collapseomatic {
    	background-image: url(images/arrow-down.png);
    	background-repeat: no-repeat;
    	padding: 0 0 10px 16px;
    	/*border: 1px dotted blue;*/
    	cursor: pointer;
    }

    to

    .collapseomatic {
    	background-image: none;
    	padding: 0 0 10px 16px;
    	/*border: 1px dotted blue;*/
    	cursor: pointer;
    }

    One I'm still working on is getting it to collapseall by default without needing a rel attribute.

    Thanks again for this great plugin. By the way your <div> solutiion for the weird spacing issue worked for me.

    Thanks,
    Rod

    http://wordpress.org/extend/plugins/jquery-collapse-o-matic/

  2. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    Everything you are doing looks good so far. One thing to keep in mind: all of these changes will revert when/if the plugin is updated. We will look into adding an options page so the default behavior can be set and saved... and remain during upgrades.

  3. rodmusic
    Member
    Posted 1 year ago #

    Thanks, Baden. I keep notes on all my plugin modso I can recreate them after an update. I just did the following in collapse-o-matic.php to make the tags look like links so folks would know to click on them.
    'startwrap' => '<a>',
    'endwrap' => '</a>'
    I felt like my site needed this for a consistent look/behavior. Hope this was the right way to do that. A "show tags as hyperlinks" option would be a another good one on a future options page. This didn't work for my expandall collapseall text, so I put some anchor tags right in the page html.
    http://fgmea.org/test

  4. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    Hey Rod, I think we have something you might like. Check out the alpha version of Collapse-O-Matic 1.5 from The Plugin Oven. Once installed, check out the new options page at: Dashboard > Settings > Collapse-O-Matic

    Here you can set the default tag attribute for ALL expand shortcodes used site-wide.
    Once this has been tested by more people and proven stable, we will release it, along with an inexpensive $3-5 'Premium' version that will add a few more attributes and allow all of their default values to be managed via the options page.

    If you can beta test this for us, you'll get it for free, of course.

    Let us know what you think!

    -Twinpictures

  5. rodmusic
    Member
    Posted 1 year ago #

    Baden, I'm trying 1.5c now: http://fgmea.org/test

    Seems to be working fine for the tag attribute. I'm still adding the and to the startwrap and endwrap in the plugin code. I also figured out I can add noarrow to the trigclass in the same file rather than doing it in the css file. (duh!)

    I look forward to other attributes being added!

  6. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    Rod,

    We are going to release a new Collapse-Pro-Matic plugin that allows every one of the attribute defaults to be set. It will be very reasonable (3 - 5 Bucks) and we'll hook you up with a copy for free because you are an awesome dude and might enjoy being a beta-tester that provides useful feedback to make the plugin all it can be.

    More on this in the coming days...

  7. rodmusic
    Member
    Posted 1 year ago #

    Very cool. Can't wait!

  8. UaMV
    Member
    Posted 1 year ago #

    Ah, nice! i did realize this was an addition in 1.5c. Looking forward to the Pro release. And the slinky is a nice touch.

  9. UaMV
    Member
    Posted 1 year ago #

    Rather, i mean, i did NOT realize that was an addition. It seems when i test it out, having set the default to tag="div" the markup shows the trigger as a <tag> element, rather than a <div> element.

  10. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    you would not set the default tag to:
    tag="div"

    just set the default tag to:
    div or h2 or strong, etc...

  11. UaMV
    Member
    Posted 1 year ago #

    Thought i had it set simply to div, went to check and it was actually set to tag ... must not have saved the setting. Oops.

  12. rodmusic
    Member
    Posted 1 year ago #

    It seems you can put any text tag in and get some useful effects. I tried a, em, sub, sup, blockquote, q, ins, del, and others with no problem, and sometimes a useful look. Seems to basically insert whatever you enter into start and end tags, much like the separate startwrap and endwrap attributes, but without entering all the < ></ > characters.

    Try bdo dir=rtl (no quotes needed) for a cool effect! :)

  13. rodmusic
    Member
    Posted 1 year ago #

    I'm finding this plugin very useful. Being able to use other shortcodes within the collapse-o-matic shortcode is a real timesaver. http://fgmea.org/test Check out the last two questions to see how it works with NextGen Gallery and Mp3j-Player plugins.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic