vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Profile Enhancements - Extra Profile Fields Page (https://vborg.vbsupport.ru/showthread.php?t=123253)

adwade 02-08-2007 07:51 PM

Quote:

Originally Posted by Wired1 (Post 1173474)
Read the 3.5.x hack instructions. There's BETA search code in there (which is really just vB's search code w/ one minor change). Search for the new code in 3.6.x (they changed like 1 minor thing in it IIRC), and it should work fine.

OH, this sounds like what I need to do!? But for someone who's not a coder, could you say that one-more-time...a little slower? :confused:

Are you saying to find/copy the BETA code out of the 3.5.x version into the 3.6.x version -or- to locate the 'similar code' in the 3.6.x version and then tidy it up somehow to get it to work properly? If the latter, the 'somehow' part would stump me. :(

Has anyone installed this MOD on vB3.6x that could copy/paste their modified memberlist.php file into a CODE box perhaps?

I LOVE the idea of this MOD, but at present it's broken on my system. :o

afmarko99 02-19-2007 03:14 PM

Ok I installed this hack but like others I am having problems. I can go to my User CP and click on (Computer Specs) and it will bring me to the extra page. From there the only thing that is displayed is 'Save Changes' and 'Reset Fields'. Where do I go to add fields?

Did I miss something in the editing? The help file for this mod doesn't tell you how to add fields? The add-on does show you how to make certain fields display but I can't figure out this mod first.

afmarko99 02-19-2007 06:58 PM

Ok so I have this mod working on my forum and I will say that I like it a lot.

Thank you.

I have two questions.

How would I move it to the right side under: Join Date, Location, Etc.
Also I am trying to figure out how to remove the box placed around 'EaglezEye's Computer Specs'. I want it to just display the text.

Can anyone help me?

????

Wired1 02-19-2007 10:56 PM

Quote:

Originally Posted by EaglezEye (Post 1186224)
How would I move it to the right side under: Join Date, Location, Etc.

Example: http://www.thepublicenemy.net/member.php?u=1

What you have said is on the right, is on the left. What do you mean exactly?


Quote:

Also I am trying to figure out how to remove the box placed around 'EaglezEye's Computer Specs'. I want it to just display the text.
I don't see a box, which I'm assuming means you've fixed it? I'm assuming you were talking about a box created by a table or cell, or some vBulletin CSS code.

afmarko99 02-20-2007 06:12 PM

Doh....I meant to post this problem under the posbit hack. I will move the post over.

imranbaig 02-26-2007 08:01 AM

Hey man nice hack.
I tried installing this got an Error.
Did everything followed all steps, getting a blank page for user profile fields >> User Profile Field Manager

?? any suggestions?

Wired1 02-28-2007 12:26 PM

un/reinstall it, it's a typo somewhere.

RedGTiVR6 03-02-2007 11:16 PM

Can anyone tell me if this mod added any tables to the DB and if so, what are the names of those tables?

Perhaps I should ask for some assistance on this.

I have added Zoints to our web site.

One of the blocks that's avaliable out there will take the additional fields that are added to the normal profile (for lack of a better term) and port them over to your Zoints profile page.

It calls on table "cprofilefield" for this information.

I'm gathering that this mod uses the same table?

I'm trying to figure out how to tell this block to look at the fields for this mod rather than the fields that are under the normal profile area. I'm sure it's super easy (or maybe I'm just that ignorant), but I can't figure it out.

I've attached the code below.

Code:

