veedeoo 474 Junior Poster Featured Poster

Your codes looks ok. Make sure $tentID is defined or have value otherwise it will give you an undefined variable tenantID, and sql syntax error .

veedeoo 474 Junior Poster Featured Poster

Hi,

All you need to do is cascade your file input like this

<label>File One</label>
<input type="file" name="file[]" id="file[]">
<br/>
<label>File Two</label>
<input type="file" name="file[]" id="file[]">
<br/>
<label>File Three</label>
<input type="file" name="file[]" id="file[]">

<!-- add more as needed -->
veedeoo 474 Junior Poster Featured Poster

If you need to learn how to make your own plugin or just want to have a greater understanding on how the WP plugins are built, go to this site.

Before attempting to write your own, try adding your custom.js on the header. Sometimes lightbox and colorbox js files can have conflicts with other jquery files.

veedeoo 474 Junior Poster Featured Poster
veedeoo 474 Junior Poster Featured Poster

Ok, I will make an exemption ONLY this time.. next time, make sure to post question in the proper forum.

Step One: Create a php document

    <?php

        ## put your function here

        function getlink($x)
        {
        $y=$x.'.php';
        return($y);
        }

    ?>
    <!DOCTYPE HTML>
    <html>
    <head>
    </head>
    <body>
    <!-- set your iframe below You can add a default php page if your want-->
    <iframe id="myframe" src=""></iframe>
    <!-- call your php function and loop over items -->

    <?php
        $a=array('0','1','2','3','4');
        for($i=0;$i<5;$i++)
        {

         echo '<a href="javascript:loadintoIframe(\'myframe\', \''. getlink($a[$i]) .'\')">'. $a[$i] .'</a><br/>';
        }

     ## close your php
     ?>



    <script type="text/javascript">

    /***********************************************
    * IFrame SSI script II- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
    * Visit DynamicDrive.com for hundreds of original DHTML scripts
    * This notice must stay intact for legal use
    ***********************************************/

    //Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
    //Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
    var iframeids=["myframe"]

    //Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):
    var iframehide="yes"

    var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
    var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers

    function resizeCaller() {
    var dyniframe=new Array()
    for (i=0; i<iframeids.length; i++){
    if (document.getElementById)
    resizeIframe(iframeids[i])
    //reveal iframe for lower end browsers? (see var above):
    if ((document.all || document.getElementById) && iframehide=="no"){
    var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
    tempobj.style.display="block"
    }
    }
    }

    function resizeIframe(frameid){
    var currentfr=document.getElementById(frameid)
    if (currentfr && !window.opera){
    currentfr.style.display="block"
    if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
    currentfr.height …
veedeoo 474 Junior Poster Featured Poster

You will need to look for a reliable hosting company. This is the hosting company I used for developing video streaming applications.

I think they also have a ready to install FREE video streaming applications e.g. phpmotion, clic bucket, vidiscript and many others.

MORE INFO. NOT RELATED TO YOUR QUESTION
I was one of the developer of the vidiscript open-source version 1.0 to version 1.3, but that is the old version we wrote that is still being distributed by most ffmpeg hosting companies. I was able to released all the bug fixes two years ago 2010 and then it was followed by major fix for php 5.3+ in my last year release.

I wrote version 3.7 of the open source, but got really busy at my schooling, and then I have to trashed bin all of the 3.7 version because I want to write it as a video content management using my own mvc framework with an option of smarty, twig and tinybutstrong template engines. I am still on track for my projected release date by mid 2013. This will be called veedeoo scripts which is an open source.

veedeoo 474 Junior Poster Featured Poster

I would ask my hosting company first, for any changes they made on your server. It might be some major upgrades or changed of server appliance...e.g. apache to nginx or something similar.

veedeoo 474 Junior Poster Featured Poster

Hi,

You mean video and audio streaming?

You will need to have an ffmpeg, mp4 box, flvtool2,mencoder and mplayer, ffmpeg-php capable server. You can also look into red5 media server as an option.

Additional items you would need is a reliable flash player like the ones offered by jwplayer and flowmotion.

If you have a limited bandwidth on your hosting account, make sure to have your video metadata injected with flvtool2 (flv files only), for the h264 and mp4 you can move the moov atom in the front of the video, by using mp4box. These tools will allow you to pseudo-stream your contents without translating all the media file size into bandwidth consumptions.

Lastly, you will need to know all of the basics of ffmpeg-php and the basics ffmpeg encoding commands.

veedeoo 474 Junior Poster Featured Poster

Hi,

Did you try changing this

$query = mysql_query('SELECT description FROM events WHERE date = "'. $deets .'"');

to this?

$query = mysql_query('SELECT description, date FROM events WHERE date = "'. $deets .'"');
veedeoo 474 Junior Poster Featured Poster

Same thing here, want to see more elaboration on bus. logic. It all depends on how your script stored the binary info. of the image. Is it base64 encoded or just a plain binary? I am not sure, but I think most BLOB are base64 encoded.

Let us assume that is indeed a base64 encoded, then we can convert it by using fwrite(), or file_put_contents. I am not 100% sure with the file_put_contents though. I need to look it up.

Anyways, if my assumptions above are correct, then blob can be saved as a physical image by example codes below. This is not a tested approach, please consider this as an example and by no means an ultimate solution to your question.

   ## assuming that image is the column containing the BLOB
   $thisBlob = $row['image'];
   ## and the image extension is also stored in ext column
   $ext = $row['ext'];

   ## use fwrite() function
   $physicalFile = fopen('temporarylocation/newImage'. $ext ,"w");
   ## write the physical file
   fwrite($physicalfile, base64_decode($row['image']));

   fclose($physicalfile);

The file_put_contents method, I still have to experiment with it, because I have never done it before. I used it with simple xml and html files but not with BLOB.

UPDATE!

I just found out that some are not base64 encoded. If that is your case remove the base64_decode in the frwire() function.

veedeoo 474 Junior Poster Featured Poster

hi,

What you need is a javascript.

veedeoo 474 Junior Poster Featured Poster

I am not sure, try freelancer site and look for a guy who goes by name veedeoo... nooooooo, I am just kidding :)... I don't do freelance work anymore.

How big is your application?

veedeoo 474 Junior Poster Featured Poster

It is all about port 80, the windows just won't allow it. Check your firewall settings or whatever windows security they have. If you have a flash drive handy, and if interested in discovering other server apps, try portable nginx.. this is one fast server, but there is a limitation though nginx does not support .htaccess. I could help re-writing a minor .htaccess to nginx equivalent mod-rewrite. As long as it is not one full page..

veedeoo 474 Junior Poster Featured Poster

Hi,

The dreamweaver PHP test location should be directed to Drive:\xampp\htdocs\Your_dw_test_directory\

veedeoo 474 Junior Poster Featured Poster

Not the best, but a nice place to start discovering what ajax could do. There are are books called ajax for dummies and javascript and ajax for dummies that are pretty good for learning the ajax language. I always read these books at my local library.

veedeoo 474 Junior Poster Featured Poster

is this an apache server on linux ? Aside from running the server settings by default, did you modified any entries? If so, what are those entries..e.g. vhosts.conf, myPHPAdmin...etc.. Do you have .htaccess in or above that directory?

can you post the < directory /> part of your httpd.conf

example

<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
veedeoo 474 Junior Poster Featured Poster

Hi,

Try this..

    $password = md5($_POST['oldpass']);
    $newpassword = md5($_POST['newpass1']);
    $confirmnewpassword = md5($_POST['newpass2']);

plese try if it work, if it does let us know.

RaeesIqbal commented: thanx, it was a problem also. +0
veedeoo 474 Junior Poster Featured Poster

I am not telling you to be interested in an MVC and OOP solution, what I am trying to portray on my example is to get your coding practices organize. That's simple....it will help you in debugging later on..sorry though good luck..

veedeoo 474 Junior Poster Featured Poster

May I ask the OP, when you envision developing this site, did you write a barebone flowchart as to which file will include which one?

The reason I am asking is that, in a project of this size, there should be a file manager. For a much bigger one, there is file called director to direct all include and require requests of the scripts. Without these methods, it will be pretty hard to track down which files is needing another files.

A file manager is like a location map of your site. Similar to the one we see at the shopping complex. So, if page1.php needed to include page2.php, then page one must include the filemanager.php first, and include the page2.php. filemanger.php will take care of finding the page2.php. This is a common practice used in MVC framework and OOP.

Here is a simple filemanger-definition file based on Diafol's observed structure.

 ## not necessarily the first one, but let's define the directory separator
 define('DS', DIRECTORY_SEPARATOR);

 ## define the root directory where your script is going to run
 define('ROOT', dirname(__FILE__));
     ## define root directory files that will be included by another files
     // for example if the register.php is going to be included by another file, then it can be define as this
     define( 'REGISTER_FILE', ROOT.DS .'register.php' );

 ## define location of your includes directory
 define('INC_DIR', ROOT.DS .'includes');
     ## define files in include directory
     define('HEADER_PAGE', INC_DIR.DS .'header.php' );
     define('LOGIN_INC', INC_DIR.DS .'login.inc.php' );
     // add the rest of your files 
veedeoo 474 Junior Poster Featured Poster

That sucks dude, every time joomla release a new versions, it keeps on getting bigger and bigger. Their latest release is about 158MB on the disc, That is a huge load for simple corporate or publication websites. Unless, there are some really good features you cannot write in php, then I guess joomla is the choice.

However, if you will be creating a simple blog, or content management of some type you can easily write them in PHP. I was a big fan of these people e.g. joomla, wordpress and many other framework. Then I came to realized that their purpose behind all these, is to put everyone in the box, until nobody would ever think outside of this box they have created. The price we have to pay are our own ability to create, innovate, explore new ideas, and to be able to attain our maximum potential we possesed since birth. That reminds of "Allegory of the Cave" or the "Parable of the Cave".

Adding a background music to a page that loops is not that hard. If you will not be creating a publication sites like the time.com or forbes.com, I think a simple lightweight platform should be sufficient. For example, with minimal knowledge of PHP, MYSQL, SMARTY template engine, you can easily create an ultra lightweight application using the bootstrap. Bootstrap gives you every possible configuration of your site's design. Then just write the php part that will utilize the bootstrap via smarty template engine. Sometimes, thinking …

veedeoo 474 Junior Poster Featured Poster

what is ID2PDF v.2.6?

veedeoo 474 Junior Poster Featured Poster

hi,

ok, the permission problem is coming from the default template..By allowing the Atomic to default, creates problem in CHMOD or inability to write, even-though the /tmp directory is writtable.

You will have asked the publisher which template this module supports.

For some reason, overriding is not allowed and that would violate his TOS..

veedeoo 474 Junior Poster Featured Poster

ok, I could see it in my thumb server (both apache and nginx are displaying the same).. in the system information it is writtable.

Did you try connecting to your server using an FTP application like fileZilla?

Try connecting to your remote server using FTP appliance, and then right click on the tmp directory, click on file permission, set the permission to 0777 or 777 ..

Most servers running on Apache module as server API, they require to have 0777 or 777. However, servers running on su, fast CGI, CGI server API would allow 0755 or 755.

The loosy CHMOD is 777, so for testing purposes I think 777 is fine regardless if it is fast CGI or Apache module. However, for production site server API file permission recommendation should be followed at all times.

If you don't mind me asking, which module are you trying to install? is it an open source where we can do the testing also?, or it is propriety module?

veedeoo 474 Junior Poster Featured Poster

ok, on your joomla administration panel, does it have any permission settings option for the tmp directory?

Hold on le me run a joomla on my thumb server... let me see..

veedeoo 474 Junior Poster Featured Poster

if you are running xampp on windows, there is no permission requirement (most of the time), but in linux CHMOD is a requirement, even if you are running your application as root.

I just notice on your error notification

tmp/::name.hsh

it has Scope Resolution Operator (::), is it part of joomla syntax? or it just got there by accident?

veedeoo 474 Junior Poster Featured Poster

Dude,

Your controlled page does not check for any existing session. YOu need to validate if the session exist, before letting them in.

I hope I am making sense here.

veedeoo 474 Junior Poster Featured Poster

Hi,

on your function login, you can try setting the session for that username.

for example,

    if(mysql_num_rows($query)== 1){

    ## this user exists
    ## set session for this user
    session_start(); 

    $_SESSION['thisUser'] = $username;

    }

    else{

    ## do what you want to do on failed login

    }

You protection function on top of every pages can be as simple as this

    session_start();
    if(!isset($_SESSION['thisUser']) )

    {
    ## this user is not login send them to the login page, or wherever you deemed appropriate.

    header("location:login.php");
    die();

    }
    else{

    ## this is user is authenticated at the very least :).

        $user_isLogin = true;

        $user = $_SESSION['thisUser'];



    }

Warning! There are broader topics in web security, validation, and sanitization of data you must take into consideration, before sending this script to production site.

veedeoo 474 Junior Poster Featured Poster

You mean change this

$sql="name, price from table1";
echo "<tr><td>Name</td><td>>Price</td></tr>";
if ($result=mysql_query($sql)) {
while ($row=mysql_fetch_assoc($result)) {
echo "<td>".$row['name']."</td>";
echo "<td>".$row['price']."</td></tr>";}}

to this, right ?

$sql="select name, price from table1";
echo "<tr><td>Name</td><td>>Price</td></tr>";
if ($result=mysql_query($sql)) {

while ($row=mysql_fetch_assoc($result)) {
echo "<tr><td colspan=2>".$row['name'].",".$row['price']."</td></tr>";
}

}
veedeoo 474 Junior Poster Featured Poster

ok, I tried them and other IP's I found on other sites with similar service, but for some reason cURL would fail most of the time.

For the random IPs above, I've got 2 dead ones and one 403 with redirection. Codes I used is the same as your code above except I added this..

    curl_setopt($ch,CURLOPT_HTTPPROXYTUNNEL, 1);

We can also check if the cURL is reading something by passing the fetched data to a PHP function called stripos or even better pregmatch.

    if (preg_match("/html/i", $data)) {
        echo 'IP is alive';
} else {
    echo 'IP is dead';
}

## I have seen some other guys do it like this

  $countX = stripos($data,'</html>');   
  if($countX > 0 ){

  echo 'It is alive';

  }

  else{

  echo 'Not available';

  }

There is a class written by Stanislav in PHPclass.org that looks pretty promising. Another one is written by Alexey , this may need minor work, but it is looking pretty good because of the Ping functions, instead of sending the cURL right away.

UPDATE: I forgot mention there is a PHP exec that can be very helpful in knowing if the IP is alive or not. If you run this code..

        function GetPing($ip=NULL) {
             if(empty($ip)) {$ip = $_SERVER['REMOTE_ADDR'];}
             if(getenv("OS")=="Windows_NT") {
              $exec = exec("ping -n 3 -l 64 ".$ip);
              return end(explode(" ", $exec ));
             }
             else {
              $exec = exec("ping -c 3 -s 64 -t 64 ".$ip);
              $array = explode("/", end(explode("=", $exec )) );
              return ceil($array[1]) …
Resentful commented: Awesome solution! +1
veedeoo 474 Junior Poster Featured Poster

ok, you need to provide us with a sample IP:PORT. AT least three of them ..please don't give me more than 5. I get lazy right away..

like this 00.00.00.00:126 where: 126 is port and the zeros before it are part of the IP.

veedeoo 474 Junior Poster Featured Poster

Hi,

Updated: check this proxy API. It looks pretty easy to use.

veedeoo 474 Junior Poster Featured Poster

Hi,

Can you please shade more lights upon us. Are you trying to parse the contents of the url? Is that it?

veedeoo 474 Junior Poster Featured Poster

ok, here we go again. I am not going to provide any link because, for some reason the mp3 I would like to be the demo for this response is misbehaving badly :).

I only tested this on IE, because that is the only one I have at the moment.

Here we go, we can provide link from any page using this syntax

    <a href="mp3streamer.php?file=pinkfloyd">Pink Floyd </a>

Ok, just to remind you that the file name is up to you. YOu can rename your mp3 like mysterysong101.mp3, it does not matter.

Here is the script..

    <?php
    ## Warning! not tested in firefox ONLY in IE. This script triggers the windows media player.

    if(isset($_GET['file']) && (!empty($_GET['file']))){
     $thisMp3 = mp3Streamer($_GET['file'],'.mp3');
    }
    else{

    //nothing 

    }

    function mp3Streamer($title,$ext){

    ## define secret directory
    $loc = 'uploads/';

    ## based on the known vars we have the actual filename, location, and extension
    $actual_file = $loc.$title.$ext;
    ## mime types possible
    $mType = "  audio/mpeg3, audio/x-mpeg, audio/x-mpeg-3, audio/mpeg"; 
    ## we double check and make file exist
    if(file_exists($actual_file)){

    ## do as what we already know
        header('Content-type: {$mType}');
        header('Content-length: ' . filesize($actual_file));
        header('Content-Disposition: filename="'. $actual_file .'"');
        header('X-Pad: avoid browser bug');
        header('Cache-Control: no-cache');
        $mfile = readfile($actual_file);

        ## ! source src was left blank intentionally ##
        ###############################################

        $thisAudio = '<audio controls height="100" width="100">
      <source src="" type="audio/mpeg">
      <embed height="50" width="100" src="'.$mfile.'">
       </audio> ';
    die(); 
    }

    else{

    $thisAudio = 'not available';

    }

    return $thisAudio;

    }

    ?>

Good luck to you.. :)

veedeoo 474 Junior Poster Featured Poster

Sorry, I have to remove it my response. I think you already got it sorted out..

veedeoo 474 Junior Poster Featured Poster

Hi,

You need to dig into your desktop to see how the gmail plant the cookie pattern, and then create a regex for it to be able for you to parsed. Once you have done that, you can try adding codes below, before you close the cURL processes.

I know the regex for the gmail cookies, BUT I don't want to become responsible for any anomalies that may arise. This you must find it for yourself, and once you found out, do not share it...( It is felthy and not acceptable by any standards), because there is a great security risk involved here, not only on the GMAIL account, but also with other mail services that allows OATH login and integration.

Codes below if assembled will print cookie on your browser.. PLEASE READ MY DISCLAIMER.

    $cookieJar = array();
    preg_match_all('## put the pattern Here for the cookie ##', $result, $cookieJar);
    print_r($cookieJar['cookie']); 

Below is an exmaple of a yahoo cookie printed by the above codes.. It's a regular visit and nothing is manipulated for any purpose. This cookies has been derived for educational purposes only.

    Array ( [0] => B=3o5kdi58d3s73&b=3&s=bj; expires=Sat, 20-Dec-2014 16:52:51 GMT; path=/; domain=.yahoo.com ) Array ( [0] => Array ( [0] => Set-Cookie: B=3o5kdi58d3s73&b=3&s=bj; expires=Sat, 20-Dec-2014 16:52:51 GMT; path=/; domain=.yahoo.com ) [name] => Array ( [0] => B ) [1] => Array ( [0] => B ) [value] => Array ( [0] => 3o5kdi58d3s73&b=3&s=bj ) [2] => Array ( [0] => 3o5kdi58d3s73&b=3&s=bj ) [expires] => Array …
veedeoo 474 Junior Poster Featured Poster

ok, this is what I found out. This is what my brother Michael told me, and hes is working for the big G. What he told me "when there is a remote application accessing the atom, from unknown IP address, google will throw 401."

If you are getting this 401, all need to do is log-in to your gmail account. Look on top of the page for the red bar notification. The notification will say "Someone is trying to access your account from ....", What you could do at this point is to click on the red bar, and then if you recoginized the IP address to your server's IP in which the application is located, you have an option to allow it. This is just like a twitter OATH class.

Now, the dreaded security issues. Make sure no ONE BUT YOU have the access to your cURL script. The reason is that your password is exposed in plain text. I will not do this in shared hostings, unless I am pretty much aware of who are the other people currently hosted in the same very server, where the cURL script is running.

veedeoo 474 Junior Poster Featured Poster

If the site is requiring you to have cookies, then we can create a directory named tmp, this should be adjacent to your curl script.

    ## first we define a directory where to temporarilty store it

    $cookieDump = tempnam("tmp/", "cookies");

Now, add these to your cURL codes

curl_setopt($ch, CURLOPT_POST, 0); // Set this to 1 is it is a POST method
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookieDump);
## is the target server host uses SSL layer?
## turn these to true or false and false is 0
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);

