Kleine Vragen Topic #1

Gestart doorLennard4.284 reacties15.585 weergaven

4.285 berichten · pagina 231 van 286

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nielsie schreef:
Eerdere citaten tonen
Shahiem schreef:
Eerdere citaten tonen
Nielsie schreef:
Eerdere citaten tonen
Jordyvc schreef:
Is het mogelijk om dit te doen met de Youtube API:
Als iemand iets intypt in een tekstveld, dat hij dan de eerste video laat zien die hij vind?
Bv. Je typt in PHP
en als je zo op youtube PHP intypt kom je op dit: klik. En de eerste video is "PHP Tutorials: Register & Login: User login (Part 1)" dat hij die dan laad en laat zien in een iFrame?

De eerste video is "What is PHP", Maar ja dat kan met de Youtube API gewoon?
Waar loop je vast? yummie
Had jij niet zo een optie waarmee je op embed vids ads kon hidden/verbergen? :G
Bassie*
Oke, biggrin Moet hem toch gelijk vragen naar zijn videoplayer n_n
0
Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php
$thisday[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]j[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$thisday[/COLOR] [COLOR= #007700]<[/COLOR] [COLOR= #0000BB]11[/COLOR][COLOR= #007700]) {[/COLOR]
    [COLOR= #0000BB]$maand[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]n[/COLOR][COLOR= #007700]);
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
    [COLOR= #0000BB]$maand[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]n[/COLOR][COLOR= #007700])+[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700];
}[/COLOR]


    [COLOR= #0000BB]$days[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"t"[/COLOR][COLOR= #007700]);[/COLOR]
    [COLOR= #0000BB]$daysLeft[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$days[/COLOR][COLOR= #007700]-([/COLOR][URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"j"[/COLOR][COLOR= #007700])-[/COLOR][COLOR= #0000BB]11[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"j"[/COLOR][COLOR= #007700]) <[/COLOR] [COLOR= #0000BB]11[/COLOR][COLOR= #007700]){[/COLOR]
        [COLOR= #0000BB]$days[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"t"[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/strtotime"]strtotime[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Y"[/COLOR][COLOR= #007700]).[/COLOR][COLOR= #DD0000]"-"[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"n"[/COLOR][COLOR= #007700])-[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]).[/COLOR][COLOR= #DD0000]"-01 00:00:00"[/COLOR][COLOR= #007700]);[/COLOR]
        [COLOR= #0000BB]$daysleft[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]11[/COLOR][COLOR= #007700]-[/COLOR][URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"j"[/COLOR][COLOR= #007700]);
    }[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$daysLeft[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]$days[/COLOR][COLOR= #007700])[/COLOR] [COLOR= #0000BB]$daysLeft[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR]
    [COLOR= #0000BB]$daysPast[/COLOR] [COLOR= #007700]-[/COLOR] [COLOR= #0000BB]$days[/COLOR][COLOR= #007700]-[/COLOR][COLOR= #0000BB]$daysLeft[/COLOR][COLOR= #007700];[/COLOR]
    [COLOR= #0000BB]$percentage[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/round"]round[/URL][COLOR= #007700](([/COLOR][COLOR= #0000BB]$daysPast[/COLOR]/[COLOR= #0000BB]$days[/COLOR][COLOR= #007700])*[/COLOR][COLOR= #0000BB]100[/COLOR][COLOR= #007700]);[/COLOR]


[COLOR= #0000BB]$pro[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$percentage[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]%[/COLOR][COLOR= #007700];[/COLOR]
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Hoelang nog...</title>
<link rel=stylesheet id=wpop_beback_theme-css  href=http://localhost/beback/style.css?ver=3.2.1 type=text/css media=screen />
<script type=text/javascript src=http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js></script>
<script type=text/javascript src=http://localhost/beback/js/jquery/jquery.js?ver=1.6.1></script>
<script type=text/javascript src=http://localhost/beback/js/jquery.progressbar.min.js?ver=3.2.1></script>
<script type=text/javascript src=http://localhost/beback/js/jquery.countdown.js?ver=3.2.1></script>
<script type=text/javascript src=http://localhost/beback/js/init.js?ver=3.2.1></script>

</head>
<script type="text/javascript">
var BeBack_Settings = {
  launchDate_year:  2013,
  launchDate_month: [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$maand[/COLOR] ?>,
  launchDate_day:   11,
  progressBoxImage: http://localhost/beback/images/progressbar-frame.gif ,
  progressBarImage: http://localhost/beback/images/progressbar-yellow.gif
};
</script>
<body>
<div class="container">
  <div class="logo">
  
  </div>  <div class="mainbox">
    <div class="progress">
      <h2>
        Hoelang duurd het nog voordat het de 11de is?
      </h2>
      <div class="progress-bar">
        <span class="progressBar" id="spaceused1">
               [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$pro[/COLOR] ?></span>
              </div>
      <h2>Countdown...</h2>
      <div class="launch-date">
        <div class="launch-date-display">
          <div class="month">[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$maand[/COLOR]?></div>
          <div class="day">11</div>
          <div class="year">2013</div>
        </div>
      </div>
      <div class="countdown">&nbsp;</div>
    </div>
  </div>
  <div class="intro">
    <div class="footer">
    <div class="copy">Copyright  [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Y[/COLOR][COLOR= #007700]);[/COLOR] ?> Hoelang nog?</div>
    <a id="wordspop" href="http://wordspop.com" title="Theme by Wordspop">Theme by Wordspop</a>  </div>
</div>
<script type=text/javascript src=http://localhost/beback/libs/wpop/assets/js/webfont-loader.js?ver=3.2.1></script>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push([_setAccount, UA-24328776-2]);
  _gaq.push([_trackPageview]);

  (function() {
    var ga = document.createElement(script); ga.type = text/javascript; ga.async = true;
    ga.src = (https: == document.location.protocol ? https://ssl : http://www) + .google-analytics.com/ga.js;
    var s = document.getElementsByTagName(script)[0]; s.parentNode.insertBefore(ga, s);
  })();

</script></body>
</html>


Demo: http://hoelangnog.eu5.org/

Zoals je ziet blijft ie 0% staan, wat is er fout aan het script?
Voorbeeld hoe het moet werken:

Als een maand 30 dagen duurd en het is nu de 15e dan is het aantal procenten dus 50%, op de 30ste 100% en op de 1e 0% hoe kan ik de andere dagen bereken? Ook wanneer de maand 29 dagen heeft etc.
0
Berichten
8.602
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
http://localhost/beback/libs/wpop/assets/js/webfont-loader.js?ver=3.2.1

???????????????????????????????????????????????????????????????????????
0
Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Milan schreef:
http://localhost/beback/libs/wpop/assets/js/webfont-loader.js?ver=3.2.1
???????????????????????????????????????????????????????????????????????

Fixed.
Aarclay schreef:
Ik weet niet wat er mis is met die HTML?

Maar
Afbeelding
*question
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Dat laatste kan je schrappen, want we zijn ontopic, als het nou over schoenveter strikken ging was het een ander verhaal.

Gebruik eerst eens gewoon de base-tag en link die naar jouw live locatie.
0
Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Waarom gebruiken als er geen linkjes in zitten?
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Omdat verwijzingen er ook onder vallen, en daar tel ik er zat van.....
0
Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Oké staat er in en weet nu ook waar het voor is.

toevoeging op 14 januari 2013, 20:08:05:
Maar waarom staat er nu dan nog 0%?
0
Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Sjoerd schreef:
http://hoelangnog.eu5.org/beback/js/jquery/jquery.js?ver=1.6.1 bestaat niet
En hoezo wil je 2 keer jQuery gebruiken? Je hebt al versie 1.4.2 via google, en nu wil je zelf 1.6.1 er bij zetten. Pak dan direct de 1.6.1 via Google..
Klopt, deze layout is volgens mij bedoeld voor wordpress maar heb dat er uit gehaald en ik ben dat vergeten.

toevoeging op 15 januari 2013, 18:02:39:
Maar iemand nog een idee waarom ie altijd op 0% blijft?
0
Berichten
11.263
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hoe laat je nu weer dingen herhalen met for loop?

[COLOR= #0000BB]<?php
$zin[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"deze zin wil ik laten herhalen"[/COLOR][COLOR= #007700];[/COLOR]

[URL="http://www.php.net/for"]for[/URL] [COLOR= #007700]() {[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$zin[/COLOR][COLOR= #007700];
}[/COLOR]
?>


Ik deed het altijd anders maar dit is veel korter.
biggrin bdankt
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
http://php.net/for

Cmon zeg emo
Spoiler tonen
[COLOR= #0000BB]<?php
$zin[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"deze zin wil ik laten herhalen"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/for"]for[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]<=[/COLOR] [COLOR= #0000BB]42[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$i[/COLOR][COLOR= #007700]++) {[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$zin[/COLOR][COLOR= #007700];
}[/COLOR]
?>
0
Berichten
8.602
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Wat is een goede PayPal api zodat gebruikers met creditcard en met PayPal saldo kunnen betalen?
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Sanderc schreef:
Hoe laat je nu weer dingen herhalen met for loop?
[COLOR= #0000BB]<?php
$zin[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"deze zin wil ik laten herhalen"[/COLOR][COLOR= #007700];[/COLOR]

[URL="http://www.php.net/for"]for[/URL] [COLOR= #007700]() {[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$zin[/COLOR][COLOR= #007700];
}[/COLOR]
?>


Ik deed het altijd anders maar dit is veel korter.
biggrin bdankt

Normale mensen die een onderdeel van de basis van php niet snappen zoeken gewoon op "for php" en dan kom je direct op de docs. Wees eens niet lui.

toevoeging op 17 januari 2013, 201353:
Milan schreef:
Wat is een goede PayPal api zodat gebruikers met creditcard en met PayPal saldo kunnen betalen?
De Paypal api die paypal je zelf bied? Ik dacht de paypal IPN api. Not sure.
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren