# This patch file was generated by NetBeans IDE # This patch can be applied using context Tools: Apply Diff Patch action on respective folder. # It uses platform neutral UTF-8 encoding. # Above lines and this line are ignored by the patching process. --- administrator/components/com_comprofiler/plugin.foundation.php +++ administrator/components/com_comprofiler/plugin.foundation.php @@ -1105,9 +1105,9 @@ return null; } } - function getTab( $tab ) { + function getTab( $tab, $output = 'html', $formatting = null, $reason = 'profile' ) { $tabs =& $this->_getCbTabs(); - $tabs->generateViewTabsContent( $this->_cbuser, '', $tab ); + $tabs->generateViewTabsContent( $this->_cbuser, '', $tab, $output, $formatting, $reason ); return $tabs->getProfileTabHtml( $tab ); } function getProfileView( $position = '' ) { @@ -1500,23 +1500,27 @@ } function _evaluateCbTags( $input ) { - $regex = '#\[cb:user(data +field|field +field|tab +tab|position +position)="([a-zA-Z0-9_]+)"(?: +user="([^"/\] ]+)")? */\]#'; + $regex = '#\[cb:user(data +field|field +field|tab +tab|position +position)="([a-zA-Z0-9_]+)"(?: +user="([^"/\] ]+)")?(?: +output="([a-zA-Z]+)")?(?: +formatting="([a-zA-Z]+)")?(?: +reason="([a-zA-Z]+)")? */\]#'; if ( is_array( $input ) ) { if ( isset( $input[3] ) ) { - $user =& $this->_evaluateUserAttrib( $input[3] ); + $user =& $this->_evaluateUserAttrib( $input[3] ); } else { - $user =& $this; + $user =& $this; } if ( ( $user !== null ) && is_object( $user->_cbuser ) && isset( $user->_cbuser->id ) ) { + $display = ( isset( $input[4] ) ? ( $input[4] !== '' ? $input[4] : 'html' ) : 'html' ); + $formatting = ( isset( $input[5] ) ? ( $input[5] !== '' ? $input[5] : 'none' ) : 'none' ); + $reason = ( isset( $input[6] ) ? ( $input[6] !== '' ? $input[6] : 'profile' ) : 'profile' ); + switch ( substr( $input[1], 0, 3 ) ) { case 'dat': return $user->_cbuser->get( $input[2] ); break; case 'fie': - return $user->getField( $input[2] ); + return $user->getField( $input[2], null, $display, $formatting, $reason ); break; case 'tab': - return $user->getTab( $input[2] ); + return $user->getTab( $input[2], $display, $formatting, $reason ); break; case 'pos': return $user->getPosition( $input[2] );