• Resolved pcdc

    (@pcdc)


    Hi there,

    I have some questions that I hope you can help me with and are not too complicated to address.

    One: Is it possible to make space the spreadsheet is showing on the page wider? Would that be something to adjust in our theme’s settings, or in the plugin’s settings? Or at least widen the columns so that the names and other info are on one line? If it’s in the plugins, would it be a matter of adjusting shortcode or would I have to adjust it through CSS?

    Two: I’m unsure, about how to show the entire spreadsheet on one page by default. Instead of 10, 25, 50 and 100 entries, is there a way to designate a number that has all of the entries showing?

    Three: For my last question, I think it might be a matter of adding javascript to my spreadsheet but I’m not sure. We would like to have a pop up window with a small summary of info when you hover over a person’s name. Kind of like a tooltip, but specific to each individual. This would be the closest example of what I am referring to: Info Bubble

    Thank you very much for your assistance and for the development of this plugin!

    Paul

    Link to the page in question here.

    https://ww.wp.xz.cn/plugins/inline-google-spreadsheet-viewer/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Meitar

    (@meitar)

    1. Yes, adjusting your theme is the correct answer; your theme determines how much visual area the spreadsheet table has available to it.
    2. This was answered in the FAQ:

      to disable paging, add a JavaScript to your theme that looks like this:

      jQuery(window).load(function () {
          jQuery('#igsv-MY_TABLE_KEY').dataTable().api().page.len(-1).draw();
      });
    3. Correct, to have custom interactive elements like an info bubble, you need to write custom JavaScript in your theme or in your own plugin.
    Thread Starter pcdc

    (@pcdc)

    Ok, thank you for your response. Is ‘MY_TABLE_KEY’ the same as our Google Spreadsheet url that we copy into the plugin’s shortcode?

    Plugin Author Meitar

    (@meitar)

    Is ‘MY_TABLE_KEY’ the same as our Google Spreadsheet url that we copy into the plugin’s shortcode?

    No, it’s the Google Spreadsheet’s document ID. This is embedded in the URL, so if your URL is something like

    https://docs.google.com/spreadsheets/d/ABCDEFG/edit

    then your spreadsheet’s document ID is ABCDEFG. The plugin prefixes this document ID with igsv- so you need to reference this table in your JavaScript as “the element with the ID of igsv-ABCDEFG“, which is what the jQuery('#igsv-ABCDEFG') excerpt is doing.

    You can find the correct ID to use in your JavaScript by looking at the <table> element the plugin produces via your browser’s “View source” function.

    Thread Starter pcdc

    (@pcdc)

    Ahhh got it. Thank you, just wanted to confirm. Now I just have to figure out where to put the js code since it’s showing up in the header. I should be able to figure it out now.

    Thanks again for your help!

    Thread Starter pcdc

    (@pcdc)

    Hi Meitar,

    I added a javascript file to my parent theme and used the suggested js code with my table key and it’s not disabling the paging. Do you have a recommendation as far as exactly how and where to add the js file?

    Thank you again.

    Plugin Author Meitar

    (@meitar)

    Do you have a recommendation as far as exactly how and where to add the js file?

    For a script like this, it’s generally a good idea to add JavaScripts at the very end of the page, right before the </body> tag, because you want the rest of the page to load first, which includes the actual table. But there’s a more detailed answer on Stack Exchange here.

    Good luck troubleshooting your theme.

    Thread Starter pcdc

    (@pcdc)

    Good news! I was able to figure out (with your assistance of course) all of my questions.

    The last one which I am sincerely stumped on is the tooltip issue. Basically what we want to do is have each persons’ info: (name, phone, email) pop up when the user clicks on the first name in the Column. Or it can be a traditional hover feature.

    I’ve read on the Google Developers page on how to set it up through them. I just don’t know enable it since we are using a shortcode via your plugin.

    If there is a way to set it up on our original google spreadsheet, would that info still be displayed when we use our shortcode?

    Thanks again for all of your assistance.

    Plugin Author Meitar

    (@meitar)

    If there is a way to set it up on our original google spreadsheet, would that info still be displayed when we use our shortcode?

    No, only the data inside the table gets pulled to your WordPress site, not any presentational code.

    Thread Starter pcdc

    (@pcdc)

    Do you have any recommendations of/how it would be possible to add specific tooltips in for each name in a column?

    Thank you.

    Plugin Author Meitar

    (@meitar)

    No, sorry. That’s simply a programming task, and I don’t offer arbitrary programming help on these forums. Good luck!

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Spreadsheet Questions’ is closed to new replies.