1. Halo Guest, pastikan Anda selalu menaati peraturan forum sebelum mengirimkan post atau thread baru.

Help!!! Cara Setting timthumb agar bisa tampilin gambar external host

Discussion in 'Wordpress' started by rofiaifa, Dec 31, 2012.

  1. rofiaifa

    rofiaifa Super Hero

    Joined:
    Sep 29, 2009
    Messages:
    1,330
    Likes Received:
    37
    Permisi para mastah semua, disini ane mohon bantuannya agan agan semua,

    ceritanya ane lagi mau nyoba bikin blog pribadi, tapi ada sedikit masalah yaitu tidak bisa tampilnya gambar thumbnail di home,
    gambar gambar tersebut emang di ambil direct dari photobucket, dan bisa tampil kalo postnya di buka.
    tapi kalo gambarnya langsung upload ke hosting, gambar gambar tersebut bisa tampil di thumbnail home.

    nah jadi ane mohon bantuannya gimana caranya biar gambar yg dari photobucket bisa tampil di thumbnail home.
    template yg ane gunakan pake file timthumb, dan ane udah search dan utak atik, tapi tetep aja, gambar yg dari photobucket tidak mau tampil di thumbnail.

    mohon bantuannya ya para mastah, ane udah bingung nih :swt:
     
    astroder and hadie87 like this.
  2. syalala

    syalala Super Hero

    Joined:
    Apr 6, 2010
    Messages:
    4,559
    Likes Received:
    1,003
    Location:
    semarang
    coba pake plugin ini bro wordpress.org/extend/plugins/thumbnail-for-excerpts/
     
    rofiaifa likes this.
  3. hadie87

    hadie87 Densus 99

    Joined:
    Sep 10, 2009
    Messages:
    5,920
    Likes Received:
    3,046
    Location:
    Baturaja, Indonesia
    Buka file timtumb.php nya, di situ nanti ada allowed external site. Tambahkan aja domain photobucket dishitu

    Sent using Tapatalk
     
    aksanza, rofiaifa and syalala like this.
  4. rofiaifa

    rofiaifa Super Hero

    Joined:
    Sep 29, 2009
    Messages:
    1,330
    Likes Received:
    37
    udah saya cob oom, tetep ga bisa keluar gambar yg dari photbucketnya
     
  5. rofiaifa

    rofiaifa Super Hero

    Joined:
    Sep 29, 2009
    Messages:
    1,330
    Likes Received:
    37
    udah di coba juga oom, tetep ga mau tampil ..
     
  6. limsoke

    limsoke Ads.id Fan

    Joined:
    Dec 26, 2012
    Messages:
    177
    Likes Received:
    10
    coba pakai cara ini ..
    buka theme editor index.php, taruh kode ini di bawah setelah <div class="post-content"> Ukuran width & height bisa di rubah sesuai selera sendiri /:)
    PHP:
    <div class="post-img">
    <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><img src="<?php echo get_post_image(); ?>" alt="<?php the_title(); ?>" width="150" height="100" /></a>
    </div>
    terus masuk Theme Functions (functions.php) paste kode ini
    PHP:
    ////////////////////////////////////////////////////////////////////////////////
    // Get Standard Post Image
    ////////////////////////////////////////////////////////////////////////////////
    function get_post_image() {
      global 
    $post$posts;
      
    $first_img '';
      
    ob_start();
      
    ob_end_clean();
      
    $output preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i'$post->post_content$matches);
      
    $first_img $matches [1] [0];

      if(empty(
    $first_img)){ //Defines a default image
          
    $img_dir get_bloginfo('template_directory');
        
    $first_img $img_dir '/images/post-default.jpg';
      }
      return 
    $first_img;
    }
    catatan untuk images/post-default.jpg (upload gambar default di wp-content/themes/nama-theme-kamu/ jika dalam posting tidak ada gambar, external atau internal)
    copy paste kode di bawah ini di style.css
    PHP:
    .post-img{overflow:hidden;float:left}
    .
    post-img img{border:5px solid #E2E2E2;margin-right:8px;margin-top:5px;margin-bottom:5px}
    silahkan save theme dan lihat hasilnya.../:)

    Semoga bisa membantu

    Regard's
     
  7. astroder

    astroder Super Hero

    Joined:
    May 4, 2010
    Messages:
    1,198
    Likes Received:
    57
    Location:
    Tepat samping rumah pak lurah
    ini yang lagi ane cari kebetulan banget, makasih gan
     
  8. panji24

    panji24 Newbie

    Joined:
    Mar 6, 2013
    Messages:
    24
    Likes Received:
    1
    Location:
    Bandar Lampung
    <div class="post-content"> di index.php ane gak ada, bos. (public_html/wp-content/themes/SensAzon WPRobot). Di mana letaknya, ya.. ?
     
  9. java09

    java09 Jujur = Sukes

    Joined:
    May 27, 2010
    Messages:
    1,412
    Likes Received:
    36
    Location:
    Tulungagung
    kontak cs hostnya om biasanya harus aktifin dulu dri pihak hosting terutama di hostgator dan jangan lupa di file thimthumb.php nya baris all_external... di Allow
    kemarin ane jga seperti itu di kasih tau Aa' hadie danker harus ngaktifin alhasil selesai.
     
  10. limsoke

    limsoke Ads.id Fan

    Joined:
    Dec 26, 2012
    Messages:
    177
    Likes Received:
    10
    theme itu kan dah ada thimthumb nya semua posting keluar imagenya bos coba sambil cek di functions.php ..

    klo pakai yg di atas mesti rombak tuh theme nya, ane klo pakai theme itu langsung keluar, tanpa edit theme

    coba cek bagian ini di theme ente SensAzon WPRobot
     
  11. krozbonek

    krozbonek Krozden

    Joined:
    May 28, 2010
    Messages:
    394
    Likes Received:
    7
    Location:
    Surabaya
    Pake custom field juga bisa gan :D
    hxxp://codex.wordpress.org/Custom_Fields

    kalau tertarik pm ya gan, nanti ane buat tutorialnya.
     
  12. panji24

    panji24 Newbie

    Joined:
    Mar 6, 2013
    Messages:
    24
    Likes Received:
    1
    Location:
    Bandar Lampung
    Iya, bos yang ini <p><span class="thumb-img"><?php if (image_by_scan('TRUE')) : ?>
    <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php my_post_thumbnail(250,220); ?></a> ada. Terus di gimanain lg?
     
  13. cyberworlds

    cyberworlds Hero

    Joined:
    Feb 20, 2012
    Messages:
    621
    Likes Received:
    35
    Location:
    M A K A S S A R KOTA DAENG
    ini yang saya cari. thanks mastah dah share trikmya. agar tidak makan ruang di hosting
     

Share This Page