vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Empty Profile Field Notification! 1.0.0 (https://vborg.vbsupport.ru/showthread.php?t=108843)

Stangsta 02-24-2006 10:00 PM

Empty Profile Field Notification! 1.0.0
 
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!

bubba1977 02-25-2006 12:13 PM

install went ok, shows that i need to fill in some information about me.

i filled in the info but the warning is still on the main page

any help?

EDIT.... silly me, forgot to change the XX to profile field number.

works ok now thanks :squareeyed:

MissKalunji 02-25-2006 12:40 PM

nice just what i needed :)

[high]* MissKalunji clicks installed[/high]

bubba1977 02-25-2006 12:49 PM

just noticed that when this is in place it makes the footer of the skin skewif and makes a large gap at the bottom of the page. :ermm:

Stangsta 02-25-2006 02:41 PM

Quote:

Originally Posted by bubba1977
just noticed that when this is in place it makes the footer of the skin skewif and makes a large gap at the bottom of the page. :ermm:

Hmmmmm, Ill look into it.

It shouldnt effect the footer. Are you sure you installed it in the FORUMHOME template under the $navbar?

trancetopia 02-25-2006 06:03 PM

Now this is more like it. Thanks for sharing.

/me clicks install

bubba1977 02-25-2006 07:04 PM

Quote:

Originally Posted by Stangsta
Hmmmmm, Ill look into it.

It shouldnt effect the footer. Are you sure you installed it in the FORUMHOME template under the $navbar?


yes i did install it it in forumhome under $navbar

Stangsta 02-25-2006 08:30 PM

Quote:

Originally Posted by bubba1977
yes i did install it it in forumhome under $navbar

Can you PM me with a link to your forum with guest access?

FleaBag 02-25-2006 08:35 PM

Nice! I'll install I think.

bubba1977 02-25-2006 08:36 PM

Sorry the forum is members only but i will still pm you the link


All times are GMT. The time now is 09:23 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01304 seconds
  • Memory Usage 1,752KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete