Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Extra Profile Fields Page Details »»
Extra Profile Fields Page
Version: 1.00, by Zachery Zachery is offline
Developer Last Online: May 2017 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 01-03-2004 Last Update: Never Installs: 55
Re-useable Code  
No support by the author.

Extra Profile Fields Page Version 1.2
1.1 updated version, minor fix for searching in memberlist.php
1.2 fixed for RC2 the current instructions will not work with anything lowerrequested by
Caszi @ http://www.vbulletin.nl/community/showthread.php?t=1190


Screen Shots

update2.gif is the optional part of the hack

Description
Adds an Extra Page for you to Define Profile Fields

install time~ 5-10 min

Files to Edit 4
Tempaltes to edit/add 2

Enjoy ^^

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 02-02-2004, 12:28 AM
NuclioN's Avatar
NuclioN NuclioN is offline
 
Join Date: Aug 2002
Posts: 955
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

With all respect but...what is the function of this hack? I tried to understand it but i can't. Can someone explain it?
Reply With Quote
  #23  
Old 02-02-2004, 12:29 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It gives you an extra page to display uuser profile feilds
Reply With Quote
  #24  
Old 03-27-2004, 03:29 PM
chapsrulez chapsrulez is offline
 
Join Date: Mar 2004
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #25  
Old 03-27-2004, 11:08 PM
AlexanderT's Avatar
AlexanderT AlexanderT is offline
 
Join Date: Mar 2003
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #26  
Old 04-02-2004, 12:55 PM
sjau sjau is offline
 
Join Date: Apr 2003
Location: Switzerland
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #27  
Old 04-06-2004, 03:55 PM
AlexanderT's Avatar
AlexanderT AlexanderT is offline
 
Join Date: Mar 2003
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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',
    ), 
Reply With Quote
  #28  
Old 04-06-2004, 04:13 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #29  
Old 04-07-2004, 06:28 AM
AlexanderT's Avatar
AlexanderT AlexanderT is offline
 
Join Date: Mar 2003
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Thanks again!
Reply With Quote
  #30  
Old 04-07-2004, 04:50 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so your code is all good now?

If so i will patch this with my original instructions
Reply With Quote
  #31  
Old 04-08-2004, 07:30 AM
sjau sjau is offline
 
Join Date: Apr 2003
Location: Switzerland
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can this hack be modified, so that only certain user(groups) get access / can fill in those extra profile fileds?
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 04:30 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.05070 seconds
  • Memory Usage 2,328KB
  • 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
  • (7)bbcode_php
  • (1)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
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • 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