Warning: strpos(): Empty delimiter. in /home/joomlaha/public_html/components/com_smf/smf.php on line 14
No avatar showing with CB
Home arrow Forum No avatar showing with CB
  Welcome, Guest. Please login or register.
Did you miss your activation email?
September 06, 2008, 11:04:40 PM
Home New Posts Search Calendar


Login with username, password and session length
+  Joomla Forum
|-+  Joomla Hacks
| |-+  Joomla-SMF Forum Support
| | |-+  Joomla-SMF 2.0.x (Moderators: -Wolverine, kai920)
| | | |-+  No avatar showing with CB
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: No avatar showing with CB  (Read 2179 times)
Ted Barnett
Joomla Newbie
*

Karma: +1/-0
Offline Offline

Posts: 7



View Profile WWW
No avatar showing with CB
« on: September 11, 2006, 04:54:24 PM »

I've installed JSMF 2.0 beta 2 and everything works great except for the avatar showing on the JSMF login module.  I uploaded an avatar through CB but none shows up on the module.  I looked at the page code and the image tag is there but the image link is weird:

https://www.website.org/intranet/smf/avatars/https://www.website.org/intranet/images/comprofiler/65_4505c9a7a53aa.jpg

when it should be:

https://www.website.org/intranet/images/comprofiler/65_4505c9a7a53aa.jpg

when I go to the forum profile the avatar doesn't show but the page source code shows the same bad link.

How is this created?
Did I set something up wrong?

thanks
-barnett
Logged
Ted Barnett
Joomla Newbie
*

Karma: +1/-0
Offline Offline

Posts: 7



View Profile WWW
Re: No avatar showing with CB
« Reply #1 on: September 11, 2006, 05:06:53 PM »

In the SMF admin I cleared out the Avatar URL directory settings but now the link to the avatar is:

/https://www.aimint.org/intranet/images/comprofiler/65_4505c9a7a53aa.jpg

if only I could get rid of the begining slash.

anyone?

I'm using SMF1.1 RC3
Logged
skunkpit
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 4


View Profile
Re: No avatar showing with CB
« Reply #2 on: September 11, 2006, 05:56:44 PM »

i have a similar problem

uploading a avatar for CB mirrors it nicely for smf avatar

but uploading or deleting smf avatars gives this error

Code:
Query was empty SQL=~~~
FROM::/mounted-storage/osc/components/com_jsmf/jsmf.class.php
|| integatechangemeberdata || 1290

<edit>
sorry
my main issue was that while deleting user image from CB it did not delete from smf
but it seems to be working now
i think it was because i played around with
Code:
Redirect Profile Links:    Enable      [X] Disable
« Last Edit: September 11, 2006, 06:08:18 PM by skunkpit » Logged
-Wolverine
Moderator
Joomla Guru
*****

Karma: +374/-34
Offline Offline

Posts: 3393


Lead Developer


View Profile WWW
Re: No avatar showing with CB
« Reply #3 on: September 11, 2006, 06:44:26 PM »

In the SMF admin I cleared out the Avatar URL directory settings but now the link to the avatar is:

/https://www.aimint.org/intranet/images/comprofiler/65_4505c9a7a53aa.jpg

if only I could get rid of the begining slash.

anyone?

I'm using SMF1.1 RC3
The link I create is
Code:
$av_url = $mosConfig_live_site . '/images/comprofiler/' . $filename;
So the only way this could happen is if your $mosConfig_live_site is wrong.
Logged

Need help?  Check Here First!
Get the JSMF User Guide
SEARCH this forum.
-Wolverine
Moderator
Joomla Guru
*****

Karma: +374/-34
Offline Offline

Posts: 3393


Lead Developer


View Profile WWW
Re: No avatar showing with CB
« Reply #4 on: September 11, 2006, 06:47:23 PM »

i have a similar problem

uploading a avatar for CB mirrors it nicely for smf avatar

but uploading or deleting smf avatars gives this error

Code:
Query was empty SQL=~~~
FROM::/mounted-storage/osc/components/com_jsmf/jsmf.class.php
|| integatechangemeberdata || 1290

<edit>
sorry
my main issue was that while deleting user image from CB it did not delete from smf
but it seems to be working now
i think it was because i played around with
Code:
Redirect Profile Links:    Enable      [X] Disable
That error message did turn out to be a bug.  You can fix it by finding the line in jsmf.class.php at or around 1290 that is like this:
Code:
$database->setQuery();
and change it to this:
Code:
$database->setQuery($query);
Logged

Need help?  Check Here First!
Get the JSMF User Guide
SEARCH this forum.
Ted Barnett
Joomla Newbie
*

Karma: +1/-0
Offline Offline

Posts: 7



View Profile WWW
Re: No avatar showing with CB
« Reply #5 on: September 12, 2006, 10:50:53 AM »

The link I create is
Code:
$av_url = $mosConfig_live_site . '/images/comprofiler/' . $filename;
So the only way this could happen is if your $mosConfig_live_site is wrong.

Actually I think the problem is somewhere in the function integrateChangeMemberData() in the smf.class.php file.