# vBulletin Custom Profile Fields
# 1.0
# Soup (soup@zoints.com)
# http://dev.zoints.com/
#
# This block lets you display your custom profile fields
# from the old vBulletin profile
class user_vbulletin_custom_profile_fields extends z_module
{
        function contents()
        {
                $vbulletin = $this->_zoints->external->vbulletin;
                $languageid = intval($vbulletin->userinfo['languageid']);
               
                # get custom phrases used in this block
                $vbphrase = array();
                $phrases = $vbulletin->db->query_read("
                        SELECT * FROM " . TABLE_PREFIX . "phrase
                        WHERE fieldname = 'cprofilefield'
                                AND (languageid = $languageid OR languageid = -1)
                        ORDER BY languageid DESC
                ");
                while ($phrase = $vbulletin->db->fetch_array($phrases))
                {
                        $vbphrase[$phrase['varname']] = $phrase['text'];
                }
                unset($phrase);
                $vbulletin->db->free_result($phrases);

                # get data from usertextfield for this user
                $extended_info = $vbulletin->db->query_first("
                        SELECT * FROM " . TABLE_PREFIX . "userfield
                        WHERE userid = " . $this->zuser . "
                ");

                $profilefields = $vbulletin->db->query_read("
                        SELECT profilefieldid, required, type, data, def, height
                        FROM " . TABLE_PREFIX . "profilefield
                        WHERE form = 0
                                AND hidden = 0
                        ORDER BY displayorder
                ");

                $search = array(
                        '#(\r\n|\n|\r)#',
                        '#(<br />){3,}#', // Replace 3 or more <br /> with two <br />
                );
                $replace = array(
                        '<br />',
                        '<br /><br />',
                );
               
                $customfields = '';
                while ($profilefield = $vbulletin->db->fetch_array($profilefields))
                {
                        $profilefieldname = "field$profilefield[profilefieldid]";
                        $profilefield['title'] = $vbphrase[$profilefieldname . '_title'];
               
                        if ($profilefield['type'] == 'checkbox' OR $profilefield['type'] == 'select_multiple')
                        {
                                $data = unserialize($profilefield['data']);
                                foreach ($data AS $key => $val)
                                {
                                        if ($extended_info["$profilefieldname"] & pow(2, $key))
                                        {
                                                $profilefield['value'] .= iif($profilefield['value'], ', ') . $val;
                                        }
                                }
                        }
                        else if ($profilefield['type'] == 'textarea')
                        {
                                $profilefield['value'] = preg_replace($search, $replace, trim($extended_info["$profilefieldname"]));
                        }
                        else
                        {
                                $profilefield['value'] = $extended_info["$profilefieldname"];
                        }
                       
                        if ($profilefield['value'] != '')
                        {
                                $customfields .= '<div class="' . $this->style['phead'] . '">' . $profilefield['title'] . '</div>';
                                $customfields .= '<div class="' . $this->style['pmain1'] . '">' . $profilefield['value'] . '</div>';
                        }
               
                }
                $vbulletin->db->free_result($profilefields);
               
                return $customfields;
        }
}

Any help would be greatly appreciated!

Wired1 03-05-2007 01:39 PM

Quote:

Originally Posted by RedGTiVR6 (Post 1194490)
Can anyone tell me if this mod added any tables to the DB and if so, what are the names of those tables?

At the top of all hacks it states if tables are added or not, or if any SQL changes have been made.

The answer is NO.


Quote:

One of the blocks that's avaliable out there will take the additional fields that are added to the normal profile (for lack of a better term) and port them over to your Zoints profile page.

It calls on table "cprofilefield" for this information.

I'm gathering that this mod uses the same table?
NO.

RedGTiVR6 03-05-2007 04:06 PM

wow - sorry dood - just looking for a bit of help....perhaps from someone else in the thread.

Sorry!

Lionel 03-13-2007 09:16 PM

This is cool. Thanks for sharing. I have 2 questions.

1-How can I fix the drop down on the extreme right as per image?

2-I am using for boat specs. How do I handle the gut with 2 boats, or do you handle the guy with 2 pc with 2 different config?

sheryarpatel 03-13-2007 10:35 PM

does it work on 3.6.5 or 3.6.4

calord 03-25-2007 08:57 AM

I'd like to make use of this mod, but I admit ...the instructions have me absolutely lost with how to create different pages for different profiles. I simply don't understand the editing of vbphrases, variables, and other such.

It's a gaming site. I need to be able to create "Edit X Profile" pages in the UserCP for each game. For example, users need to be able to create a profile for EVE, VG, and WoW. Please help me accomplish that. I need very specific instructions.

I downloaded the instructions you posted in page 2 of this thread (page.zip) and that just made me more confused. I don't get it. What do I need to edit, where, and how to create these extra pages? Sorry I'm not so VB savvy, I try, but my experiments aren't producing any results. The whole "change the ### to a number" was ....lost on me.

Any help is appreciated, and thank you for your patience.

Ted S 03-25-2007 06:48 PM

Quote:

Originally Posted by sheryarpatel (Post 1202890)
does it work on 3.6.5 or 3.6.4

Yes.

OmniBuzz 04-05-2007 01:36 PM

Hello Wired1, first thank you for this hack !
Everything is running fine (I have my extra page, the fields are there, etc.) but I have one simple issue : if I click on a user profile, I have an empty space with the extra page title, but nothing in it...
See the picture file attached if my english is not crystal clear (englsh is not my language)
How could I remove this ?
Thanks in advance for your help.

Wired1 04-06-2007 02:00 PM

Quote:

Originally Posted by OmniBuzz (Post 1220363)
Hello Wired1, first thank you for this hack !
Everything is running fine (I have my extra page, the fields are there, etc.) but I have one simple issue : if I click on a user profile, I have an empty space with the extra page title, but nothing in it...
See the picture file attached if my english is not crystal clear (englsh is not my language)
How could I remove this ?
Thanks in advance for your help.

This hack does not touch that area, the Additional Section within Profile and Dropdown within Posts does that. I'd un/reinstall it.

Tralala 04-21-2007 11:45 PM

Quote:

Originally Posted by Wired1 (Post 1173474)
Read the 3.5.x hack instructions. There's BETA search code in there (which is really just vB's search code w/ one minor change). Search for the new code in 3.6.x (they changed like 1 minor thing in it IIRC), and it should work fine. A proper way to do this would involve a heavy rewrite, which I simply don't have the time for (hence why I haven't been around much).

To clarify, I just tried it... and found what worked for me. This is with this version of the hack, and vBulletin 3.6.5. And now the "extra" fields I choose are showing up in Members List and are searchable too.


All it took was changing two instances of form = 0 to form = 0 OR 6


In memberlist.php:


FIND:
PHP Code:

