Back to vBulletin 3.5 Add-ons

Force Current Members To Fill Out Required Profile Field
Mod Version: 1.0.0, by calorie

This modification is in the archives.
vB Version: 3.5.3 Rating: (1 vote - 5.00 average) Installs: 233
Released: 10 Jun 2005 Last Update: 02 Feb 2006 Downloads: 275
Not Supported Uses Plugins  

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

    Spoiler (click to open)


    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.


    Close
    post.
  • Thanks to KirbyDE for this

    Spoiler (click to open)


    Instead of
    PHP Code:
    $zzz_regex "(profile|usercp)\.php";
    if (isset(
    $_SERVER['REQUEST_URI']) && !eregi($zzz_regex,$_SERVER['REQUEST_URI']))

    why not just
    PHP Code:
    if (THIS_SCRIPT != 'profile' AND THIS_SCRIPT != 'usercp'
    ?

    Btw: Did you consider releasing this as a Product?
    Would make installation and maintenace easier

    Close
    post.
  • Credit is given to Revan from this

    Spoiler (click to open)


    This is my revised code, and it seems to work OK. It goes in place of the original global.php edit:
    PHP Code:
    if ($bbuserinfo['userid'] AND $bbuserinfo['userid'] > 1
    {
        
    $regex "(profile\.php|usercp\.php)";
        if (!
    eregi($regex$_SERVER['REQUEST_URI'])) 
        {
            
    $reqfields $DB_site->query("SELECT * FROM " TABLE_PREFIX "profilefield WHERE required = 1");
            if (
    $DB_site->num_rows($reqfields))
            {
                while (
    $reqfield $DB_site->fetch_array($reqfields)) 
                {
                    
    $fieldname "field$reqfield[profilefieldid]";
                    
    $field $bbuserinfo["$fieldname"];
                    if (empty(
    $field))
                    {
                        eval(
    'print_output("' fetch_template('STANDARD_ERROR_PROFILEFIELD') . '");');
                        die;
                    }
                }
            }
        }

    STANDARD_ERROR_PROFILEFIELD is in place of "zzzz_emptyreqfields", I just thought that was a stupid name so I made something more vBish.

    Close
    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

Download

This modification is archived and cannot be downloaded.

Screenshots

 

Similar Mods

Force Current Members To Fill Out Required Profile Field vBulletin 3.0 Full Releases

vblts.ru supports vBulletin®, 2022-2024