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)

Zachery 01-03-2004 10:00 PM

Extra Profile Fields Page
 
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 :D

install time~ 5-10 min

Files to Edit 4
Tempaltes to edit/add 2

Enjoy ^^

deathemperor 01-04-2004 12:57 AM

you should attach screenshot here, no one can see those in vb.nl if they dont have account.

Link14716 01-04-2004 02:00 AM

Not to mention you copied disfigured URLs. ;)

the_sisko 01-04-2004 11:27 AM

I'm also interested in this hack, but don't want to sign up on your site just to see the screenshot.

Cassidy 01-04-2004 11:17 PM

Whe thank you for releasing this here XD you still gave me credit for requesting *Sniffs*

Anyway i'll get some screenshots up of it working on my forums. It's really helpfull ^^;

Zachery 01-05-2004 04:15 PM

you did ;D its in the install

#Idea: Caszi

i will get updated screens posted here, sometimes i forget about vbnl restriction

Zachery 01-05-2004 05:49 PM

all updated, screens too

corsacrazy 01-06-2004 12:22 PM

possible to be able to upload images to that w00t page? that would be cool

Zachery 01-06-2004 12:23 PM

not at this time, however you can have them point to a url and then include it in your own coding

corsacrazy 01-06-2004 12:31 PM

fair enough, i just saw this as a great basis for the hack i requested
https://vborg.vbsupport.ru/showthread.php?t=59581
and with image attachments wood b perfect :) nice werk

Zachery 01-06-2004 12:36 PM

i can take a look into it, however i feel it would be a hole nother hack more than anything else >.< and im sure it would be rather large of a hack @ that

Wired1 01-09-2004 02:55 AM

If I'm reading that 3rd screen right, then you can add a variable to the user, but you can set it so that the member won't know it's there, it won't show up on their profile, and there's no option for them to edit it anywhere in their cp?

Zachery 01-09-2004 04:20 AM

Quote:

Originally Posted by Wired1
If I'm reading that 3rd screen right, then you can add a variable to the user, but you can set it so that the member won't know it's there, it won't show up on their profile, and there's no option for them to edit it anywhere in their cp?

no thats what the edit to usercp_shell does ;)

schuelerd 01-10-2004 02:43 PM

I would like to add fields like you are doing here but when they show up, allow the USER to decide if the fields are publicly viewable or not....this is for an alumni site and they may not want to share certain info....anyone done anything like this?

gmarik 01-10-2004 03:06 PM

This one feels food.
Agree with "schuelerd's" post.

Zachery 01-10-2004 04:39 PM

Quote:

Originally Posted by schuelerd
I would like to add fields like you are doing here but when they show up, allow the USER to decide if the fields are publicly viewable or not....this is for an alumni site and they may not want to share certain info....anyone done anything like this?

well you can add an extra profile feild to allow them to share or not share info, and you can have it set not to be searchable and not to show on their profile page.

eXtremeTim 01-15-2004 09:16 PM

BIG PROBLEM

If you update the options page for vb3 all your options for the second options page are reset to defualt. Any ideas on how to fix this?

Zachery 01-15-2004 11:48 PM

Quote:

Originally Posted by eXtremeTim
BIG PROBLEM

If you update the options page for vb3 all your options for the second options page are reset to defualt. Any ideas on how to fix this?

i never personally exprirend this problem, but i will look into it

???`S?LV?R???` 02-01-2004 10:25 PM

Does This Work Fine On VB3 RC3?

Zachery 02-01-2004 10:59 PM

i dont see why it wouldnt :) it is working on RC2 and i dont think there was too much more, its sorta stand alone. as in it shoudl always work :D

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?

AlexanderT 04-08-2004 03:14 PM

Quote:

Originally Posted by Zachery
so your code is all good now?

If so i will patch this with my original instructions

Yes it works well now. I am using your hack with the fix for my upcoming site.

Greets
Alex

AlexanderT 04-08-2004 03:20 PM

Quote:

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

I guess so... all you have to add the following changes to USERCP_SHELL instead of the ones mentioned in the hack description:

Code:

<if condition="$bbuserinfo['usergroupid'] == XX">
<tr>
        <td class="$navclass[extra]" style="white-space:nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=extra">Extra Info</a></td>
</tr>
</if>

Where XX is the usergroup you want to allow access.

Note that this is not fool-proof. A user who KNOWS that there is such an extra field section and who knows the url can access it directly. In this case, I guess adding some php code would do the trick.

sjau 04-08-2004 06:16 PM

Thx for that alexander,

I'll have a further go then myself.

I'm setting up vB for my fraternity. so far we've used a private Lotus Notes R5 DB for internal affairs, however I can't give access to our alumni anymore and I would like to have some sort of "address tool" that I can associate with vB users... I think those extra fields will do the trick.

sjau

raxafarian 04-10-2004 12:07 AM

Quote:

Originally Posted by sjau
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?

yea...profile.php has changed...

Can somebody update where this needs to be placed? I'm trying to find my copy of rc1 to try and figure it out...

AlexanderT 04-10-2004 12:47 AM

it is not really so important where you put the code... you can for instance put the hack code ABOVE the following original code:
PHP Code:

// ############################### List of attachments for current user ################
if ($_REQUEST['do'] == 'editattachments'


raxafarian 04-10-2004 05:33 PM

Quote:

Originally Posted by AlexanderT
it is not really so important where you put the code... you can for instance put the hack code ABOVE the following original code:
PHP Code:

// ############################### List of attachments for current user ################
if ($_REQUEST['do'] == 'editattachments'


thanks...got it installed..

but I changed something trying to change some of the displayed text and now I no longer have the extra options appear in the admincp when using the profile field manager. The Extra fields are still in the usercp and if I add a new profile field, I can select the other: extra, and it appears in the usercp, but not in the admin profile manager. I've checked the profilefield.php file but I must be missing something

thanks

AlexanderT 04-10-2004 07:13 PM

yes i suggest you go over Zachery's hack instruction again. There shouldn't be any problem with admincp and the hack if you follow the instruction correctly.

Sketch 04-13-2004 08:48 PM

Out of curiosity, how would I refer to the custom field in the postbit?

Zachery 04-13-2004 08:49 PM

Same way you do any other field in the postbit

$post[fieldX]

Sketch 04-13-2004 08:52 PM

yeah but is it referred to as fieldx or is it referred to by name (in my case, blog)? Bear with me, it's been about 8 months since I did any kind of extensive work with vB and vb3 is quite different, you know? ;)


All times are GMT. The time now is 02:23 PM.

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.01522 seconds
  • Memory Usage 1,851KB
  • 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
  • (1)bbcode_code_printable
  • (10)bbcode_php_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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