<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Modifying existing module]]></title><description><![CDATA[<p dir="auto">I have installed this module: <a href="https://github.com/htilburgs/MMM-MyPrayerTimes" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/htilburgs/MMM-MyPrayerTimes</a><br />
And I have reallized that it gives me the wrong times. So what I wanted to do is, to use the same app but with an other API. I am a very beginner in javascript and json so I have to ask you for help.</p>
<p dir="auto">I want just the times of a specific city. I don’t want to change it with lon, lat or the timezone. The times should be static. The code should just take the data from the API: <a href="https://ezanvakti.herokuapp.com/vakitler?ilce=10565" target="_blank" rel="noopener noreferrer nofollow ugc">https://ezanvakti.herokuapp.com/vakitler?ilce=10565</a></p>
<p dir="auto">What I need from this API is the value of: Aksam, Ogle, Ikindi, Imsak, Yatsi</p>
<p dir="auto">So what I have done is, I changed this code: <a href="https://github.com/htilburgs/MMM-MyPrayerTimes/blob/master/MMM-MyPrayerTimes.js" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/htilburgs/MMM-MyPrayerTimes/blob/master/MMM-MyPrayerTimes.js</a></p>
<p dir="auto">Here are the changes:</p>
<ul>
<li>
<p dir="auto">In line 64 I changed the url to the new one: this.url = <a href="https://ezanvakti.herokuapp.com/vakitler?ilce=10565" target="_blank" rel="noopener noreferrer nofollow ugc">https://ezanvakti.herokuapp.com/vakitler?ilce=10565</a></p>
</li>
<li>
<p dir="auto">I have commented the lines 92 to 113 out</p>
</li>
<li>
<p dir="auto">In line 127 I changed the time of fajr  to get the time of the api (Value of: Imsak):<br />
from:<br />
FajrTimeCell.innerHTML = this.config.show24Clock == false ? this.convert24Time(MPT.Fajr) : MPT.Fajr;	<br />
To:<br />
FajrTimeCell.innerHTML = this.config.show24Clock == false ? this.convert24Time(MPT.Imsak) : MPT.Imsak;</p>
</li>
<li>
<p dir="auto">I have commented the lines from 138 to 159 out</p>
</li>
<li>
<p dir="auto">line 173:<br />
From:<br />
DhuhrTimeCell.innerHTML = this.config.show24Clock == false ? this.convert24Time(MPT.Dhuhr) : MPT.Dhuhr;<br />
To:<br />
DhuhrTimeCell.innerHTML = this.config.show24Clock == false ? this.convert24Time(MPT.Ogle) : MPT.Ogle;</p>
</li>
<li>
<p dir="auto">line 195:<br />
From:<br />
AsrTimeCell.innerHTML = this.config.show24Clock == false ? this.convert24Time(MPT.Asr) : MPT.Asr;<br />
To:<br />
AsrTimeCell.innerHTML = this.config.show24Clock == false ? this.convert24Time(MPT.Ikindi) : MPT.Ikindi;</p>
</li>
<li>
<p dir="auto">commented from 206 to 227 out</p>
</li>
<li>
<p dir="auto">line 241:<br />
From:<br />
MaghribTimeCell.innerHTML = this.config.show24Clock == false ? this.convert24Time(MPT.Maghrib) : MPT.Maghrib;<br />
To:<br />
MaghribTimeCell.innerHTML = this.config.show24Clock == false ? this.convert24Time(MPT.Aksam) : MPT.Aksam;</p>
</li>
<li>
<p dir="auto">line 263:<br />
From:<br />
IshaTimeCell.innerHTML = this.config.show24Clock == false ? this.convert24Time(MPT.Isha) : MPT.Isha;<br />
To:<br />
IshaTimeCell.innerHTML = this.config.show24Clock == false ? this.convert24Time(MPT.Yatsi) : MPT.Yatsi;</p>
</li>
<li>
<p dir="auto">commented from 274 to 295 out</p>
</li>
</ul>
<p dir="auto">So what I know is that I am not doing the access correctly. For example the MPT.Yatsi is not correct. I also tried MPT[0].Yatsi or MPT.0.Yatsi but these also did not work.</p>
<p dir="auto">I do not know if I also have to change the default:{…} Would it be enough to delete the lon lat and the other components I am not using? And do I also have to change other things (files) to get it to work? I hope you guys can help me.</p>
]]></description><link>https://forum.magicmirror.builders/topic/10887/modifying-existing-module</link><generator>RSS for Node</generator><lastBuildDate>Sun, 17 May 2026 09:11:46 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/10887.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 02 Aug 2019 10:14:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Modifying existing module on Fri, 02 Aug 2019 15:45:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sirver" aria-label="Profile: SirVer">@<bdi>SirVer</bdi></a> Data returned is definitely in a different format.</p>
<p dir="auto">From your link:<br />
<code>{"Aksam":"21:27","AyinSekliURL":"http://namazvakti.diyanet.gov.tr/images/r1.gif","Gunes":"05:48","GunesBatis":"21:20","GunesDogus":"05:55","HicriTarihKisa":"1.12.1440","HicriTarihUzun":"1 ZİLHİCCE 1440","Ikindi":"17:51","Imsak":"04:18","KibleSaati":"11:18","MiladiTarihKisa":"02.08.2019","MiladiTarihKisaIso8601":"02.08.2019","MiladiTarihUzun":"02 Ağustos 2019 Cuma","MiladiTarihUzunIso8601":"2019-08-02T00:00:00.0000000+03:00","Ogle":"13:42","Yatsi":"22:47"}</code></p>
<p dir="auto">From the link used by the MMM-PrayerTimes:<br />
<code>{"code":200,"status":"OK","data":{"timings":{"Fajr":"05:27","Sunrise":"06:47","Dhuhr":"12:14","Asr":"15:20","Sunset":"17:42","Maghrib":"17:42","Isha":"18:57","Imsak":"05:17","Midnight":"00:15"},"date":{"readable":"02 Aug 2019","timestamp":"1564760362","hijri":{"date":"30-11-1440","format":"DD-MM-YYYY","day":"30","weekday":{"en":"Al Juma'a","ar":"\u0627\u0644\u062c\u0645\u0639\u0629"},"month":{"number":11,"en":"Dh\u016b al-Qa\u02bfdah","ar":"\u0630\u0648\u0627\u0644\u0642\u0639\u062f\u0629"},"year":"1440","designation":{"abbreviated":"AH","expanded":"Anno Hegirae"},"holidays":[]},"gregorian":{"date":"02-08-2019","format":"DD-MM-YYYY","day":"02","weekday":{"en":"Friday"},"month":{"number":8,"en":"August"},"year":"2019","designation":{"abbreviated":"AD","expanded":"Anno Domini"}}},"meta":{"latitude":-26.250013,"longitude":27.985634,"timezone":"Africa\/Johannesburg","method":{"id":3,"name":"Muslim World League","params":{"Fajr":18,"Isha":17}},"latitudeAdjustmentMethod":"ANGLE_BASED","midnightMode":"STANDARD","school":"STANDARD","offset":{"Imsak":0,"Fajr":0,"Sunrise":0,"Dhuhr":0,"Asr":0,"Maghrib":0,"Sunset":0,"Isha":0,"Midnight":0}}}}</code></p>
]]></description><link>https://forum.magicmirror.builders/post/59689</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/59689</guid><dc:creator><![CDATA[mumblebaj]]></dc:creator><pubDate>Fri, 02 Aug 2019 15:45:10 GMT</pubDate></item><item><title><![CDATA[Reply to Modifying existing module on Fri, 02 Aug 2019 14:15:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> Thanks you replyed. Could you look in the code when have time?</p>
]]></description><link>https://forum.magicmirror.builders/post/59685</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/59685</guid><dc:creator><![CDATA[SirVer]]></dc:creator><pubDate>Fri, 02 Aug 2019 14:15:20 GMT</pubDate></item><item><title><![CDATA[Reply to Modifying existing module on Fri, 02 Aug 2019 13:30:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sirver" aria-label="Profile: SirVer">@<bdi>SirVer</bdi></a> it may be that the different API returns data in a different format.</p>
<p dir="auto">I am not near my computer today, so I cannot look at it</p>
]]></description><link>https://forum.magicmirror.builders/post/59680</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/59680</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Fri, 02 Aug 2019 13:30:13 GMT</pubDate></item></channel></rss>