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

[Help] Spinner text di php

Discussion in 'Pemrograman Web' started by teukualamsyah, Mar 28, 2018.

  1. teukualamsyah

    teukualamsyah Super Hero

    Joined:
    Nov 28, 2010
    Messages:
    1,292
    Likes Received:
    64
    Location:
    Bengkoeloe, Bengkulu, Indonesia, Indonesia
    Bismillah.

    mohon bantuan agan2 yang bisa php.

    saya mau buat artikel spin seperti ini :

    <?php echo $title; ?> - {Welcome|Encouraged|Pleasant|Delightful|Allowed} {to|in order to|to be able to|for you to|to help} {my|my personal|my own|our|the} {blog|weblog|website|website|blog site|blog}, {in this|with this|on this|within this|in this particular} {time|period|moment|occasion|time period} {I'll|I will|I am going to|I'm going to|We'll} {show you|demonstrate|explain to you|teach you|provide you with} {about|regarding|concerning|with regards to|in relation to} <?php echo $title; ?>. {And now|And today|Now|And after this|And from now on}, {this is the|this is actually the|here is the|this can be a|this can be the} {first|very first|initial|1st|primary} {image|picture|graphic|impression|photograph}

    sudah ikuti cara di sini :
    https://ads.id/forums/index.php?threads/membuat-spinner-text-menggunakan-php.62485/
    PHP:
    <?php
    $text 
    "This is {an amazing|a great|a wonderful|a perfect} {code|script}";
    $words explode("{",$text);
    foreach (
    $words as $word)
    {
        
    $words explode("}",$word);
        foreach (
    $words as $word)
        {
            
    $words explode("|",$word);
            
    $word $words[array_rand($words1)];       
            echo 
    $word." ";
        }
     
    }
    ?>


    tapi masalahnya error spin gak jalan karena ada kode ini <?php echo $title; ?>
    mungkin agan2 ada yang tau salahnya dimana? atau ada yg punya kode lain agar spinnya berjalan.

    mudah2an ada yang bantu. ana ucapkan terima kasih. Jazakumullah khoiron.
     
    Last edited: Mar 28, 2018
  2. AdhyKun

    AdhyKun Super Hero

    Joined:
    Jan 17, 2012
    Messages:
    821
    Likes Received:
    41
    Location:
    Bengkulu - Yogyakarta - Solo
    Coba untuk manggil titlenya di ganti jadi
    Code:
    get_the_title($post->ID)
    Untuk spintextnya biar lebih flexible d bikin function mungkin spt ini

    Code:
    function spintext ($text) {
       $ar_text = explode ('|',$text);
       shuffle ($ar_text);
       return $ar_text[0];
    }
    
    Code:
    $a = "amazing|great|wonderful|perfect";
    $b = "code|script";
    This is <?php spintext($a) . ' ' . spintext($b); ?>
     
  3. nuh0058

    nuh0058 New Comer

    Joined:
    Feb 28, 2016
    Messages:
    42
    Likes Received:
    1
    coba pakek yg ini hxxp://ads.id/forums/index.php?threads/share-php-spinner.73745/
     
  4. teukualamsyah

    teukualamsyah Super Hero

    Joined:
    Nov 28, 2010
    Messages:
    1,292
    Likes Received:
    64
    Location:
    Bengkoeloe, Bengkulu, Indonesia, Indonesia
    udah juga, malahan error gak mau kata yang pake tanda kutip atas seperti I'll.
     
  5. teukualamsyah

    teukualamsyah Super Hero

    Joined:
    Nov 28, 2010
    Messages:
    1,292
    Likes Received:
    64
    Location:
    Bengkoeloe, Bengkulu, Indonesia, Indonesia
    masih bingung step by step nya, apa bisa langsung gunakan text di bawah ini gan?

    <b><?php echo $title; ?> -</b> {Welcome|Encouraged|Pleasant|Delightful|Allowed} {to|in order to|to be able to|for you to|to help} {my|my personal|my own|our|the} {blog|weblog|website|website|blog site|blog}, {in this|with this|on this|within this|in this particular} {time|period|moment|occasion|time period} {I'll|I will|I am going to|I'm going to|We'll} {show you|demonstrate|explain to you|teach you|provide you with} {about|regarding|concerning|with regards to|in relation to} <?php echo $title; ?>. {And now|And today|Now|And after this|And from now on}, {this is the|this is actually the|here is the|this can be a|this can be the} {first|very first|initial|1st|primary} {image|picture|graphic|impression|photograph}:
     
  6. hadrianmh

    hadrianmh AdSense Pro

    Joined:
    Dec 26, 2013
    Messages:
    337
    Likes Received:
    40
    Location:
    depan laptop
    Script ini native non-framewok alias berdiri sendiri .. Ente menambahkan <?php the_title(); ?> utk apa? Function title wordpress? Trus inj {{keyword}} mw di apain gan?
     
  7. teukualamsyah

    teukualamsyah Super Hero

    Joined:
    Nov 28, 2010
    Messages:
    1,292
    Likes Received:
    64
    Location:
    Bengkoeloe, Bengkulu, Indonesia, Indonesia
    iya kodenya salah tulis mestinya pake yg ini gan <?php echo $title; ?>. Untuk webnya sendiri masih berbasis wordpress tapi sudah gak pake dashboard wordpress lagi. instalnya cuma upload ke server. nah isinya cuma gambar doang mau ditambahin artikel. single postnya seperti ini :
    PHP:
    <!DOCTYPE HTML>
    <html>
    <head>
            <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
       <meta http-equiv="X-UA-Compatible" content="IE=edge">
       <meta name="viewport" content="width=device-width, initial-scale=1">
       <?php
       
    echo ' <title>'.$title.'.'.$more_title.' - '.$judul.'</title> ';
       echo 
    '
           <meta name="google-site-verification" content="'
    .$google.'" />
           <meta name="description" content="'
    .$title.'.'.$more_title.'. '.$judul.'"/>
           <meta name="keywords" content="'
    .$title.'.'.$more_title.'. '.$judul.'"/>
    '
    ;
           echo 
    '<meta content="index,follow" name="robots" />'"\n";
           echo 
    '<meta content="2 days" name="revisit-after" />'"\n";
           echo 
    '<meta content="2 days" name="revisit" />'"\n";
           echo 
    '<meta content="never" name="expires" />'"\n";
           echo 
    '<meta content="always" name="revisit" />'"\n";
           echo 
    '<meta content="global" name="distribution" />'"\n";
           echo 
    '<meta content="general" name="rating" />'"\n";
           echo 
    '<meta content="true" name="MSSmartTagsPreventParsing" />'"\n";
           echo 
    '<meta content="index, follow" name="googlebot" />'"\n";
           echo 
    '<meta content="follow,all" name="googlebot-image"/>' "\n";
             echo 
    '<meta content="follow,all" name="msnbot"/>' "\n";
             echo 
    '<meta content="follow,all" name="alexabot"/>' "\n";
             echo 
    '<meta content="follow,all" name="ZyBorg"/>' "\n";
             echo 
    '<meta content="follow,all" name="Scooter"/>' "\n";
             echo 
    '<meta content="all,index,follow" name="spiders"/>' "\n";
             echo 
    '<meta content="all,index,follow" name="webcrawlers"/>' "\n";
             echo 
    '<meta content="all,index,follow" name="SLURP"/>' "\n";
             echo 
    '<meta content="all,index,follow" name="yahoobot"/>' "\n";
             echo 
    '<meta content="all,index,follow" name="bingbot"/>' "\n";
             echo 
    '<meta content="10" name="pagerank"/>' "\n";
             echo 
    '<meta content="100" name="alexa"/>' "\n";
             echo 
    '<meta content="1,2,3,10,11,12,13,ATF" name="serps"/>' "\n";
             echo 
    '<meta content="no" http-equiv="imagetoolbar"/>' "\n";
             echo 
    '<meta content="no-cache" http-equiv="cache-control"/>' "\n";
             echo 
    '<meta content="no-cache" http-equiv="pragma"/>' "\n";
             echo 
    '<meta content="Aeiwi, Alexa, AllTheWeb, AltaVista, AOL Netfind, Anzwers, Canada, DirectHit, EuroSeek, Excite, Overture, Go, Google, HotBot. InfoMak, Kanoodle, Lycos, MasterSite, National Directory, Northern Light, SearchIt, SimpleSearch, WebsMostLinked, WebTop, What-U-Seek, AOL, Yahoo, WebCrawler, Infoseek, Excite, Magellan, LookSmart, bing, CNET, Googlebot" name="search engines"/>' "\n";
             echo 
    '<link rel="canonical" content="' $domain$q .'/" />'"\n";
           echo 
    '<meta property="og:url" content="' $domain$q .'/" />'"\n";
           echo 
    '<meta property="og:image" content="' $metaimg.'/" />'"\n";
           echo 
    '<meta property="og:type" content="article" />'"\n";
           echo 
    '<meta property="og:site_name" content="'.$judul '" />'"\n";
           echo 
    '<meta property="og:title" content="' $title '" />'"\n";
           echo 
    '<meta property="og:description" content="'.$title.'.'.$more_title.'. '.$judul.'"/>'"\n";

    ?>
       <link rel="icon" type="image/jpg" href="/img/icon.jpg">

        <link href="https://fonts.googleapis.com/css?family=Asap:400,700,400italic,700italic" rel="stylesheet" type="text/css">
       <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
       <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
       <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
       <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
         
       <link href="<?php echo $domain;?>/lib/css/mov.css" rel="stylesheet" type="text/css">
       <link href="<?php echo $domain;?>/lib/css/style.css" rel="stylesheet" type="text/css">
     
            <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.7.1/modernizr.min.js" type="text/javascript"></script>
       <script src="<?php echo $domain;?>/lib/js/css3-mediaqueries.js" type="text/javascript"></script>

       <!--[if lt IE 9]>
           <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
           <script src="https://oss.maxcdn.com/respond/1.3/respond.min.js"></script>
       <![endif]-->
    </head>
    <body>
            <div class="container" >
               <div class="col-md-12 col-xs-12" align="right"></div>
               <b><a class="navbar-brand" href="/"><?php echo $judul?> </a></b><br/>
    &emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;
    <a href=' /about.php' . $extension . ' title="About" rel="nofollow"><b>About</b></a>
    &#160; &#x25CF; &#160;
    <a href=' /terms.php' . $extension . ' title="Terms" rel="nofollow"><b>Terms</b></a>
    &#160; &#x25CF; &#160;
    <a href=' /contact.php' . $extension . ' title="Contact" rel="nofollow"><b>Contact</b></a>
    &#160; &#x25CF; &#160;
    <a href=' /copyright.php' . $extension . ' title="Copyright" rel="nofollow"><b>Copyright</b></a></div>
    </div>
               </div>
         
           <div class="col-md-9 col-xs-12">
           <div class="navbar-header">
                    </div>

            </div><!-- container -->
    </div>
    <div class="container box-container" >
           <ol class="breadcrumb">
        <li><a href="/">Home</a></li>
        <li class="active"><a href="#"<?php echo $word?>/"><?php echo $title?></a></li>       
      </ol>
           <div class="col-md-8 col-xs-12">
                    <div class="row">
                            <div class="page-header text-center tittle h3">☑ <?php echo $title?></div>
                           <center><?php echo $ads_header?></center></br>
    <?php

    $i 
    0;
       foreach (
    $grab as $gm) {
           if(++
    $i==90) break;
           
    $key $gm['title'];
           
    $img $gm['imgsrc'];
           
    $key slugUri($key);
           include 
    dirname(__FILE__)."/inc/_filter.php";
           
    $key ucwords($key);
           
    $slug slugUri($key);

    echo 
    '               <div class="col-md-4 col-sm-5 col-xs-3">
                       <div class="movie-list text-center" data-toggle="tooltip" data-placement="top" title="'
    .$key.'">
                           <a href="#"'
    .$do.'/'.$slug.'">

    <style>
    img {
      width: normal ;
      max-width: 100% ;
      height: normal ;
    }
    </style>
    <img src="'
    .$img.'" alt="'.$key.'" height="120" width="200">
    <div class="row">
        <div class="col-lg-12">
                <a class="thumbnail" href="#" data-image-id="" data-toggle="modal" data-title="'
    .$key.'" data-caption=" " data-image="'.$img.'" data-target="#image-gallery">
                    <div class="label label-info movie-list-title nowrap">'
    .$key.'</div>
                </a>
            </div>
    </div>

    <div class="modal fade" id="image-gallery" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">X</span><span class="sr-only">Close</span></button>
                    <h4 class="modal-title" id="image-gallery-title"></h4>
                </div>
                <div class="modal-body">
                    <img id="image-gallery-image" class=" src="'
    .$img.'" alt="'.$key.'" height="340" width="570">
                </div>
                <div class="modal-footer">
    <center> <?php echo $ads_popup; ?></center>

                    <div class="col-md-6">
                        <button type="button" class="btn btn-primary" id="show-previous-image"><</button>
                    </div>
                 
                    <div class="col-md-1">
                        <button type="button" id="show-next-image" class="btn btn-default">></button>
                    </div>
                </div>
            </div>
        </div>
    </div>
                                                    </a>
                       </div>
                   </div> '
    ;
    }     

    }       
    ?>
    </div>
    </div>
                               <?php

    require_once(dirname(__FILE__) . "/inc/sidebar.php");
    ?>
                               </div>
                             
                           </div>
    <?php require_once(dirname(__FILE__) . "/inc/footer.php");?>
    nah mau ana masukin spin artikel yang posisinya seperti ini :
    <b><?php echo $title; ?> -</b> {Welcome|Encouraged|Pleasant|Delightful|Allowed} {to|in order to|to be able to|for you to|to help} {my|my personal|my own|our|the} {blog|weblog|website|website|blog site|blog}, {in this|with this|on this|within this|in this particular} {time|period|moment|occasion|time period} {I'll|I will|I am going to|I'm going to|We'll} {show you|demonstrate|explain to you|teach you|provide you with} {about|regarding|concerning|with regards to|in relation to} <?php echo $title; ?>. {And now|And today|Now|And after this|And from now on}, {this is the|this is actually the|here is the|this can be a|this can be the} {first|very first|initial|1st|primary} {image|picture|graphic|impression|photograph}:
     
    Last edited: Mar 28, 2018
  8. hadrianmh

    hadrianmh AdSense Pro

    Joined:
    Dec 26, 2013
    Messages:
    337
    Likes Received:
    40
    Location:
    depan laptop
    ente mw sisipinnya di line brp tuh teks spin nya? gambaran buat ente aja teks yg untuk di spin
     
    Last edited: Mar 28, 2018
  9. teukualamsyah

    teukualamsyah Super Hero

    Joined:
    Nov 28, 2010
    Messages:
    1,292
    Likes Received:
    64
    Location:
    Bengkoeloe, Bengkulu, Indonesia, Indonesia
    di sini gan line 99

    PHP:
    <!DOCTYPE HTML>
    <html>
    <head>
            <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
       <meta http-equiv="X-UA-Compatible" content="IE=edge">
       <meta name="viewport" content="width=device-width, initial-scale=1">
       <?php
       
    echo ' <title>'.$title.'.'.$more_title.' - '.$judul.'</title> ';
       echo 
    '
           <meta name="google-site-verification" content="'
    .$google.'" />
           <meta name="description" content="'
    .$title.'.'.$more_title.'. '.$judul.'"/>
           <meta name="keywords" content="'
    .$title.'.'.$more_title.'. '.$judul.'"/>
    '
    ;
           echo 
    '<meta content="index,follow" name="robots" />'"\n";
           echo 
    '<meta content="2 days" name="revisit-after" />'"\n";
           echo 
    '<meta content="2 days" name="revisit" />'"\n";
           echo 
    '<meta content="never" name="expires" />'"\n";
           echo 
    '<meta content="always" name="revisit" />'"\n";
           echo 
    '<meta content="global" name="distribution" />'"\n";
           echo 
    '<meta content="general" name="rating" />'"\n";
           echo 
    '<meta content="true" name="MSSmartTagsPreventParsing" />'"\n";
           echo 
    '<meta content="index, follow" name="googlebot" />'"\n";
           echo 
    '<meta content="follow,all" name="googlebot-image"/>' "\n";
             echo 
    '<meta content="follow,all" name="msnbot"/>' "\n";
             echo 
    '<meta content="follow,all" name="alexabot"/>' "\n";
             echo 
    '<meta content="follow,all" name="ZyBorg"/>' "\n";
             echo 
    '<meta content="follow,all" name="Scooter"/>' "\n";
             echo 
    '<meta content="all,index,follow" name="spiders"/>' "\n";
             echo 
    '<meta content="all,index,follow" name="webcrawlers"/>' "\n";
             echo 
    '<meta content="all,index,follow" name="SLURP"/>' "\n";
             echo 
    '<meta content="all,index,follow" name="yahoobot"/>' "\n";
             echo 
    '<meta content="all,index,follow" name="bingbot"/>' "\n";
             echo 
    '<meta content="10" name="pagerank"/>' "\n";
             echo 
    '<meta content="100" name="alexa"/>' "\n";
             echo 
    '<meta content="1,2,3,10,11,12,13,ATF" name="serps"/>' "\n";
             echo 
    '<meta content="no" http-equiv="imagetoolbar"/>' "\n";
             echo 
    '<meta content="no-cache" http-equiv="cache-control"/>' "\n";
             echo 
    '<meta content="no-cache" http-equiv="pragma"/>' "\n";
             echo 
    '<meta content="Aeiwi, Alexa, AllTheWeb, AltaVista, AOL Netfind, Anzwers, Canada, DirectHit, EuroSeek, Excite, Overture, Go, Google, HotBot. InfoMak, Kanoodle, Lycos, MasterSite, National Directory, Northern Light, SearchIt, SimpleSearch, WebsMostLinked, WebTop, What-U-Seek, AOL, Yahoo, WebCrawler, Infoseek, Excite, Magellan, LookSmart, bing, CNET, Googlebot" name="search engines"/>' "\n";
             echo 
    '<link rel="canonical" content="' $domain$q .'/" />'"\n";
           echo 
    '<meta property="og:url" content="' $domain$q .'/" />'"\n";
           echo 
    '<meta property="og:image" content="' $metaimg.'/" />'"\n";
           echo 
    '<meta property="og:type" content="article" />'"\n";
           echo 
    '<meta property="og:site_name" content="'.$judul '" />'"\n";
           echo 
    '<meta property="og:title" content="' $title '" />'"\n";
           echo 
    '<meta property="og:description" content="'.$title.'.'.$more_title.'. '.$judul.'"/>'"\n";

    ?>
       <link rel="icon" type="image/jpg" href="/img/icon.jpg">

        <link href="https://fonts.googleapis.com/css?family=Asap:400,700,400italic,700italic" rel="stylesheet" type="text/css">
       <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
       <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
       <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
       <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
        
       <link href="<?php echo $domain;?>/lib/css/mov.css" rel="stylesheet" type="text/css">
       <link href="<?php echo $domain;?>/lib/css/style.css" rel="stylesheet" type="text/css">
     
            <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.7.1/modernizr.min.js" type="text/javascript"></script>
       <script src="<?php echo $domain;?>/lib/js/css3-mediaqueries.js" type="text/javascript"></script>

       <!--[if lt IE 9]>
           <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
           <script src="https://oss.maxcdn.com/respond/1.3/respond.min.js"></script>
       <![endif]-->
    </head>
    <body>
            <div class="container" >
               <div class="col-md-12 col-xs-12" align="right"></div>
               <b><a class="navbar-brand" href="/"><?php echo $judul?> </a></b><br/>
    &emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;
    <a href=' /about.php' . $extension . ' title="About" rel="nofollow"><b>About</b></a>
    &#160; &#x25CF; &#160;
    <a href=' /terms.php' . $extension . ' title="Terms" rel="nofollow"><b>Terms</b></a>
    &#160; &#x25CF; &#160;
    <a href=' /contact.php' . $extension . ' title="Contact" rel="nofollow"><b>Contact</b></a>
    &#160; &#x25CF; &#160;
    <a href=' /copyright.php' . $extension . ' title="Copyright" rel="nofollow"><b>Copyright</b></a></div>
    </div>
               </div>
        
           <div class="col-md-9 col-xs-12">
           <div class="navbar-header">
                    </div>

            </div><!-- container -->
    </div>
    <div class="container box-container" >
           <ol class="breadcrumb">
        <li><a href="/">Home</a></li>
        <li class="active"><a href="#"<?php echo $word?>/"><?php echo $title?></a></li>      
      </ol>
           <div class="col-md-8 col-xs-12">
                    <div class="row">
                            <div class="page-header text-center tittle h3">☑ <?php echo $title?></div>
                           <center><?php echo $ads_header?></center></br>

    $text = $TITLE."{Welcome|Encouraged|Pleasant|Delightful|Allowed} {to|in order to|to be able to|for you to|to help} {my|my personal|my own|our|the} {blog|weblog|website|website|blog site|blog}, {in this|with this|on this|within this|in this particular}{time|period|moment|occasion|time period} {I'll|I will|I am going to|I'm going to|We'll} {show you|demonstrate|explain to you|teach you|provide you with} {about|regarding|concerning|with regards to|in relation to} ". $TITLE." {And now|And today|Now|And after this|And from now on}, {this is the|this is actually the|here is the|this can be a|this can be the} {first|very first|initial|1st|primary} {image|picture|graphic|impression|photograph}";

    <?php

    $i 
    0;
       foreach (
    $grab as $gm) {
           if(++
    $i==90) break;
           
    $key $gm['title'];
           
    $img $gm['imgsrc'];
           
    $key slugUri($key);
           include 
    dirname(__FILE__)."/inc/_filter.php";
           
    $key ucwords($key);
           
    $slug slugUri($key);

    echo 
    '               <div class="col-md-4 col-sm-5 col-xs-3">
                       <div class="movie-list text-center" data-toggle="tooltip" data-placement="top" title="'
    .$key.'">
                           <a href="#"'
    .$do.'/'.$slug.'">

    <style>
    img {
      width: normal ;
      max-width: 100% ;
      height: normal ;
    }
    </style>
    <img src="'
    .$img.'" alt="'.$key.'" height="120" width="200">
    <div class="row">
        <div class="col-lg-12">
                <a class="thumbnail" href="#" data-image-id="" data-toggle="modal" data-title="'
    .$key.'" data-caption=" " data-image="'.$img.'" data-target="#image-gallery">
                    <div class="label label-info movie-list-title nowrap">'
    .$key.'</div>
                </a>
            </div>
    </div>

    <div class="modal fade" id="image-gallery" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">X</span><span class="sr-only">Close</span></button>
                    <h4 class="modal-title" id="image-gallery-title"></h4>
                </div>
                <div class="modal-body">
                    <img id="image-gallery-image" class=" src="'
    .$img.'" alt="'.$key.'" height="340" width="570">
                </div>
                <div class="modal-footer">
    <center> <?php echo $ads_popup; ?></center>

                    <div class="col-md-6">
                        <button type="button" class="btn btn-primary" id="show-previous-image"><</button>
                    </div>
                
                    <div class="col-md-1">
                        <button type="button" id="show-next-image" class="btn btn-default">></button>
                    </div>
                </div>
            </div>
        </div>
    </div>
                                                    </a>
                       </div>
                   </div> '
    ;
    }    

    }       
    ?>
    </div>
    </div>
                               <?php

    require_once(dirname(__FILE__) . "/inc/sidebar.php");
    ?>
                               </div>
                            
                           </div>
    <?php require_once(dirname(__FILE__) . "/inc/footer.php");?>
     
  10. AdhyKun

    AdhyKun Super Hero

    Joined:
    Jan 17, 2012
    Messages:
    821
    Likes Received:
    41
    Location:
    Bengkulu - Yogyakarta - Solo

    Code:
    <?php
    function spintext ($text) {
       $ar_text = explode ('|',$text);
       shuffle ($ar_text);
       return $ar_text[0];
    }
    
    $a = "Welcome|Encouraged|Pleasant|Delightful|Allowed";
    $b = "to|in order to|to be able to|for you to|to help";
    $c = "my|my personal|my own|our|the";
    ?>
    
    <b><?php echo $title; ?> -</b> <?php echo spintext($a).' '.spintext($b).' '.spintext($c) ;?> dst....
    
     
  11. amrimf

    amrimf Super Hero

    Joined:
    Jul 4, 2009
    Messages:
    2,907
    Likes Received:
    170
    Location:
    Purwokerto
    Kalo bukan di WordPress, ya jangan pake <php the_title() ;>
     
  12. teukualamsyah

    teukualamsyah Super Hero

    Joined:
    Nov 28, 2010
    Messages:
    1,292
    Likes Received:
    64
    Location:
    Bengkoeloe, Bengkulu, Indonesia, Indonesia
    iya salah tulis gan kodenya pakai yg ini <?php echo $title; ?>
     
  13. teukualamsyah

    teukualamsyah Super Hero

    Joined:
    Nov 28, 2010
    Messages:
    1,292
    Likes Received:
    64
    Location:
    Bengkoeloe, Bengkulu, Indonesia, Indonesia
    ana mau masukkan kode ini <?php echo $title; ?> di tengah artikel, jadinya error gan.
    ana buat seperti ini :
    <b><?php echo $title; ?> -</b> <?php echo spintext($a).' '.spintext($b).' '.<?php echo $title; ?>.' '.spintext($c) ;?>

    ana buat seperti di bawah ini gak error tapi title gak muncul yg di tengah

    PHP:
    <?php
    function spintext ($text) {
       
    $ar_text explode ('|',$text);
       
    shuffle ($ar_text);
       return 
    $ar_text[0];
    }

    $a "Welcome|Encouraged|Pleasant|Delightful|Allowed";
    $b "to|in order to|to be able to|for you to|to help";
    $c "my|my personal|my own|our|the";
    $d "<?php echo $title; ?>";
    ?>

    <b><?php echo $title?> -</b> <?php echo spintext($a).' '.spintext($b).' '.spintext($d).' '.spintext($c) ;?>
    terus meletakkan titik dan koma di kalimatnya gimana gan?
    terima kasih sudah membantu.
     
    Last edited: Mar 29, 2018
  14. AdhyKun

    AdhyKun Super Hero

    Joined:
    Jan 17, 2012
    Messages:
    821
    Likes Received:
    41
    Location:
    Bengkulu - Yogyakarta - Solo
    salah itu penulisan codenya...
    Basic php-nya di pahami dulu gan...
     
  15. teukualamsyah

    teukualamsyah Super Hero

    Joined:
    Nov 28, 2010
    Messages:
    1,292
    Likes Received:
    64
    Location:
    Bengkoeloe, Bengkulu, Indonesia, Indonesia
    bingung gan belajarnya kadang sering gak nyambung.
     
  16. teukualamsyah

    teukualamsyah Super Hero

    Joined:
    Nov 28, 2010
    Messages:
    1,292
    Likes Received:
    64
    Location:
    Bengkoeloe, Bengkulu, Indonesia, Indonesia
    gimana kelanjutannya gan?

     
  17. teukualamsyah

    teukualamsyah Super Hero

    Joined:
    Nov 28, 2010
    Messages:
    1,292
    Likes Received:
    64
    Location:
    Bengkoeloe, Bengkulu, Indonesia, Indonesia
    seperti ini ya gan:
    PHP:
    <?php
    function spintext ($text) {
       
    $ar_text explode ('|',$text);
       
    shuffle ($ar_text);
       return 
    $ar_text[0];
    }

    $a "Welcome|Encouraged|Pleasant|Delightful|Allowed";
    $b "to|in order to|to be able to|for you to|to help";
    $c "my|my personal|my own|our|the";
    ?>

    <b><?php echo $title?> -</b> <?php echo spintext($a).' '.spintext($b).' '.$title.' '.spintext($c) ;?>
    kalau mau titik atau koma langsung masukkan seperti ini ya:

    $a = "Welcome|Encouraged.|Pleasant|Delightful.|Allowed";
    $b = "to|in order to,|to be able to|for you to,|to help";
    $c = "my|my personal|my own|our|the";
     
  18. AdhyKun

    AdhyKun Super Hero

    Joined:
    Jan 17, 2012
    Messages:
    821
    Likes Received:
    41
    Location:
    Bengkulu - Yogyakarta - Solo
    Gitu jg bisa... di coba" aja...
     
  19. teukualamsyah

    teukualamsyah Super Hero

    Joined:
    Nov 28, 2010
    Messages:
    1,292
    Likes Received:
    64
    Location:
    Bengkoeloe, Bengkulu, Indonesia, Indonesia
    ternyata jadi capek gan kalau mau buat 3 paragraf. luar biasa banyak variabelnya. satu kata satu variabel.

    sayang kode yang ini belum tau cara nyisipkan titlenya. dengan cara ini lebih praktis dan cepat.

    <?php
    $text = "This is {an amazing|a great|a wonderful|a perfect} {code|script}";
    $words = explode("{",$text);
    foreach ($words as $word)
    {
    $words = explode("}",$word);
    foreach ($words as $word)
    {
    $words = explode("|",$word);
    $word = $words[array_rand($words, 1)];
    echo $word." ";
    }

    }
    ?>
     
  20. punxs

    punxs musuhnya google

    Joined:
    Dec 9, 2010
    Messages:
    443
    Likes Received:
    47
    Location:
    Di Depan Mu
    script ini bekerja di area php mas bro, jadi jangan pakai <?php echo $title;?> lagi, tapi di gabungnya pakai tanda titik.
    kalau tidak salah line 99 punya mu sudah area php, karena line 98 sudah di buka tanda php nya (<?php)
    jadi masukin scriptsnya
    PHP:
    $title .' - {Welcome|Encouraged|Pleasant|Delightful|Allowed} {to|in order to|to be able to|for you to|to help} {my|my personal|my own|our|the} {blog|weblog|website|website|blog site|blog}, {in this|with this|on this|within this|in this particular} {time|period|moment|occasion|time period} {I\'ll|I will|I am going to|I\'m going to|We\'ll} {show you|demonstrate|explain to you|teach you|provide you with} {about|regarding|concerning|with regards to|in relation to} ' $title ' {And now|And today|Now|And after this|And from now on}, {this is the|this is actually the|here is the|this can be a|this can be the} {first|very first|initial|1st|primary} {image|picture|graphic|impression|photograph}';
    tulisan yg bukan php harus di pasang dalam tanda quote ( ' )atau double quote ( " ) dan di akhir pakai tan titik koma ( ; )
    tapi ingat kalau ada tanda quote di tulisanmu, harus di kasih tanda slash (\')
    di hubungkan dengan kode php pakai tanda titik.

    semoga paham dan sukses

    thanks
    regards
     

Share This Page