If it does not work, try looking into the post data cURL function.

PHP code reference http://php.net/manual/en/function.tempnam.php

veedeoo 474 Junior Poster Featured Poster

@kashifbhatti,

You mean to say that the format process only took five seconds? If it is, then you have a better chance of recovering your data. The reason data can be recover during quick format is that the data are not being overwritten.

You must try the gparted tutorial.

veedeoo 474 Junior Poster Featured Poster

I guess we are locked out :). There must be a really big party going on in there and we are not invited :). ( I am just kidding of course, it could be something is wrong with the controller file). They will fix it for sure.

veedeoo 474 Junior Poster Featured Poster

Here is another one for you, it is called testDisk.

veedeoo 474 Junior Poster Featured Poster

Do as suggested by caperjack, and then on another computer boot from CD with a live copy of gparted, and then attempt to follow this instructions.

Another option that you may have is to use a software called GetDataBack . However, this application may only work (NOT guarantee), if you quick formatted the hard drive, you may still have chance, but for a normal formatting ( this is a complete overwrite), I could see the chance of getting your data back is pretty slim to none.

People who are trying to experiment with dual boot, should use gparted to create a new partition and then install the second OS to the newly created partition, but then installation question like installing it along the existing OS or replace the existing OS should be watched closely.

The tutorial is for the bad partition, but you still it is worth trying. Goog luck to you.

