vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Profile Enhancements - Friendster style hyperlinked profile fields (https://vborg.vbsupport.ru/showthread.php?t=61077)

moley 05-06-2004 04:05 PM

seems like a great hack i'll be adding this later tonight.

Fluous 05-08-2004 02:32 AM

You should make it so things via the Search Panel can be done like this. Like sometimes I remember a persons instant messenger, and not the thread. So it takes forever to search it. It would be handy to be able to search their messenger and other profile information like DOB and anything applicable into the search part. And if something was added it would automatically add it into the search box. That part would be a little complicated though lol.

Mobo 05-14-2004 11:42 PM

I just did this to my 3.0.1 forum and it did not do any thing. The entered text is not a link at all.

Any thoughts?

Thanks.

buro9 05-15-2004 10:42 AM

Quote:

Originally Posted by Mobo
I just did this to my 3.0.1 forum and it did not do any thing. The entered text is not a link at all.

Any thoughts?

Thanks.

There's only two changes, so I can't imagine what the problem is, but have you made both changes? Uploaded the files? Stated that the fields are searchable in the control panel? etc?

If you've done all of the above, then send me an e-mail with the file attached and I'll look into why it didn't work: d a v i d @ b u r o 9 . c o m

Cheers

David K

Mobo 05-15-2004 08:00 PM

Yep, did both parts and uploaded the file. Not sure why it's not working. I also set all the profile fields to searchable in the User Profile Fields options via the Admin CP. I'll email you the file that I have.

Thanks for the help.

MaxScript 05-15-2004 08:07 PM

i third this 301

buro9 05-15-2004 08:50 PM

Quote:

Originally Posted by MaxScript
i third this 301

Yours is related to the way in which you had pasted in the code... you did not keep the linebreaks, so my "// HACK : START" comment then comments out the entire hack.

You need your entire custom profile fields block to be exactly this:

PHP Code:

// *********************
// CUSTOM PROFILE FIELDS

// HACK : START : FRIENDSTER STYLE LINKS
//$profilefields = $DB_site->query("
//  SELECT profilefieldid, required, title, type, data, def, height
//  FROM " . TABLE_PREFIX . "profilefield
//  WHERE form = 0 " . iif(!can_moderate(), "
//    AND hidden = 0") . "
//  ORDER BY displayorder
//");

$profilefields $DB_site->query("
  SELECT profilefieldid, required, title, type, data, def, height, searchable
  FROM " 
TABLE_PREFIX "profilefield
  WHERE form = 0 " 
iif(!can_moderate(), "
    AND hidden = 0"
) . "
  ORDER BY displayorder
"
);
// HACK : END : FRIENDSTER STYLE LINKS

while ($profilefield $DB_site->fetch_array($profilefields))
{
  
exec_switch_bg();
  
$profilefieldname "field$profilefield[profilefieldid]";
  if (
$profilefield['type'] == 'checkbox' OR $profilefield['type'] == 'select_multiple')
  {
    
$data unserialize($profilefield['data']);
    foreach (
$data AS $key => $val)
    {
      if (
$userinfo["$profilefieldname"] & pow(2$key))
      {
        
$profilefield['value'] .= iif($profilefield['value'], ', ') . $val;
      }
    }
  }
  else
  {
    
$profilefield['value'] = $userinfo["$profilefieldname"];
  }
  if (
$profilefield['value'] != '')
  {
    
$show['extrainfo'] = true;
    
// HACK : START : FRIENDSTER STYLE LINKS
    
if ($profilefield['searchable']) {
      
$profileLinks explode(','$profilefield['value']);

      for (
$ii 0$ii count($profileLinks); $ii++) {
        
$profileLinks[$ii] = '<a href="memberlist.php?do=getall&'.$profilefieldname.'='.urlencode(trim($profileLinks[$ii])).'">'.$profileLinks[$ii].'</a>';
      }

      
$profilefield['value'] = implode(','$profileLinks);
    }
    
// HACK : END : FRIENDSTER STYLE LINKS

  
}
  eval(
'$customfields .= "' fetch_template('memberinfo_customfields') . '";');

}
// END CUSTOM PROFILE FIELDS
// ************************* 


buro9 05-15-2004 08:53 PM

Quote:

Originally Posted by Mobo
Yep, did both parts and uploaded the file. Not sure why it's not working. I also set all the profile fields to searchable in the User Profile Fields options via the Admin CP. I'll email you the file that I have.

Thanks for the help.

Received the file, but in case you didn't get my reply via e-mail, here it is:

I uploaded your version of the file and it worked perfectly on my
forum. Which means that it's a setting.

Are members allowed to perform advanced searches on your boards for
other members?

Also, in the Admin Control Panel at this point:
User Profile Fields > User Profile Field Manager

Are the fields that you want hyperlinking defined as being
'Searchable'?

If users do not have permission to do an advanced search, and/or the
field isn't searchable... then it won't create the hyperlinks for you.

The hack is working though, your file worked perfectly on my forum, so
it's definately a setting rather than a code fault.

Mobo 05-18-2004 07:36 AM

buro9, I never got the email from you so I'm glad you posted this here as well. I do have all the feilds set to searchable, but I'm not sure about the advanced search. Where do I find that. Sorry I'm a noob at VB3!!

Thanks gain.

buro9 05-18-2004 09:06 AM

Quote:

Originally Posted by Mobo
buro9, I never got the email from you so I'm glad you posted this here as well. I do have all the feilds set to searchable, but I'm not sure about the advanced search. Where do I find that. Sorry I'm a noob at VB3!!

Thanks gain.

You'll find the setting in the Admin Control Panel.

vBulletin Options > User Listing & Profile Viewing > Allow Advanced Searches = Yes

I think that might do it, if the fields are searchable already then this is the only option I can think of that might impact it.

Let me know how you get on... if you have trouble I'll look into it some more :)


All times are GMT. The time now is 01:42 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.01210 seconds
  • Memory Usage 1,767KB
  • 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_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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