View your profile

Started on the old forum in August 2009 · view the original in the archive · old links redirect here

14 replies · 785 views · started 17 years ago · 1 min read

6 participants
robzky Developer · 205 posts #1

what is the code if YOU, STAFFS AND YOUR BUDDIES only can view your PROFILE?? THANKS!

LESS TALK. LESS MISTAKE.

HTTP://APPSROB.COM - LIST OF MY FACEBOOK APPS!

shad0w Developer · 119 posts #2

robzky wrote: what is the code if YOU and the STAFFS only can view your PROFILE?? THANKS!

I don't know if that is what you are looking 4 but ... Something I've codded in less than 1 minute .. I think that it works

// for profile
$uid = getuid_sid($sid);
$who = $_GET["who"];

if (shad0w($uid,$who))
{
// profile
}else{
echo "You can't view this profile ! ";
}

/////////////////////////////////////////////
// for core.php
function shad0w($uid, $who)
{

  if($uid==$who||ismod($uid))
  {
    return true;
  }
  return false;
}

P.S: If it works use thank button, if doesn't use it anyway ... lol

whatmp3.name - search mp3 on mobile

riderz Lead · 975 posts #3

Shadow this one code of urs do u have the options in settings to switch it on and of for public to view also


Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code


NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

robzky Developer · 205 posts #4

Its WORKING!.. Can you combine that code at this code??

if (arebuds($uid, $who)) { //profile }else { echo "Private profile. Add $who to your buddies to view the profile. "; }

I hope you can code this thanks shadow..

LESS TALK. LESS MISTAKE.

HTTP://APPSROB.COM - LIST OF MY FACEBOOK APPS!

robzky Developer · 205 posts #5
$sml = mysql_fetch_array(mysql_query("SELECT hvia FROM ibwf_users WHERE id='".getuid_sid($sid)."'"));
	if($sml[0]=="1")
	{
		echo "<a href=\"genproc.php?action=shsml&sid=$sid&act=dis\">Disable Smilies</a>";
	}else{
		echo "<a href=\"genproc.php?action=shsml&sid=$sid&act=enb\">Enable Smilies</a>";
	}

I think you can get a idea if how to do Switch on/off this function..

LESS TALK. LESS MISTAKE.

HTTP://APPSROB.COM - LIST OF MY FACEBOOK APPS!

robzky Developer · 205 posts #6

If you are not in my buddies you are not able to see my profile, But if i accept your reqeust to become one of my buddies, you are now able to see my profile..

-Can you code this? I hope you can.. Coz i want to private my profile to those who are not list in my buddies..

LESS TALK. LESS MISTAKE.

HTTP://APPSROB.COM - LIST OF MY FACEBOOK APPS!

kiLLeR-eyEd_14 Senior · 382 posts #7

robzky wrote: Its WORKING!.. Can you combine that code at this code??

if(arebuds($uid, $who)) { //profile }else { echo "Private profile. Add $who to your buddies to view the profile. "; }

I hope you can code this thanks shadow..

if(arebuds($uid, $who) OR ismod($uid) OR $who==$uid) It's very easy..Like when i'm 3days old in php coding..Lol

robzky Developer · 205 posts #8

kiLLeR-eyEd_14 wrote: if(arebuds($uid, $who) OR ismod($uid) OR $who==$uid) It's very easy..Like when i'm 3days old in php coding..Lol

  • The problem is... My profile is Private.. So i cant see my own profile! when i use this code..

LESS TALK. LESS MISTAKE.

HTTP://APPSROB.COM - LIST OF MY FACEBOOK APPS!

kiLLeR-eyEd_14 Senior · 382 posts #9

robzky wrote:

  • The problem is... My profile is Private.. So i cant see my own profile! when i use this code..

what do u mean?why is ur profile private?did u add a row of privatepro in ur users table and update urs into private?then make a function dat will determine if ur profile is private then make a condition, let say u made a function isprivatepro($uid)..the c0nditi0n is, if(isprivatepro($uid)) then everyone can't view urs unless they are one of ur buddy..Just use ur head in doing this.,that's very easy..if u know the basic php coding, making functions, then u'l juz use ur head to do conditi0ns..

shad0w Developer · 119 posts #12
// for profile 
$uid = getuid_sid($sid); 
$who = $_GET["who"]; 

if (shad0w($uid,$who)) 
{ 
// profile 
}else{ 
echo "You can't view this profile ! "; 
} 

///////////////////////////////////////////// 
// for core.php 
function shad0w($uid, $who) 
{ 

  if($uid==$who||arebuds($uid,$who)||ismod($uid)) 
  { 
    return true; 
  } 
  return false; 
} 

I think that should work ...

whatmp3.name - search mp3 on mobile

srecnica Developer · 174 posts #15

I made this in itself... in core.php

function shad0w($uid, $who) {

$pm = mysql_fetch_array(mysql_query("SELECT viewpro FROM ibwf_users WHERE id='".$who."'")); if($pm[0]=='2') { if (ismod($uid)) { return true; }else{

return false; } return false; }else if($pm[0]=='1') { if($uid==$who||arebuds($uid,$who)||ismod($uid)) { return true; }else{ return false; } }else if($pm[0]=='0') { return true; } } in genproc.php

else if($action=="viewpro") { addonline(getuid_sid($sid),"Profil",""); $act = $_GET["act"]; $acts = ($act=="dis" ? 0 : 1); echo "<card id="main" title="HAPPY Forum">"; echo " "; //$uid = getuid_sid($sid); $res = mysql_query("UPDATE ibwf_users SET viewpro='".$acts."' WHERE id='".$uid."'"); if($res) { echo "<img src="http://coding-talk.com/images/ok.gif" alt="o"/>Profile changed! "; }else{ echo "<img src="http://coding-talk.com/images/notok.gif" alt="x"/>
It's impossible to update your profile! "; } echo " <a href="index.php?action=main&sid=$sid"><img src="http://coding-talk.com/images/home.gif" alt="*"/>"; echo "HAPPY</a>"; echo " </card>"; } in index.php... if($action=="cpanel")

$viewpro = mysql_fetch_array(mysql_query("SELECT viewpro FROM ibwf_users WHERE id = '".$uid."'"));

if($viewpro[0]=="1")
{
    echo "<a href=\"genproc.php?action=viewpro&amp;sid=$sid&amp;act=dis\">Public Profile</a>

"; }else{ echo "<a href="genproc.php?action=viewpro&sid=$sid&act=enb">Private Profile</a> "; } else if($action=="viewuser")

if (shad0w($uid,$who)) {

code profile<<<

}else{ echo "Privacy Profile !!!</ b> This profile can only see members with a list of friends and members of the Administration "; }

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close