Thumbnail with info

Hi,

I would like to add more information under the thumb on the index page and browse page.

I think i have found the line for browse page (line 247)

$cont .= get_member_thumbnail($arr['ID'], 'none', true ) . '<div class="browse_nick"><a href="' . getProfileLink($arr['ID']) . '">' . $arr['NickName'] . '</a></div></div>';

I tried to edit it like this :

. $arr['NickName'] . $arr['Country'] . $arr['City'] . '</a></div></div>';

But it doesn t work.  Only $arr['DateOfBirth'] is working.

How can i fix it please ?

And for the index page i didn t find the line

Thank you

Quote · 24 Jun 2009

You probably need to specify it in your SQL select statement just before calling that function. Look a few lines above where that function is called and make sure the select statement includes the "DateOfBirth" field.

Quote · 24 Jun 2009

$arr['DateOfBirth'] is working but i would like to add $arr['City'] and $arr['Country']

Quote · 26 Jun 2009

 

$arr['DateOfBirth'] is working but i would like to add $arr['City'] and $arr['Country']

 

Need the full code from the section your editing, right now your showing us just bits and pieces and that does not help us fully answer the question, for now we'd be shooting in the dark.  Please give the full code snipet from start to finish (not the whole file, just the section your editing [the entire function]) and we'll be able to answer the question better.

 

Also, are you sure your calling the variable by it's correct name?  Check your language keys to make sure you have the correct system name as it appears in the LK, not as it appears on the end users screen.

Quote · 27 Jun 2009

Thanks for your answer. The code is in browse.php (line 247). Do you want i paste the  330 lines of the code here ??

Quote · 27 Jun 2009

 

Thanks for your answer. The code is in browse.php (line 247). Do you want i paste the  330 lines of the code here ??

 

Not the whole 330 lines, just the section of the file that your editing.  By this I mean:

 

{

    $res = db_res( $profiles_list_query );
 $iI = 1;
    while ( $arr = mysql_fetch_array( $res ) )
    {
  //$user_is_online = get_user_online_status($arr['ID']);

  $iNewWidth = 0;
  if (isset($arr['Couple']) && $arr['Couple'] > 0) {
   $iMaxThumbWidth = getParam('max_thumb_width');
   $iNewWidth = 2 * ( $iMaxThumbWidth + 10 + 2 ) ;
   //$templ = str_replace ( "__ext_st__", 'style="width:' . $iNewWidth . 'px;"', $templ );
  } else {
   $iMaxThumbWidth = getParam('max_thumb_width');
   $iNewWidth = 1 * ( $iMaxThumbWidth +12 ) ;
   //$templ = str_replace ( "__ext_st__", 'style="width:' . $iNewWidth . 'px;"', $templ );
  }
  $sWidthStyle = ($iNewWidth>0) ? 'style="width:'.$iNewWidth.'px;"' : '';

  $cont = '<div class="browse_thumb" '.$sWidthStyle.'>';
  //$cont .= getProfileOnlineStatus( $user_is_online ) . get_member_thumbnail($arr['ID'], 'none' ) . '<div class="browse_nick"><a href="' . getProfileLink($arr['ID']) . '">' . $arr['NickName'] . '</a></div></div>';
  $cont .= get_member_thumbnail($arr['ID'], 'none', true ) . '<div class="browse_nick"><a href="' . getProfileLink($arr['ID']) . '">' . $arr['NickName'] . '</a></div></div>';
  $ret .= $cont;
  $iI++;
  if( $iI > 6 )
   $iI = 1;
 }

    }

I believe that is your code above and as such you will need to verify.  Now your adjustment is probably taking place here:

//$cont .= getProfileOnlineStatus( $user_is_online ) . get_member_thumbnail($arr['ID'], 'none' ) . '<div class="browse_nick"><a href="' . getProfileLink($arr['ID']) . '">' . $arr['NickName'] . '</a></div></div>';
  $cont .= get_member_thumbnail($arr['ID'], 'none', true ) . '<div class="browse_nick"><a href="' . getProfileLink($arr['ID']) . '">' . $arr['NickName'] . '</a></div></div>';

And you need to make your edits to this section.  Now to help you out the section should look something like this:

//$cont .= getProfileOnlineStatus( $user_is_online ) . get_member_thumbnail($arr['ID'], 'none' ) . '<div class="browse_nick"><a href="' . getProfileLink($arr['ID']) . '">' . $arr['NickName'] . '</a></div></div>';
  $cont .= get_member_thumbnail($arr['ID'], 'none', true ) . '<div class="browse_nick"><a href="' . getProfileLink($arr['ID']) . '">' . $arr['NickName'] .$arr['DateOfBirth'].$arr['MaritalStatus']. '</a></div></div>';

Or however you have these items labeled.  Specifically, you need to check and see what you have them marked as in the Builders => Field Builders Section on the Join Form as far as System Name goes.  The caption does not matter, you need the System Name exactly as it appears for each box.

 

 

PS:  A default base install has 337 lines of code, my browse.php has 942 lines. 

Quote · 28 Jun 2009

Thank you but only $arr['NickName'] .$arr['Sex'] .$arr['DateOfBirth'] are working.

$arr['Relation'] .$arr['Country'] .$arr['City']...... are not working

Quote · 28 Jun 2009

 

Thank you but only $arr['NickName'] .$arr['Sex'] .$arr['DateOfBirth'] are working.

 

$arr['Relation'] .$arr['Country'] .$arr['City']...... are not working

 

Now we return to the question I previously asked you:  What is the "SYSTEM NAME" of the items.  Ignore the captions you have for them and the actual system name that is applied.  You may want to check your predefined lists if your using any of them (Such as Country) as these need to be done specific and exact to what the system has.  Remember, some of the items within the coding of Dolphin are misspelled as php does not have a concrete means of setting variables, rather they are set as the specific code is written and this makes it very pliable yet sometimes a pain in the arse. 

Quote · 28 Jun 2009

Also check this thread, it has a good tutorial written to it that will help you out.  Keep in mind of what your looking to do and use the applicable coding to help you out.

 

http://www.boonex.com/unity/forums/?action=goto&topic_id=Full-Pics-for-Featured-Members

Quote · 28 Jun 2009

$arr['DateOfBirth'] is working but i would like to add $arr['City'] and $arr['Country']

City is the name of the item in fields builder

Country is the name of the item in fields builder

DateOfBirth is the name of the item in fields builder

Quote · 28 Jun 2009
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.