Jump to content

Eldar

New Members
  • Posts

    3
  • Joined

  • Last visited

Eldar's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, I've just started learning PHP, JavaScript and I've got a big problem on my website. I'm getting this ReferenceError. I know what's the problem, but I don't know how to solve it, and I know people can do it for money but I don't have money, I'm searching for someone who's willing to help newbie. As I said I'm begginer, and I know something. The main problem is because I want to use GKPlugin and Player(jwplayer). Plugin need to use object, example: <object id="flashplayer" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="600" height="400"> <param name="movie" value="player.swf" /> <param name="allowFullScreen" value="true" /> <param name="allowScriptAccess" value="always" /> <param name="FlashVars" value="plugins=plugins/proxy.swf&proxy.link=http://www.vidbull.com/53qx9uo10k5d" /> <embed name="flashplayer" src="player.swf" FlashVars="plugins=plugins/proxy.swf&proxy.link=http://www.vidbull.com/53qx9uo10k5d" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="600" height="400" /> </object> Script is generetad just to embed with iframe, and the problem is when I replace it with object, then I'm getting this error. I know that JS can't "call" that iframe to show because I've replaced it with object. You guys probably know about what I'm talking. I'm just searching for some instructions, guidelines from you. ReferenceError: embeds is not defined if (embeds[embedid].indexOf("rapidplayer")== iframe_ad){ Here's the rest of code, I think it's used to show iframe. elseif (substr_count($link,"gorillavid")){ $video_id = explode("/",$link); if (isset($video_id[count($video_id)-1])){ $video_id = $video_id[count($video_id)-1]; $embed = '<object id="flashplayer" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="600" height="400"> <param name="movie" value="http://www.kiinc.com/videott/player.swf" /> <param name="allowFullScreen" value="true" /> <param name="allowScriptAccess" value="always" /> <param name="FlashVars" value="plugins=http://www.kiinc.com/videott/plugins/proxy.swf&proxy.link=http://gorillavid.in/'.$video_id.'" /> <embed name="flashplayer" src="player.swf" FlashVars="plugins=http://www.kiinc.com/videott/plugins/proxy.swf&proxy.link=http://gorillavid.in/'.$video_id.'" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="600" height="400" /> </object>'; This is the original code. Don't look at providers(source as gorillavid) because I used gorillavid in previous an posted another example from another source (zalaa) elseif (substr_count($link,"zalaa")){ $video_id = explode("/",$link); if (isset($video_id[count($video_id)-1])){ $video_id = $video_id[count($video_id)-1]; $embed = '<IFRAME SRC="http://www.zalaa.com/embed-'.$video_id.'.html" FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=NO WIDTH='.$width.' HEIGHT='.$height.'></IFRAME>'; Function which embed links and should embed GKPlugin/Player: // general image link if (!$embed){ $embed = "<div style='background-color:#000000; width: ".$width."px; height: ".$height."px;text-align:center;cursor:pointer;' onclick='window.open(\"$link\");'>"; $embed.= "<p style='text-align:center; padding-top: 70px;'>"; $embed.= "<a href='$link' target='_blank' style='font-size:24px; color: #ffffff !important'>Click here to play this video</a>"; $embed.= "</p>"; $embed.= "</div>"; } return $embed; } JavaScript code: function getEmbed(embedid){ if (embeds[embedid].indexOf("rapidplayer")== iframe_ad){ var html_content = "<div class='fake_embed' id='fake_embed"+embedid+"' onclick='closeFakeEmbed("+embedid+");'>" + "<br /><br />" + "<div class='fake_embed_ad_close'><a href='javascript:void(0);' onclick='closeFakeEmbed("+embedid+");'>Close Ad</a></div>" + "<div class='fake_embed_ad' id='fake_embed_ad" + embedid +"'>" + "<iframe src='"+baseurl+"/iframe_ad.php' width='300' height='300' frameborder='NO' border='0'></iframe>" + "</div>" + "<div class='fake_embed_bar'><span class='fake_embed_bar_right'></span></div>" + "</div>" + "<div id='real_embed"+embedid+"' style='display:none'>"+embeds[embedid]+"</div>"; jQuery('#videoBox'+embedid).html(html_content); jQuery('#videoBox'+embedid).show(); } else { jQuery('#videoBox'+embedid).html(embeds[embedid]); jQuery('#videoBox'+embedid).show(); } } function countDown(embedid){ showCounter = showCounter-1; jQuery('span#counter').html(showCounter); if (showCounter>0){ showTimer = setTimeout('countDown('+embedid+');',1000); } else { showTimer = null; showCounter = 20; getEmbed(embedid); } } function changeEmbed(embedid, counter){ if (counter == 0){ jQuery('.embedcontainer').html(''); jQuery('.embedcontainer').hide(); getEmbed(embedid); } else { if (showTimer){ clearTimeout(showTimer); } showTimer = null; showCounter = counter; jQuery('.embedcontainer').html(''); jQuery('.embedcontainer').hide(); jQuery('#videoBox'+embedid).html(js_lang.ticker); jQuery('#videoBox'+embedid+' span#counter').html(showCounter); jQuery('#videoBox'+embedid).slideDown("slow"); showTimer = setTimeout('countDown('+embedid+');',1000); } /* jQuery('li.selected').removeClass('selected'); jQuery('#selector'+embedid).addClass('selected'); */ }
  2. $conf['name'] = 'INSERT HERE'; - > config file <input type="text" class="form_text" name="name" size="30" value="<?php echo $conf['name'] ?>"> - > install file How to make form in "install file" which will insert in config file where is currently 'INSERT HERE'
  3. Hi, guys, I'm learning PHP and I'm total beginner and I need help. Here's the problem, I have config.php in my website, I need to "update/edit" that file and it should be saved. Like installation for website. $conf = $TMPL = array(); $conf['host'] = 'localhost'; $conf['user'] = 'username'; $conf['pass'] = 'password'; $conf['name'] = 'name'; $conf['url'] = 'http://yourdomain.com'; $conf['mail'] = 'example@example.com'; I need PHP file which will insert and connect database, and insert mysql dump file (database.sql). In the config.php there are more code bellow, I would like to save that code to, just to edit upfront code. I've did something before and it delete all code bellow and insert the new code. If anyone can help me please.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.