veedeoo 474 Junior Poster Featured Poster

Hi,

In html 5, if my memory can still serve me well, there is a function called "web storage" I am not pretty sure of the name, because I can't find a good search result on my desktop. However, this function can save the checked or any inputted data on the form. The browser can refreshed or can visit another page, but when you go back that page, you selection is still there as if the browser never left the page.

This question should be posted in javascript section, but since that you are already here, let's try to deal with this matter accordingly..

Copy these codes and modify it to your needs

    <!DOCTYPE html>
    <!-- doctype above is the minimum requirement for the html5 standard -->
    <head>
    <script >

    $(document).ready(function () {
        function init() {
            if (localStorage["cakes"]) {
                $('#cakes').thisradio(localStorage["cakes"]);
            }

        }
        init();
    });

    $('#radioselected').keyup(function () {
        localStorage[$(this).attr('cakes')] = $(this).thisradio();
    });

    $('#thisForm').submit(function() {
        localStorage.clear();
    });
    </script>
    </head>
    <body>

        <form id="thisForm" action="#" Method="post">
        <input type="radio" name="cakes" id="radioselected cakes" value="blackforest">Black Forest<br/>
        <input type="radio" name="cakes" id="radioselected cakes" value="darkforest">Dark Forest<br/>
        <input type="radio" name="cakes" id="radioselected cakes" value="vanila">Vanilla<br/>
        <input type="submit" value="submit">
        </form>



    </body>
    </html>

