PluginProbe ʕ •ᴥ•ʔ
Daily Prayer Time / 2026.05.04
Daily Prayer Time v2026.05.04
2026.05.20 2026.05.11 2026.05.09 2026.05.05 2026.05.04 2026.05.03 2026.04.28 2026.04.28.1 trunk 2019.10.16 2019.11.19 2019.2.16 2019.3.1 2019.4.1 2019.4.5 2019.5.12 2019.5.13 2019.5.14 2019.5.19 2019.5.19.1 2019.5.21 2019.5.30 2019.5.5 2019.5.6 2019.5.7 2019.5.8 2019.5.9 2019.6.10 2019.6.2 2019.6.22 2019.7.10 2019.7.25 2019.8.1 2019.8.4 2019.9.16 2020.04.25 2020.04.26 2020.05.01 2020.05.04 2020.05.08 2020.05.17 2020.07.03 2021.01.10 2021.03.28 2021.07.20 2021.07.23 2021.07.24 2021.07.28 2021.08.01 2021.08.06 2021.08.07 2021.08.10 2021.09.12 2021.09.18 2021.09.23 2021.09.24 2021.10.01 2021.10.02 2021.10.10 2021.10.11 2021.10.15 2021.10.21 2021.10.27 2021.10.29 2022.03.24 2022.04.04 2022.04.14 2022.04.15 2022.04.21 2022.04.22 2022.05.04 2022.09.19 2022.11.14 2022.11.16 2022.12.18 2022.12.20 2023.01.27 2023.02.04 2023.02.09 2023.02.21 2023.03.08 2023.03.17 2023.03.18 2023.03.20 2023.05.04 2023.08.03 2023.08.08.16 2023.08.19 2023.08.19.1 2023.10.13 2023.10.21 2023.11.26 2023.12.28 2023.12.31 2024.03.28 2024.03.29 2024.03.30 2024.04.18 2024.04.20 2024.04.22 2024.04.26 2024.08.26 2024.09.12 2024.09.14 2024.09.17 2024.12.29 2024.12.30 2025.01.02 2025.01.17 2025.02.02 2025.03.04 2025.03.06 2025.03.08 2025.03.15 2025.03.20 2025.03.26 2025.03.27 2025.04.03 2025.06.16 2025.06.29 2025.07.15 2025.08.09 2025.10.26 2026.04.26
daily-prayer-time-for-mosques / Views / HelpsAndTips.php
daily-prayer-time-for-mosques / Views Last commit date
Tabs 1 month ago DSTemplate.php 1 month ago DailyTimetablePrinter.php 1 month ago DptApiDoc.php 2 months ago HelpsAndTips.php 2 months ago MonthlyTimetablePrinter.php 2 months ago TimetablePrinter.php 1 month ago dptWidgetForm.php 4 years ago horizontal-div.php 1 month ago widget-admin.php 1 month ago
HelpsAndTips.php
255 lines
1 <?php
2 $basicShortcodes = [
3 '[monthlytable]', '[dailytable_vertical]', '[dailytable_horizontal]', '[display_ramadan_time]', '[daily_next_prayer]'
4 ];
5
6 $prayerTimes = [
7 '[fajr_prayer]', '[sunrise]', '[ishraq]', '[zawal]', '[zuhr_prayer]', '[asr_prayer]', '[maghrib_prayer]', '[isha_prayer]', '[jummah_prayer]'
8 ];
9
10 $individualTimes = [
11 '[fajr_start]', '[zuhr_start]', '[asr_start]', '[maghrib_start]', '[isha_start]'
12 ];
13
14 $specialFeatures = [
15 '[display_iqamah_update]', '[quran_verse]', '[digital_screen]', '[hijri_date]'
16 ];
17
18 $options = [
19 ['key' => 'asr', 'value' => 'hanafi', 'desc' => 'Use Hanafi Asr start method'],
20 ['key' => 'display', 'value' => 'iqamah_only/azan_only', 'desc' => 'Show only azan or iqamah times'],
21 ['key' => 'hide_time_remaining', 'value' => 'true', 'desc' => 'Hide countdown timer'],
22 ['key' => 'hide_ramadan', 'value' => 'true', 'desc' => 'Hide Ramadan row'],
23 ['key' => 'announcement', 'value' => '"Any text"', 'desc' => 'Show announcement text'],
24 ['key' => 'day', 'value' => 'friday', 'desc' => 'Day for announcement: everyday/saturday/.../friday'],
25 ['key' => 'heading', 'value' => '"any text"', 'desc' => 'Custom heading'],
26 ['key' => 'use_div_layout', 'value' => 'true', 'desc' => 'Simple div layout (horizontal only)'],
27 ['key' => 'start_time', 'value' => 'true', 'desc' => 'Show prayer start time (single prayer only)'],
28 ];
29
30 $digitalOptions = [
31 ['key' => 'view', 'value' => 'vertical/presentation', 'desc' => 'Display mode'],
32 ['key' => 'slides', 'value' => 'image1,image2', 'desc' => 'Slide images'],
33 ['key' => 'dim', 'value' => 'number', 'desc' => 'Minutes to dim after Jamaat'],
34 ['key' => 'scroll', 'value' => 'text', 'desc' => 'Scrolling text'],
35 ['key' => 'scroll_link', 'value' => 'url', 'desc' => 'Make scroll text clickable'],
36 ['key' => 'blink', 'value' => 'text', 'desc' => 'Blinking text'],
37 ['key' => 'blink_link', 'value' => 'url', 'desc' => 'Make blink text clickable'],
38 ['key' => 'disable_overnight_dim', 'value' => 'true', 'desc' => 'Disable overnight dimming'],
39 ['key' => 'deactivate_tomorrow', 'value' => 'true', 'desc' => 'Hide tomorrow after prayer finishes'],
40 ['key' => 'mute_adhan', 'value' => 'true', 'desc' => 'Disable Adhan sound'],
41 ];
42
43 $examples = [
44 ['[monthlytable]', 'Display yearly and monthly prayer time with ajax month selector'],
45 ['[monthlytable display=iqamah_only]', 'Display Iqamah times only'],
46 ['[monthlytable display=azan_only]', 'Display Azan times only'],
47 ['[monthlytable heading="Månedlige Tidsplan"]', 'Custom heading in any language'],
48 ['[dailytable_vertical]', 'Display daily timetable vertically'],
49 ['[dailytable_vertical asr=hanafi]', 'Vertical with Hanafi Asr method'],
50 ['[dailytable_horizontal]', 'Display daily timetable horizontally'],
51 ['[dailytable_horizontal display=iqamah_only]', 'Horizontal with Iqamah times only'],
52 ['[dailytable_horizontal asr=hanafi]', 'Horizontal with Hanafi Asr'],
53 ['[dailytable_vertical asr=hanafi announcement="First Khutbah: 1:15" day=friday]', 'Announcement on Friday'],
54 ['[sunrise]', 'Display sunrise time'],
55 ['[isha_prayer]', 'Display Isha prayer time'],
56 ['[fajr_prayer start_time=true]', 'Display fajr with start time'],
57 ['[daily_next_prayer]', 'Display only next prayer'],
58 ['[digital_screen]', 'Display on big monitors'],
59 ['[digital_screen view=vertical]', 'Portrait mode'],
60 ['[digital_screen dim=5]', 'Dim after 5 minutes'],
61 ['[quran_verse min_word=20 max_word=30 language=bangla]', 'Quran verse in Bengali'],
62 ];
63 ?>
64 <style>
65 .dpt-help-accordion { margin-bottom: 10px; }
66 .dpt-help-accordion .accordion-header {
67 background: #2271b1; color: #fff; padding: 12px 15px; cursor: pointer;
68 border-radius: 4px; display: flex; justify-content: space-between; align-items: center;
69 }
70 .dpt-help-accordion .accordion-header:hover { background: #1d5a8a; }
71 .dpt-help-accordion .accordion-header:after { content: ''; font-size: 10px; transition: transform 0.3s; }
72 .dpt-help-accordion.active .accordion-header:after { transform: rotate(180deg); }
73 .dpt-help-accordion .accordion-content { display: none; padding: 15px; border: 1px solid #ddd; border-top: none; }
74 .dpt-help-accordion.active .accordion-content { display: block; }
75 .dpt-shortcode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 15px; }
76 .dpt-shortcode-grid.basic { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
77 .dpt-shortcode-card {
78 background: #f6f7f7; border: 1px solid #dcdcde; padding: 10px 12px; border-radius: 4px;
79 font-family: monospace; font-size: 13px; cursor: pointer; transition: background 0.2s; position: relative;
80 }
81 .dpt-shortcode-card:hover { background: #e6e6e6; border-color: #2271b1; }
82 .dpt-shortcode-card.copied { background: #d1e7dd; border-color: #0f5132; }
83 .dpt-option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
84 .dpt-option-card { background: #f6f7f7; border: 1px solid #dcdcde; padding: 10px; border-radius: 4px; }
85 .dpt-option-card code { background: #fff; padding: 2px 6px; border-radius: 3px; font-size: 12px; }
86 .dpt-example-list { list-style: none; padding: 0; }
87 .dpt-example-list li { padding: 8px 0; border-bottom: 1px solid #eee; }
88 .dpt-example-list li:last-child { border-bottom: none; }
89 .dpt-example-list code { background: #f6f7f7; padding: 2px 6px; border-radius: 3px; font-size: 13px; }
90 .dpt-example-list .desc { color: #666; font-size: 12px; display: block; margin-top: 4px; }
91 .dpt-tip { background: #fff8c5; border-left: 4px solid #f0c33c; padding: 10px 15px; margin-bottom: 20px; font-size: 14px; }
92 .dpt-tip a { color: #2271b1; }
93 </style>
94
95 <p class="dpt-tip">
96 <span class="red">! Important !</span> Please <a href="plugins.php">re-activate</a> the plugin if your data is not imported
97 </p>
98
99 <p style="background:#e7f1ff; padding:10px; border-radius:4px; margin-bottom:15px;">
100 <strong>💡 Tip:</strong> Click on any shortcode below to copy it to your clipboard!
101 </p>
102
103 <h2>Helps and Tips</h2>
104
105 <div id="dpt-help-accordions">
106
107 <!-- Basic Shortcodes -->
108 <div class="dpt-help-accordion active">
109 <div class="accordion-header" onclick="toggleHelpAccordion(this)">Basic Shortcodes</div>
110 <div class="accordion-content">
111 <p>Most commonly used shortcodes for displaying prayer times (click to copy):</p>
112 <div class="dpt-shortcode-grid basic">
113 <?php foreach ($basicShortcodes as $sc): ?>
114 <div class="dpt-shortcode-card" onclick="copyShortcode(this, '<?php echo esc_attr($sc); ?>')"><?php echo esc_html($sc); ?></div>
115 <?php endforeach; ?>
116 </div>
117 </div>
118 </div>
119
120 <!-- Prayer Times -->
121 <div class="dpt-help-accordion">
122 <div class="accordion-header" onclick="toggleHelpAccordion(this)">Prayer Times</div>
123 <div class="accordion-content">
124 <p>Display individual prayer times with Iqamah:</p>
125 <div class="dpt-shortcode-grid">
126 <?php foreach ($prayerTimes as $sc): ?>
127 <div class="dpt-shortcode-card" onclick="copyShortcode(this, '<?php echo esc_attr($sc); ?>')"><?php echo esc_html($sc); ?></div>
128 <?php endforeach; ?>
129 </div>
130 </div>
131 </div>
132
133 <!-- Individual Times -->
134 <div class="dpt-help-accordion">
135 <div class="accordion-header" onclick="toggleHelpAccordion(this)">Individual Times (Start/Jamah)</div>
136 <div class="accordion-content">
137 <p>Display only start time or jamah time for each prayer:</p>
138 <div class="dpt-shortcode-grid">
139 <?php foreach ($individualTimes as $sc): ?>
140 <div class="dpt-shortcode-card" onclick="copyShortcode(this, '<?php echo esc_attr($sc); ?>')"><?php echo esc_html($sc); ?></div>
141 <?php endforeach; ?>
142 </div>
143 </div>
144 </div>
145
146 <!-- Special Features -->
147 <div class="dpt-help-accordion">
148 <div class="accordion-header" onclick="toggleHelpAccordion(this)">Special Features</div>
149 <div class="accordion-content">
150 <p>Additional features like Quran verse, digital screen, etc:</p>
151 <div class="dpt-shortcode-grid">
152 <?php foreach ($specialFeatures as $sc): ?>
153 <div class="dpt-shortcode-card" onclick="copyShortcode(this, '<?php echo esc_attr($sc); ?>')"><?php echo esc_html($sc); ?></div>
154 <?php endforeach; ?>
155 </div>
156 </div>
157 </div>
158
159 <!-- Options Reference -->
160 <div class="dpt-help-accordion">
161 <div class="accordion-header" onclick="toggleHelpAccordion(this)">Shortcode Options Reference</div>
162 <div class="accordion-content">
163 <p>Add these options to any shortcode (e.g., [dailytable_horizontal asr=hanafi]):</p>
164 <div class="dpt-option-grid">
165 <?php foreach ($options as $opt): ?>
166 <div class="dpt-option-card">
167 <code><?php echo esc_html($opt['key']); ?>=<?php echo esc_html($opt['value']); ?></code>
168 <br><small><?php echo esc_html($opt['desc']); ?></small>
169 </div>
170 <?php endforeach; ?>
171 </div>
172 <p style="margin-top: 15px;"><strong>Digital Screen Options:</strong></p>
173 <div class="dpt-option-grid">
174 <?php foreach ($digitalOptions as $opt): ?>
175 <div class="dpt-option-card">
176 <code><?php echo esc_html($opt['key']); ?>=<?php echo esc_html($opt['value']); ?></code>
177 <br><small><?php echo esc_html($opt['desc']); ?></small>
178 </div>
179 <?php endforeach; ?>
180 </div>
181 </div>
182 </div>
183
184 <!-- Examples -->
185 <div class="dpt-help-accordion">
186 <div class="accordion-header" onclick="toggleHelpAccordion(this)">Practical Examples</div>
187 <div class="accordion-content">
188 <p>Click any example to copy it:</p>
189 <ul class="dpt-example-list">
190 <?php foreach ($examples as $ex): ?>
191 <li>
192 <code onclick="copyShortcode(this, '<?php echo esc_attr($ex[0]); ?>')" style="cursor:pointer;"><?php echo esc_html($ex[0]); ?></code>
193 <span class="desc"><?php echo esc_html($ex[1]); ?></span>
194 </li>
195 <?php endforeach; ?>
196 </ul>
197 <p><a href="https://wordpress.org/plugins/daily-prayer-time-for-mosques/screenshots/" target="_new">View screenshots <i class="fa fa-external-link" aria-hidden="true"></i></a></p>
198 </div>
199 </div>
200
201 <!-- Ramadan & Hijri -->
202 <div class="dpt-help-accordion">
203 <div class="accordion-header" onclick="toggleHelpAccordion(this)">How To: Ramadan & Custom Hijri</div>
204 <div class="accordion-content">
205 <p><strong>Update Ramadan timetable:</strong><br>Put '1' for column (is_ramadan) in the sample CSV for days belonging to Ramadan before upload.</p>
206 <p><strong>Use custom Hijri date:</strong><br>Insert your own calculated Hijri date in the CSV column (hijri_date) and enable visibility from settings.</p>
207 </div>
208 </div>
209
210 </div>
211
212 <script>
213 function toggleHelpAccordion(header) {
214 header.parentElement.classList.toggle('active');
215 }
216
217 function copyShortcode(el, text) {
218 // Try modern clipboard API first
219 if (navigator.clipboard && navigator.clipboard.writeText) {
220 navigator.clipboard.writeText(text).then(function() {
221 showCopyFeedback(el, text);
222 }).catch(function(err) {
223 fallbackCopy(text, el);
224 });
225 } else {
226 fallbackCopy(text, el);
227 }
228 }
229
230 function fallbackCopy(text, el) {
231 // Fallback for older browsers
232 var textarea = document.createElement('textarea');
233 textarea.value = text;
234 textarea.style.position = 'fixed';
235 textarea.style.opacity = '0';
236 document.body.appendChild(textarea);
237 textarea.select();
238 try {
239 document.execCommand('copy');
240 showCopyFeedback(el, text);
241 } catch (err) {
242 alert('Failed to copy. Please manually select and copy: ' + text);
243 }
244 document.body.removeChild(textarea);
245 }
246
247 function showCopyFeedback(el, originalText) {
248 el.classList.add('copied');
249 el.innerText = 'Copied! ✓';
250 setTimeout(function() {
251 el.classList.remove('copied');
252 el.innerText = originalText;
253 }, 1500);
254 }
255 </script>