Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
themes-topic
Req. for code change: sp_UserAvatar
Avatar
BOZ
Member
Free Members
Offline
Dec 21, 2011 - 9:37 pm

Keeping it simple.

Currently tagClass is used for both the div output and img src resulting in the inability of the elements being addressed independently.

Please add an imgClass element to separate the two elements.

Original code:

# now display the avatar
        $width = ($avatarData->size > 0) ? " width='$avatarData->size'" : "";
        $avatar = sp_build_avatar_display($avatarData->userId, "<img src='".esc_url($avatarData->url)."' class='$tagClass'$width alt='' />", $link);

        $avatar = "<div class='$tagClass'>$avatar</div>\n";

 

Replacement code:

# now display the avatar
        $width = ($avatarData->size > 0) ? " width='$avatarData->size'" : "";
        $avatar = sp_build_avatar_display($avatarData->userId, "<img src='".esc_url($avatarData->url)."' class='$imgClass'$width alt='' />", $link);

        $avatar = "<div class='$tagClass'>$avatar</div>\n";

 

PS. How did you place the code in a container on the forum yesterday, which editor or tags, please

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
Offline
Dec 21, 2011 - 10:08 pm

the code sytnax highlighter is only available in the tinymce rich text editor...  paste the code, select the code, then hit the code button - looks like ${}

I will take a look at this... should be doable...

where were you in the alpha when we went through all this??? wink

Avatar
BOZ
Member
Free Members
Offline
Dec 21, 2011 - 10:22 pm

Heh, sorry like I said I was late to the game, glad I found you, not trying to bust your chops.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
Offline
Dec 21, 2011 - 10:44 pm

no, we actually like this... would have be nice of course during alpha rather than just before RC, but good all the same... wink

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
Offline
Dec 22, 2011 - 12:17 am

does req mean requested or required???? winkcool

changes to separate avatar container class and image class have been committed to svn...

oh... and Boz, we could always use another coder on the simple:press team! laugh

Avatar
BOZ
Member
Free Members
Offline
Dec 22, 2011 - 2:03 am

Mr Papa said

does req mean requested or required???? winkcool

changes to separate avatar container class and image class have been committed to svn...

oh... and Boz, we could always use another coder on the simple:press team! laugh

Hmm well, lets see it was meant as REQuest, but would REQuired mean I get my way? wink

As to the jumping in as a coder, yeah I think Im twinkling my toes in the waters, We ll see where it goes laugh

 

Definitely easier to get these commits this way, so far, than using all my space and overhead for my rapidly growing spfunction file, GRIN 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
Offline
Dec 22, 2011 - 2:05 am

lol. understand. are you running out of svn? you could always just submit a patch...

Avatar
BOZ
Member
Free Members
Offline
Dec 22, 2011 - 2:23 am

Mr Papa said

lol. understand. are you running out of svn? you could always just submit a patch...

Have to get up to speed on SVN, I understand the concepts and subversion control would have certainly pulled my bacon out of the fire on more than one occasion, but Ive been working in a local LAMP to remote LAMP environment with a SAMBA share as a manual commit wall between the two for over a decade now so old habits die hard. I grabbed tortoise and Ill see about generating some diff patches on future ideas or bugs that I can help with.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
Offline
Dec 22, 2011 - 2:26 am

yeah, tortoise svn is great... real easy to generate a patch file.. just svn checkout trunk... then make your changes and then in the right click menu, select create (generate?) patch...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625