Version: 1.0.0, by Stangsta
Developer Last Online: Feb 2017
Version: 3.5.4
Rating:
Released: 02-24-2006
Last Update: 02-24-2006
Installs: 24
Template Edits
No support by the author.
Empty Profile Field Notification! 1.0.0
WHAT IT DOES: This hack will inform your users in a somewhat annoying way that they should fill in profile fields that you specify. Once they fill in the specified fields, this message will go away. This Hack can be used for many things, for example. You can have a notice displayed if they are not a subscriber, not a member of a certain usergroup, have not selected an avatar, and more. Its up to your imagination
WHY I MADE THIS: Rather than forcing users to fill out profile fields and potentially lose new members because they just didnt feel like doing it right then and there during signup, this will remind them while they are browsing the forums that "hey, its a good idea to fill this out or you have to look at this annoying message everyday"!
INSTRUCTIONS:
Step 1 - Go in your adminCP > Styles & Templates > Edit Templates > Forum Home Templates > FORUMHOME
Find:
Code:
$navbar
Below, add:
Code:
<!-- Empty Profile Field Notification by Stangsta -->
<if condition="$bbuserinfo[usergroupid] == 1">
<else />
<if condition="$bbuserinfo[fieldXX]==''">
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tr>
<td class="tcat" colspan="5">
<strong><font color="#FF9933">ATTENTION:</font> You do not have anything listed for the <a href="http://www.YOUR_DOMAIN_NAME.com/forums/profile.php?do=editprofile">"About Me" </a>field in your profile.</strong>
</if>
</td>
</tr>
</if>
<!-- / Empty Profile Fields Notification by Stangsta -->
Step 2 This can get tricky for beginners. Now, customize the Hex color for the word "ATTENTION:" to whatever color you wish. I just made it a different color to help it stand out, you may remove the color formatting if you wish. Now select the profile field number you wish to produce a warning with. ex.
Code:
<if condition="$bbuserinfo[fieldXX]==''">
*NOTE: Make sure you change the URL to match yours.
Step 3 This is OPTIONAL!
Lets say, you want your users to fill out 2 or more profile fields. Simple, just keep adding the code like this:
Code:
<!-- Empty Profile Field Notification by Stangsta -->
<if condition="$bbuserinfo[usergroupid] == 1">
<else />
<if condition="$bbuserinfo[fieldXX]==''">
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tr>
<td class="tcat" colspan="5">
<strong><font color="#FF9933">ATTENTION:</font> You do not have anything listed for the <a href="http://www.YOUR_DOMAIN_NAME.com/forums/profile.php?do=editprofile">"Field 1" </a>field in your profile.</strong>
</if>
</td>
</tr>
<if condition="$bbuserinfo[fieldXX]==''">
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tr>
<td class="tcat" colspan="5">
<strong><font color="#FF9933">ATTENTION:</font> You do not have anything listed for the <a href="http://www.YOUR_DOMAIN_NAME.com/forums/profile.php?do=editprofile">"Field 2" </a>field in your profile.</strong>
</if>
</td>
</tr>
<if condition="$bbuserinfo[fieldXX]==''">
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tr>
<td class="tcat" colspan="5">
<strong><font color="#FF9933">ATTENTION:</font> You do not have anything listed for the <a href="http://www.YOUR_DOMAIN_NAME.com/forums/profile.php?do=editprofile">"Field 3" </a>field in your profile.</strong>
</if>
</td>
</tr>
</if>
<!-- / Empty Profile Fields Notification by Stangsta -->
Hopefully this was informative and helpful. I will support this the best I can, but I am no expert. Feel free to improve upon this, all I ask is you share the improvements with others in this thread.
PLEASE PLEASE PLEASE....If you use this hack CLICK INSTALL!
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
<if condition="$show['profilepic']">
<else />
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tr>
<td class="tcat" colspan="5">
<strong><font color="#FF9933">ATTENTION:</font> You have not created a <a href="http://www.YOUR_DOMAIN_NAME.com/forums/profile.php?do=editprofile">"Profile Picture" </a>for your profile.</strong>
</if>
</td>
</tr>
Change the URL to the location to change the profile pic.
Unfortunately there was something wrong with the if condition ... it displayed for everyone regardless of whether they had a picture or not, even non-members.
Unfortunately there was something wrong with the if condition ... it displayed for everyone regardless of whether they had a picture or not, even non-members.
Ok , try this. If I had a way to test this, I would. My site does not use profile pics and has it disabled. I would as always recommend that you use a "test style" if you dont already. Just so your users arent affected.
Code:
<!-- Empty Profile Field Notification by Stangsta -->
<if condition="$bbuserinfo[usergroupid] == 1">
<else />
<if condition="$show['profilepic']">
<else />
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tr>
<td class="tcat" colspan="5">
<strong><font color="#FF9933">ATTENTION:</font> You have not created a <a href="http://www.YOUR_DOMAIN_NAME.com/forums/profile.php?do=editprofile">"Profile Picture" </a>for your profile.</strong>
</td>
</tr>
</if></if>
<!-- / Empty Profile Fields Notification by Stangsta -->
or this
Code:
<!-- Empty Profile Field Notification by Stangsta -->
<if condition="$bbuserinfo['usergroupid'] == 1 OR $show['profilepic'] ">
<else />
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tr>
<td class="tcat" colspan="5">
<strong><font color="#FF9933">ATTENTION:</font> You have not created a <a href="http://www.YOUR_DOMAIN_NAME.com/forums/profile.php?do=editprofile">"Profile Picture" </a>for your profile.</strong>
</td>
</tr>
</if>
<!-- / Empty Profile Fields Notification by Stangsta -->
Also, this Hack can be used for many things, for example. You can have a notice displayed if they are not a subscriber, not a member of a certain usergroup, have not selected an avatar, and more. Its up to your imagination
Ok , try this. If I had a way to test this, I would. My site does not use profile pics and has it disabled. I would as always recommend that you use a "test style" if you dont already. Just so your users arent affected.
I know im close on this.
Instead of adding this to forumhome I added it to the bottom of the navbar template to test it on different pages.
It actually works on "profile.php?do=editprofilepic" but it displays all the time on other pages.
I think that <if condition="$show['profilepic']"> will only work on that particular page, so I'm guessing it will need a plugin to function properly.
I just installed this and everything seemed to be working fine, until I realized the right column that I placed in my forums page using vBadvanced CPMS was gone. I removed your code from FORUMHOME and the right column magically reappeared.
I'd really like to get this working and don't want to give up my right column, so if you have any advice I'd really appreaciate it. If it helps, here's the instructions from the vBadvanced manual that I used and they have nothing to do with the FORUMHOME template.