reference

veedeoo 474 Junior Poster Featured Poster

Ooops, My apology about that, I just got bored and I thought It would be nice if I show people how to do it. It is not a mandatory type of thing. I always believe, people should explore outside the box to be able to discover their maximum potential. I don't know, it's probably just me who think this way, and the rest fell in love in the cookie cutter type of uniformity. I like multitude of ideas that comes in different types and shapes without bounds.

But then, If you guys noticed the link I have provided on my first response, those are the links of all the plugins for embedding videos.

veedeoo 474 Junior Poster Featured Poster

Hi,

Please allow me to post another response.. I got bored reading some of the questions, let me evive this thread. Maybe we can learn something from this. Most importantly on how the wordpress plugins work.

Two years ago, I can pretty much write what I like to do with my wordpress. However, that was in the old version. I have a newer version, but I never bother writing plugins for my own use.

Writing a wordpress plugin is not that hard. As long as you follow what the codex instructions.

I will attempt to create a simple shortcode function plugin that will embed a youtube video on your wordpress article.. Yes, right here in Daniweb.com and right now :)..

First step: Creating a shortcode function is the easiest one in wordpress. Here we go, our simple youtube embedder shortcode.

save this file as ytembedder.php

    <?php 

       function AddYoutube($params = array()){
           extract(shortcode_atts(array(

             'vtitle'=>$vtitle,
             'vid' =>$vid,
             'width'=>$width,
             'height'=>$height), $params)
            );

       $youtube = '<iframe width="'.$width." height="'.$height.'" src="http://www.youtube.com/embed/'.$vid.'" frameborder="0" allowfullscreen></iframe>';

        return $youtube;
        }

        add_shortcode('vid', 'AddYoutube');

