News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Religion Tabs

Started by Gobo, July 23, 2006, 04:56:59 PM

Previous topic - Next topic

Gobo

Link To Mod
Compatible with: 1.1

This mod is based on Country Flags mod by JayBachatero and was used by permission and adapted to display religion tags.

----------------------------
Version 3 has an admin interface and allows the admin to select whether the user selects the tabs on registration or in profile and if it is a required feild or not. The tabs are added both to profile and post profile
----------------------------

----------------------------
Version 2 does not have an admin interface and only adds the religion tabs to profile and post profile and is only selectable via the profile edit screen
----------------------------

A preview of all the icons inside this mod:



















































A screenshot of how it appears in your post profile:



A screenshot of how it appears in your profile:



A screenshot of how you can select it via profile edit screen:



A screenshot of how you can select it via registration screen:



A screenshot of the admin interface:



You can see this mod in action at my test site at: Here

A great big THANKS to Fwitt and Kindred who helped me develop version 2 of this mod :D

And a HUGE thanks to JayBachatero without whose help I would never have been able to make version 3.

Gobo

#1
Version 2 Manual Mod Instructions Only!


================For Custom Themes================
================Manual Install Instructions================

In case your board is already heavily modded or uses a custom theme and this install fails - then you can attempt a manual install, it is very simple. Just make sure to make backup of the files used before attempting it.

1- Download from your themes folder 2 files named:
- Profile.template.php
- Display.template.php
And open them in a text editor suitable for PHP files

2- In Profile.template.php find:



<td><input type="text" name="websiteUrl" size="50" value="', $context['member']['website']['url'], '" /></td>



Add AFTER it the following:



</tr><tr>
<td><b>Way of Life: </b></td>
<td><select name="default_options[profile_way_of_life]">
<option', @$context['member']['options']['profile_way_of_life'] == 'Islam' ? ' selected="selected"' : '', '>Islam</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Christianity' ? ' selected="selected"' : '', '>Christianity</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Judaism' ? ' selected="selected"' : '', '>Judaism</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Buddhist' ? ' selected="selected"' : '', '>Buddhist</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Athiest' ? ' selected="selected"' : '', '>Athiest</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Hinduism' ? ' selected="selected"' : '', '>Hinduism</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Agnostic' ? ' selected="selected"' : '', '>Agnostic</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Undecided' ? ' selected="selected"' : '', '>Undecided</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Undisclosed' ? ' selected="selected"' : '', '>Undisclosed</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Sikhism' ? ' selected="selected"' : '', '>Sikhism</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Bahai' ? ' selected="selected"' : '', '>Bahai</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Janism' ? ' selected="selected"' : '', '>Janism</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Shinto' ? ' selected="selected"' : '', '>Shinto</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Zoroast' ? ' selected="selected"' : '', '>Zoroast</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Pagan' ? ' selected="selected"' : '', '>Pagan</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Satanism' ? ' selected="selected"' : '', '>Satanism</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Humanism' ? ' selected="selected"' : '', '>Humanism</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Secular' ? ' selected="selected"' : '', '>Secular</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Scientology' ? ' selected="selected"' : '', '>Scientology</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Confucianism' ? ' selected="selected"' : '', '>Confucianism</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Taoism' ? ' selected="selected"' : '', '>Taoism</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Wicca' ? ' selected="selected"' : '', '>Wicca</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Unitarian' ? ' selected="selected"' : '', '>Unitarian</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Spiritism' ? ' selected="selected"' : '', '>Spiritism</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Ayyavazhi' ? ' selected="selected"' : '', '>Ayyavazhi</option>
</select></td>


3 - Now in Profile.template.php file look for:



<td><a href="', $context['member']['website']['url'], '" target="_blank">', $context['member']['website']['title'], '</a></td>



Add AFTER it this:


', !empty($context['member']['options']['profile_way_of_life']) ? '</tr><tr>
<td><b>Way of Life: </b></td>
<td>' . $context['member']['options']['profile_way_of_life'] . '</td>' : '', '




4 - In Display.template.php find this:



// Show the member's gender icon?



Add BEFORE it:



if (empty($message['member']['options']['profile_way_of_life'])) {
    $message['member']['options']['profile_way_of_life']='Undisclosed';
}
echo '
   Way of Life: ', $message['member']['options']['profile_way_of_life'] , ' <img src="', $settings['default_images_url'], '/', $message['member']['options']['profile_way_of_life'], '.png" /> <br />';

      

You DO NOT need to upload the images to each themes images folder since this mod will use the images from the default theme.

Thats all :)

- danny

#2
This is a really cool MOD; thank you!

Do you have a button generator, or could you tell me which font you have used to create the buttons? I need to add other religions to the offered options. [ex: Pagan, Animism, Taoism/Daoism, and what not.]

Deaks

yeh this would be good if you did expand it to include Paganism (or even better the differenet branches of Paganism) and other faiths
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Gobo

Sorry for the late reply but havent been online much during the past few weeks.

Thanks for the compliments :D

The font used is Berlin Sans FB <click to download>

I would love to add more religions but to be honest my knowledge on them may be limited and as a result I may end up giving them a symbol which the followers of that way of life may find offensive or something.

So if you guy have a symbol I could work with I'll be happy to make it :)

Also here is the PSD file for the religion badge - all you will have to do is add the symbol graphic to it and change the text.

PSD File <click to download>

Also if you do make any badges could you kindly share here? So that we can have even a better variety :)

alphacaveman

