Quran Macro
A new fascinating features of Quran module is Quran macro which allows you to put Quranic text inside nodes simply by typing the ayah/verse number only. So you don't need to copy paste full Quranic text by yourself.
Activating the macro
This is how to activate the macro:
- Login as Administrator
- Go to http://your.drupal-site.com/admin/settings/filters
- Click "configure" on your default input filter
- Check "Quran macro" and click "Save configuration"
- Alhamdulillah, the Quran macro has been activated
Using the macro
The basic syntax of the macro is:
[qs:<sura>:<ayah>[:[<param 1>][,<param 2>]]]
The parameters are: show=both|translation|quran; display=render|tooltip; text="blah blah"
For more details, please continue reading. Note that I must use macro "os" instead of "qs" since I don't want the text to be rendered.
There are 2 ways to apply specify the ayah:
- Using *. [os:114:*] which will produce An-Nas. Please be careful not to apply the asterisk to sura with many ayah.
قُلْ أَعُوذُ بِرَبِّ النَّاسِ (1) مَلِكِ النَّاسِ (2) إِلَهِ النَّاسِ (3) مِن شَرِّ الْوَسْوَاسِ الْخَنَّاسِ (4) الَّذِي يُوَسْوِسُ فِي صُدُورِ النَّاسِ (5) مِنَ الْجِنَّةِ وَ النَّاسِ (6)
"Say: I seek refuge with the Lord and Cherisher of Mankind, The King (or Ruler) of Mankind, The god (or judge) of Mankind,- From the mischief of the Whisperer (of Evil), who withdraws (after his whisper),- (The same) who whispers into the hearts of Mankind,- Among Jinns and among men." (An-Nas)
- Using range. [os:100:1-3] which will produce Al-Adiyat: 1-3.
وَالْعَادِيَاتِ ضَبْحاً (1) فَالْمُورِيَاتِ قَدْحاً (2) فَالْمُغِيرَاتِ صُبْحاً (3)
"By the (Steeds) that run, with panting (breath), And strike sparks of fire, And push home the charge in the morning," (Al-Adiyat: 1-3)
The parameters are:
- Show: both (default) or, translation, or quran. e.g. [os:110:*:show=both] will give you An-Nasr, while [os:110:*:show=translation] will give you An-Nasr
إِذَا جَاء نَصْرُ اللَّهِ وَالْفَتْحُ (1) وَرَأَيْتَ النَّاسَ يَدْخُلُونَ فِي دِينِ اللَّهِ أَفْوَاجاً (2) فَسَبِّحْ بِحَمْدِ رَبِّكَ وَاسْتَغْفِرْهُ إِنَّهُ كَانَ تَوَّاباً (3)
"When comes the Help of Allah, and Victory, And thou dost see the people enter Allah's Religion in crowds, Celebrate the praises of thy Lord, and pray for His Forgiveness: For He is Oft-Returning (in Grace and Mercy)." (An-Nasr)
. Lastly, [os:110:*:show=quran] will give you An-Nasr"When comes the Help of Allah, and Victory, And thou dost see the people enter Allah's Religion in crowds, Celebrate the praises of thy Lord, and pray for His Forgiveness: For He is Oft-Returning (in Grace and Mercy)." (An-Nasr)
إِذَا جَاء نَصْرُ اللَّهِ وَالْفَتْحُ (1) وَرَأَيْتَ النَّاسَ يَدْخُلُونَ فِي دِينِ اللَّهِ أَفْوَاجاً (2) فَسَبِّحْ بِحَمْدِ رَبِّكَ وَاسْتَغْفِرْهُ إِنَّهُ كَانَ تَوَّاباً (3)
- Display: tooltip (default) or, render. e.g. [os:113:*:display=tooltip] will give you Al-Ikhlas, while [os:113:*:display=render], will give you
قُلْ هُوَ اللَّهُ أَحَدٌ (1) اللَّهُ الصَّمَدُ (2) لَمْ يَلِدْ وَلَمْ يُولَدْ (3) وَلَمْ يَكُن لَّهُ كُفُواً أَحَدٌ (4)
"Say: He is Allah, the One and Only; Allah, the Eternal, Absolute; He begetteth not, nor is He begotten; And there is none like unto Him." (Al-Ikhlas)
.قُلْ هُوَ اللَّهُ أَحَدٌ (1) اللَّهُ الصَّمَدُ (2) لَمْ يَلِدْ وَلَمْ يُولَدْ (3) وَلَمْ يَكُن لَّهُ كُفُواً أَحَدٌ (4)
"Say: He is Allah, the One and Only; Allah, the Eternal, Absolute; He begetteth not, nor is He begotten; And there is none like unto Him." (Al-Ikhlas)
- Text parameter allows you to use custom text instead of the Ayah information as the link text. e.g. [os:112:*:text="God's oness"] will give you God oness
قُلْ هُوَ اللَّهُ أَحَدٌ (1) اللَّهُ الصَّمَدُ (2) لَمْ يَلِدْ وَلَمْ يُولَدْ (3) وَلَمْ يَكُن لَّهُ كُفُواً أَحَدٌ (4)
"Say: He is Allah, the One and Only; Allah, the Eternal, Absolute; He begetteth not, nor is He begotten; And there is none like unto Him." (Al-Ikhlas)
If you have any questions or ideas, please comments. Thanks.

Comments
Testing the macro in comments
Testing the macro in comments Al-Falaq
قُلْ أَعُوذُ بِرَبِّ الْفَلَقِ (1) مِن شَرِّ مَا خَلَقَ (2) وَمِن شَرِّ غَاسِقٍ إِذَا وَقَبَ (3) وَمِن شَرِّ النَّفَّاثَاتِ فِي الْعُقَدِ (4) وَمِن شَرِّ حَاسِدٍ إِذَا حَسَدَ (5)
"Say: I seek refuge with the Lord of the Dawn From the mischief of created things; From the mischief of Darkness as it overspreads; From the mischief of those who practise secret arts; And from the mischief of the envious one as he practises envy." (Al-Falaq)
testing
Here I would like to test Macro
[os:113:*:display=render]
is not working in my site.
Sorry, we haven't implement
Sorry, we haven't implement macro for comments yet. But, we are eager to.
Congratulations on your great work for Islam
Please advise How I can help?
You can help translation into
You can help translation into other languages especially for countries which people have big interest in Islam.
You can also help us by sharing your ideas to improve the modules.
Also, if you are familiar with Drupal7 which is not released yet, you can help us porting the current drupal6 version.
Post new comment