Save ytembedder.php inside your default theme dirctory.

  1. Open your default theme directory, and then find functions.php. Load this file to your editor. and add this code somewhere in the page,

    include_once('ytembedder.php');

but I prefer to add it on top section

  1. Save your changes..

  2. To add embedded video your post, just add the short code like this

     [vid vid=Vo_0UXRY_rY  width=580 height=380 vtitle=testing]
    

    Explanation:

    always start with vid followed by vid=YoutubeVideoId , width=PlayerWidth height=PlayerHeight …

veedeoo 474 Junior Poster Featured Poster

Hi,

Copy, paste to notepad, save as info.php, upload to your server.

    <?php
        phpinfo();

    ?>

Direct your browser to this file..

Look for the following setting values

        max_execution_time
        max_file_uploads
        max_input_time
        post_max_size

Let us know what you have..also what do you see on the

        Server API 

is it apache module or CGI/FastCGI?

veedeoo 474 Junior Poster Featured Poster

one last thing, if you want to load the HD version of the youtube video (ONLY IF Available), add this to the colorbox target url

        rel=0&amp;hd=1

Like this

    href="http://www.youtube.com/watch?v='. $row['id'] .'rel=0&amp;hd=1"

The implementation example of this hd attribute can be viewed here . Click on the 6th thumbnail below the player. That is the HD=1 of that particular video. By the way, this particular demo is called player targetting. The onclick event result is being passed into the target iframe to create the no-reload effects.