I've installed this mod, but can't find where to go in the Admin section to enable and customize it.

Can anyone tell me where to go in 1.1 RC2

Gobo

Once you install it - its enabled thats all there is to it lol

Look in your forum profile and Edit the profile and you sill see an additional drop down list there for religion

once you select a religion it will appear in your posts (under your avatar on every post you make)

For those who dont select any icon - it will show the "Undisclosed" icon in their post profile



As for customization - you can only do that manually through the code or by uploading different images to replace existing ones - the mod dosent have an admin interface

alphacaveman

Ok thanks. But where do I go to add/remove religions?

Gobo

to add remove a religion simply take out the respective line for it from the code in Profile.template.php



<option', @$context['member']['options']['profile_way_of_life'] == 'Islam' ? ' selected="selected"' : '', '>Islam</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Christianity' ? ' selected="selected"' : '', '>Christianity</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Judaism' ? ' selected="selected"' : '', '>Judaism</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Buddhist' ? ' selected="selected"' : '', '>Buddhist</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Athiest' ? ' selected="selected"' : '', '>Athiest</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Hinduism' ? ' selected="selected"' : '', '>Hinduism</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Agnostic' ? ' selected="selected"' : '', '>Agnostic</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Undecided' ? ' selected="selected"' : '', '>Undecided</option>
<option', @$context['member']['options']['profile_way_of_life'] == 'Undisclosed' ? ' selected="selected"' : '', '>Undisclosed</option>



Additionally you can also add new religiongs if you want by adding more lines - all you must ensure is that the name EXACTLY matches the one given in the code for example "Undisclosed" in the code above has an image called Undisclosed.gif associated with it...so the name must be the same as the option you add

To replace existing images - well simply replace them making sure the names are the same

thats all really

you can also adapt this mod for other uses like "clan badges" or other stuff

You can even place this in your signature instead of your post profile with a simple shifting of the code :)

Gobo

Updated for RC3
File added to download section

Gobo

#10
Version 2 of this mod is out (look at 1st and 2nd posts)

It is compatible with 1.1RC2 and 1.1RC3

Those already using this mod should simply uninstall it via the package manager and install the new one.

New Version Changes

-It now offers 25 religions
-The icons have been greatly enhanced

A lot of research went into the symbols used on the icons - and best to my capabilities I have taken all care to assign each religion its correct symbol.

If however you see a mistake - please let me know

Aku

Gobo


yellow1912

While this idea is quite cool, I do think most of the forums shouldnt use this mod. People may look at the religious tag and behave differently.
My SMF forum ^^
An Ecommerce site I help to build

Gobo

#13
Version 3 of this mod is out

Compatible with 1.1

A huge thanks to Jay Bertho who allowed me to use his Country Flags Mod to base this from :D

This version adds a few new features:
- An admin interface where the admin can specify whether this option will be asked for on registration or in the profile or both. Also it can be set as a "required" field if necessary.

More details in 1st post with screen shots
Enjoy

Manual Mod Instructions for Version 3 Only!

In case your mod fails to install due to heavy modifications or because you have a custom theme (this only installs for default core which comes with SMF) follow these instructions.

In most custom themes you will probably only require the Display.Template.php modifications so I am putting them here.

FIND:

// Show the member's gender icon?
if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '')
echo '
', $txt[231], ': ', $message['member']['gender']['image'], '<br />';


Add AFTER with:

// Did they select a religion?
if(isset($message['member']['options']['religion']) && !empty($modSettings['religion_tab_show']) && !empty($message['member']['options']['religion']))
{
$tabs = ReligionTab();
echo '
<img src="', $settings['default_theme_url'], '/images/tabs/', $message['member']['options']['religion'], '.png" alt="', $tabs[$message['member']['options']['religion']], '" /><br />';
}

Adamzon

Can u search all members within a specified religion?

/adam


Gobo


QueenTiye

I can't install the mod.  I have the following mods already installed:

TinyPortal
Arcade

However, when I install the Religion Tabs mod, I get this gobbledygook at the top of every page:

// Religion Tab mod $txt['religion_tab_label'] = 'Please select your religion'; $txt['religion_tab_error_required'] = 'You must select the religion'; $txt['religion_tab_ask'] = 'Ask for religion tab on'; $txt['religion_tab_disabled'] = 'Don\'t show (Disabled)'; $txt['religion_tab_profile'] = 'Profile'; $txt['religion_tab_registration'] = 'Registration'; $txt['religion_tab_both'] = 'Both'; $txt['religion_tab_required'] = 'Require a member to select a religion?'; $txt['religion_tab_show'] = 'Show religion on Display page (Where posts are shown).'; $txt['religion_tab'] = 'Religion';

Also, I want to know if the mod is editable - that is - can I add or delete religions listed?

QT

Gobo

open up /Themes/default/Languages/modifications.english.php

and look in the file for a ?> (just do a search)
This should be at the VERY END of the file.

But in your case you will find it somewhere in the middle...just delete that and place it right at the end and the text at the top will dissapear.

As for adding and deleting religions you can do that by replacing the image tabs first.

Then open up the XML file for the mod (before installing it) and change all instance of which ever religion you wanted to change. Thats the simpler method, because once it gets installed I believe you have ot change the options in a few files.

Hope that helps

QueenTiye

Can we add to the list something Animism and Native American Beliefs?

Thank you for the suggestions for change.  I wasn't clear on the XML thing - I deleted the files from the zip and will try again.

QT

Advertisement: