vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Force Current Members To Fill Out Required Profile Field (https://vborg.vbsupport.ru/showthread.php?t=82756)

Andreas 09-03-2005 06:48 PM

No.
What is the Condition for?
It should not show the Error if the Script is profile.php or usercp.php (obviously, otherwise Users would not even have the chance to edit the Fields ;))

So the Condition is
PHP Code:

if (!(THIS_SCRIPT == 'usercp' OR THIS_SCRIPT == 'profile')) 

Now keeping DeMorgan #1 in mind: NOT (smth OR smth) => NOT (smth) AND NOT(smth)
PHP Code:

if (!(THIS_SCRIPT == 'usercp') AND !(THIS_SCRIPT == 'profile')) 

Getting rid of the inner brackets
PHP Code:

if (THIS_SCRIPT != 'usercp' AND THIS_SCRIPT != 'profile'

Nothing magic, just boolean logic :)

Boofo 09-03-2005 06:52 PM

Quote:

Originally Posted by KirbyDE
No.
What is the Condition for?
It should not show the Error if the Script is profile.php or usercp.php (obviously, otherwise Users would not even have the chance to edit the Fields ;))

So the Condition is
PHP Code:

if (!(THIS_SCRIPT == 'usercp' OR THIS_SCRIPT == 'profile')) 

Now keeping DeMorgan #1 in mind: NOT (smth OR smth) => NOT (smth) AND NOT(smth)
PHP Code:

if (!(THIS_SCRIPT == 'usercp') AND !(THIS_SCRIPT == 'profile')) 

Getting rid of the inner brackets
PHP Code:

if (THIS_SCRIPT != 'usercp' AND THIS_SCRIPT != 'profile'

Nothing magic, just boolean logic :)

You see? Once you explain it like that, now it makes sense the way it is. ;)

calorie 09-03-2005 06:54 PM

Quote:

Originally Posted by Boofo
You might want to throw some instructions on setting up the profile field in a text file and ZIP it up for those that might have to re-install vb sometime. ;)

http://www.vbulletin.com/docs/html/profile :confused:

Boofo 09-03-2005 06:56 PM

Quote:

Originally Posted by calorie

I know how to do it, sir, but there are those that don't. It'll save you a lot of grief later on. ;)

calorie 09-03-2005 07:04 PM

@Kirby: LOL, DeMorgan's, good explanation.
@Boofo: Okay, thanks, added a how-to link.

Boofo 09-03-2005 07:16 PM

The reason I recommended a txt file was so user's wouldn't have to come back to the thread here to re-install this if they ever needed it. ;)

mcyates 09-18-2005 01:54 PM

I have uninstalled this but i still get the warning about there being new profile fields and i can't access the site.

calorie 09-19-2005 12:06 PM

@mcyates: Are you having an issue like in this thread or being affected by this bug?

Aeolian_X 09-30-2005 12:02 PM

What a great hack. Gonna try to install it with 3.5.0 Gold tonight. Has anyone else tried it?

OmaniMan 10-01-2005 08:51 AM

Great >>> :)

silurius 10-01-2005 03:07 PM

Quote:

Originally Posted by Aeolian_X
What a great hack. Gonna try to install it with 3.5.0 Gold tonight. Has anyone else tried it?

Waiting to see a brave soul like you try it first. :nervous:

Aeolian_X 10-01-2005 03:34 PM

Seems to work on 3.5 Gold. No problems. I tested it as much as I could last night, and found nothing wrong. Great hack, because we have a lot of people who didn't fill out the required fields.

PennylessZ28 10-08-2005 10:19 PM

Works like a champ!

tanyeri24 10-08-2005 11:29 PM

really a small but powerfull hack, thanks to the coder.
*installed*

:Judge: 10-09-2005 03:41 PM

Will this work with the birthday as well?

I just added the settings in AdminCP for new users to fill it in but I have around 30% of current members who have not.

wolfyman 10-09-2005 04:56 PM

Dear Forum Love God,

I Iust tried it on 3.5 Gold, it keeps nagging at me to edit my profile even though I just did. I will leave it installed but disabled for now.

Signed,

Lost and Confused in Wisconsin.

weaver 10-09-2005 06:05 PM

I'm having the same issue. I tried the bug fix Marco suggested but that did not work.

calorie 10-09-2005 09:55 PM

@:Judge: - nope, this mod is for required profile fields.
@wolfyman - make sure to fill in all required profile fields.
@weaver - what bug fix did Marco suggest for this mod?

weaver 10-09-2005 09:58 PM

I was referring to this bug fix:

http://www.vbulletin.com/forum/bugs3...iew&bugid=1020

Also, the gender profile field was my only required field other than the email and password which were both entered.

calorie 10-09-2005 09:59 PM

@weaver - oh okay, thanks.

calorie 10-09-2005 10:53 PM

