Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Force Current Members To Fill Out Required Profile Field Details »»
Force Current Members To Fill Out Required Profile Field
Version: 1.0.0, by calorie calorie is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.5.3 Rating:
Released: 06-08-2005 Last Update: 02-01-2006 Installs: 233
Uses Plugins
 
No support by the author.

So you add a new required profile field, and members who join afterwards are forced to fill out the field, but you want your current members to fill out that field too. Well unless your current members go edit their profile, the new field sits and waits for them to take action. This mod will force your current members to fill out the field by prompting them for action before allowing them to return to normal site use. Here are some further details:
  • Install as a vB 3.5.0 product.
  • Thanks to wolfyman for this post.
  • Thanks to KirbyDE for this post.
  • Credit is given to Revan from this post.
  • Credit is given to Locutus2999 from this thread.
  • Related vB 2.2.x from roxics in this thread.
  • Here based off the vB 2.3.x hack by Locutus2999.
  • Cost to install this mod is an additional query.
  • Support only if/as time available, no guarantees.
  • Should you install, say thanks by clicking install.
Remember to set 'Field Required' to 'Yes' and 'Field Editable by User' to 'Yes' for mod to kick in (see profile how-to: http://www.vbulletin.com/docs/html/profile).

Mod Update (03 September 2005):
- changed mod from plugin/hack to product

Mod Update (01 October 2005):
- changed mod to have better output display

Mod Update (10 October 2005):
- changed mod to use required, editable fields

Mod Update (02 February 2006):
- added vB v.3.5.3 force profile update mod

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
b00k

Comments
  #112  
Old 12-13-2005, 12:50 AM
fyjpm's Avatar
fyjpm fyjpm is offline
 
Join Date: Oct 2005
Location: Buffalo, NY
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well if you named your CMPS page that displays all of Vbulletins pages to "forum" then you are ok with this part. You can check by going into Admin Control Panel > vBa CMPS > Edit Pages and look for "forum" if you don't see it then this is your problem and change that to what you do see there and see if that works. IF you do see it, then I'm getting at a loss for why its doing this for you...

-John

Quote:
Originally Posted by cbr929rrerion
I have this

Code:
<?php
define('VBA_PORTAL', true);
define('VBA_PAGE', 'forum');
Reply With Quote
  #113  
Old 12-13-2005, 01:04 AM
cbr929rrerion cbr929rrerion is offline
 
Join Date: Oct 2005
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok... what should be named what?

it was named default, I renamed it to forum, still not work but the identifier is still default...

what where do I need to check?
Reply With Quote
  #114  
Old 12-13-2005, 01:41 AM
Kuimera Kuimera is offline
 
Join Date: Aug 2005
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So you have to change it manualy, every time I add a new profile field I go there and change in the text what I added, that a good idea.
Tks a lot, now plz ppl, anwser is questions :P
Reply With Quote
  #115  
Old 12-13-2005, 03:18 AM
fyjpm's Avatar
fyjpm fyjpm is offline
 
Join Date: Oct 2005
Location: Buffalo, NY
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cbr929rrerion
ok... what should be named what?

it was named default, I renamed it to forum, still not work but the identifier is still default...

what where do I need to check?
before we continue on, please make sure you've followed the instructions carefully at:

http://www.vbadvanced.com/membersare...tid=4&pageid=6

Then you just have to make sure that the :

<?php
define('VBA_PORTAL', true);
define('VBA_PAGE', 'include');

is the same as the module's identifier you created.
Reply With Quote
  #116  
Old 12-13-2005, 04:26 AM
fyjpm's Avatar
fyjpm fyjpm is offline
 
Join Date: Oct 2005
Location: Buffalo, NY
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by fyjpm
How can I get the members username in the error message like this:

"Dear so-and-so, you need to fill in the required field blah blah blah..."

Anyone?

Thanks,

John
"There's no help like self help" so in case anybody else wants get fancy like me find this line in the hook for this mod:

Code:
				eval(standard_error(fetch_error('zzz_update_profile',$vbulletin->options['bburl'],$vbulletin->session->vars['sessionurl'])));
change to this:

Code:
				eval(standard_error(fetch_error('zzz_update_profile',$vbulletin->options['bburl'],$vbulletin->session->vars['sessionurl'],$vbulletin->userinfo['username'])));
Now in your Phrase manager search for : zzz_update_profile

change to

Code:
Dear {3}, there are new required profile field(s) since your last visit: click <a href="{1}/profile.php?{2}do=editprofile">Edit Profile</a> to update.
There. Personalized error message.

-John

EDIT: see next post for combined features: https://vborg.vbsupport.ru/showthrea...554#post847554
Reply With Quote
  #117  
Old 12-13-2005, 05:29 AM
fyjpm's Avatar
fyjpm fyjpm is offline
 
Join Date: Oct 2005
Location: Buffalo, NY
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kuimera
I know this should be kind of hard request, but sometimes we get that kind of dumb users who dont know the hell what is a profile, and when that message shows, they tend to go to the profile and leave without changing anything...
Is there a way to show in the msg what are the new profile fields or something?
I modified the code to expose 2 additional parameters you can use in the zzz_update_profile phrase "{3}" (username) and "{4}" (list of required fields needing attention). So one could do something like this:

Code:
Dear {3} there are new required profile field(s) since your last visit: {4}. Click <a href="{1}/profile.php?{2}do=editprofile">Edit Profile</a> to update.
Here's the modified "Force Profile Update" hook code: ( Plugin System > Plugin Manager > Hook Location: global_start )

Code:
// #### Force Current Members To Fill Out Required Profile Field ####
$zzz_showmessage = false;
$zzz_multiplefields = false;
if ($vbulletin->userinfo['userid'] > 1)
{
	if (THIS_SCRIPT != 'profile' AND THIS_SCRIPT != 'usercp')
	{
		$zzz_reqfields = $db->query_read("SELECT profilefieldid, title ".
				"FROM ".TABLE_PREFIX."profilefield ".
				"WHERE required = 1 AND editable = 1");
		if ($db->num_rows($zzz_reqfields))
		{
			while ($zzz_reqfield = $db->fetch_array($zzz_reqfields))
			{
				$zzz_fieldname = "field".$zzz_reqfield['profilefieldid'];
				$zzz_userfield = $vbulletin->userinfo["$zzz_fieldname"];
				if (empty($zzz_userfield) && $zzz_userfield != "0")
				{
					$zzz_multiplefields ? $zzz_fieldnamelist .= ", " . $zzz_reqfield['title'] : $zzz_fieldnamelist .= $zzz_reqfield['title'] ;
					$zzz_multiplefields = true;
					$zzz_showmessage = true;
				}
			}
		}
		if ($zzz_showmessage)
		{
			eval('$gobutton = "' . fetch_template('gobutton') . '";');
			eval('$spacer_open = "' . fetch_template('spacer_open') . '";');
			eval('$spacer_close = "' . fetch_template('spacer_close') . '";');
			$show['pmstats'] = true;
			if ($vbulletin->options['usepopups'] != 0)
			{
				$show['popups'] = true;
			}
			$show['member'] = true;
			$show['searchbuttons'] = true;
			$pmbox['lastvisitdate'] = vbdate($vbulletin->options['dateformat'], $vbulletin->userinfo['lastvisit'], 1);
			$pmbox['lastvisittime'] = vbdate($vbulletin->options['timeformat'], $vbulletin->userinfo['lastvisit']);
			$pmunread_html = iif($vbulletin->userinfo['pmunread'], '<strong>' . $vbulletin->userinfo['pmunread'] . '</strong>', $vbulletin->userinfo['pmunread']);
			$vbphrase['unread_x_nav_compiled'] = construct_phrase($vbphrase['unread_x_nav'], $pmunread_html);
			$vbphrase['total_x_nav_compiled'] = construct_phrase($vbphrase['total_x_nav'], $vbulletin->userinfo['pmtotal']);
			eval('$headinclude = "' . fetch_template('headinclude') . '";');
			eval('$header = "' . fetch_template('header') . '";');
			eval('$footer = "' . fetch_template('footer') . '";');
			eval(standard_error(fetch_error('zzz_update_profile',$vbulletin->options['bburl'],$vbulletin->session->vars['sessionurl'],$vbulletin->userinfo['username'],$zzz_fieldnamelist)));
		}
	}
}
// #### Force Current Members To Fill Out Required Profile Field ####
Reply With Quote
  #118  
Old 12-13-2005, 07:15 AM
fyjpm's Avatar
fyjpm fyjpm is offline
 
Join Date: Oct 2005
Location: Buffalo, NY
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by fyjpm
You know what I almost cross posted you because I was looking at the code and it does seem that they should keep getting it...I'm thinking its because I'm using CMPS that a blank screen is happening? I'll post back my findings, anyone else have an idea please reply.

Thanks guys!

-John

P.S. Obviously I clicked *INSTALL* and I love this hack. nuff said.
FIXED this issue with vBA CMPS: see my self-answering thread here:
http://www.vbadvanced.com/forum/showthread.php?p=74589

But here's the quick fix:

add:
PHP Code:
            if (defined('VBA_PORTAL') AND !defined('SKIP_OUTPUT') AND !defined('VBA_SCRIPT'))
            {
                
define('SKIP_OUTPUT'true);
            } 
right before:

PHP Code:
            eval('$headinclude = "' fetch_template('headinclude') . '";');
            eval(
'$header = "' fetch_template('header') . '";');
            eval(
'$footer = "' fetch_template('footer') . '";'); 
Reply With Quote
  #119  
Old 12-13-2005, 09:24 PM
cbr929rrerion cbr929rrerion is offline
 
Join Date: Oct 2005
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Im sad to say I wish I could get it to work but I cant, I named the part in the index.php file the same as the identifier and all else checks out.. I guess I cant use this
Reply With Quote
  #120  
Old 12-13-2005, 10:09 PM
fyjpm's Avatar
fyjpm fyjpm is offline
 
Join Date: Oct 2005
Location: Buffalo, NY
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cbr929rrerion
Im sad to say I wish I could get it to work but I cant, I named the part in the index.php file the same as the identifier and all else checks out.. I guess I cant use this
PM me with your login info, I'll take a look for you... we can finish this in instant messenger or PM.
Reply With Quote
  #121  
Old 12-19-2005, 08:14 AM
ConKien ConKien is offline
 
Join Date: Apr 2004
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to force users to pick their avatar OR upload their profile's picture?

*Click Install*
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:55 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04837 seconds
  • Memory Usage 2,335KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_code
  • (2)bbcode_php
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete