Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Need to remove ProfileLink

422422 MVP
edited April 2012 in Vanilla 2.0 - 2.8

Doing new theme, and this is my code snippet below.

if ($Discussion->LastCommentID != '') {
               echo '< span class="LastCommentBy"> < span class="repliedBy">'.UserPhoto($Last).'</ span>'.'</ span>';
               echo '< span class="LastCommentDate">'.Gdn_Format::Date($Discussion->LastDate).'</ span>';
            } else {
               echo '< span class="LastCommentBy">'.sprintf(T('Started by %1$s'), '< span class="showNew"> </ span>'.UserAnchor($First)).'</ span>';
               echo '< span class="LastCommentDate">'.Gdn_Format::Date($Discussion->FirstDate);
               
               if ($Source = GetValue('Source', $Discussion)) {
                  echo ' '.sprintf(T('via %s'), T($Source.' Source', $Source));
               }
               
               echo '</ span>';
            }

The issue is the Userphoto is yanking in the a href link, which has class :

ProfileLink

I need to remove this from my code, What I am doing is...

On Discussions page, main index ( that is )

I have original poster avatar displayed, and within it, I have the last poster avatar ( smaller version ) displayed.
I still need the href on the original posters avatar , but want to strip the href of the LastCommentBy userphoto..

Can you think of what I can do to fix ?

Because the href link that wraps the photo..stuffs up my styling

< a class="ProfileLink" href="/theme/profile/1/admin" title="admin">
    < img class="ProfilePhotoMedium" alt="admin" src="http://testsite.com/respond/uploads/userpics/703/n3JE1ANP8ZZRZ.png">
< /a>

There was an error rendering this rich post.

Answers

  • Hmm I may have circumvented this , by changing css classes. Still would like to know if we can strip href on the last replied by...

    There was an error rendering this rich post.

  • peregrineperegrine MVP
    edited April 2012
     UserPhoto($Last, array('LinkClass'=>'nolink','ImageClass'=>'')) 
    
    
     echo '< span class="LastCommentBy"> < span class="repliedBy">'.  UserPhoto($Last, array('LinkClass'=>'nolink','ImageClass'=>''))      .'   </ span>'.'</ span>';
    

    I didn't try it. i assume you can modify your newly added class .nolink to do whatever you want.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Thankyou, i opted for css change in the end.

    Have saved your code tho, thankyou.

    There was an error rendering this rich post.

  • peregrineperegrine MVP
    edited April 2012

    I'm giving you a like because you said thank you and because you clicked like, and you finalized the discussion :), a rarity sometimes (not with you though).

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Cheers :) ... << the questions are coming thick n fast

    There was an error rendering this rich post.

Sign In or Register to comment.