WordPress.org

Ready to get started?Download WordPress

Forums

Flot for WordPress
Flot plugin will not install... (5 posts)

  1. hackeconomics
    Member
    Posted 1 year ago #

    This is what happens when I try to install:

    Downloading install package from http://downloads.wordpress.org/plugin/flot-for-wp.zip…

    Unpacking the package…

    Installing the plugin…

    The package could not be installed. No valid plugins were found.

    Plugin install failed.

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

    Also, after I resolve the install issue, how do you reference flot in a post. I have a chart that I created independently of wordpress that works fine. How do I insert that combination of html, css, jquery, and flot.js into a post?

    Thanks!

    http://wordpress.org/extend/plugins/flot-for-wp/

  2. OzManic
    Member
    Posted 1 year ago #

    How did you get it installed? I got the same error when I tried to install.

  3. hackeconomics
    Member
    Posted 1 year ago #

    I ended up downloading the plug-in manually and then ftp'ing the unzipped files to the wp-content/plugins directory. So the directory structure ends up looking like this:

    wp-content/plugins/flot-for-wp

    Once that's done you can go into the wordpress ui and activate the plug-in. I've been using the library to create graphs in my blog http://www.hackeconomics.com.

  4. OzManic
    Member
    Posted 1 year ago #

    THANKS!
    I finally got it installed. Where is the library?
    This plugin is ... I don't know. They do warn that it takes work to get it going. I'm willing to do the work but there isn't much guidance.

    Any direction you can give would be appreciated. And I dig your blog. The graphs really make it stand out. Where is the subscribe option? You're speaking my language. My minor was in Economics and I'm looking into Flot because I make a lot of Excel graphs but Excel translates poorly to the web.

  5. hackeconomics
    Member
    Posted 1 year ago #

    Thanks for the kind words on the blog.

    I'm not an expert on WordPress, php, etc. but this is what I learned to hack together a graph using flot and this plug-in via trial and error.

    There are two files you'll be dealing with, the first being flot-for-wp.php. As I understand it, this is where you let WordPress know where the supporting files are for the plugin (e.g. jquery.flot.min.js, etc.). This is done during installation so nothing to do here.

    This is also where you let WordPress know where the file contains the necessary html, css, and javascript to build your graph. In essence the file you'll be creating that will contain the graph. For example:

    include ( plugin_dir_path( __FILE__ ) . 'flot/gdp.php');

    I originally copied whatever example file is in the default installation (I think it's named flot-example.php). This file basically echoes via php all of the html, css, and javascript necessary to build the graph and creates the short code.

    In case you didn't know what a short kid is (I didn't), it's a string between two brackets (e.g. -> [gdp_sc] that "points" to, in my example, gdp.php. The short code is actually placed in your post and then WordPress substitutes the short code for whatever is in the file you are pointing to.

    At the bottom of flow-example.php you'll notice this line:

    add_shortcode( 'flot_example_sc', 'flot_example' );

    So this links the short code (flot_example_sc] with your file flot_example.

    In sum, you need to:
    - Create a file that contains the graph
    - Add a short code to the bottom of that file
    - Add a line in flot-for-wordpress.php that points to the file that contains your graph.

    I hope this helps and feel free to ask any follow-up questions.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags