Thread Rating:
  • 4 Vote(s) - 2.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.8] Private Profile released!
#4
(2015-01-18, 12:29 PM)Destroy666 Wrote: Note: the plugin is far from being optimised and will generate at most 6 queries per profile while 0 are needed, You should use $memprofile variable instead of selecting all columns in the users table multiple times.. E. g.

//no $db->simple_select("users", "*", "uid=".$profileuid." AND whocanview=3"); query here anymore
if($memprofile['whocanview'] == 3)
{
 if(!$mybb->user['uid'])
 error("This user has a private profile!");
}
elseif($memprofile['whocanview'] == 4)
{
 if($mybb->user['uid'])
 error("This user has a private profile!");
}
// and so on..

And it would be nice if you used lang variables for easy translation.

Ah, that's cool!

Thanks, I didn't know this var of mybb.

Very useful, I'm going to updating the plugin.

Thanks!
Reply


Messages In This Thread
Private Profile released! - by The_Dark - 2015-01-14, 05:15 PM
RE: Private Profile released! - by iturdu - 2015-01-15, 03:00 PM
RE: Private Profile released! - by Destroy666 - 2015-01-18, 12:29 PM
RE: Private Profile released! - by The_Dark - 2015-01-19, 07:54 PM
RE: Private Profile released! - by iturdu - 2015-01-25, 06:23 PM
RE: Private Profile released! - by The_Dark - 2015-01-26, 06:38 PM
RE: Private Profile released! - by tomhillepille - 2015-02-16, 10:13 PM
RE: Private Profile released! - by Destroy666 - 2015-02-17, 12:28 AM
RE: Private Profile released! - by Vanz - 2015-02-17, 06:57 PM
RE: Private Profile released! - by The_Dark - 2015-04-22, 10:14 PM
RE: Private Profile released! - by bitcoin - 2015-05-10, 12:57 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)