veedeoo 474 Junior Poster Featured Poster

here is a promising php class. Another one is the store locator with php and mysql. By combining all these, I am pretty sure you can achieved something, but not the true gps as what we see in our automobile.

more links for you to read

ajax related

From Info Windows to a Database: Saving User-Added Form Data

The google maps API articles library.

Special Project I found. If you know a little of python and java plus mysql, this is the project you may want to build someday

veedeoo 474 Junior Poster Featured Poster

I just updated my demo. To watch the video in the colorbox just click the thumbnail, to watch it on youtube, click on the play button below the thumbnail..

I hope this will help you to solve the problem you are trying to solve. Good luck to you..

veedeoo 474 Junior Poster Featured Poster

Hi,

if that is the case then you can use something like this..

    ## for example this is the while loop for the images, id, and title of your trailer.

    $query = "SELECT id,title, trailer_path, image FROM YOUR-DATBASE";

 while($row = mysql_fetch_array( $query )) {

 ## these are your images
 ## use trailer path or whatever column is holding the youtube video id
 ## this will create a popup

 echo '<a class='youtube' href="'. $row['trailer_path']" title="'. $row['title'] .'">';
 ## we use the thumbnail from youtube. The proper syntax in grabbing the thumbnail from youtube is like this per the API TOS.

 echo '<img width="155" height="150" src="http://i.ytimg.com/vi/'. $row['id'] .'/hqdefault.jpg" title="'. $row['title'] .'"/>';

 ## This button when click will take your visitor to youtube
 ## take a not of the proper url syntax.

 echo '<br/><a   href="http://www.youtube.com/watch?v='. $row['id'] .'"  class="button play"> Watch in Youtube </a><br/>';

 } 
 // end of while loop

What I have given you above is the full coding example of the trailer images page. If the image is clicked the trailer opens up in the colorbox, while a click on the button takes them to youtube.

The css for the button that will look like youtube's play button

    .button
{
        display: inline-block;
        white-space: nowrap;
        background-color: #ccc;
        background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#ccc));
        background-image: -webkit-linear-gradient(top, #eee, #ccc);
        background-image: -moz-linear-gradient(top, #eee, #ccc);
        background-image: -ms-linear-gradient(top, #eee, #ccc);
        background-image: -o-linear-gradient(top, #eee, #ccc);
        background-image: linear-gradient(top, #eee, #ccc);
        filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#eeeeee', EndColorStr='#cccccc');
        border: 1px solid #777;
        padding: 0 1.5em;
        margin: …
veedeoo 474 Junior Poster Featured Poster

Try suggestions above and then try obfuscating your html source with ioncube.It is free to download. This may not help you 100%, but parsing scripts will probably have to be rewrite before they can grab your page. Most copy cats are from parsed data using a parser.

If your html codes are obfuscated, then the parser will not be able to find the html tags of page.