Even when I delete the avatar in CB the weird link shows in the SMF profile.

It seems to always combine the Smf Avatar url with the CB avatar url. 

My $mosConfig_live_site is set up correctly.

any thoughts?

-barnett
Logged
-Wolverine
Moderator
Joomla Guru
*****

Karma: +374/-34
Offline Offline

Posts: 3393


Lead Developer


View Profile WWW
Re: No avatar showing with CB
« Reply #6 on: September 12, 2006, 12:56:45 PM »

Actually I think the problem is somewhere in the function integrateChangeMemberData() in the smf.class.php file.

Even when I delete the avatar in CB the weird link shows in the SMF profile.

It seems to always combine the Smf Avatar url with the CB avatar url. 

My $mosConfig_live_site is set up correctly.

any thoughts?

-barnett
integrateChangeMemberData is only when the avatar is set in SMF.  I thought you said you were setting the avatar in CB?  I'll look at both.
Logged

Need help?  Check Here First!
Get the JSMF User Guide
SEARCH this forum.
Ted Barnett
Joomla Newbie
*

Karma: +1/-0
Offline Offline

Posts: 7



View Profile WWW
Re: No avatar showing with CB
« Reply #7 on: September 13, 2006, 10:54:46 AM »

integrateChangeMemberData is only when the avatar is set in SMF.  I thought you said you were setting the avatar in CB?  I'll look at both.

You're right I am setting the avatar in CB.  So where is that link created in the code? 

It is just interesting that the CB Avatar URL is appended to the SMF Avatar URL making the link not work in SMF and the login module.

My urls are like this:
http://www.smfavatarurl.com/http://www.cbavatarurl/image.jpg

and when I try to clear the SMF Avatar URL it still adds a beginning slash:
/http://www.cbavatarurl/image.jpg

If I could just find where it is putting this link together I could fix it.  Could it have anything to do with the patch file for SMF1.1 RC3?

Thanks for your patience with all of us on the forum.
-barnett
Logged
-Wolverine
Moderator
Joomla Guru
*****

Karma: +374/-34
Offline Offline

Posts: 3393


Lead Developer


View Profile WWW
Re: No avatar showing with CB
« Reply #8 on: September 13, 2006, 09:57:27 PM »

obviously this isn't going to get fixed by generalizations.  Gimme step for step how you are updating it. 

The code is exactly what I previously posted
Code:
$av_url = $mosConfig_live_site . '/images/comprofiler/' . $filename;

Then I run an SQL query that updates the avatar in smf's member table.  So my only thought is that $filename is a full URL, but in my experience with CB I did not run across this.  If you upload an image the only thing stored in the CB table is the filename itself, no path.  Further, if $filename was a full path then we would see http://www.smfavatarurl.com/images/comprofiler/http://www.cbavatarurl.com/images/comprofile/theimage.jpg

When you say you are changing the link, is this in the database or on the members SMF profile?  Be explicit, something is going wrong here.
Logged

Need help?  Check Here First!
Get the JSMF User Guide
SEARCH this forum.
Ted Barnett
Joomla Newbie
*

Karma: +1/-0
Offline Offline

Posts: 7



View Profile WWW
Re: No avatar showing with CB
« Reply #9 on: September 14, 2006, 10:37:56 AM »

The code is exactly what I previously posted
Code:
$av_url = $mosConfig_live_site . '/images/comprofiler/' . $filename;

Then I run an SQL query that updates the avatar in smf's member table.

Ok I've looked in the smf_member table and the links are stored correctly.  So your line of code above is doing it job.  Smiley

However when the following line of code is called in mod_smf_login.php:
Code:
$context['user']['avatar']['image']
the SMF Avatar URL is somehow added to the front of the correct avatar link stored in the database thus making it incorrect.  Sad

When you say you are changing the link, is this in the database or on the members SMF profile?  Be explicit, something is going wrong here.

The link I'm changing in an effort to get the correct Avatar Path is the SMF Avatar URL which is being added to the front of the link.  Only SMF Forum Admins can change this link by going to:
admin > Attachments and Avatars > Avatars Settings
Then under Server-stored avatars section I changed the Avatars URL: field to nothing.  Becasue this is the URL that keeps being added to the front of correct avatar link already stored in the smf_member table.   Unfortunetly even with the SMF Avatar URL set to nothing a single backslash is added to the URL thus making it invalid:
/https://www.cbavatarurl.com/images/comprofile/theimage.jpg

So my question is Where is the following array constructed?
Code:
$context['user']['avatar']['image']

Wherever this is constructed is where the URL is being added to the front.

Or maybe there is a setting in either SMF or CB or JSMF that is not set right which is making this all come out weird.

I hope this was specific enough.  Thanks
-barnett
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Joomla Forum | Powered by SMF 1.1 RC1.
© 2001-2005, Lewis Media. All Rights Reserved.
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

Joomla Hacks is a Joomla Components, Joomla Modules, Joomla Templates, & Joomla Mambots resource portal.
None of the text or images in this public website may be copied without the expressed written consent of the authors.
Copyright 2005 by JoomlaHacks.com. Powered by Joomla. All rights reserved.
Terms of Use