[Joomla1.5.1]Avatar will upload, but will not show

14 years 6 months ago #55534 by loplo
Replied by loplo on topic Re:Avatar will upload, but will not show
OK
I had the same problem.
There is an error in the code. Here it is what you have to do:

you have to modify some things in the cbcore.php file, as follows:

Find this:
[code:1] if ( file_exists( "components/com_comprofiler/plugin/language/".$mosConfig_lang."/images" ) ) {
$uimagepath = "components/com_comprofiler/plugin/language/".$mosConfig_lang."/images/";
} else {
$uimagepath = "components/com_comprofiler/plugin/language/default_language/images/";[/code:1]

change-it into this:
[code:1] if ( file_exists( "/components/com_comprofiler/plugin/language/".$mosConfig_lang."/images" ) ) {
$uimagepath = "/components/com_comprofiler/plugin/language/".$mosConfig_lang."/images/";
} else {
$uimagepath = "/components/com_comprofiler/plugin/language/default_language/images/";[/code:1]

it's the / before components.

This will show up the avatar after upload, but you will notify an error on the profile page.
Make the following modification:
[code:1] $uimage = $user->avatar;
if ( file_exists( "/components/com_comprofiler/plugin/language/".$mosConfig_lang."/images" ) ) {
$uimagepath = "/components/com_comprofiler/plugin/language/".$mosConfig_lang."/images/";
} else {
$uimagepath = "/components/com_comprofiler/plugin/language/default_language/images/";
}
if ( $user->avatarapproved == 0 ) {
$uimage = $uimagepath."pendphoto.jpg";
} elseif ( $user->avatar == '' || $user->avatar == null ) {
$uimage = $uimagepath."nophoto.jpg";
}
else {
$uimage = "/images/comprofiler/".$uimage;[/code:1]

Missing the / again.

Good luck

Please Log in to join the conversation.

14 years 6 months ago #55537 by nant
Replied by nant on topic Re:Avatar will upload, but will not show
mstar wrote:

i found the problem.

CB is requesting the file from

mydomain.nlimages/comprofiler/gallery/redflower.gif
but it has to be fixed to :

mydomain.nl/slash/images/comprofiler/gallery/redflower.gif

How can i fix this?


did you move your site from somewhere else?

Please Log in to join the conversation.

14 years 6 months ago #55553 by mstar
Replied by mstar on topic Re:Avatar will upload, but will not show
Thanks, this partially worked, avatar is showing and uploading just works fine, however i get another error:

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/components/com_comprofiler/plugin/language/dutch/images) is not within the allowed path(s): (/home/deb5503/:/tmp:/usr/local/lib/php/) in /usr/home/deb5503/domains/mysite.nl/public_html/subdomain/components/com_comprofiler/plugin/user/plug_cbcore/cb.core.php on line 88

Please Log in to join the conversation.

14 years 6 months ago #55554 by mstar
Replied by mstar on topic Re:Avatar will upload, but will not show
nant wrote:

mstar wrote:

i found the problem.

CB is requesting the file from

mydomain.nlimages/comprofiler/gallery/redflower.gif
but it has to be fixed to :

mydomain.nl/slash/images/comprofiler/gallery/redflower.gif

How can i fix this?


did you move your site from somewhere else?

No friend, this isnt the case, both fresh installs, Joomla 1.5 and CB, the latest.

Please Log in to join the conversation.

14 years 6 months ago #55555 by loplo
Replied by loplo on topic Re:Avatar will upload, but will not show
youre welcome
this looks like some file error for me.
try to set the default language to english and test it.
If it works, then something's wrong with your language files.

Please Log in to join the conversation.

14 years 6 months ago #55558 by mstar
Replied by mstar on topic Re:Avatar will upload, but will not show
loplo wrote:

youre welcome
this looks like some file error for me.
try to set the default language to english and test it.
If it works, then something's wrong with your language files.

You mean the joomla default language?
The CB default is already english, though it tell me that is english

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.255 seconds

Facebook Twitter LinkedIn