fedyamaslov1987 / steamprofile

Automatically exported from code.google.com/p/steamprofile
0 stars 0 forks source link

If slidermenu = false, Steam user's name links to the current page. #11

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Install SteamProfile on a web server. Any version will do - 2.0.3, 2.0.4, 
2.1.0.
2. In steamprofile.xml, set slidermenu to false.
3. Delete cache folder contents to ensure the result is correct, and load 
example.htm. (Which also has to be corrected in 2.1.0 - it points to 
steamprofile/steamprofile.min.js instead of 
steamprofile/ajax/steamprofile.min.js.)

What is the expected output? What do you see instead?
The name links to the current page on which the Steam profile box appears. It 
should link to the Steam user's Steam Community profile. Re-enabling the 
slidermenu fixes this bug.

What version of the product are you using? On what operating system?
SteamProfile 2.0.3 and SteamProfile 2.1.0 Beta, although this has been occuring 
ever since 2.0.1 and I've found the cause of it just now, so I assume 2.0.4 
will have the same bug.

This can be fixed by moving the following code block: (Lines 321 - 323)
"profile.find('.sp-avatar a, .sp-info a.sp-name')
.attr('href', 'http://steamcommunity.com/profiles/' + profileData.find('profile 
> steamID64').text());"

...from within the "if(showSliderMenu)" conditional's code block to right after 
it ends. This way, the correct profile links are made whether the slider menu 
is enabled or disabled. I've attached a patched version of steamprofile.js from 
version 2.1.0 Beta Ajax.

Original issue reported on code.google.com by Idan.Noi...@gmail.com on 23 Jul 2011 at 4:36

Attachments:

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r109.

Original comment by barracud...@yahoo.de on 24 Jul 2011 at 3:42

GoogleCodeExporter commented 8 years ago
Thank you for the bug report! I'll add this fix for the next version.

Original comment by barracud...@yahoo.de on 24 Jul 2011 at 3:45