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

how to remove a parameter "alt" and "tittle" from avatars of visitors ?

battersbatters New
edited April 2011 in Vanilla 2.0 - 2.8
I have instead of a tip to the visitor's avatar appear such marks% D0% B3% D0% BE% D1% 81% D1% 82% D1% 8C + probably because I use Russian letters in behalf of users. How do I change the encoding, I don `t know, can anyone knows in what file and what line you want to remove to have pictures of visitors to disable settings: "alt" and "tittle"
Tagged:

Comments

  • yu_tangyu_tang New
    edited April 2011
    See /library/core/functions.render.php.
    You'll find a function UserPhoto().
    You may also check Link() in /library/core/class.theme.php.
    Both fxs puts UserName to urlencode().
  • battersbatters New
    edited April 2011
    See /library/core/functions.render.php.
    You'll find a function UserPhoto().
    You may also check Link() in /library/core/class.theme.php.
    Both fxs puts UserName to urlencode().
    thanks for the help, I changed the file /library/core/functions.render.php in 2 lines 259 and 260. was so:
    259 return '<a title="'.urlencode($User->Name).'" href="'.Url('/profile/'.$User->UserID.'/'.urlencode($User->Name)).'"'.$CssClass.'>' 260 .Img($PhotoUrl, array('alt' => urlencode($User->Name)))

    and now so:
    259 return '<a '.$CssClass.'>' 260 .Img($PhotoUrl, array())

    and now works as expected
    but in the file /library/core/class.theme.php I do not find what you want to change, because do not understand the code
  • What is your version of Vanilla?
    The code I mentioned was added to class.theme.php in v2.0.17.
    https://github.com/vanillaforums/Garden/commit/1051911e829c3c1f729b6b179713c7c6ed708b22#L15R70
    Not exists if you are using older version.
  • 2.0.17.9
    in file class.theme.php exists only this line (29 line) with the word "Link" public static function Link($Path, $Text = FALSE, $Format = '<a href="%url" class="%class">%text</a>', $Options = array()) {
  • Yes, that is Link() function head.
    Now you can look into function body.
    https://github.com/vanillaforums/Garden/blob/Vanilla_2.0.17.9/library/core/class.theme.php#L68
    Truth 'alt' is out there.
  • Thanks, found the 68 line inside the function body changed it with the original

    $ Text = Img ($ PhotoUrl, array ('alt' => urlencode ($ Session-> User-> Name)));
    at:
    $ Text = Img ($ PhotoUrl, array ());
    while working as before, I did not notice the change, it should have been required to do?
    in any case no longer a pop-up prompts and the alternate text instead of images
  • I don't know exactly where the Link() function is called. Maybe Smarty templates or something uses.
    I just realized that also the Link() function set url-encoded user name to 'alt' attribute, so let you know that.
  • LincLinc Detroit Admin
    This has been fixed for the next version, thanks.
Sign In or Register to comment.