Malta'da çalışmak ister misiniz? Kariyer sayfasına bir gözatın!

Resim Upload php,( Adında Türkçe Karakter İçeren Resimlerin Görüntülenmemesi)

Şimdiden Cevaplar İçin Teşekkür Ederim...

Sorunum Şu Şekilde; Elimde bir script var. Bu scriptte üyeler jpg,gif vs. resim formatlarını paylaşım yapabiliyor. Yalnız resim adı örn. üööçı.jpg şeklinde olunca yükleniyor ama görüntülenmiyor. Form şu şekilde başlıyor.

<form method="POST" action="<?= URL::to('media') ?>" id="media-form" accept-charset="UTF-8" file="1" enctype="multipart/form-data">

ve biraz amatör olduğum için action kodu ile fonksiyonlara ulaşamadım. Yardımcı Olursanız Sevinirim.
Cevaplar (11)
1
Resim isimlerini db kayır ederken bu fonsiyondan geçirirsen bir problem olmaz
Bu fonksiyon metinlerdeki türkçe karekterleri boşlukları vs vs düzeltir
function seflink($string){
    $find = array('Ç', 'Ş', 'Ğ', 'Ü', 'İ', 'Ö', 'ç', 'ş', 'ğ', 'ü', 'ö', 'ı', '+', '#');
    $replace = array('c', 's', 'g', 'u', 'i', 'o', 'c', 's', 'g', 'u', 'o', 'i', 'plus', 'sharp');
    $string = strtolower(str_replace($find, $replace, $string));
    $string = preg_replace("@[^A-Za-z0-9\-_\.\+]@i", ' ', $string);
    $string = trim(preg_replace('/\s+/', ' ', $string));
    $string = str_replace(' ', '-', $string);
    return $string;
}
Örnek
echo seflink('şekerli çay içmek çok güzel.jpg');
Çıktısı
sekerli-cay-icmek-cok-guzel.jpg olarak db ye kayıt edilir
0
Hocam Cevap icin cok tesekkurler. Yalniz tam nasil yapmam gerekir yani db`mi ekleyeyim.
0
Yani affınıza sıgınarak soruyorum bu fonksiyondan nasil geciririm.
1
Estağfirullah nacizane izah etmiye çalışacağım
İlk olarak her sayfada çağırdığın ayar.php dosyana aşağıdaki kodları ekle
function seflink($string){
    $find = array('Ç', 'Ş', 'Ğ', 'Ü', 'İ', 'Ö', 'ç', 'ş', 'ğ', 'ü', 'ö', 'ı', '+', '#');
    $replace = array('c', 's', 'g', 'u', 'i', 'o', 'c', 's', 'g', 'u', 'o', 'i', 'plus', 'sharp');
    $string = strtolower(str_replace($find, $replace, $string));
    $string = preg_replace("@[^A-Za-z0-9\-_\.\+]@i", ' ', $string);
    $string = trim(preg_replace('/\s+/', ' ', $string));
    $string = str_replace(' ', '-', $string);
    return $string;
}
ikinci olarak
<form method="post" action="#" enctype="multipart/form-data">

<input name="resim" type="file" />
<input name="resim_yukle" type="submit" value="Resimleri Yüklemek için tıkla vs" /> 

</form>
    
Üyelerine basit bir resim yükleme ekranı verdin sayıyorum
Burada üye resimleri yüklemek için tıkla düğmesine basınca
php nin $_FILES["resim"]["name"] global değişkeni ile resmin adını alırsın bu global değişkeni seflink fonsiyonunun içine yazarsan resim dosyasının adındaki boşluk tükçr karekter vs hataları düzeltmiş olursun dahasonra ise kayıt işle başlatarak db (database) yanı veri tabanına kayır edrsin veritab nındaki isimler türçe karektersiz kayıt edildiği için problemsiz görüntülenir
 <?php 
 $resim_adi  = seflink($_FILES["resim"]["name"]);
?>

yani kod yapısı şu şekilde olmalıdır

 <?php 

//seflink fonksiyonunun kayıtlı olduğu ayar.php yi busayfaya çağırmayı unutma 

$resim_adi = seflink($_FILES["resim"]["name"]);//resim adını fosiyondan geçirdik
$resim_kaydet= mysql_query('INSERT INTO resimler SET uye_resim=$resim_adi'); //sonrada veri tabanına kayıt ettik

?>

<form method="post" action="#" enctype="multipart/form-data">

<input name="resim" type="file" />
<input name="resim_yukle" type="submit" value="Resimleri Yüklemek için tıkla vs" /> 

</form>

umarım becerebilmişimdir kolay gele
0
Cevap İçin Tekrardan Çok Teşekkürler Hocam... Yalnız sorunda burda belki acemi olduğum içindir bilemiyorum ama çağırabileceğim bir ayar.php yok. script olduğu için belkide...
Upload.php de şu şekilde
<?php include('includes/header.php'); ?>

<link rel="stylesheet" href="<?= URL::to('/') ?>/content/themes/default/assets/js/tagsinput/jquery.tagsinput.css" />

<div class="container main_home_container">

    <div class="col-md-8 col-lg-8">

        <form method="POST" action="<?= URL::to('media') ?>" id="media-form" accept-charset="UTF-8" file="1" enctype="multipart/form-data">
            
            <h2><i class="icon-cloud-upload"></i> <?= Lang::get('lang.upload') ?></h2>

            <input type="hidden" class="form-control" name="user_id" id="user_id" value="<?= Auth::user()->id ?>" />

            <input type="hidden" value="" name="delete_img" id="delete_img">

            <!-- Select between an image or a video -->
            <div class="btn-group vid-pic" data-toggle="buttons">
              <label class="btn btn-radio active">
                <input type="radio" name="pic" id="pic" checked> <i class="fa fa-picture-o"></i>  <?= Lang::get('lang.image') ?>
              </label>
              <label class="btn btn-radio vid-radio-btn">
                <input type="radio" name="vid" id="vid"> <i class="icon-film"></i> <?= Lang::get('lang.video') ?>
              </label>
            </div>

            <p><input name="title" class="form-control" type="text" id="title" placeholder="<?= Lang::get('lang.title') ?>"></p>

            <select name="category_id" id="category_id" class="form-control">
                <option value="1"><?= Lang::get('lang.select_category') ?></option>
                <?php foreach($categories as $category): ?>
                    <option value="<?= $category->id ?>"><?= $category->name ?></option>
                <?php endforeach; ?>
            </select>
           
            <div style="clear:both"></div>
            <div id="img_upload" style="margin-top:25px; margin-bottom:15px;">
                <i class="fa fa-picture-o" style="font-size:50px; color:#aaa; float:left"></i>
                <p style="margin-left:65px; margin-bottom:6px;"><input type="file" id="pic_url" name="pic_url"/></p>
                <h4 style="margin-left:65px; padding-top:0px;"><?= Lang::get('lang.or_enter_url') ?></h4>
                <p><input type="text" class="form-control" id="img_url" name="img_url" style="" placeholder="<?= Lang::get('lang.image_url') ?>" /></p> 
            </div>

            

            <div id="vid_upload" style="display:none; padding-left:100px; background:#f1f1f1; padding:15px; margin-top:15px; margin-bottom:15px;">
                <label for="vid_url">
                    <i class="icon-film" style="font-size:50px; color:#aaa; float:left"></i> 
                    <p style="margin-left:65px; margin-bottom:6px; font-weight:normal; margin-top:2px;"><?= Lang::get('lang.add_a_video') ?></p>
                    <h4 style="margin-left:65px; padding-top:0px; margin-top:8px;"><?= Lang::get('lang.add_video_types_below') ?>:</h4>
                </label>
                <p><input type="text" name="vid_url" class="form-control" id="vid_url" placeholder="<?= Lang::get('lang.add_url_here') ?>" /></p>
            </div>
            
            <?php if($settings->media_description): ?>
                <p><textarea name="description" class="form-control" id="description" placeholder="<?= Lang::get('lang.description') ?>"></textarea></p>   
            <?php endif; ?>

          
            
  <p style="margin:10px 0">
                <label for="nsfw"><?= Lang::get('lang.nsfw') ?></label>

                <?php if(isset($item->nsfw)): ?><?php $nsfw = $item->nsfw ?><?php else: ?><?php $nsfw = 0 ?><?php endif; ?>
                    <?= Form::checkbox('nsfw', '', $nsfw, array('class' => 'onoffswitch-checkbox', 'id' => 'nsfw')) ?>                      
                    
            </p>
          
            

            <input class="btn btn-color submit-media upload" id="upload" type="submit" value="<?= Lang::get('lang.submit') ?>">


        </form>

       

        <?php if ($errors->any()): ?>
        	<ul style="margin:0px; padding:0px;">
        		<?= implode('', $errors->all('<li class="error">:message</li>')) ?>
        	</ul>
        <?php endif; ?>

    </div>

    <?php include('partials/sidebar.php'); ?>

</div>

<script type="text/javascript" src="<?= URL::to('/') ?>/content/themes/default/assets/js/tinymce/tinymce.min.js"></script>
<script type="text/javascript" src="<?= URL::to('/') ?>/content/themes/default/assets/js/tagsinput/jquery.tagsinput.js"></script>

<?php if($settings->media_description): ?>
    <script type="text/javascript">
    tinymce.init({
        selector: "#description"
     });
    </script>
<?php endif; ?>

<script type="text/javascript">

    $(document).ready(function(){

        $('#tags').tagsInput();

        $('#img_url').keyup(function (){
            console.log($(this).val());
            if($(this).val() != ''){
                $('#pic_url').attr('disabled', 'true');
            } else {
                $('#pic_url').removeAttr('disabled');
            }
        });

        $('.vid-pic input').change(function(){
            if($(this).attr('id') == 'pic'){
                $('#img_upload').show();
                $('#upload_multiple_image').show();
                $('.drop_container').show();
                $('#import-fb').show();
                $('.img-drop').show();
                $('#vid_upload').hide();
            } else{
                console.log('hit');
                $('#vid_upload').show();
                $('#img_upload').hide();
                $('#upload_multiple_image').hide();
                $('#import-fb').hide();
                $('.img-drop').hide();
                $('.drop_container').hide();
            }
        });


        $('.submit-media').click(function(){
            $('#media-form').submit();
        });
    });
</script>
<script type="text/javascript" src="<?= URL::to('/') ?>/content/themes/default/assets/js/script_upload.js"></script>

<?php include('includes/footer.php'); ?>
1
Siz gerekli sayfayı eklemişsiniz. class yapınızı buraya eklerseniz medya kısmından gerkeli upload kısmına bu seflink fonksiyonunu ekleyip eklenecek olan dosyanın yeni ismini bu fonksiyon ile kaydedip veritabanınada yeni ismiyle kayıt edebilirsiniz.
0
Cevabınız İçin Teşekkür Ederim. Tam Olarak Nereye Eklemem Gerekli. Rica Etsem Detaylarmısınız.. Şimdiden Teşekkürler.
1
header.php'nin içinde include yada require ile bi class çekilmiş olması gerek onun içeriğini bi eklerseniz yardımcı olayım.
0
 <!DOCTYPE html>
<html>
<head>
    <?php $settings = Setting::first(); ?>
    <?php if(isset($item->title)): ?>
      <title><?= stripslashes($item->title) ?></title>
    <?php else: ?>
      <title><?= $settings->website_name ?> - <?= $settings->website_description ?></title>
    <?php endif; ?>

    <meta name="viewport" content="initial-scale=1">
    
    <link rel="stylesheet" href="<?= URL::to('/') ?>/content/themes/default/assets/css/bootstrap.min.css" />
    <link rel="stylesheet" href="<?= URL::to('/') ?>/content/themes/default/assets/css/font-awesome.min.css" />
    <link rel="stylesheet" href="<?= URL::to('/') ?>/content/themes/default/assets/css/animate.min.css" />
    <link rel="stylesheet" href="<?= URL::to('/') ?>/content/themes/default/assets/css/style.css" />
    <?= dynamic_styles($settings); ?>

    <link rel="icon" href="<?= Config::get('site.uploads_dir') . '/settings/' . $settings->favicon ?>" type="image/x-icon">
    <link rel="shortcut icon" href="<?= Config::get('site.uploads_dir') . '/settings/' . $settings->favicon ?>" type="image/x-icon">

    <!--[if lte IE 8]>
      <script type="text/javascript" src="<?= URL::to('/') ?>/content/themes/default/assets/js/respond.min.js"></script>
    <![endif]-->
    
    <script type="text/javascript" src="<?= URL::to('/') ?>/content/themes/default/assets/js/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="<?= URL::to('/') ?>/content/themes/default/assets/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="<?= URL::to('/') ?>/content/themes/default/assets/js/masonry.pkgd.min.js"></script>
    <script type="text/javascript" src="<?= URL::to('/') ?>/content/themes/default/assets/js/imagesloaded.pkgd.min.js"></script>
    <script type="text/javascript" src="<?= URL::to('/') ?>/content/themes/default/assets/js/jquery.infinitescroll.min.js"></script>
    <script type="text/javascript" src="<?= URL::to('/') ?>/content/themes/default/assets/js/jquery.sticky.js"></script>
    <script type="text/javascript" src="<?= URL::to('/') ?>/content/themes/default/assets/js/jquery.fitvid.js"></script>
    <script type="text/javascript" src="<?= URL::to('/') ?>/content/themes/default/assets/js/jquery.timeago.js"></script>
    
    <?php if(isset($item->title) && isset($item->pic_url)): ?>
      <meta property="og:title" content="<?= stripslashes($item->title) ?>"/>
      <meta property="og:url" content="<?= Request::url() ?>"/>
      <meta property="og:image" content="<?= Config::get('site.uploads_dir') . '/images/' . $item->pic_url ?>"/>
      <meta property="og:type" content="article" />

        <?php if(isset($item->description)): ?>
          <meta property="og:description" content="<?= strip_tags($item->description); ?>"/>
        <?php endif; ?>

      <meta itemprop="name" content="<?= stripslashes($item->title) ?>">
      <?php if(isset($item->description)): ?>
      <meta itemprop="description" content="<?= strip_tags($item->description); ?>">
      <?php endif; ?>
      <meta itemprop="image" content="<?= Config::get('site.uploads_dir') . '/images/' . $item->pic_url ?>">
    <?php endif; ?>
</head>
<body>

<nav class="navbar navbar-fixed-top" role="navigation">
    <div class="container">
      <!-- Brand and toggle get grouped for better mobile display -->
      <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
          <span class="sr-only"><?= Lang::get('lang.toggle_navigation') ?></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand logo" href="<?= URL::to('/') ?>"><img src="<?= Config::get('site.uploads_dir') . '/settings/' . $settings->logo ?>" style="height:35px; width:auto;" /></a>
      
        <div class="mobile-menu-toggle"><i class="fa fa-bars"></i></div>

          <!-- MOBILE NAV -->

            <div class="mobile-menu">

              <?php if(!Auth::guest()): ?>

                <?php $user_profile = ''; ?>
                <?php if(isset($user->username)): $user_profile = $user; endif; ?>

                <?php $user = Auth::user(); ?>
                <?php $user_points = DB::table('points')->where('user_id', '=', $user->id)->sum('points'); ?>
                <a href="<?= URL::to('user') . '/' . $user->username; ?>" class="usr-avatar"><img src="<?= Config::get('site.uploads_dir') ?>/avatars/<?= $user->avatar ?>" alt="<?= $user->username ?>" class="img-circle user-avatar-large"></a>
                <a href="<?= URL::to('user') . '/' . $user->username; ?>" class="username"><h2><?php if(strlen(Auth::user()->username) > 14): echo substr(Auth::user()->username, 0, 14) . '...'; else: echo Auth::user()->username; endif; ?></h2></a>
                <p class="points"><i class="fa fa-star" style="color:gold"></i> <?= $user_points ?> points</p>
                <div id="avatar-bg"></div>

              <?php endif; ?>

              <ul>
                <li class="<?php if(Request::is('/') || Request::is('category/*')){ echo 'active'; } ?>"><a href="<?= URL::to('/') ?>"><i class="fa fa-home"></i> <?= Lang::get('lang.home') ?></a></li>
               <li class="dropdown <?php if(Request::is('popular/*') || Request::is('popular')){ echo 'active'; } ?>">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-star"></i> <?= Lang::get('lang.popular') ?> <b class="caret"></b></a>
                <ul class="dropdown-menu">
                  <li><a href="<?= URL::to('popular/week') ?>"><?= Lang::get('lang.for_the_week') ?></a></li>
                  <li><a href="<?= URL::to('popular/month') ?>"><?= Lang::get('lang.for_the_month') ?></a></li>
                  <li><a href="<?= URL::to('popular/year') ?>"><?= Lang::get('lang.for_the_year') ?></a></li>
                  <li><a href="<?= URL::to('popular') ?>"><?= Lang::get('lang.all_time') ?></a></li>
                </ul>
               </li>
              
               <?php $categories = Category::orderBy('order', 'ASC')->get(); ?>

               <li class="dropdown">
                  <a href="#" class="dropdown-toggle categories" data-toggle="dropdown"><i class="fa fa-folder-open"></i> <?= Lang::get('lang.categories') ?> <b class="caret"></b></a>
                  
                  <ul class="dropdown-menu">
                      <li>
                          <?php foreach ($categories as $category): ?>
                            <a href="<?= URL::to('category') . '/' . strtolower($category->name) ?>"><?= $category->name ?></a>
                          <?php endforeach; ?>
                      </li>
                    </ul>
              </li>

              <?php if($settings->pages_in_menu): ?>
              <li class="dropdown <?php if(Request::is('pages/*') || Request::is('pages')){ echo 'active'; } ?>">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-file-text"></i> <?= $settings->pages_in_menu_text ?> <b class="caret"></b></a>
                <ul class="dropdown-menu">
                  <?php $pages = Page::orderBy('order', 'ASC')->get(); ?>
                  <?php foreach($pages as $page_link): ?>
                    <li><a href="<?= URL::to('pages') . '/' . $page_link->url ?>"><?= $page_link->title ?></a></li>
                  <?php endforeach; ?>
                
                </ul>
              </li>
              <?php endif; ?>

              <li><a href="<?= URL::to('/random') ?>"><i class="fa fa-random"></i> <?= Lang::get('lang.random') ?></a></li>

             </ul>

          <!-- END MOBILE NAV -->



        <ul class="nav navbar-nav navbar-right">
          <?php if(Auth::guest()): ?>
        
        
            <li class="<?php if(Request::is('login')){ echo 'active'; } ?>"><a href="<?= URL::to('login') ?>"><?= Lang::get('lang.sign_in') ?></a></li>
            
            <?php if($settings->user_registration): ?>
              <li class="<?php if(Request::is('signup')){ echo 'active'; } ?>"><a href="<?= URL::to('signup') ?>"><?= Lang::get('lang.sign_up') ?></a></li>
            <?php endif; ?>

          <?php else: ?>

          <?php $user_points = DB::table('points')->where('user_id', '=', Auth::user()->id)->sum('points'); ?>

          <li class="dropdown">
            <a href="#" class="user-menu dropdown-toggle" data-toggle="dropdown"><b class="caret"></b><div id="user-info"><h4><i class="fa fa-gear"></i> <?= Lang::get('lang.settings') ?></h4></div> </a>
            <ul class="dropdown-menu">
              <?php if(Auth::user()->admin): ?>
                <li><a href="<?= URL::to('admin') ?>" class="admin_link_mobile"><i class="fa fa-coffee"></i> <?= Lang::get('lang.admin') ?></a></li>
              <?php endif; ?>
              <li><a href="<?= URL::to('user') . '/' . Auth::user()->username; ?>"><i class="fa fa-user"></i> <?= Lang::get('lang.my_profile') ?></a></li>
              <li><a href="<?= URL::to('logout') ?>" id="user_logout_mobile"><i class="fa fa-power-off"></i> <?= Lang::get('lang.logout') ?></a></li>
            </ul>
          </li>
          <?php endif; ?>
          <?php if($settings->user_registration || !Auth::guest()): ?>
          <li><a href="<?= URL::to('upload') ?>" class="upload-btn"><i class="fa fa-cloud-upload"></i> <?= Lang::get('lang.upload') ?></a></li>
          <?php endif; ?>
        </ul>

        </div>
      </div>

      <!-- Collect the nav links, forms, and other content for toggling -->
      <div class="collapse navbar-collapse navbar-ex1-collapse">
      
      <ul class="nav navbar-nav navbar-left nav-desktop">
        <!--li><a href="#" id="categories_open"><i class="fa fa-th-list"></i> Categories</a></li-->
        <li class="<?php if(Request::is('/') || Request::is('category/*')) echo 'active'; ?>"><a href="<?= URL::to('/') ?>"><i class="fa fa-home"></i><span> <?= Lang::get('lang.home') ?></span></a><div class="nav-border-bottom"></div></li>
         <li class="dropdown <?php if(Request::is('popular/*') || Request::is('popular')){ echo 'active';  } ?>">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-star"></i><span> <?= Lang::get('lang.popular') ?> </span><b class="caret"></b><div class="nav-border-bottom"></div></a>
          <ul class="dropdown-menu">
            <li><a href="<?= URL::to('popular/week') ?>"><?= Lang::get('lang.for_the_week') ?></a></li>
            <li><a href="<?= URL::to('popular/month') ?>"><?= Lang::get('lang.for_the_month') ?></a></li>
            <li><a href="<?= URL::to('popular/year') ?>"><?= Lang::get('lang.for_the_year') ?></a></li>
            <li><a href="<?= URL::to('popular') ?>"><?= Lang::get('lang.all_time') ?></a></li>
          </ul>
        </li>
        
        <?php $categories = Category::orderBy('order', 'ASC')->get(); ?>

        <li class="dropdown">
            <a href="#" class="dropdown-toggle categories" data-toggle="dropdown"><i class="fa fa-folder-open"></i><span> <?= Lang::get('lang.categories') ?> </span><b class="caret"></b><div class="nav-border-bottom"></div></a>
            
            <ul class="dropdown-menu">
                <li>
                    <?php foreach ($categories as $category): ?>
                      <a href="<?= URL::to('category') . '/' . strtolower($category->name) ?>"><?= $category->name ?></a>
                    <?php endforeach; ?>
                </li>
              </ul>
       </li>

       <?php if($settings->pages_in_menu): ?>
       <li class="dropdown <?php if(Request::is('pages/*') || Request::is('pages')){ echo 'active'; } ?>">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-file-text"></i> <?= $settings->pages_in_menu_text ?> <b class="caret"></b></a>
          <ul class="dropdown-menu">
            <?php $pages = Page::orderBy('order', 'ASC')->get(); ?>
            <?php foreach($pages as $page_link): ?>
              <li><a href="<?= URL::to('pages') . '/' . $page_link->url ?>"><?= $page_link->title ?></a></li>
            <?php endforeach; ?>
          
          </ul>
        </li>
        <?php endif; ?>
      </ul>  

      <ul class="nav navbar-nav navbar-right">
        <li class="dropdown dropdownNotifi">
        <?php if(Auth::guest()): ?>
          <a href="#" class="dropdown-toggle" data-toggle="dropdown">
            <i class="fa fa-bell"></i>
          </a>
        <?php else: ?>
          <a href="#" class="dropdown-toggle readNotifi" data-toggle="dropdown">
            <i class="fa fa-bell"></i>
              <?php
                $notification = DB::table('notifications')->where('user_id', '=', Auth::user()->id)->take(10)->get();

                $notice = DB::table('notifications')->where('user_id', '=', Auth::user()->id)->where('is_read','=',0)->get();
                $count =  count($notice);?>
                  <?php if($count > 0): ?><span class="notifications"><?php echo $count ?></span><?php endif; ?>
          </a>
          <ul class="dropdown-menu">
            <?php 
              foreach ($notice as $value) {?>
                <li>
                  <a id="<?php echo $value->id ?>" href="<?php echo $value->url_comment; ?>">
                  <?php echo $value->content ?>
                  </a>
                </li>
            <?php } 
              foreach ($notification as $value) {?>
                <li>
                  <a id="<?php echo $value->id ?>" href="<?php echo $value->url_comment; ?>">
                  <?php echo $value->content ?>
                  </a>
                </li>
            <?php } ?>
          </ul>
        <?php endif; ?>
        </li>
        <li><a href="<?= URL::to('/random') ?>" class="random"><i class="fa fa-random"></i></a></li>
      <?php if($settings->user_registration || !Auth::guest()): ?>
        <li><a href="<?= URL::to('upload') ?>" class="upload-btn upload-btn-desktop"><i class="fa fa-cloud-upload"></i> <?= Lang::get('lang.upload') ?></a></li>
      <?php endif; ?>

      <?php if(Auth::guest()): ?>
      
          <li class="<?php if(Request::is('login')){ echo 'active'; } ?>"><a href="<?= URL::to('login') ?>" id="login-button-desktop"><?= Lang::get('lang.sign_in') ?></a><div class="nav-border-bottom"></div></li>
          <?php if($settings->user_registration): ?>
            <li class="<?php if(Request::is('signup')){ echo 'active'; } ?>"><a href="<?= URL::to('signup') ?>" id="signup-button-desktop"><?= Lang::get('lang.sign_up') ?></a><div class="nav-border-bottom"></div></li>
          <?php endif; ?>
      <?php else: ?>

      <?php $user_points = DB::table('points')->where('user_id', '=', Auth::user()->id)->sum('points'); ?>

        <li class="dropdown">
            <a href="#" class="user-menu user-menu-desktop dropdown-toggle" data-toggle="dropdown"><img src="<?= Config::get('site.uploads_dir') ?>/avatars/<?= Auth::user()->avatar ?>" class="img-circle" /><b class="caret"></b><div id="user-info"><h4><?php if(strlen(Auth::user()->username) > 8){ echo substr(Auth::user()->username, 0, 8) . '...';  } else { echo Auth::user()->username; } ?></h4><p><?= $user_points ?> <?= Lang::get('lang.points') ?></p></div> </a>
            <ul class="dropdown-menu">
              <?php if(Auth::user()->admin): ?>
                <li><a href="<?= URL::to('admin') ?>" class="admin_link_desktop"><i class="fa fa-coffee"></i> <?= Lang::get('lang.admin') ?></a></li>
              <?php endif; ?>
              <li><a href="<?= URL::to('user') . '/' . Auth::user()->username; ?>" class="user-profile-link-desktop"><i class="fa fa-user"></i> <?= Lang::get('lang.my_profile') ?></a></li>
              <li><a href="<?= URL::to('logout') ?>" id="user_logout_desktop"><i class="fa fa-power-off"></i> <?= Lang::get('lang.logout') ?></a></li>
            </ul>
          </li>

    <?php endif; ?>
    </ul>

  </div><!-- /.navbar-collapse -->
</div><!-- /.container -->
</nav>
<style type="text/css">
  .notifications{
    margin-top: -7px;
    display: inline-block;
    float: right;
  }
  .dropdownNotifi .dropdown-menu{
    display: none;
    opacity: 1!important;
    visibility: visible!important;
  }
</style>
<script type="text/javascript">
  $( document ).ready(function() {
    $('.dropdownNotifi').on('click', 'a.readNotifi', function(event) {
      event.stopPropagation();
      tc = $(this);
      var ID = tc.attr("id");
      $.ajax({
        type: 'POST',
        url : '/notification',
        data: {
        },
        success: function(response){
          $('.notifications').hide();
        }
      });
    });
  });
</script>


buyur bu şekilde hocam...
0
Var mıdır Yardım Edebilecek ?
0
bu da media.php

<?php include('includes/header.php'); ?>

<style type="text/css">
	.item-large{
		width:100%;
	}
</style>

<?php if(!Auth::guest() && (Auth::user()->admin == 1 || Auth::user()->id == $item->user_id)): ?>
	<link rel="stylesheet" href="<?= URL::to('/') ?>/content/themes/default/assets/js/tagsinput/jquery.tagsinput.css" />
<?php endif; ?>

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>


<?php $media = $item; ?>

<div class="container main_home_container single">

	<div class="single-left col-md-8 col-lg-8 col-sm-12">
		
		<div class="col-sm-12 item animated single-left" data-href="<?= URL::to('media') . '/' . $media->id ?>">

			<?php include('partials/media-item.php'); ?>

			<div style="clear:both"></div>

			<?php $media_url = URL::to('media') . '/' . $item->slug; ?>
		
			<div id="below_media">
				<div class="social-icons">
					<ul class="socialcount socialcount-large" data-url="<?= $media_url ?>" style="width:100%; position:relative; right:0px">
						<li class="facebook"><a href="https://www.facebook.com/sharer/sharer.php?u=<?= $media_url ?>" target="_blank" title="<?= Lang::get('lang.share_facebook') ?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=no,scrollbars=no,height=400,width=600');return false;"><span class="fa fa-facebook"></span><span class="count"><?= Lang::get('lang.like') ?></span></a></li>
						<li class="twitter" data-share-text="<?= $media->title ?>"><a href="https://twitter.com/intent/tweet?url=<?= $media_url ?>&text=<?= $media->title ?>" data-url="<?= $media_url ?>" title="<?= Lang::get('lang.share_twitter') ?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=no,scrollbars=no,height=400,width=600');return false;"><span class="fa fa-twitter" data-url="<?= $media_url ?>"></span><span class="count"><?= Lang::get('lang.tweet') ?></span></a></li>
						<li class="googleplus"><a href="https://plus.google.com/share?url=<?= $media_url ?>" target="_blank" title="<?= Lang::get('lang.share_google') ?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=no,scrollbars=no,height=400,width=600');return false;"><span class="fa fa-google-plus"></span><span class="count"><?= Lang::get('lang.plus_one') ?></span></a></li>
						<li class="pinterest"><a href="//www.pinterest.com/pin/create/button/?url=<?= $media_url ?>&media=<?= Config::get('site.uploads_dir') . '/images/' . $media->pic_url ?>&description=<?= $media->title ?>" title="<?= Lang::get('lang.pin_it') ?>" target="_blank" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=no,scrollbars=no,height=400,width=600');return false;"><span class="fa fa-pinterest"></span><span class="count"><?= Lang::get('lang.pin_it') ?></span></a></li>
					</ul>
				</div>

				<?php if(!Auth::guest()): ?>
					<?php $flagged = MediaFlag::where('user_id', '=', Auth::user()->id)->where('media_id', '=', $media->id)->first(); ?>
					<div class="media-flag pull-right border-radius <?php if(isset($flagged->id)): ?> active <?php endif; ?>" data-id="<?= $media->id ?>" style="margin-top:5px;"><i class="fa fa-flag"></i> <span class="media-flag-desc"><?php if(isset($flagged->id)): ?><?= Lang::get('lang.flagged') ?><?php else: ?><?= Lang::get('lang.flag_this') ?><?php endif; ?></span></div>
				<?php endif; ?>

				<?php if(isset($item->link_url) && $item->link_url != ''): ?>
					<a href="<?= $item->link_url ?>" target="_blank" class="label label-success" style="margin-top:6px;"><i class="fa fa-globe"></i> <?= Lang::get('lang.source') ?></a>
				<?php endif; ?>

				<?php if(!Auth::guest() && (Auth::user()->admin == 1 || Auth::user()->id == $item->user_id)): ?>
				
					<div class="edit-delete">
						<a href="#_" data-href="<?= URL::to('media/delete') . '/' . $item->id ?>" onclick="confirm_delete(this)" class="label label-danger"><i class="icon-trash"></i> <?= Lang::get('lang.delete') ?></a>
						<a href="#_" data-toggle="modal" data-target="#edit-modal" class="label label-warning"><i class="icon-edit"></i> <?= Lang::get('lang.edit') ?></a>
					</div>
				<?php endif; ?>
			</div>
		

			<div style="clear:both"></div>

			<h3 class="comment-type site active" data-comments="#current_comments"><?= Lang::get('lang.site_comments') ?> (<span class="current_comment_count site_comments"><?= $media->comments()->get()->count() ?></span>)</h3>
			<h3 class="comment-type facebook" data-comments="#facebook_comments"><?= Lang::get('lang.facebook_comments') ?> (<span class="current_comment_count"><fb:comments-count href="<?= Request::url() ?>"></fb:comments-count></span>)</h3>

			<div id="facebook_comments">
				<div class="fb-comments" data-href="<?= Request::url() ?>" data-width="660" data-numposts="5" data-colorscheme="light"></div>
			</div>

			<div id="current_comments">

				<div class="comment-submit">
					<?php if(Auth::guest()): ?>
						<h2 style="padding-left:0px; text-align:center;"><?= Lang::get('lang.sign_in_to_comment', array('before_signin' => '<a href="' . URL::to("login") . '">', 'after_signin' => '</a>', 'before_signup' => '<a href="' . URL::to("signup") . '">', 'after_signup' => '</a>')) ?></h2>
					<?php else: ?>
						<h5><?= Lang::get('lang.add_a_comment') ?></h5>
						<img src="<?= Config::get('site.uploads_dir') ?>/avatars/<?= Auth::user()->avatar ?>" class="user-avatar-small img-rounded" style="width:8.5%; margin-right:1.5%" /><textarea placeholder="<?= Lang::get('lang.write_comment_here') ?>" class="form-control" style="border-width:2px; width:90%;" id="comment"></textarea>
						<div class="btn pull-right btn-color" style="margin-top:15px;" id="comment-submit"><?= Lang::get('lang.post_comment_btn') ?></div><div style="clear:both"></div>
						<input type="hidden" name="media_id" id="media_id" value="<?= $media->id ?>" />
					<?php endif; ?>
				</div>
				<div style="clear:both"></div><br />
				<div class="comment-loop">
				<?php foreach($media->comments()->orderBy('created_at', 'desc')->get() as $comment): ?>

					<div class="comment comment-<?= $comment->id ?>">
						
						<?php if(!Auth::guest()): ?>
							<?php $user_vote = CommentVote::where('user_id', '=', Auth::user()->id)->where('comment_id', '=', $comment->id)->first(); ?>
						<?php endif; ?>

						<div class="comment_vote pull-left">
							<i class="fa fa-chevron-up vote-up <?php if(isset($user_vote->up) && $user_vote->up): ?> active <?php endif; ?>" data-commentid="<?= $comment->id ?>"></i>
							<p><?= $comment->totalVotes() ?></p>
							<i class="fa fa-chevron-down vote-down <?php if(isset($user_vote->down) && $user_vote->down == 1): ?> active <?php endif; ?>" data-commentid="<?= $comment->id ?>"></i>
						</div>

						<?php if(!Auth::guest()): ?>
							
							<div class="flag_edit_delete_comment">
								<a class="flag_comment" data-id="<?= $comment->id ?>"><i class="fa fa-flag"></i> + <span class="num_flags"><?= $comment->totalFlags() ?></span></a><?php if(Auth::user()->id == $comment->user_id  || Auth::user()->admin == 1): ?><a class="edit_comment" data-id="<?= $comment->id ?>"><i class="fa fa-edit"></i></a><a class="delete_comment" data-id="<?= $comment->id ?>"><i class="fa fa-trash-o"></i></a><?php endif; ?>
							</div>

						<?php endif; ?>

						<div class="comment_container border-radius" data-id="<?= $comment->id ?>">
							
							<a href="<?= URL::to('user') . '/' . $comment->user()->username ?>"><img src="<?= Config::get('site.uploads_dir') ?>/avatars/<?= $comment->user()->avatar ?>" class="user-avatar-small img-circle" /></a>
							<div class="comment_info">
								<p class="timeago" title="<?= date('F j, Y, g:i a', strtotime($comment->updated_at)) ?>"><?= date('F j, Y, g:i a', strtotime($comment->created_at)) ?></p>
								<h4><a href="<?= URL::to('user') . '/' . $comment->user()->username ?>"><?= $comment->user()->username ?></a> <?= Lang::get('lang.wrote') ?>:</h4>
							</div>
							<p class="comment_data"><?= $comment->comment ?></p>

						</div>
					</div>

				<?php endforeach; ?>
				</div>

			</div><!-- #current_comments -->

		</div>

	</div>


	<input type="hidden" id="user_media" name="user_media" value="<?php if(!Auth::guest() && Auth::user()->id == $item->user_id): ?><?= 'true' ?><?php else: ?><?= 'false' ?><?php endif; ?>" />
	<input type="hidden" id="user_id" name="user_id" value="<?php if(!Auth::guest()): ?><?= Auth::user()->id ?><?php else: ?>0<?php endif; ?>" />
	
	<?php include('partials/sidebar.php'); ?>

</div>


<script type="text/javascript" src="<?= URL::to('/') ?>/application/assets/js/imgLiquid-min.js"></script>
<?php include('partials/media-javascript.php'); ?>


<?php if(!Auth::guest() && (Auth::user()->admin == 1 || Auth::user()->id == $item->user_id)): ?>
	<?php include('partials/media-show-edit.php'); ?>
<?php endif; ?>
	
<?php include('includes/footer.php'); ?>
Cevap Yazın..

[code=css,php,sql,asp..]..kod..[/code] , [url=http:...com] , [img=resim linki]
[color=renk kodu]..yazı..[/color]

yabancı dizi izle dizi altyazı indir tv ünitesi