vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Extra Profile Fields Page (https://vborg.vbsupport.ru/showthread.php?t=59618)

NuclioN 02-02-2004 12:28 AM

With all respect but...what is the function of this hack? I tried to understand it but i can't. Can someone explain it? :)

Zachery 02-02-2004 12:29 AM

It gives you an extra page to display uuser profile feilds :)

chapsrulez 03-27-2004 03:29 PM

Will this hack give me the option to add a new custom user filed, which is NON editable by the user, and every time a new user signs up, add a default value in the database?

I have tried to do this but no success.

cheers.

AlexanderT 03-27-2004 11:08 PM

That is a nice hack, exactly what I was looking for. Was tired of adding all custom profiles under "Miscellaneous Options". Will add your hack soon!

sjau 04-02-2004 12:55 PM

Could you use put into the install instructions where above or below to add code?
I'm not sure if I have changed my profile.php.

Here are my lines 2415-2120
PHP Code:

                $attachsize ceil($attachsum $permissions['attachlimit'] * 100);
                
$totalsize 100 $attachsize;
            }

            
$attachlimit vb_number_format($permissions['attachlimit'], 1true);
        } 

Is that the right place to add?

AlexanderT 04-06-2004 03:55 PM

Hack (1.1 / 1.2?) needs 2 fixes (one bug mentioned by eXtremeTim). Thanks to Zachery for this nice hack :P
Edit: FIX FIXED :)

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
FIX 1 (no more option resets)

- Open file includes/functions_user.php

Find:
-----
PHP Code:

// check extra profile fields
    
$profilefields $DB_site->query("
        SELECT profilefieldid,required,title,size,maxlength,type,data,optional, regex
        FROM " 
TABLE_PREFIX "profilefield
        WHERE editable = 1
            AND form " 
iif($formtype'>= 1''= 0'). "
    "
); 

REPLACE with:
-------------
PHP Code:

// vB currently only uses $formtype=0(profile form 0) or $formtype=1(all options (form 1 to 5))
    
if ($formtype >= and $formtype <=5) {
        
$typestart 1;
        
$typeend 5;
    }
    
// formtype is either 0(profile) or our extra page
    
else $typestart $typeend $formtype;

    
// check extra profile fields
    
$profilefields $DB_site->query("
        SELECT profilefieldid,required,title,size,maxlength,type,data,optional, regex
        FROM " 
TABLE_PREFIX "profilefield
        WHERE editable = 1
            AND (form >= 
$typestart)
            AND (form <= 
$typeend)
    "
); 

- Open file profile.php

Find:
----
PHP Code:

if ($_POST['do'] == 'updateextra')

    
$userfields verify_profilefields(1); 

REPLACE with:
-------------
PHP Code:

if ($_POST['do'] == 'updateextra')

    
$userfields verify_profilefields(6); 

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
FIX 2 (Cache templates)

- Open file profile.php

Find:
-----
PHP Code:

'removelist' => array(
        
'modifylist_removeuser',
    ), 

BELOW it add:
-------------
PHP Code:

'extra' => array(
        
'page',
        
'modifyoptions_timezone',
        
'userfield_checkbox_option',
        
'userfield_optional_input',
        
'userfield_radio',
        
'userfield_radio_option',
        
'userfield_select',
        
'userfield_select_option',
        
'userfield_select_multiple',
        
'userfield_textarea',
        
'userfield_textbox',
    ), 


Zachery 04-06-2004 04:13 PM

Quote:

Originally Posted by AlexanderT
There is still a problem when a user submits an empty field (that field is not saved then). Must think of a solution...

Sorry, i havent updated this as of late, no one has really shown any intrest :) ill make the updates to my code.

AlexanderT 04-07-2004 06:28 AM

Zachery, I fixed my fix. Your hack works great now.

Thanks again!

Zachery 04-07-2004 04:50 PM

so your code is all good now?

If so i will patch this with my original instructions

sjau 04-08-2004 07:30 AM

Can this hack be modified, so that only certain user(groups) get access / can fill in those extra profile fileds?


All times are GMT. The time now is 05:33 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.01249 seconds
  • Memory Usage 1,760KB
  • 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
  • (7)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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