OK, without sounding like a total newbie, I need help with how to call a member icon for 7.1 for a page.
scenario: older module, vendor lives on the moon now.. so there in no help there.
On a particular page, I guess it's trying to pull a member icon/avatar with this line.
$sMemberIcon = get_member_thumbnail($alocation['ID']);
this is the error that happens.
Warning: Missing argument 2 for get_member_thumbnail(), called in /home/mynewbee/public_html/7.1/modules/imodz/games/classes/BxGamesPageMy.php on line 199 and defined in/home/mynewbee/public_html/7.1/inc/design.inc.php on line 175
ManOfTeal.COM a Proud UNA site, six years running strong! |
It's wanting more parameters.
The 2nd parameter is the float parameter.
in 7.0.9 this function is as such
function get_member_thumbnail( $ID, $float, $bGenProfLink = false, $sForceSex = 'visitor', $aOnline = array()) {
anytime you do not have default variables assign IE $bGenProfLink = false you MUST pass a value.
looking at this... it jumps to templates/base/scripts/BxBaseFunctions.php
which has a default value of 'none'.
so, add the parameter for float. either 'left' 'none' or 'right' and see what that does for you.
http://www.mytikibar.com |
Your code is missing the 2nd parameter. Try this
$sMemberIcon = get_member_thumbnail($alocation['ID'], 'none');
Below is the function definition in design.inc.php around line no. 175
function get_member_thumbnail( $ID, $float, $bGenProfLink = false, $sForceSex = 'visitor', $aOnline = array()){
return $GLOBALS['oFunctions']->getMemberThumbnail($ID, $float, $bGenProfLink, $sForceSex, true, 'medium', $aOnline);
}
Looking for Help? http://www.boonex.com/kevinmitnick |
BTW, I use an application called aptana.
It has a built in terminal window.
I SSH'ed to my server and grep 'function get_member_thumbnail' * to find this function.
Also, been coding a little while with PHP, so I know if you don't have a default parameter specified in a function, you get that error. LOL
I knew the answer before I looked all this up, I just looked it up to paste from the source code.
Learn something new everyday is the goal! :D
http://www.mytikibar.com |
[edit] ps, thanks for taking the time to look at this
Well, applied that line, gets rid of the error but no thumbnail/avatar :(
ManOfTeal.COM a Proud UNA site, six years running strong! |
Make sure the first parameter ( $alocation['ID'] ) has an integer value. Looking for Help? http://www.boonex.com/kevinmitnick |
what module and approximately what line number is this on?
I am looking at mine now.
If it's BeckmediaGamesPageMy.php around line 200 or so, this is mine.
$sMemberIcon = get_member_thumbnail($alocation['ID'],'left');
http://www.mytikibar.com |
ManOfTeal.COM a Proud UNA site, six years running strong! |
Were you able to get it fixed?
http://www.mytikibar.com |
I did put in "left" but no icon; that's cool because the avatar is already on the submenu..
Thanks for your help guys..
now on to fix the "Locations and Events" everything works except when you try and select your own profile.
Do you have that module?
ManOfTeal.COM a Proud UNA site, six years running strong! |