Not Using WordPress? Click here
I have recently been working on a new plugin. I started this plugin because it was the month of Ramadan in the Hijri (Islamic) calendar and I thought it would be nice to show what was posted in each month on the Hijri Calendar. Thankfully I had already acquired a script which calculated the Hijri date using PHP in the past so my main aim was to implement this in the plugin to make it calculate the Hijri date as well as the Gregorian date.
This plugin is a much more complicated one then my first ones; Random Hadith and Random Qur’an. I wanted to be a little ambitious so I made this new plugin have a few extra features.
- It gives you the choice of showing the Hijri and Gregorian date together, or both of them on their own.
- It also allows you to change the format of the displayed date to suit your liking.
- You can add before, separator and after text or HTML.
- All of this is done with an extra menu in the administration panel.
I am currently working on a version which allows you to choose the language in the admin panel. Anyone offering to translate to their language please contact us.
Current Languages: English, Turkish, Bahasa Indonesia, Arabic.
This plugin is running on my homepage.
2. Upload the unnhijridate.PHP file to your plugins directory (wp-content/plugins)
3. Go to your WordPress administration area and activate the plugin.
4. Go to your Options menu and select ‘HijriDate’
5. Customise your dates.
< ?PHP show_hijridate(); ?> for
< ?PHP the_time(); ?> where ever you wish the plugin to output the date and time. (Usually index.PHP).
HirjiDate Plugin is listed on the following:
Frequently Asked Questions
Q. Why is nothing displayed when I put the ‘
unn_hijridate()‘ function in my template?
A. Did you go to the options page at least once after installing the plugin? If not, the default replacement strings haven’t been set up yet. Go to your dashboard, click options and select ‘HijriDate’. This should solve your problem.
Q. How do I make my HirjiDate like yours on the homepage?
A. Probably for advanced users: show_hijridate takes the following parameters to make use of each of the three variables individually; Day, Month and Year for both Hirji and Gregorian dates.
< ?PHP show_hijridate('%02d %s %d', '%d %B %Y', '') ?>
And then wrap it in whatever CSS you like. View this page for theme styling tips with code for the standard Kubrick theme (see homepage), Connections theme and Freshy theme.
Q. The date is slightly off for my part of the world.
A. Unfortunately for all script calcuated dates this will be the case, it should automatically correct itself within a few days.
I really like this plugin, can I donate to you?
There are many people in the world who are much worse of then me. Donate to Islamic Relief, http://www.islamic-relief.com/.
If you want to contribute to continue development of these projects, please donate to the Usayd Network:
0.1-0.5 – Initial development
0.6 – Integration with Admin panel
0.7-1.85 – Plugin finalisation
1.86-1.87 – Bug squashing
Current Version: 1.87
Operating Platform: WordPress 1.5 – 2.5.x
You can download the standalone PHP script that calculates the Hijri Date from our partners, YSE. With this you can experiment and create your own script, or you can create ideas and work with us to improve existing ones or share ideas for new ones. Please feel free to contact us if you are interested in doing so, or if you are interesting in contributing to any of the projects run by the Usayd Corp.
Who contributed to this project?
I had the idea for the plugin and programmed the ‘bulk’ of the code, though that isn’t much
This plugin uses a PHP script to calculate the Hijri date which was programmed by a kind person who does not ask for any recognition. In his own words; “There’s no need to give me credit for anything. The coding really is minimal and I’d prefer the anonymity (lol).” Well thank you dearly anyway
-> Sewar – Arabic Translation
-> Adrian – Indonesian Translation
-> Splee’s date plugin
-> Simons Footnotes plugin
-> io_error gave a lot of constructive criticism
-> s_g helped loads with the coding
-> Steven gave some ideas
-> Other people on #wordpress
© Usayd Networks 2005-2008.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA