Giter Site home page Giter Site logo

wp-iet-generic-plugins's People

Contributors

gr4376 avatar nfreear avatar peterdevinegmd avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

subx25

wp-iet-generic-plugins's Issues

Add 'include' / 'exclude' filters to [tagcloud] shortcode [LACE]

Current crude CSS:

@IET-OU/wp-iet-generic-plugins ../css/iet-custom-style.css ~ line 193-195:

.lace-remove-ev-tags .iet-wp-tag-cloud-plugin a[ href *= 'tag/ev-' ] {
    display: none;
}

Current examples:

[tagcloud format="list" x_display_count="after"]

Possible extensions

Include tag/ev-* tags:

[tagcloud x_include="tag/ev-"] `

Exclude tag/ev-* tags:

[tagcloud x_exclude="tag/ev-"]

Experimental "Export RTF" button [LACE]

Relates to: #7.

Configuration - wp-config.php:

<?php

define( 'IET_CUSTOM_FN_RTF_URL',
    'http://document.online-convert.com/convert-to-rtf?external_url=%s#forms' );
define( 'IET_CUSTOM_FN_RTF_TITLE',
    "Convert using an external service, 'Online-Convert.com' - experimental - opens in new window" );

Implementation - my_custom_functions.php:

<?php
class IET_Custom_Functions {

    // ...

    protected function print_button_javascript( $selector = NULL, $title='' ) {
        // ...
    }
}

Offset HTML anchor to adjust for fixed header - Javascript, CSS? [LACE]+

Javascript:

/**
  * Check an href for an anchor. If exists, and in document, scroll to it.
  * If href argument omitted, assumes context (this) is HTML Element,
  * which will be the case when invoked by jQuery after an event
  */
function scroll_if_anchor(href) {
    href = typeof(href) == "string" ? href : $(this).attr("href");

    // If href missing, ignore
    if(!href) return;

    // You could easily calculate this dynamically if you prefer
    var fromTop = 50;

    // If our Href points to a valid, non-empty anchor, and is on the same page (e.g. #foo)
    // Legacy jQuery and IE7 may have issues: http://stackoverflow.com/q/1593174
    var $target = $(href);

    // Older browsers without pushState might flicker here, as they momentarily
    // jump to the wrong position (IE < 10)
    if($target.length) {
        $('html, body').animate({ scrollTop: $target.offset().top - fromTop });
        if(history && "pushState" in history) {
            history.pushState({}, document.title, window.location.pathname + href);
            return false;
        }
    }
}    

// When our page loads, check to see if it contains and anchor
scroll_if_anchor(window.location.hash);

// Intercept all anchor clicks
$("body").on("click", "a[href^='#']", scroll_if_anchor);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.