Hi everyone
I’m trying to adjust the time of this widget for wordpress which is called Namaz Vakti. its a muslim prayer time widget you can check the widget page on this link https://wordpress.org/plugins/namaz-vakti/
There is also a github page for the widget at https://github.com/wp-plugins/namaz-vakti
There is a preview of the widget on the creators website which is http://www.erdemarslan.com/. if you look at the right sidebar you see the widget.
I’m using the widget on a local wordpress and its working fine without any problems.
i only need to know how i can adjust the time of the prayers. Like for example i want to add 30 minutes to the Fajir (imsak) prayer.
I did find this php file which is called widget.namazvakti.php and tried several things but without any luck.
[CODE]
<div class="vakitler">
<div id="imsak" class="vakit">
<div class="vakit_adi"><?php _e('İmsak', 'namazvakti'); ?></div>
<div class="vakit_saati"><?php echo $vakit['imsak']; ?></div>
</div>
<div id="gunes" class="vakit">
<div class="vakit_adi"><?php _e('Güneş', 'namazvakti'); ?></div>
<div class="vakit_saati"><?php echo $vakit['gunes']; ?></div>
</div>
<div id="ogle" class="vakit">
<div class="vakit_adi"><?php _e('Öğle', 'namazvakti'); ?></div>
<div class="vakit_saati"><?php echo $vakit['ogle']; ?></div>
</div>
<div id="ikindi" class="vakit">
<div class="vakit_adi"><?php _e('İkindi', 'namazvakti'); ?></div>
<div class="vakit_saati"><?php echo $vakit['ikindi']; ?></div>
</div>
<div id="aksam" class="vakit">
<div class="vakit_adi"><?php _e('Akşam', 'namazvakti'); ?></div>
<div class="vakit_saati"><?php echo $vakit['aksam']; ?></div>
</div>
<div id="yatsi" class="vakit">
<div class="vakit_adi"><?php _e('Yatsı', 'namazvakti'); ?></div>
<div class="vakit_saati"><?php echo $vakit['yatsi']; ?></div>
</div>
<div id="kible" class="vakit">
<div class="vakit_adi"><?php _e('Kıble', 'namazvakti'); ?></div>
<div class="vakit_saati"><?php echo $vakit['kiblesaati']; ?></div>
</div>
</div>
</div>
</div>
<?php
} else {
echo 'İstenilen şehre ait veriler alınamadı!';
}
echo $after_widget;
}
private function hangi_vakitteyiz($vakitler)
{
$imsak = strtotime( date('d.m.Y') . ' ' . $vakitler['imsak'] . ':00');
$gunes = strtotime( date('d.m.Y') . ' ' . $vakitler['gunes'] . ':00');
$ogle = strtotime( date('d.m.Y') . ' ' . $vakitler['ogle'] . ':00');
$ikindi = strtotime( date('d.m.Y') . ' ' . $vakitler['ikindi'] . ':00');
$aksam = strtotime( date('d.m.Y') . ' ' . $vakitler['aksam'] . ':00');
$yatsi = strtotime( date('d.m.Y') . ' ' . $vakitler['yatsi'] . ':00');
$simdi = strtotime(date('d.m.Y H:i:s'));
if ($simdi > $yatsi)
{
return 'yatsi';
}
elseif ($simdi <= $yatsi AND $simdi > $aksam)
{
return 'aksam';
}
elseif ($simdi <= $aksam AND $simdi > $ikindi)
{
return 'ikindi';
}
elseif ($simdi <= $ikindi AND $simdi > $ogle)
{
return 'ogle';
}
elseif ($simdi <= $ogle AND $simdi > $gunes)
{
return 'gunes';
} else {
return 'imsak';
}
}
private function hicri_dil_duzeltmesi($tarih)
{
$exp = explode( ' ', $tarih );
$hicri_ay = trim($exp[1]);
return $exp[0] . ' ' . __($hicri_ay, 'namazvakti') . ' ' . $exp[2];
}
}[/CODE]
found this in the end of the php file.
i tried
$imsak = strtotime( date(‘d.m.Y’) . ’ ’ . $vakitler[‘imsak’] . ‘:00 + 30 minutes’);
But it looks like the time is not even being affected.
[CODE]
<div class="vakitler">
<div id="imsak" class="vakit">
<div class="vakit_adi"><?php _e('İmsak', 'namazvakti'); ?></div>
<div class="vakit_saati"><?php echo $vakit['imsak']; ?></div>
</div>
<div id="gunes" class="vakit">
<div class="vakit_adi"><?php _e('Güneş', 'namazvakti'); ?></div>
<div class="vakit_saati"><?php echo $vakit['gunes']; ?></div>
</div>
<div id="ogle" class="vakit">
<div class="vakit_adi"><?php _e('Öğle', 'namazvakti'); ?></div>
<div class="vakit_saati"><?php echo $vakit['ogle']; ?></div>
</div>
<div id="ikindi" class="vakit">
<div class="vakit_adi"><?php _e('İkindi', 'namazvakti'); ?></div>
<div class="vakit_saati"><?php echo $vakit['ikindi']; ?></div>
</div>
<div id="aksam" class="vakit">
<div class="vakit_adi"><?php _e('Akşam', 'namazvakti'); ?></div>
<div class="vakit_saati"><?php echo $vakit['aksam']; ?></div>
</div>
<div id="yatsi" class="vakit">
<div class="vakit_adi"><?php _e('Yatsı', 'namazvakti'); ?></div>
<div class="vakit_saati"><?php echo $vakit['yatsi']; ?></div>
</div>
<div id="kible" class="vakit">
<div class="vakit_adi"><?php _e('Kıble', 'namazvakti'); ?></div>
<div class="vakit_saati"><?php echo $vakit['kiblesaati']; ?></div>
</div>
</div>
</div>
</div>
<?php
} else {
echo 'İstenilen şehre ait veriler alınamadı!';
}
echo $after_widget;
}
private function hangi_vakitteyiz($vakitler)
{
$imsak = strtotime( date('d.m.Y') . ' ' . $vakitler['imsak'] . ':00');
$gunes = strtotime( date('d.m.Y') . ' ' . $vakitler['gunes'] . ':00');
$ogle = strtotime( date('d.m.Y') . ' ' . $vakitler['ogle'] . ':00');
$ikindi = strtotime( date('d.m.Y') . ' ' . $vakitler['ikindi'] . ':00');
$aksam = strtotime( date('d.m.Y') . ' ' . $vakitler['aksam'] . ':00');
$yatsi = strtotime( date('d.m.Y') . ' ' . $vakitler['yatsi'] . ':00');
$simdi = strtotime(date('d.m.Y H:i:s'));
if ($simdi > $yatsi)
{
return 'yatsi';
}
elseif ($simdi <= $yatsi AND $simdi > $aksam)
{
return 'aksam';
}
elseif ($simdi <= $aksam AND $simdi > $ikindi)
{
return 'ikindi';
}
elseif ($simdi <= $ikindi AND $simdi > $ogle)
{
return 'ogle';
}
elseif ($simdi <= $ogle AND $simdi > $gunes)
{
return 'gunes';
} else {
return 'imsak';
}
}
private function hicri_dil_duzeltmesi($tarih)
{
$exp = explode( ' ', $tarih );
$hicri_ay = trim($exp[1]);
return $exp[0] . ' ' . __($hicri_ay, 'namazvakti') . ' ' . $exp[2];
}
}[/CODE]
Now i am not sure if i am editing the right file but if so please tell me which line of code i have to edit to add 30 minutes to the Imsak (fajir) prayer which is the first prayer in the table.
so all i want is a time offsets in minutes for each prayer time, in this case for the prayer Imsak (Fajir).
I also did emailed the creator of the widget a week ago but i have not received any mails back. The code is written in Turkish but there are still elemtns in the code in english.
Hope someone can help me out that would be great.
Thanks in advance