@wolfyman and weaver - are you installing this mod as a product?
[ ACP > Manage Products > Add/Import Product > Import Product ]

wolfyman 10-09-2005 10:59 PM

Quote:

Originally Posted by calorie
@:Judge: - nope, this mod is for required profile fields.
@wolfyman - make sure to fill in all required profile fields.
@weaver - what bug fix did Marco suggest for this mod?

Every field on the page was filled in.

calorie 10-09-2005 11:15 PM

@wolfyman - just ran a test on 3.5 Gold and it worked okay for me. Not sure what to advise. Maybe delete/uninstall the mod, and then reinstall as a product.

wolfyman 10-09-2005 11:17 PM

ok, will try

wolfyman 10-09-2005 11:25 PM

ok, it was already installed as a product - I was pretty sure it was.

I figured out what happened though - the new field was gender, and it was set to editable only at registration.

Wich means anybody who registered after the field was added was being asked to edit something they couldn't edit.

:D

calorie 10-10-2005 12:35 AM

@wolfyman: Thanks for the info. Mod has been updated to avoid that issue.

weaver 10-10-2005 12:39 AM

Quote:

Originally Posted by wolfyman
ok, it was already installed as a product - I was pretty sure it was.

I figured out what happened though - the new field was gender, and it was set to editable only at registration.

Wich means anybody who registered after the field was added was being asked to edit something they couldn't edit.

:D

Yeah I thought of that too but when I changed that field to editable at any time, it still didn't fix it. I'll update with the newest copy though and maybe that will fix it. :)

wolfyman 10-10-2005 12:42 AM

Quote:

Originally Posted by calorie
@wolfyman: Thanks for the info. Mod has been updated to avoid that issue.

happy to help, thank you for the plugin. :)

weaver 10-10-2005 12:45 AM

I just uninstalled and reinstalled the updated version. It wouldn't work with it set to "edit only at registration". I did what wolfyman did and now it works.

calorie 10-10-2005 01:16 AM

@weaver: glad it's working. :)

If you set 'Field Required' or 'Field Editable by User' to something other than 'Yes' the mod will now ignore that profile field.

Brandon Sheley 10-10-2005 02:38 AM

so not sure.. this is names product and the start of the thread says its a plug,
where is the user can edit profile option at ?
do i just upload as product ?

*edit*
I've dl, and uploaded as a product.
set up a new profile field,, checked the field is in the profile options.. i had clicked require user to fill out, and user editable.
am i missing something ?
even shanged the plugin in acp from the fix that was posted on the bug tracker.
I must be missing something

PennylessZ28 10-10-2005 03:24 AM

This was a very helpful hack. Thats for the excellent work.

ConqSoft 10-10-2005 08:08 AM

This won't let the user log out until they fill in their information either. Is that by design? If so, how can we allow them to log out?

Thanks

calorie 10-10-2005 08:48 AM

@Loco Macheen: userid one is not affected by this mod.
@HR3rdGen: thanks, glad you like. :)
@ConqSoft: just edit the following line...
Code:

from: if (THIS_SCRIPT != 'profile' AND THIS_SCRIPT != 'usercp')
to: if (!in_array(THIS_SCRIPT,array('profile','usercp','login')))


Allan 10-10-2005 09:12 AM

I will like to use this hack to force the members to update their profiles that when it want to download some attach files (extensions)

is it possible ?

calorie 10-10-2005 03:16 PM

@Allan: change the hookname from global_start to attachment_start and then use the following as the inner most if block:
Code:

                                if (empty($zzz_userfield) && $zzz_userfield != "0")
                                {
                                        eval(standard_error(fetch_error('zzz_update_profile',$vbulletin->options['bburl'],$vbulletin->session->vars['sessionurl'])));
                                }

Those two changes should make it so a member needs to fill out required, editable profile fields to download any attachment.

Allan 10-10-2005 04:45 PM

Thank Calorie, but i'm sorry, I not understand or I have to put this code :(

Would there be a means to choose the extensions clarify for the consideration of this hack ?

calorie 10-11-2005 03:56 AM

@Allan: you could try attachment_display as the hookname instead, and use something like the following:
Code:

if ($vbulletin->userinfo['userid'] > 1 && $extension == 'txt')
{
// blah blah
}


Brandon Sheley 10-12-2005 06:01 AM

i tested with id#'s other then admin
where do i see the " edit your profile" box ?
and i see it added the querry, but i just don't see the profile request ?

calorie 10-12-2005 04:11 PM

@Loco Macheen: install the mod as a product from the ACP and, on the profile fields you want to have filled out by users with userid greater than one, set 'Field Required' to 'Yes' and 'Field Editable by User' to 'Yes' for the mod to kick in.


All times are GMT. The time now is 04:16 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.01569 seconds
  • Memory Usage 1,827KB
  • 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
  • (3)bbcode_code_printable
  • (6)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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