1

Topic: Profile Image in Blog when no Upload - Adding Profile Link in Blog

Tested on 2.5.3

http://www.filipina-lady.net/test253/nopix1.jpg

http://www.filipina-lady.net/test253/nopix2.jpg

http://www.filipina-lady.net/test253/nopix3.jpg


Open member_blog_entry.tpl

ADD MEMBER PHOTO IF NO UPLOAD

FIND:

<!-- IF entry_picture -->
<a class="picture_zoom" href="{top.virtual_pic_path}{entry_picture_large}" id="blog_picture_{entry_id}" target="_blank"><img src="{top.virtual_pic_path}{entry_picture}" alt="" border="0" /><br></a>
div id="blog_picture_{entry_id}_zoom" style="display:none"><img src="{top.virtual_pic_path}{entry_picture_large}" alt="" border="0" /><br></div>

AFTER ADD:

<!-- ELSEIF member_picture AND member_picture_active -->
<a class="picture_zoom" href="{top.virtual_pic_path}{member_picture_large}" id="profile_picture_{member_id}" target="_blank"><img src="{top.virtual_pic_path}{member_picture}" alt="" border="0" /><br></a>
<div id="profile_picture_{member_id}_zoom" style="display:none"><img src="{top.virtual_pic_path}{member_picture_large}" alt="" border="0" /><br></div>

TO DISPLAY USERNAME WITH LINK TO THEIR PROFILE

FIND:

{entry_body}

AFTER ADD:

<a href="{virtual_path}{member_profile_link}"style="text-decoration: none;">View {member_username} Profile</a>

--------------------------------------------

END OF CODING

http://www.filipina-lady.net/test253/nopix4.jpg

Last edited by db3204 (2009-05-26 15:32:49)

2

Re: Profile Image in Blog when no Upload - Adding Profile Link in Blog

Well done Dan, Thanks.
Added this to my site

Not only am I a Staff member,  I'm also a Client

3

Re: Profile Image in Blog when no Upload - Adding Profile Link in Blog

Hi db I tried but could not get this to work, I must be missing something, I am using 2.5.3 softgreen template.

These are the two changed code sections;

<div class="image">
                                <!-- IF entry_picture -->
                                    <a class="picture_zoom" href="{top.virtual_pic_path}{entry_picture_large}" id="blog_picture_{entry_id}" target="_blank"><img src="{top.virtual_pic_path}{entry_picture}" alt="" border="0" /><br></a>
                                    <div id="blog_picture_{entry_id}_zoom" style="display:none"><img src="{top.virtual_pic_path}{entry_picture_large}" alt="" border="0" /><br></div>
                                <!-- ELSEIF member_picture AND member_picture_active -->
                                    <a class="picture_zoom" href="{top.virtual_pic_path}{member_picture_large}" id="profile_picture_{member_id}" target="_blank"><img src="{top.virtual_pic_path}{member_picture}" alt="" border="0" /><br></a>
                                    <div id="profile_picture_{member_id}_zoom" style="display:none"><img src="{top.virtual_pic_path}{member_picture_large}" alt="" border="0" /><br></div>
                                <!-- ENDIF -->
<div class="entry">
                                {entry_body}
                                <a href="{virtual_path}{member_profile_link}"style="text-decoration: none;">View {member_username} Profile</a>
                            </div>

Any pointers what I have done wrong?

Thanks in advance...

4

Re: Profile Image in Blog when no Upload - Adding Profile Link in Blog

Hey big dog...may not get a chance to study your code till later. I'm at work and things are hoping so if I don't get a chance soon, I may have to wait till I off work.

cheers

5

Re: Profile Image in Blog when no Upload - Adding Profile Link in Blog

Thanks db...

6

Re: Profile Image in Blog when no Upload - Adding Profile Link in Blog

BigDog, don't see anything wrong with your coding.

Two suggestions.

1. Make sure you are putting the code in the right template: member_blog_entry.tpl

2. Clear both your template cache and your browsers cache and cookies.

7

Re: Profile Image in Blog when no Upload - Adding Profile Link in Blog

Well no luck, just cant get it to work.

I checked and rechecked I was using the correct template and tpl and cleared the cache and cookies.

Anyway thanks db for your time in looking at my code...

8

Re: Profile Image in Blog when no Upload - Adding Profile Link in Blog

Bigdog

Here is what my coding looks like between the <td></td> tags in member_blog_entry.tpl. Maybe seeing the added code with the other code will help. The code below in red is what was added

<td>
                            <div class="image">
                                <!-- IF entry_picture -->
                                    <a class="picture_zoom" href="{top.virtual_pic_path}{entry_picture_large}" id="blog_picture_{entry_id}" target="_blank"><img src="{top.virtual_pic_path}{entry_picture}" alt="" border="0" /><br></a>
                                    <div id="blog_picture_{entry_id}_zoom" style="display:none"><img src="{top.virtual_pic_path}{entry_picture_large}" alt="" border="0" /><br></div>
                                   
                                    <!-- ELSEIF member_picture AND member_picture_active -->
<a class="picture_zoom" href="{top.virtual_pic_path}{member_picture_large}" id="profile_picture_{member_id}" target="_blank"><img src="{top.virtual_pic_path}{member_picture}" alt="" border="0" /><br></a>
        <div id="profile_picture_{member_id}_zoom" style="display:none"><img src="{top.virtual_pic_path}{member_picture_large}" alt="" border="0" /><br></div>
                                                       
                                   
                                <!-- ELSE -->
                                    <a href="{top.virtual_path}{entry_link}" alt="" border="0" /><img src="{top.virtual_tpl_path}{session.template}/media/content_picture_none.gif" alt="" border="0" /><br /></a>
                                <!-- ENDIF -->
                            </div>
                        </td>

Last edited by db3204 (2009-06-19 17:40:34)

9

Re: Profile Image in Blog when no Upload - Adding Profile Link in Blog

Thanks db still no luck, I even copied your code as is and it did not work, I am not sure if using different template (softgreen) causes the problem I would not think so, but something is causing the mod code to fail.

Anyway thanks for your time and help...

10

Re: Profile Image in Blog when no Upload - Adding Profile Link in Blog

Works Excellent 4 me. Thank You db3204! smile

"Never be afraid to try something new. Amateurs built the Ark,Professionals built the Titantic."

11

Re: Profile Image in Blog when no Upload - Adding Profile Link in Blog

Can this mod also be done for events. I believe the same thing happens - if no photo is uploaded, then it shows the dreaded question mark.

12

Re: Profile Image in Blog when no Upload - Adding Profile Link in Blog

update for 2.5.6 which works for me when altering the above code. The only change I had to make (due to the multiple media folders I believe) is below. I put in bold what I added. I am using pink2

<!-- ELSEIF member_picture AND member_picture_active -->
            <a class="picture_zoom" href="{top.virtual_pic_path}{member_media_path}{member_picture_large}" id="profile_picture_{member_id}" target="_blank"><img src="{top.virtual_pic_path}{member_media_path}{member_picture}" alt="" border="0" /><br></a>
            <div id="profile_picture_{member_id}_zoom" style="display:none"><img src="{top.virtual_pic_path}{member_media_path}{member_picture_large}" alt="" border="0" /><br></div>

Last edited by kozmosis66 (2010-05-20 23:33:18)

13

Re: Profile Image in Blog when no Upload - Adding Profile Link in Blog

Update: This works perfectly in ver 2.6 using kozmosis66's slight code modification from post #12

vldPersonals ver: 2.7
Templates by LuvPoint