maxpozdeev / mytinytodo

Todo list script
156 stars 49 forks source link

Suggestion : using wttr.in in the footer #67

Closed ParoTheParrot closed 1 year ago

ParoTheParrot commented 1 year ago

Feature request: include wttr.in (https://github.com/chubin/wttr.in#one-line-output) in the footer. I did it with sparse know-how. at the end of includes/theme.php:

<span><?php _e('powered_by');?> 
<a href="http://www.mytinytodo.net/" class="powered-by-link">myTinyTodo</a>&nbsp;<?php mttinfo('version'); ?>
 (<?php $ch = curl_init('https://wttr.in/London?format=%c+%t,+%p'); curl_exec($ch); curl_close($ch); ?>)
</span> 

I hope for improvements, e.g. city name in settings (@maxpozdeev )!?

maxpozdeev commented 1 year ago

Only like an extension.

ParoTheParrot commented 1 year ago

Is there an instruction how to implement an extension?

maxpozdeev commented 1 year ago

No instructions yet.

maxpozdeev commented 1 year ago

Here is a quick solution. Unpack to ext directory, activate in settings and go to extension settings and specify URI for wttr.in url. Also you need to edit includes/theme.php and add new action like in this commit c42143a17d9dc82a .

wttrin.zip

maxpozdeev commented 1 year ago

In v1.8 will be theme_footer_content_end action which can be used to add some things to the footer. Extension for wttr.in is above.