Google Spreadsheet Colors ?
-
i’ve managed to fetch a google spreadsheet into my wordpress site with your awesome plugin. in the spreadsheet i defined some text-colors and background-colors and i hae noticed they do not get exported in the csv file. Are there any options or workarounds for this please?
-
This topic was modified 2 years, 3 months ago by
nicmare.
-
This topic was modified 2 years, 3 months ago by
nicmare.
The page I need help with: [log in to see the link]
-
This topic was modified 2 years, 3 months ago by
-
how about some kind of markdown support? for instance i could write **text** and it gets text
Hi there!
Thanks for reaching out! The CSV-itself does not contain any color/formatting as I understand it. Background color and textcolors can be done with css. If you supply a screenshot of how your original Google sheet looks like I could help you achieve what you want.
i managed to place everything i need in my wp env. take a look please:
https://hosting195903.ae93c.netcup.net/termine/
pw: user
really happy with it. With some advanced css code it even works mobile.
source is here: https://docs.google.com/spreadsheets/d/1qfLHc3jBDXChnexYKL4BcDOwljcsWEQnKerb_0tL7Fs/gviz/tq?tqx=out:csv&sheet=TSG_Termine
the only thing i would like to do is to highlight some certain words in a cell. like giving it a color or making it bold. but making it bold in google would not work because the csv file does not export it. but wrapping words in a markdown-way could be a workaround. what do you think?
and by the way: is there some kind of cache when i open the wp-page? does the plugin makes requests to google with each page impression?
It looks really good! Nice work!
Highlight word:
Because the information from the spreadsheet are rendered as html you could enter this in a cell in the beginning:<span style="font-weight:bold;">and after your text you enter</span>to make a bold text.
A better option is to do like this:<span class="highlight-word">and after your text you enter</span>to make a bold text. And in your CSS you add:.highlight-word{
font-weight:bold;
}
If you want to define a textcolor, you add this:<span style="color:blue;">and after your text you enter</span>to make a blue text.
OR (better):<span class="highlight-word">and after your text you enter</span>
CSS:.highlight-word{
font-weight:bold;
color:blue;
}-
This reply was modified 2 years, 3 months ago by
wibergsweb.
“and by the way: is there some kind of cache when i open the wp-page? does the plugin makes requests to google with each page impression?”
As default it actually fetches content in realtime, converts it a csv-file and then renders it to a html-table.
But there is a setting created for fetching within certain intervals and it’sfetch_interval:
fetch_intervalΒ β Set to daily, hourly or weekly. This is how often the actual fetch from source is done. so if you add fetch_interval=”hourly” it would only fetch once an hour. You MUST have html_id set for the table because a local file based on it’s html-id is stored to keep the cached file. If one hour hasn’t elapsed, then it renders the table directly from your local cached file. This locally (on the server where you host your site) cached file is stored in a folder called csvtohtml-arrs within your uploads-folder.Because I didn’t hear anything from you for almost two weeks I guess the issue is solved, so I set this question as resolved.
Sorry and excuse me for the late reply. Thanks for the explanation of the caching function. Thatβs what I actually need. Very helpful.
But I was wondering if there is a kind of wp filter where the table data gets passed through. I would like to add some custom php code like adding markdown support to the text. Then I could write some certain words within a cell in italic or bold in google sheet and see that in the wp page as well.
using css classes would not work like intended.No worries! Good to know you’re using my plugin π
I don’t have support to include any filters – mainly because noone requested it. Is the main reason to include italic or bold I could add that kind of support with markdown – if you’d like?
yes at the moment that was the only reason for it. Our club is using your awesome plugin to display certain events which got managed in google sheets. Works like a charm and is dead simple to use. But we want to highlight some special words inside the cells. Therefore the idea was to use something like markdown like tools.
Thanks! Nice to know it’s dead simple to use! π I will add this functionality to my “todo”-list and hopefully it would be available in next update.
finally i had time to add the caching-logic and i think it seems to work right? just a bit confused about the strange file extension
thats pretty dope! thank you very much !
Yes you’re absolutely right! If that file is created it’s working. (I hope you see a large improvement in performance as well!) The reason why .csvhtml is used as fileextension is that I wanted to be unique because that is my own fileformat. I dont think .csvhtml will ever be used by another application.I don’t want to associate this fileformat with any application (there’s no reason for viewing/edit it manually).
I’ve now added (2.81) support for markdown. I hope it is to satisfaction! Sorry for the delay π
thank you buddy. i updated to 2.81 and gave it a try by typing simple stuff like **tsg cup** but nothing happens in the frontend. are we talking about the same markdown support?
Yes, but you have to add markdown_support=”yes” into your shortcode first. https://wibergsweb.se/plugins/csvtohtml/csvtohtml-markdown/
-
This reply was modified 2 years, 2 months ago by
wibergsweb.
-
This reply was modified 2 years, 3 months ago by
The topic ‘Google Spreadsheet Colors ?’ is closed to new replies.