• 03-12-2023, 16:43:11
    #1
    merhaba,

    Aşağıda bir kod mevcut. burada talep etmek istediğim "Eğer tüm alanların hepsi boş ise"

    $L['None'];
    göstermek istiyorum. Yani Herhangi biri girilmemişse "Yok" görünecek. Şimdiden teşekkür ederim.

    if (!defined('SED_CODE')) { die('Wrong URL.'); }
    
    if($cfg['plugin']['socialname']['enabled']){
    $sqll = sed_sql_query("SELECT * FROM $db_users WHERE user_id='$id' LIMIT 1");
    $urr = sed_sql_fetcharray($sqll);
    
    if (!empty($urr['user_facebook']))
    {$face = "<a href=\"".sed_cc($urr['user_facebook'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/facebook.png\" ></a>";}
    if (!empty($urr['user_twitter']))
    {$twit = "<a href=\"".sed_cc($urr['user_twitter'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/twitter.png\" ></a>";}
    if (!empty($urr['user_instagram']))
    {$insta = "<a href=\"".sed_cc($urr['user_instagram'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/instagram.png\" ></a>";}
    if (!empty($urr['user_pinterest']))
    {$pin = "<a href=\"".sed_cc($urr['user_pinterest'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/pinterest.png\" ></a>";}
    if (!empty($urr['user_whatsapp']))
    {$whats = "<a href=\"".sed_cc($urr['user_whatsapp'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/whatsapp.png\" ></a>";}
    if (!empty($urr['user_telegram']))
    {$tele = "<a href=\"".sed_cc($urr['user_telegram'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/telegram.png\" ></a>";}
    if (!empty($urr['user_tumblr']))
    {$tum = "<a href=\"".sed_cc($urr['user_tumblr'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/tumblr.png\" ></a>";}
    if (!empty($urr['user_youtube']))
    {$you = "<a href=\"".sed_cc($urr['user_youtube'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/youtube.png\" ></a>";}
    if (!empty($urr['user_linkedin']))
    {$lin = "<a href=\"".sed_cc($urr['user_linkedin'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/linkedin.png\" ></a>";}
    if (!empty($urr['user_deviantart']))
    {$dev = "<a href=\"".sed_cc($urr['user_deviantart'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/devianart.png\" ></a>";}
    if (!empty($urr['user_github']))
    {$git = "<a href=\"".sed_cc($urr['user_github'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/github.png\" ></a>";}
    if (!empty($urr['user_steam']))
    {$steam = "<a href=\"".sed_cc($urr['user_steam'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/steam.png\" ></a>";}
    if (!empty($urr['user_reddit']))
    {$reddit = "<a href=\"".sed_cc($urr['user_reddit'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/reddit.png\" ></a>";}
    if (!empty($urr['user_discord']))
    {$discord = "<a href=\"".sed_cc($urr['user_discord'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/discord.png\" ></a>";}
    if (!empty($urr['user_twitch']))
    {$twich = "<a href=\"".sed_cc($urr['user_twitch'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/twitch.png\" ></a>";}
    if (!empty($urr['user_msn']))
    {$skype = "<a href=\"skype:".sed_cc($urr['user_msn'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/skype.png\" ></a>";}
    $t-> assign(array(
    
    "USERS_DETAILS_FACEBOOK" => $face,
    "USERS_DETAILS_TWITTER" => $twit,
    "USERS_DETAILS_INSTAGRAM" => $insta,
    "USERS_DETAILS_PINTEREST" => $pin,
    "USERS_DETAILS_WHATSAPP" => $whats,
    "USERS_DETAILS_TELEGRAM" => $tele,
    "USERS_DETAILS_TUMBLR" => $tum,
    "USERS_DETAILS_YOUTUBE" => $you,
    "USERS_DETAILS_LINKEDIN" => $lin,
    "USERS_DETAILS_DEVIANART" => $dev,
    "USERS_DETAILS_GITHUB" => $git,
    "USERS_DETAILS_STEAM" => $steam,
    "USERS_DETAILS_REDDIT" => $reddit,
    "USERS_DETAILS_DISCORD" => $discord,
    "USERS_DETAILS_TWITCH" => $twich,
    "USERS_DETAILS_SKYPE" => $skype,
    ));
    
    }
    ?>
  • 03-12-2023, 16:48:02
    #2
    Kodunuzun sonuna, tüm sosyal medya değişkenlerinin boş olup olmadığını kontrol eden ve eğer hepsi boşsa bir mesaj gösteren bir ifade ekleyebilirsiniz. İşte bu kontrolü eklemek için bir örnek:

    // Mevcut kodunuzun sonuna eklenecek
    $allEmpty = empty($face) && empty($twit) && empty($insta) && empty($pin) && empty($whats) && empty($tele) && empty($tum) && empty($you) && empty($lin) && empty($dev) && empty($git) && empty($steam) && empty($reddit) && empty($discord) && empty($twich) && empty($skype);
    
    if ($allEmpty) {
        echo $L['None']; // veya istediğiniz bir mesajı burada gösterebilirsiniz
    }
  • 03-12-2023, 17:11:17
    #3
    Teşekkür ederim. Ancak bu şekilde "yok" yazmadı.
    <?PHP
    
    if (!defined('SED_CODE')) { die('Wrong URL.'); }
    
    if($cfg['plugin']['socialname']['enabled']){
    $sqll = sed_sql_query("SELECT * FROM $db_users WHERE user_id='$id' LIMIT 1");
    $urr = sed_sql_fetcharray($sqll);
    
    if (!empty($urr['user_facebook']))
    {$face = "<a href=\"".sed_cc($urr['user_facebook'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/facebook.png\" ></a>";}
    if (!empty($urr['user_twitter']))
    {$twit = "<a href=\"".sed_cc($urr['user_twitter'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/twitter.png\" ></a>";}
    if (!empty($urr['user_instagram']))
    {$insta = "<a href=\"".sed_cc($urr['user_instagram'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/instagram.png\" ></a>";}
    if (!empty($urr['user_pinterest']))
    {$pin = "<a href=\"".sed_cc($urr['user_pinterest'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/pinterest.png\" ></a>";}
    if (!empty($urr['user_whatsapp']))
    {$whats = "<a href=\"".sed_cc($urr['user_whatsapp'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/whatsapp.png\" ></a>";}
    if (!empty($urr['user_telegram']))
    {$tele = "<a href=\"".sed_cc($urr['user_telegram'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/telegram.png\" ></a>";}
    if (!empty($urr['user_tumblr']))
    {$tum = "<a href=\"".sed_cc($urr['user_tumblr'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/tumblr.png\" ></a>";}
    if (!empty($urr['user_youtube']))
    {$you = "<a href=\"".sed_cc($urr['user_youtube'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/youtube.png\" ></a>";}
    if (!empty($urr['user_linkedin']))
    {$lin = "<a href=\"".sed_cc($urr['user_linkedin'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/linkedin.png\" ></a>";}
    if (!empty($urr['user_deviantart']))
    {$dev = "<a href=\"".sed_cc($urr['user_deviantart'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/devianart.png\" ></a>";}
    if (!empty($urr['user_github']))
    {$git = "<a href=\"".sed_cc($urr['user_github'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/github.png\" ></a>";}
    if (!empty($urr['user_steam']))
    {$steam = "<a href=\"".sed_cc($urr['user_steam'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/steam.png\" ></a>";}
    if (!empty($urr['user_reddit']))
    {$reddit = "<a href=\"".sed_cc($urr['user_reddit'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/reddit.png\" ></a>";}
    if (!empty($urr['user_discord']))
    {$discord = "<a href=\"".sed_cc($urr['user_discord'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/discord.png\" ></a>";}
    if (!empty($urr['user_twitch']))
    {$twich = "<a href=\"".sed_cc($urr['user_twitch'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/twitch.png\" ></a>";}
    if (!empty($urr['user_msn']))
    {$skype = "<a href=\"skype:".sed_cc($urr['user_msn'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/skype.png\" ></a>";}
    $t-> assign(array(
    
    "USERS_DETAILS_FACEBOOK" => $face,
    "USERS_DETAILS_TWITTER" => $twit,
    "USERS_DETAILS_INSTAGRAM" => $insta,
    "USERS_DETAILS_PINTEREST" => $pin,
    "USERS_DETAILS_WHATSAPP" => $whats,
    "USERS_DETAILS_TELEGRAM" => $tele,
    "USERS_DETAILS_TUMBLR" => $tum,
    "USERS_DETAILS_YOUTUBE" => $you,
    "USERS_DETAILS_LINKEDIN" => $lin,
    "USERS_DETAILS_DEVIANART" => $dev,
    "USERS_DETAILS_GITHUB" => $git,
    "USERS_DETAILS_STEAM" => $steam,
    "USERS_DETAILS_REDDIT" => $reddit,
    "USERS_DETAILS_DISCORD" => $discord,
    "USERS_DETAILS_TWITCH" => $twich,
    "USERS_DETAILS_SKYPE" => $skype,
    ));
    
    }
    
    $allEmpty = empty($face) && empty($twit) && empty($insta) && empty($pin) && empty($whats) && empty($tele) && empty($tum) && empty($you) && empty($lin) && empty($dev) && empty($git) && empty($steam) && empty($reddit) && empty($discord) && empty($twich) && empty($skype);
     
    if ($allEmpty) {
        echo $L[Yok]; // veya istediğiniz bir mesajı burada gösterebilirsiniz
    }
    
    ?>
  • 03-12-2023, 17:28:36
    #4
    <?PHP
    
    if (!defined('SED_CODE')) { die('Wrong URL.'); }
    
    if($cfg['plugin']['socialname']['enabled']){
    $sqll = sed_sql_query("SELECT * FROM $db_users WHERE user_id='$id' LIMIT 1");
    $urr = sed_sql_fetcharray($sqll);
    
    if (!empty($urr['user_facebook']))
    {$face = "<a href="".sed_cc($urr['user_facebook'])."" target="_blank" rel="nofollow"><img width="54" height="54" src="plugins/socialname/img/facebook.png" ></a>";}
    if (!empty($urr['user_twitter']))
    {$twit = "<a href="".sed_cc($urr['user_twitter'])."" target="_blank" rel="nofollow"><img width="54" height="54" src="plugins/socialname/img/twitter.png" ></a>";}
    if (!empty($urr['user_instagram']))
    {$insta = "<a href="".sed_cc($urr['user_instagram'])."" target="_blank" rel="nofollow"><img width="54" height="54" src="plugins/socialname/img/instagram.png" ></a>";}
    if (!empty($urr['user_pinterest']))
    {$pin = "<a href="".sed_cc($urr['user_pinterest'])."" target="_blank" rel="nofollow"><img width="54" height="54" src="plugins/socialname/img/pinterest.png" ></a>";}
    if (!empty($urr['user_whatsapp']))
    {$whats = "<a href="".sed_cc($urr['user_whatsapp'])."" target="_blank" rel="nofollow"><img width="54" height="54" src="plugins/socialname/img/whatsapp.png" ></a>";}
    if (!empty($urr['user_telegram']))
    {$tele = "<a href="".sed_cc($urr['user_telegram'])."" target="_blank" rel="nofollow"><img width="54" height="54" src="plugins/socialname/img/telegram.png" ></a>";}
    if (!empty($urr['user_tumblr']))
    {$tum = "<a href="".sed_cc($urr['user_tumblr'])."" target="_blank" rel="nofollow"><img width="54" height="54" src="plugins/socialname/img/tumblr.png" ></a>";}
    if (!empty($urr['user_youtube']))
    {$you = "<a href="".sed_cc($urr['user_youtube'])."" target="_blank" rel="nofollow"><img width="54" height="54" src="plugins/socialname/img/youtube.png" ></a>";}
    if (!empty($urr['user_linkedin']))
    {$lin = "<a href="".sed_cc($urr['user_linkedin'])."" target="_blank" rel="nofollow"><img width="54" height="54" src="plugins/socialname/img/linkedin.png" ></a>";}
    if (!empty($urr['user_deviantart']))
    {$dev = "<a href="".sed_cc($urr['user_deviantart'])."" target="_blank" rel="nofollow"><img width="54" height="54" src="plugins/socialname/img/devianart.png" ></a>";}
    if (!empty($urr['user_github']))
    {$git = "<a href="".sed_cc($urr['user_github'])."" target="_blank" rel="nofollow"><img width="54" height="54" src="plugins/socialname/img/github.png" ></a>";}
    if (!empty($urr['user_steam']))
    {$steam = "<a href="".sed_cc($urr['user_steam'])."" target="_blank" rel="nofollow"><img width="54" height="54" src="plugins/socialname/img/steam.png" ></a>";}
    if (!empty($urr['user_reddit']))
    {$reddit = "<a href="".sed_cc($urr['user_reddit'])."" target="_blank" rel="nofollow"><img width="54" height="54" src="plugins/socialname/img/reddit.png" ></a>";}
    if (!empty($urr['user_discord']))
    {$discord = "<a href="".sed_cc($urr['user_discord'])."" target="_blank" rel="nofollow"><img width="54" height="54" src="plugins/socialname/img/discord.png" ></a>";}
    if (!empty($urr['user_twitch']))
    {$twich = "<a href="".sed_cc($urr['user_twitch'])."" target="_blank" rel="nofollow"><img width="54" height="54" src="plugins/socialname/img/twitch.png" ></a>";}
    if (!empty($urr['user_msn']))
    {$skype = "<a href="skype:".sed_cc($urr['user_msn'])."" target="_blank" rel="nofollow"><img width="54" height="54" src="plugins/socialname/img/skype.png" ></a>";}
    $t-> assign(array(
    
    "USERS_DETAILS_FACEBOOK" => $face,
    "USERS_DETAILS_TWITTER" => $twit,
    "USERS_DETAILS_INSTAGRAM" => $insta,
    "USERS_DETAILS_PINTEREST" => $pin,
    "USERS_DETAILS_WHATSAPP" => $whats,
    "USERS_DETAILS_TELEGRAM" => $tele,
    "USERS_DETAILS_TUMBLR" => $tum,
    "USERS_DETAILS_YOUTUBE" => $you,
    "USERS_DETAILS_LINKEDIN" => $lin,
    "USERS_DETAILS_DEVIANART" => $dev,
    "USERS_DETAILS_GITHUB" => $git,
    "USERS_DETAILS_STEAM" => $steam,
    "USERS_DETAILS_REDDIT" => $reddit,
    "USERS_DETAILS_DISCORD" => $discord,
    "USERS_DETAILS_TWITCH" => $twich,
    "USERS_DETAILS_SKYPE" => $skype,
    ));
    
    }
    
    $allEmpty = empty($face) && empty($twit) && empty($insta) && empty($pin) && empty($whats) && empty($tele) && empty($tum) && empty($you) && empty($lin) && empty($dev) && empty($git) && empty($steam) && empty($reddit) && empty($discord) && empty($twich) && empty($skype);
    
    if ($allEmpty) {
    echo "YOK"; // veya istediğiniz bir mesajı burada gösterebilirsiniz
    }
    
    ?>
  • 03-12-2023, 17:40:29
    #5
    İkinize de teşekkürler şuan Yok yazıyor fakat ilgili yerde yazmıyor. Sayfanın en üstünde alakasız bir yerde yok yazıyor.
  • 03-12-2023, 17:42:45
    #6
    RaskolSerna adlı üyeden alıntı: mesajı görüntüle
    İkinize de teşekkürler şuan Yok yazıyor fakat ilgili yerde yazmıyor. Sayfanın en üstünde alakasız bir yerde yok yazıyor.
    ben bisey yapmadim @aliercan; arkadasimizin kodlari sadece ufak bir yalnis yaptiginiz seyi duzenledim

    CSS ile YOK yazisinin konumunu duzenliye bilirsiniz yapamazsaniz ozelden bana yaza bilirsiniz anydeskle baglanip 2 dk yaparim
  • 03-12-2023, 17:59:41
    #7
    RaskolSerna adlı üyeden alıntı: mesajı görüntüle
    İkinize de teşekkürler şuan Yok yazıyor fakat ilgili yerde yazmıyor. Sayfanın en üstünde alakasız bir yerde yok yazıyor.
    o kod yanlış, css ile alakası yok. doğrusu aşağıdadır tek tek else eklemek yerine farklı bir yol ile tanımladık

    if (!defined('SED_CODE')) { die('Wrong URL.'); }
     
    if($cfg['plugin']['socialname']['enabled']){
    $sqll = sed_sql_query("SELECT * FROM $db_users WHERE user_id='$id' LIMIT 1");
    $urr = sed_sql_fetcharray($sqll);
     
    if (!empty($urr['user_facebook']))
    {$face = "<a href=\"".sed_cc($urr['user_facebook'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/facebook.png\" ></a>";}
    if (!empty($urr['user_twitter']))
    {$twit = "<a href=\"".sed_cc($urr['user_twitter'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/twitter.png\" ></a>";}
    if (!empty($urr['user_instagram']))
    {$insta = "<a href=\"".sed_cc($urr['user_instagram'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/instagram.png\" ></a>";}
    if (!empty($urr['user_pinterest']))
    {$pin = "<a href=\"".sed_cc($urr['user_pinterest'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/pinterest.png\" ></a>";}
    if (!empty($urr['user_whatsapp']))
    {$whats = "<a href=\"".sed_cc($urr['user_whatsapp'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/whatsapp.png\" ></a>";}
    if (!empty($urr['user_telegram']))
    {$tele = "<a href=\"".sed_cc($urr['user_telegram'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/telegram.png\" ></a>";}
    if (!empty($urr['user_tumblr']))
    {$tum = "<a href=\"".sed_cc($urr['user_tumblr'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/tumblr.png\" ></a>";}
    if (!empty($urr['user_youtube']))
    {$you = "<a href=\"".sed_cc($urr['user_youtube'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/youtube.png\" ></a>";}
    if (!empty($urr['user_linkedin']))
    {$lin = "<a href=\"".sed_cc($urr['user_linkedin'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/linkedin.png\" ></a>";}
    if (!empty($urr['user_deviantart']))
    {$dev = "<a href=\"".sed_cc($urr['user_deviantart'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/devianart.png\" ></a>";}
    if (!empty($urr['user_github']))
    {$git = "<a href=\"".sed_cc($urr['user_github'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/github.png\" ></a>";}
    if (!empty($urr['user_steam']))
    {$steam = "<a href=\"".sed_cc($urr['user_steam'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/steam.png\" ></a>";}
    if (!empty($urr['user_reddit']))
    {$reddit = "<a href=\"".sed_cc($urr['user_reddit'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/reddit.png\" ></a>";}
    if (!empty($urr['user_discord']))
    {$discord = "<a href=\"".sed_cc($urr['user_discord'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/discord.png\" ></a>";}
    if (!empty($urr['user_twitch']))
    {$twich = "<a href=\"".sed_cc($urr['user_twitch'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/twitch.png\" ></a>";}
    if (!empty($urr['user_msn']))
    {$skype = "<a href=\"skype:".sed_cc($urr['user_msn'])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/skype.png\" ></a>";}
    
    /////////////
    foreach(array("face", "twit", "insta", "pin", "whats", "tele", "tum", "you", "lin", "dev", "git", "steam", "reddit", "discord", "twich", "skype") as $k) {
        if(!isset(${$k})) {
            ${$k} = $L['None'];
        }
    }
    /////////////
    
    $t->assign(array(
     
    "USERS_DETAILS_FACEBOOK" => $face,
    "USERS_DETAILS_TWITTER" => $twit,
    "USERS_DETAILS_INSTAGRAM" => $insta,
    "USERS_DETAILS_PINTEREST" => $pin,
    "USERS_DETAILS_WHATSAPP" => $whats,
    "USERS_DETAILS_TELEGRAM" => $tele,
    "USERS_DETAILS_TUMBLR" => $tum,
    "USERS_DETAILS_YOUTUBE" => $you,
    "USERS_DETAILS_LINKEDIN" => $lin,
    "USERS_DETAILS_DEVIANART" => $dev,
    "USERS_DETAILS_GITHUB" => $git,
    "USERS_DETAILS_STEAM" => $steam,
    "USERS_DETAILS_REDDIT" => $reddit,
    "USERS_DETAILS_DISCORD" => $discord,
    "USERS_DETAILS_TWITCH" => $twich,
    "USERS_DETAILS_SKYPE" => $skype,
    ));
     
    }
    ?>
    "USERS_DETAILS_FACEBOOK" => (isset($face) ? $face : $L['None']), şeklinde tek tek hepsine de eklenebilir, en üstteki tanımladıgı bölüme de benzeri yapılabilir. verdiğim kod daha kısa yolu.
  • 03-12-2023, 18:08:54
    #8
    hatta daha toparlanmış hali

    if (!defined('SED_CODE')) { die('Wrong URL.'); }
     
    if($cfg['plugin']['socialname']['enabled']){
        $sqll = sed_sql_query("SELECT * FROM $db_users WHERE user_id='$id' LIMIT 1");
        $urr = sed_sql_fetcharray($sqll);
    
        foreach(["facebook", "twitter", "instagram", "pinterest", "whatsapp", "telegram", "tumblr", "youtube", "linkedin", "devianart", "github", "steam", "reddit", "discord", "twitch", "skype"] as $k) {
            ${$k} = (!empty($urr["user_{$k}"]) ? "<a href=\"".sed_cc($urr["user_{$k}"])."\" target=\"_blank\" rel=\"nofollow\"><img width=\"54\" height=\"54\" src=\"plugins/socialname/img/{$k}.png\" ></a>" : $L['None']);
        }
    
        $t->assign(array(
            "USERS_DETAILS_FACEBOOK" => $facebook,
            "USERS_DETAILS_TWITTER" => $twitter,
            "USERS_DETAILS_INSTAGRAM" => $instagram,
            "USERS_DETAILS_PINTEREST" => $pinterest,
            "USERS_DETAILS_WHATSAPP" => $whatsapp,
            "USERS_DETAILS_TELEGRAM" => $telegram,
            "USERS_DETAILS_TUMBLR" => $tumblr,
            "USERS_DETAILS_YOUTUBE" => $youtube,
            "USERS_DETAILS_LINKEDIN" => $linkedin,
            "USERS_DETAILS_DEVIANART" => $devianart,
            "USERS_DETAILS_GITHUB" => $github,
            "USERS_DETAILS_STEAM" => $steam,
            "USERS_DETAILS_REDDIT" => $reddit,
            "USERS_DETAILS_DISCORD" => $discord,
            "USERS_DETAILS_TWITCH" => $twitch,
            "USERS_DETAILS_SKYPE" => $skype,
        ));
    }
  • 03-12-2023, 18:09:20
    #9
    @Neron;

    Maalesef kod hiç çalışmadı. ilk yolladığın.
    2.'yi henüz denemedim.