Haloo! Selamat Datang di Komunitas Private Training Web Development (49190 Members, 475 Projects, 3801 Topic, 10287 Comments)

Butuh karyawan baru? atau seorang Web Developer (Part-time/Freelance/Full-time), cari disini : Members Area Jobs!
Sintax meta property tidak terdeteksi saat saat di share di media sosial, jika uri 1 dan uri 2 dihilangkan.
Adrie saputra Mengatakan : Members -
Rate Topic :
  1. Assalamualaikum Warahmatullahi Wabarakatuh...
  2.  
  3. <?php if ($this->uri->segment(1) == 'berita' and $this->uri->segment(2) == 'detail') {
  4. $rows = $this->model_utama->view_where('tbl_berita', array('judul_seo' => $this->uri->segment(3)))->row_array();
  5. echo ' <meta property="fb:app_id" content="370055223146291" />
  6. <meta property="og:title" content="' . $title . '" />
  7. <meta property="og:type" content="article" />
  8. <meta property="og:url" content="' . base_url() . ' ' . $this->uri->segment(3) . '" />
  9. <meta property="og:image" content="' . base_url() . 'assets/img_post/' . $rows['gambar'] . '" />
  10. <meta property="og:description" content="' . $description . '"/>';
  11. }
  12. ?>
Adrie saputra Mengatakan :
Members -
  1. Assalamualaikum,..
  2. Apakah karena update ini pak Roby :
  3. - URL Berita menjadi 1 Segment (Similar to wordpress)

Robby Prihandaya Mengatakan :
Admin -
  1. Assalamualaikum,.. iya benar masalahnya disana, ganti jadi seperti ini saja mas :
  2. <?php
  3. $berita = $this->model_utama->view_where('berita',array('judul_seo' => $this->uri->segment(1)));
  4. if ($berita->num_rows()>=1){
  5. $rows = $berita->row_array();
  6. echo '<meta property="og:title" content="'.$title.'" />
  7. <meta property="og:type" content="article" />
  8. <meta property="og:url" content="http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'" />
  9. <meta property="og:image" content="'.base_url().'asset/foto_berita/'.$rows['gambar'].'" />
  10. <meta property="og:description" content="'.$description.'"/>';
  11. }
  12. ?>

Maaf, Untuk Memberikan Komentar Anda Harus Login !!!