    $profilefields $db->query_read_slave("
        SELECT *
        FROM " 
TABLE_PREFIX "profilefield
        WHERE searchable = 1
            WHERE form = 0 " 

REPLACE WITH:
PHP Code:

    $profilefields $db->query_read_slave("
        SELECT *
        FROM " 
TABLE_PREFIX "profilefield
        WHERE searchable = 1
            WHERE form = 0 OR 6 " 


FIND:
PHP Code:

    // get extra profile fields
    
$profilefields $db->query_read_slave("
        SELECT *
        FROM " 
TABLE_PREFIX "profilefield
        WHERE searchable = 1
            AND form = 0 

REPLACE WITH:
PHP Code:

    // get extra profile fields
    
$profilefields $db->query_read_slave("
        SELECT *
        FROM " 
TABLE_PREFIX "profilefield
        WHERE searchable = 1
            AND form = 0 OR 6 


The only downside is that right now I have three "regular" User Profile fields that I had designated as "not searchable" -- and now, as result of this edit, they appear in the "Members List: Advanced Search." These particular fields don't work, mind you (searching in those fields just ends up showing the entire member list.) Which is fine by me... I didn't want them to be searchable in the first place. But the fact that the fields show up in the Advanced Search might be a bit confusing, that's all.

This is a compromise I am willing to make, because I wanted to have many of the "Extra" Profile Fields I created with this hack to show up in my Member List, and be Searchable... and now they are.

Thanks!

/clicks install

sross 04-29-2007 10:59 PM

Quote:

Originally Posted by Tralala (Post 1233010)
To clarify, I just tried it... and found what worked for me.


i tried that same thing and got an error :( i was hoping it would work.

Code:

Invalid SQL:

        SELECT *
        FROM profilefield
        WHERE searchable = 1
            WHERE form = 0 OR 6
                ORDER BY displayorder;

MySQL Error  : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE form = 0 OR 6
                ORDER BY displayorder' at line 4
Error Number : 1064
Date        : Sunday, April 29th 2007 @ 06:41:25 PM
Script      : http://www.mysite.org/forums/memberlist.php
Referrer    :

Any ideas? I need these fields to be searchable, getting desperate..

RedGTiVR6 04-29-2007 11:30 PM

Thanks for posting the code.

I will give this a try on our forum and see if it works for us!

I'd really like these fields to be searchable as this would be invaluable market information for our site.

RedGTiVR6 05-24-2007 03:20 PM

has anyone tried this on 3.6.6 or 3.6.7?

I have just upgraded to 3.6.7PL1 and I'm having an issue with the page not showing up under the UserCP.

I'm not sure where to search for this solution.

When I go to the UserCP and click on the link to go to where I would enter in the information, it's the below image:

http://www.mj-garage.com/pics/UserCP.JPG

When I go to the memberinfo page I see the following (yes, other mods installed too, but they are working):

http://www.mj-garage.com/pics/memberinfo.JPG

Thanks for the help anyone can provide!

Wired1 05-24-2007 06:59 PM

Quote:

Originally Posted by RedGTiVR6 (Post 1253886)
has anyone tried this on 3.6.6 or 3.6.7?

I have just upgraded to 3.6.7PL1 and I'm having an issue with the page not showing up under the UserCP.

I'm not sure where to search for this solution.

When I go to the UserCP and click on the link to go to where I would enter in the information, it's the below image:

http://www.mj-garage.com/pics/UserCP.JPG

When I go to the memberinfo page I see the following (yes, other mods installed too, but they are working):

http://www.mj-garage.com/pics/memberinfo.JPG

Thanks for the help anyone can provide!

can't see it not working on newer versions as it's very basic code (haven't gotten a chance to test it yet); try un/reinstalling it; my guess is that you need to manually re-edit one of the template files again.

RedGTiVR6 05-25-2007 01:23 PM

OK - fixed the first issue.

functions_user.php - I missed the file edit here when I was using Araxis Merge to compare old files to the new updated ones.

Still have the second issue though - but I'll take this over to the other thread for that part of the mod.

Raw Sugar 06-11-2007 01:44 AM

Using 3.6.7 PL:

I am having the same problem that RedGTiVR6 was having... I can't seem to figure out how to fix it. Uninstalling and then reinstalling didn't work. :-/

Also, the extra profile fields I had before I upgraded no longer show up in the User Profile Fields Manager, but I can add new ones. However, they don't show up on the extra page. They do still show up in MEMBERINFO, though.

Any help would be greatly appreciated!

RedGTiVR6 06-11-2007 02:00 AM

I'm still having trouble with the profile fields in the profile field page showing up all funny...like the columns are all off.

I had to go back and double check the template info to get it to all show up in the first place.

Still no word from Wired1 on it though...:(

Wired1 06-13-2007 05:54 AM

can't duplicate the tables getting squinched on a fresh install, but someone just pointed out a variable that goes nowhere. Looks like a whole plugin is somehow missing from the uploaded code. I'll re-upload it tomorrow (sleep calls!)

Raw Sugar 06-13-2007 02:52 PM

So all that we will need to do is re-download the plugin?

4x4 Mecca 06-14-2007 03:39 AM

Quote:

Originally Posted by Wired1 (Post 1060790)
HOW TO ADD MULTIPLE PAGES:

I've attached EXAMPLES of modified instruction.txt and product.xml of what to change. ANYWHERE you see ###, INCLUDING the product name, change to whatever number you wish (but don't repeat in another extra page). I'd recommend editing the product and instructions first, and then follow them as normal.


cavyspirit, futuredood, BETIServices:
Any questions? BTW, futuredood, please hit install :)


1996 328ti:
cool beans :)


That would not be this hack, sorry. Your idea is definitely possible, but beyond the scope of this hack.


This hack has nothing in common with that one, and that hack is for 3.0.x, so it may not even be compatible with 3.6.x.

I've done this on three seperate pages, and everything works fine until i to edit the field. No options show up there. Nothing does except a save button and a reset button

Ronin Storm 06-21-2007 10:02 AM

Quote:

Originally Posted by sross (Post 1237879)
i tried that same thing and got an error :( i was hoping it would work.

Code:

Invalid SQL:

        SELECT *
        FROM profilefield
        WHERE searchable = 1
            WHERE form = 0 OR 6
                ORDER BY displayorder;


You've almost certainly either had this answered by PM or gone off and gotten bored in waiting but while I was searching for the answer to how to get the additional fields on the memberlist search I saw your problem...

... and it's an easy fix.

In your SQL code, it reads:

Code:

        SELECT *
        FROM profilefield
        WHERE searchable = 1
            WHERE form = 0 OR 6
                ORDER BY displayorder;

See the second "WHERE form = 0 OR 6"? That's a cut and paste error. That should read "AND form = 0 OR 6".

Saviour 06-23-2007 08:28 AM

Nice...

Clicked Installed.

xt0m 06-25-2007 11:54 PM

Quote:

Originally Posted by 4x4 Mecca (Post 1268167)
No options show up there. Nothing does except a save button and a reset button

Same here and did it by the book.. Twice. :(

Tried un/re-installing but still same thing - shows the edit extra options over on the left, and the save and reset in the middle area. No fields to fill with information. Looking at the user profile there's only the extra options box and a white empty field below it :confused:

Saskia 06-27-2007 10:42 AM

Okay finally I've had it do what I want, I didn't want the complete USER_CP shell on the extra profile page and forced a style on the page, to make it seem like a stand-alone RPG edit profile page.

I keep on loving this hack :D. Keep up the great work.

Saskia 06-27-2007 01:02 PM

Sorry for doubleposting, but I'd like the page to redirect to somewhere other than the usercp.php page (as it is by default right now) when you submit your info. Since it uses the profile.php redirect it automatically gets redirected to usercp.php. Any idea on how to do a different redirect for this extra profile page?

EDIT: Nevermind, figured it out :).

ChrisBaktis 07-26-2007 01:21 AM

This is something I have needed for a long time - how can I do a second set of extra fields...im going to offer advertising on my site - and I want to give access to extra profile fields for 1 group - so I know I can use this hack to do the seperate page then just use condtionals to make it available....i dont want to mess anything up so can you assist me on adding a second new catagory?

Wired1 07-27-2007 12:20 AM

not sure what you mean by a second category (refresh me, it's been a long week!)

Tom_S 08-01-2007 08:41 PM

Is this working with 3.6.8? I am having a heck of a time.

Wired1 08-02-2007 03:40 AM

haven't tested it yet, but IIRC when I skimmed the 3.6.8 notes nothing struck out at me that could potentially break it.

Tom_S 08-02-2007 11:13 AM

Well I installed and uninstalled it over 10 times and got nothing. I even tried it three times with the add on and still no luck. I don't know what I am missing but I have never had this bad of luck with any mod and we really could use this mod on our site.

It is a new day and I will try it again. ;)

Tom_S 08-03-2007 03:01 AM

Well it seems that everyones site I look at in this thread is using an older version of VB so I am guessing it don't work with 3.6.8. I sure can't get it to work so unless a skimming glance at code is all you can tell me that is you have that is making it a keeper then I have a 2 days of install and uninstall that says it is a dead mod for me at any rate. What I see as kind of odd as well is that VB.org isn't using 3.6.8 either. Am I on to something? Should I have not used it?

insolentmuse 08-06-2007 02:50 PM

Nevermind, fixed ":)

nnjj.net 08-07-2007 04:18 PM

what if I want the same put for photograpgy
Camera
Lens
other


All times are GMT. The time now is 09:15 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.01446 seconds
  • Memory Usage 1,879KB
  • 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
  • (4)bbcode_code_printable
  • (4)bbcode_php_printable
  • (13)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
  • (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