News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

what is this?

Started by Anguz, August 18, 2003, 08:42:18 AM

Previous topic - Next topic

Anguz

in sources/Profile.php there's this bit of code:

      if (stristr($memsettings[13], 'http://'))
      {
         $pic = "<a href=\"$memsettings[13]\" target=\"_blank\" onClick=\"window.fopen('$memsettings[13]', 'ppic$user', 'resizable,width=200,height=200'); return false;\">";
         $pic = "<img src=\"$memsettings[13]\" border=\"0\" alt=\"\" />";
      }


$memsettings[13] is "avatar" in the mysql_query

why is $pic defined twice? what's each for? won't the second one overwrite the first one?
Cristián Lávaque http://cristianlavaque.com

Jack.R.Abbit™

I noticed that a long time ago.  It appears to be some abandoned code that would make the avatar in your pofile link to a pop-up with your avatar in it.  When asked about it before, no one wanted to "turn it back on" for fear that it would break something.  I turned it on in my forum and nothing bad happened.  ANd yes, the second $pic just overwrites the first. If you wanted to turn it on, you would change the code to this:
      if (stristr($memsettings[13], 'http://'))
      {
         $pic = "<a href=\"$memsettings[13]\" target=\"_blank\" onClick=\"window.fopen('$memsettings[13]', 'ppic$user', 'resizable,width=200,height=200'); return false;\">";
         $pic .= "<img src=\"$memsettings[13]\" border=\"0\" alt=\"\" />";
         $pic .= "</a>";
      }

Anguz

I see... I understand why it's not enabled too, why would one need a popup of a small picture that fits fine in the page at full size...

thank you for replying! I was kinda confused about it  :-\
Cristián Lávaque http://cristianlavaque.com

Advertisement: