Nice url/picture on Facebook.
- tobydude
- Forecaster
- Posts: 192
- Joined: Sun Jan 07, 2018 6:43 pm
- Location: Norway
- Station model: Netatmo
- Software: Weatherdiaplay
- Contact:
Nice url/picture on Facebook.
When I post the url of my weather page on Facebook, it only shows an ugly, simple url with no picture or any "info".
I have talked to my webpage server host (proisp) , but they can´t do anything about it.
Is it possible to make a block that let users of Meteotemplate post their weather page url on Facebook with a picture?
The picture could be for example one of the blocks or an other picture of choice.
I have talked to my webpage server host (proisp) , but they can´t do anything about it.
Is it possible to make a block that let users of Meteotemplate post their weather page url on Facebook with a picture?
The picture could be for example one of the blocks or an other picture of choice.
-
- Advisor
- Posts: 60
- Joined: Sun Dec 24, 2017 2:22 pm
- Station model: AW WS-2000ish
- Software: Meteobridge/OIP/GW-1000
- Contact:
Re: Nice url/picture on Facebook.
My signature is actually a gif image that can be shared on FB (http://weather.westfamilynj.net/sig.gif), I just need to remember how I automated the process of saving the sticker php as a gif.
**edit
It is actually a javascript file, that when the sig.gif is loaded, actually displays the signature block instead. The file contents are -
I think it is a setting on my web server to use the javascript, I need to figure out how I did that.
**edit
It is actually a javascript file, that when the sig.gif is loaded, actually displays the signature block instead. The file contents are -
Code: Select all
document.write('<iframe marginheight="0" marginwidth="0" name="iframe1" id="iframe1" width="500" height="150" src="http://weather.westfamilynj.net/meteo/stickersWU/stickerInteractive.php?text=Observatory%20West,%20Sussex%20NJ&type=interactive" align="top" frameborder="0" scrolling="no"></iframe>');
-
- Advisor
- Posts: 60
- Joined: Sun Dec 24, 2017 2:22 pm
- Station model: AW WS-2000ish
- Software: Meteobridge/OIP/GW-1000
- Contact:
Re: Nice url/picture on Facebook.
ok I figured it out. Along with the previous sig.js file above, my .htaccess has -
That tells the webserver that when one of the sig graphic files is requested, actually serve the sticker php file instead.
Code: Select all
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
redirect /sig.gif http://weather.westfamilynj.net/meteo/plugins/stickers/stickerInteractive.php?text=Observatory%20West,%20Sussex%20NJ&dualUnits=1&type=interactive
redirect /sig500.gif http://weather.westfamilynj.net/meteo/plugins/stickers/stickerInteractive500.php?text=Observatory%20West,%20Sussex%20NJ&dualUnits=1&type=interactive
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Nice url/picture on Facebook.
Hy Ståle, if you enable ( in meteotemplate control panel->main setup ) these options
every blocks will have the capability to save a snapshot of the block itself ( clicking the picture icon on the lower right )
Only a small annoyance for menuBlocks ( those that have a menu on the upper left ): the snapshot won't work until you select one element from the menu.
every blocks will have the capability to save a snapshot of the block itself ( clicking the picture icon on the lower right )
Only a small annoyance for menuBlocks ( those that have a menu on the upper left ): the snapshot won't work until you select one element from the menu.
- tobydude
- Forecaster
- Posts: 192
- Joined: Sun Jan 07, 2018 6:43 pm
- Location: Norway
- Station model: Netatmo
- Software: Weatherdiaplay
- Contact:
Re: Nice url/picture on Facebook.
Thanks.
The settings are like on your picture.
The page show only text, an no links works.
There is no "menu" in the rain block.
The settings are like on your picture.
The page show only text, an no links works.
There is no "menu" in the rain block.
- tobydude
- Forecaster
- Posts: 192
- Joined: Sun Jan 07, 2018 6:43 pm
- Location: Norway
- Station model: Netatmo
- Software: Weatherdiaplay
- Contact:
Re: Nice url/picture on Facebook.
The rain block:
I finally understand.
Thank you
I finally understand.
Thank you
- tobydude
- Forecaster
- Posts: 192
- Joined: Sun Jan 07, 2018 6:43 pm
- Location: Norway
- Station model: Netatmo
- Software: Weatherdiaplay
- Contact:
Re: Nice url/picture on Facebook.
Nice.
Can you make me one?
-
- Advisor
- Posts: 60
- Joined: Sun Dec 24, 2017 2:22 pm
- Station model: AW WS-2000ish
- Software: Meteobridge/OIP/GW-1000
- Contact:
Re: Nice url/picture on Facebook.
Not really, it requires admin access to your meteotemplate installation, plus the ability to load files to your server. It is easy to do though,
1. Load the stickers plugin in meteotemplate.
2. Create a text file called "sig.js" and paste this code in it, changing my site information for yours -
Code: Select all
document.write('<iframe marginheight="0" marginwidth="0" name="iframe1" id="iframe1" width="500" height="150" src="http://weather.westfamilynj.net/meteo/stickersWU/stickerInteractive.php?text=Observatory%20West,%20Sussex%20NJ&type=interactive" align="top" frameborder="0" scrolling="no"></iframe>');
3. Modify if you have one, otherwise create a file called ".htaccess" and paste this code in it, changing my site information for yours -
Code: Select all
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
redirect /sig.gif http://weather.westfamilynj.net/meteo/plugins/stickers/stickerInteractive.php?text=Observatory%20West,%20Sussex%20NJ&dualUnits=1&type=interactive
5. sig.js goes pretty much anywhere in your site, it could be the root, or the home folder of your meteotemplate installation. Mine is at weather.westfamilynj.net/sig.gif.
- tobydude
- Forecaster
- Posts: 192
- Joined: Sun Jan 07, 2018 6:43 pm
- Location: Norway
- Station model: Netatmo
- Software: Weatherdiaplay
- Contact:
Re: Nice url/picture on Facebook.
Thank you.
i certainly will give it a try.
i certainly will give it a try.
- tobydude
- Forecaster
- Posts: 192
- Joined: Sun Jan 07, 2018 6:43 pm
- Location: Norway
- Station model: Netatmo
- Software: Weatherdiaplay
- Contact:
Re: Nice url/picture on Facebook.
Hey.
It works on facebook and show the right weather values.
Thank you.
Is it possible to make it so my actual weather page opens in a new link (tab), when clicking on the banner picture?
It works on facebook and show the right weather values.
Thank you.
Is it possible to make it so my actual weather page opens in a new link (tab), when clicking on the banner picture?