Arkadaşlar Elimde Vıdeo Script i Var Upload Klasörünün İçindekileri dizine Attım Yalnız Subdomain e MySQL de Veri Tabanı Oluşturdum cb_new_install.sql Dosyasını SQL den İçeri Aldım Kurulumda Yazan Yerlerde Belirtilen Dosyaların Cmod Değerlerini 777 Yaptım Siteye Girdiğimde Basedir is incorrect, please set the correct basedir value in 'config' tableYazıyor Şimdi Ben Şunu Anlıyamadım ;
1-
includes Dosyasının İçinde functions.php i Nasıl Çevirecem Yani Kullanıcı Adı Şifreyi
Bakın Ben Buraya Yazayım Siz Gerekli Yerleri Kullanıcı Adı Şifre Olarak Yazabilirmisinniz
2- Bide Kurulumu Anlatan Dosyada
Sql Dumping & Database Settings
Create a database and Import the 'clipbucket_lite.sql' from Sql folder
Now edit values in 'config' table as
'base_dir' to relative path to directory where clipbucket is installed ie /home/username/public_html (without trailing slash "/" at the end )
'base_url' to direct url to website where clipbucket is installed ie http://www.clip-bucket.com (without trailing slash "/" at the end )
Now Edit 'includes/dbconnect.php' as
$BDTYPE = 'mysql';
$DBHOST = 'localhost' ; Change the Host (Default Host is localhost so you may not need to change this)
$DBNAME = 'dbname'; Change this to the name of the database you created for clipbucket
$DBUSER = 'dbuser'; Change this to the username of the databse you assigned to the clipbucket
$DBPASS = 'password'; Change it to the password of the database
now your website is almost ready to go, but you have to change some settings from the Administrator Panel
Settings In Admin Panel
First You have to access to the admin panel and by using this url http://yourwebsites.com/admin_area
Enter username and password to login as Super Admin
username : admin
password : admin
After Logging in go to Super Admin Settings
Change the username and pass to whatever you want, but make is so complicate so that no one able to guess it
Now Create an Admin by clicking 'Add Member' found under User Management Menu
Fill The Form and Set its User Access Level to Admin and Submit it, and use this user as Admin
NOTE : DO NOT PERFORM ANY ACTION OTHER THAN USERMANAGMENT USING SUPERADMIN
Now logout and Login as Your newly created admin
Setting Website Configurations
Website Settings
Website Title "Your Website Title" ie "Best Website"
Website Slogan ie "We Are The Best";
Website Closed (If You Are Editing or Doing Maintenance) Yes/No
Website Closed Message is Displayed When You Have Closed Your Website
Set Meta Description according to your website content
Set Meta Keywords According to your website Content
Turn on/of SEO Url
Paths
FFMPEG Binary Path (Set FFMPEG path, where FFMPEG is installed)
FLVTool2 Path (Set Flv Tool 2 Path)
Mencoder Path (Set Mencoder Path)
Mplayer Path (Set Mplayer Path)
PHP Path ( Set PHP Path)
Video, Uploading and Conversion Settings
Max Upload Size (Set the Maximum Size of the File you want to be uploaded )
Video Comments (Turn on or off Video Comments) Yes/No
Video Embedding (Turn on or off Video Embedding) Yes/No
Video Rating (Turn on or off Video Rating) Yes/No
Video Comments Rating (Turn on or off Video Comments Rating ) Yes/No
Resize The Uploaded Video or Not
if yes the Set Resize Height and Resized Width
Set Other Video Settings Accordingly
Keep Original File for Download (Turn on or off ) Yes/No
Video Activation Required (Turn on or off ) Yes/No
Display Settings
Template Name ( Select Available Template From The list)
Flash Player ( Select Available Flash Player From The list)
Video List Per Page ( Number Of Videos List Per Page )
Video List Per Box ( Number Of VIdeo List in a Box, Tab or other than Main or Videos Page)
Channel List Per Page ( Number Of Channels List Per Page)
Channels List Per Box ( Number OF Channels List Per Box , Tab or Other than main or Channels Page)
Set Number Of Search Results Display
Set Number of Recently Viewed Videos in a Flash Widget
User Registration
Turn On/Off User Registrations
Set on/Off Email Verification
Yazan Yeri Anlamadım
Bu İkisini Bana Anlatabilirmisiniz Bide Yaptığım Yerlerde Yanlışlık Varmı Yardımcı Olrsanız Sevinirim
1-
includes Dosyasının İçinde functions.php i Nasıl Çevirecem Yani Kullanıcı Adı Şifreyi
Bakın Ben Buraya Yazayım Siz Gerekli Yerleri Kullanıcı Adı Şifre Olarak Yazabilirmisinniz
PHP:
<?php
/**
**************************************************************************************************
This Source File Is Written For ClipBucket, Please Read its End User License First and Agree its
Terms of use at http://clip-bucket.com/cbla
**************************************************************************************************
Copyright (c) 2007-2008 Clip-Bucket.com. All rights reserved.
**************************************************************************************************
**/
require'define_php_links.php';
//This Funtion is use to get CURRENT PAGE DIRECT URL
function curPageURL() {
$pageURL = 'http';
if (@$_SERVER["HTTPS"] == "on") {
$pageURL .= "s";
}
$pageURL .= "://";
$pageURL .= $_SERVER['SERVER_NAME'];
$pageURL .= $_SERVER['PHP_SELF'];
$query_string = $_SERVER['QUERY_STRING'];
if(!empty($query_string)){
$pageURL .= '?'.$query_string;
}
return $pageURL;
}
//QuotesReplace
function Replacer($string)
{
//Wp-Magic Quotes
$string = preg_replace("/'s/", '’s', $string);
$string = preg_replace("/'(\d\d(?:’|')?s)/", "’$1", $string);
$string = preg_replace('/(\s|\A|")\'/', '$1‘', $string);
$string = preg_replace('/(\d+)"/', '$1″', $string);
$string = preg_replace("/(\d+)'/", '$1′', $string);
$string = preg_replace("/(\S)'([^'\s])/", "$1’$2", $string);
$string = preg_replace('/(\s|\A)"(?!\s)/', '$1“$2', $string);
$string = preg_replace('/"(\s|\S|\Z)/', '”$1', $string);
$string = preg_replace("/'([\s.]|\Z)/", '’$1', $string);
$string = preg_replace("/ \(tm\)/i", ' ™', $string);
$string = str_replace("''", '”', $string);
$array = array('/& /');
$replace = array('& ') ;
return $string = preg_replace($array,$replace,$string);
}
//This Funtion is used to clean a String
function clean($string,$allow_html=false) {
$string = stripslashes($string);
//$string = htmlentities($string);
if($allow_html==false){
$string = strip_tags($string);
$string = Replacer($string);
}
//$string = utf8_encode($string);
return $string;
}
//This Fucntion is for Securing Password, you may change its combination for security reason but make sure dont not rechange once you made your script run
function pass_code($string) {
$password = md5(md5(sha1(sha1(md5($string)))));
return $password;
}
//Mysql Clean Queries
function mysql_clean($id){
$id = clean($id);
if (get_magic_quotes_gpc())
{
$id = stripslashes($id);
}
$id = mysql_real_escape_string($id);
return $id;
}
//Redirect Using JAVASCRIPT
function redirect_to($url){
echo '<script type="text/javascript">
window.location = "'.$url.'"
</script>';
}
//Simple Template Displaying Function
function Template($template){
global $admin_area;
DoTemplate::display(LAYOUT.'/'.$template);
if($template == 'footer.html' && $admin_area !=TRUE){
DoTemplate::display(BASEDIR.'/includes/templatelib/'.$template);
}
}
function Assign($name,$value){
DoTemplate::assign($name,$value);
}
//Funtion of Random String
function RandomString($length)
{
// Generate random 32 charecter string
$string = md5(time());
// Position Limiting
$highest_startpoint = 32-$length;
// Take a random starting point in the randomly
// Generated String, not going any higher then $highest_startpoint
$randomString = substr($string,rand(0,$highest_startpoint),$length);
return $randomString;
}
//This Function Is Used To Display Tags Cloud
function TagClouds($cloudquery)
{
$tags = array();
$cloud = array();
$query = mysql_query($cloudquery);
while ($t = mysql_fetch_array($query))
{
$db = explode(' ', $t[0]);
while (list($key, $value) = each($db))
{
@$keyword[$value] += 1;
}
}
if (is_array(@$keyword))
{
$minFont = 11;
$maxFont = 22;
$min = min(array_values($keyword));
$max = max(array_values($keyword));
$fix = ($max - $min == 0) ? 1 : $max - $min;
// Display the tags
foreach ($keyword as $tag => $count)
{
$size = $minFont + ($count - $min) * ($maxFont - $minFont) / $fix;
$cloud[] = '<a class=cloudtags style="font-size: ' . floor($size) . 'px;" href="' . BASEURL.search_result.'?query=' . $tag . '" title="Tags: ' . ucfirst($tag) . ' was used ' . $count . ' times"><span>' . mysql_clean($tag) . '</span></a>';
}
$shown = join("\n", $cloud) . "\n";
return $shown;
}
}
// -------------RATING FUNCTION---------------- //
function getRating($id){
$total = 0;
$rows = 0;
$sel = mysql_query("SELECT * FROM video WHERE videoid = '$id'");
if(mysql_num_rows($sel) > 0){
$data = mysql_fetch_assoc($sel);
//$newPerc = round($perc/5)*5;
//return $newPerc.'%';
$newPerc = round($data['rating']*10,2);
return $newPerc.'%';
} else {
return '0%';
}
}
function outOfFive($id){
$total = 0;
$rows = 0;
$sel = mysql_query("SELECT * FROM video WHERE videoid = '$id'");
if(mysql_num_rows($sel) > 0){
$data = mysql_fetch_assoc($sel);
return round($data['rating']/2,2);
//return round(($perc*2), 0)/2; // 3.5
} else {
return '0';
}
}
function getVotes($id){
$sel = mysql_query("SELECT * FROM video WHERE videoid = '$id'");
$data = mysql_fetch_assoc($sel);
return $data['rated_by'];
}
function pullRating($id,$show5 = false, $showPerc = false, $showVotes = false, $static = NULL){
global $row;
// Check if they have already voted...
$text = '';
$sel = mysql_query("SELECT * FROM video WHERE videoid = '$id'");
$data = mysql_fetch_array($sel);
$voter_id = $data['voter_ids'];
@$userid = $_SESSION['17760185'];
$niddle = "|";
$niddle .= $userid;
$niddle .= "|";
$flag = strstr($voter_id, $niddle);
if($row['user_rate_opt1'] !='yes'){
if($data['plansiz'] == $_SESSION['plansiz']){
$static = 'novote';
}
}
if(!empty($flag) || $static == 'novote' || !isset($_SESSION['17760185']) || isset($_COOKIE['has_voted_'.$id]) ){
if($show5 || $showPerc || $showVotes){
$text .= '<div class="rated_text">';
}
if($show5){
$text .= 'Rated <span id="outOfFive_'.$id.'" class="out5Class">'.outOfFive($id).'</span>/5';
}
if($showPerc){
$text .= ' (<span id="percentage_'.$id.'" class="percentClass">'.getRating($id).'</span>)';
}
if($showVotes){
$text .= ' (<span id="showvotes_'.$id.'" class="votesClass">'.getVotes($id).'</span>)';
}
if($show5 || $showPerc || $showVotes){
$text .= '</div>';
}
return $text.'
<ul class="star-rating2" id="rater_'.$id.'">
<li class="current-rating" style="width:'.getRating($id).';" id="ul_'.$id.'"></li>
<li><a onclick="return false;" href="#" title="1 star out of 5" class="one-star" > </a></li>
<li><a onclick="return false;" href="#" title="2 stars out of 5" class="two-stars"> </a></li>
<li><a onclick="return false;" href="#" title="3 stars out of 5" class="three-stars"> </a></li>
<li><a onclick="return false;" href="#" title="4 stars out of 5" class="four-stars"> </a></li>
<li><a onclick="return false;" href="#" title="5 stars out of 5" class="five-stars"> </a></li>
</ul>
<div id="loading_'.$id.'"></div>';
} else {
if($show5 || $showPerc || $showVotes){
$text .= '<div class="rated_text">';
}
if($show5){
$show5bool = 'true';
$text .= 'Rated <span id="outOfFive_'.$id.'" class="out5Class">'.outOfFive($id).'</span>/5';
} else {
$show5bool = 'false';
}
if($showPerc){
$showPercbool = 'true';
$text .= ' (<span id="percentage_'.$id.'" class="percentClass">'.getRating($id).'</span>)';
} else {
$showPercbool = 'false';
}
if($showVotes){
$showVotesbool = 'true';
$text .= ' (<span id="showvotes_'.$id.'" class="votesClass">'.getVotes($id).'</span>)';
} else {
$showVotesbool = 'false';
}
if($show5 || $showPerc || $showVotes){
$text .= '</div>';
}
return $text.'
<ul class="star-rating" id="rater_'.$id.'">
<li class="current-rating" style="width:'.getRating($id).';" id="ul_'.$id.'"></li>
<li><a href="javascript:void(0)" onclick="rate(\'1\',\''.$id.'\','.$show5bool.','.$showPercbool.','.$showVotesbool.'); return false;" href="rating_process.php?id='.$id.'&rating=1" title="1 star out of 5" class="one-star" > </a></li>
<li><a href="javascript:void(0)" onclick="rate(\'2\',\''.$id.'\','.$show5bool.','.$showPercbool.','.$showVotesbool.'); return false;" href="rating_process.php?id='.$id.'&rating=2" title="2 stars out of 5" class="two-stars"> </a></li>
<li><a href="javascript:void(0)" onclick="rate(\'3\',\''.$id.'\','.$show5bool.','.$showPercbool.','.$showVotesbool.'); return false;" href="rating_process.php?id='.$id.'&rating=3" title="3 stars out of 5" class="three-stars"> </a></li>
<li><a href="javascript:void(0)" onclick="rate(\'4\',\''.$id.'\','.$show5bool.','.$showPercbool.','.$showVotesbool.'); return false;" href="rating_process.php?id='.$id.'&rating=4" title="4 stars out of 5" class="four-stars"> </a></li>
<li><a href="javascript:void(0)" onclick="rate(\'5\',\''.$id.'\','.$show5bool.','.$showPercbool.','.$showVotesbool.'); return false;" href="rating_process.php?id='.$id.'&rating=5" title="5 stars out of 5" class="five-stars"> </a></li>
</ul>
<div id="loading_'.$id.'"></div>';
}
}
//Function Send Email
function send_email($from,$to,$subj,$msg){
$header = "From: ".$from." \r\n";
$header .= "Content-Type: text/html; charset=utf-8 \r\n";
$retval = mail ($to,$subj,$msg,$header);
if( $retval == true ){
return true;
}else{
return false;
}
}
//Function Used To Get FILE NAME withour extension
function GetName($file){
$new_name = substr($file, 0, strrpos($file, '.'));
return $new_name;
}
//Function Used TO Get Extensio Of File
function GetExt($file){
return substr($file, strrpos($file,'.') + 1);
}
//Functon Used To Change Time Format
function SetTime($temps)
{
round($temps);
$heures = floor($temps / 3600);
$minutes = round(floor(($temps - ($heures * 3600)) / 60));
if ($minutes < 10)
$minutes = "0" . round($minutes);
$secondes = round($temps - ($heures * 3600) - ($minutes * 60));
if ($secondes < 10)
$secondes = "0" . round($secondes);
return $minutes . ':' . $secondes;
}
//Simple Validation
function isValidText($text){
$pattern = "^^[_a-z0-9-]+$";
if (eregi($pattern, $text)){
return true;
}else {
return false;
}
}
/**
Validate an email address.
Provide email address (raw input)
Returns true if the email address has the email
address format and the domain exists.
*/
function isValidEmail($email)
{
$isValid = true;
$atIndex = strrpos($email, "@");
if (is_bool($atIndex) && !$atIndex)
{
$isValid = false;
}
else
{
$domain = substr($email, $atIndex+1);
$local = substr($email, 0, $atIndex);
$localLen = strlen($local);
$domainLen = strlen($domain);
if ($localLen < 1 || $localLen > 64)
{
// local part length exceeded
$isValid = false;
}
else if ($domainLen < 1 || $domainLen > 255)
{
// domain part length exceeded
$isValid = false;
}
else if ($local[0] == '.' || $local[$localLen-1] == '.')
{
// local part starts or ends with '.'
$isValid = false;
}
else if (preg_match('/\\.\\./', $local))
{
// local part has two consecutive dots
$isValid = false;
}
else if (!preg_match('/^[A-Za-z0-9\\-\\.]+$/', $domain))
{
// character not valid in domain part
$isValid = false;
}
else if (preg_match('/\\.\\./', $domain))
{
// domain part has two consecutive dots
$isValid = false;
}
else if(!preg_match('/^(\\\\.|[A-Za-z0-9!#%&`_=\\/$\'*+?^{}|~.-])+$/', str_replace("\\\\","",$local)))
{
// character not valid in local part unless
// local part is quoted
if (!preg_match('/^"(\\\\"|[^"])+"$/',
str_replace("\\\\","",$local)))
{
$isValid = false;
}
}
if ($isValid && !(checkdnsrr($domain,"MX") ||
checkdnsrr($domain,"A")))
{
// domain not found in DNS
$isValid = false;
}
}
return $isValid;
}
// THIS FUNCTION SETS HTMLSPECIALCHARS_DECODE IF FUNCTION DOESN'T EXIST
// INPUT: $text REPRESENTING THE TEXT TO DECODE
// $ent_quotes (OPTIONAL) REPRESENTING WHETHER TO REPLACE DOUBLE QUOTES, ETC
// OUTPUT: A STRING WITH HTML CHARACTERS DECODED
if(!function_exists('htmlspecialchars_decode')) {
function htmlspecialchars_decode($text, $ent_quotes = "") {
$text = str_replace(""", "\"", $text);
$text = str_replace("'", "'", $text);
$text = str_replace("<", "<", $text);
$text = str_replace(">", ">", $text);
$text = str_replace("&", "&", $text);
return $text;
}
} // END htmlspecialchars() FUNCTION
//THIS FUNCTION IS USED TO LIST FILE TYPES IN FLASH UPLOAD
//INPUT FILE TYPES
//OUTPUT FILE TYPE IN PROPER FORMAT
function ListFileTypes($types){
$types_array = preg_replace('/,/',' ',$types);
$types_array = explode(' ',$types_array);
$list = 'Video,';
for($i=0;$i<=count($types_array);$i++){
if($types_array[$i]!=''){
$list .= '*.'.$types_array[$i];
if($i!=count($types_array))$list .= ';';
}
}
return $list;
}
//FUNCTION USED TO FORMAT FILE SIZE
//INPUT BYTES
//OUTPT MB , Kib
function formatfilesize( $data ) {
// bytes
if( $data < 1024 ) {
return $data . " bytes";
}
// kilobytes
else if( $data < 1024000 ) {
return round( ( $data / 1024 ), 1 ) . "KB";
}
// megabytes
else if($data < 1024000000){
return round( ( $data / 1024000 ), 1 ) . " MB";
}else{
return round( ( $data / 1024000000 ), 1 ) . " GB";
}
}
//FUNCTION USED TO GET THUMBNAIL
//@param:flv
//@param:num
//@param:check_file : used to check file exists or not
function GetThumb($flv,$num=1,$check_file=FALSE){
$code = GetName($flv);
$thumb = $code.'-'.$num.'.jpg';
return $thumb;
}
?>
2- Bide Kurulumu Anlatan Dosyada
Sql Dumping & Database Settings
Create a database and Import the 'clipbucket_lite.sql' from Sql folder
Now edit values in 'config' table as
'base_dir' to relative path to directory where clipbucket is installed ie /home/username/public_html (without trailing slash "/" at the end )
'base_url' to direct url to website where clipbucket is installed ie http://www.clip-bucket.com (without trailing slash "/" at the end )
Now Edit 'includes/dbconnect.php' as
$BDTYPE = 'mysql';
$DBHOST = 'localhost' ; Change the Host (Default Host is localhost so you may not need to change this)
$DBNAME = 'dbname'; Change this to the name of the database you created for clipbucket
$DBUSER = 'dbuser'; Change this to the username of the databse you assigned to the clipbucket
$DBPASS = 'password'; Change it to the password of the database
now your website is almost ready to go, but you have to change some settings from the Administrator Panel
Settings In Admin Panel
First You have to access to the admin panel and by using this url http://yourwebsites.com/admin_area
Enter username and password to login as Super Admin
username : admin
password : admin
After Logging in go to Super Admin Settings
Change the username and pass to whatever you want, but make is so complicate so that no one able to guess it
Now Create an Admin by clicking 'Add Member' found under User Management Menu
Fill The Form and Set its User Access Level to Admin and Submit it, and use this user as Admin
NOTE : DO NOT PERFORM ANY ACTION OTHER THAN USERMANAGMENT USING SUPERADMIN
Now logout and Login as Your newly created admin
Setting Website Configurations
Website Settings
Website Title "Your Website Title" ie "Best Website"
Website Slogan ie "We Are The Best";
Website Closed (If You Are Editing or Doing Maintenance) Yes/No
Website Closed Message is Displayed When You Have Closed Your Website
Set Meta Description according to your website content
Set Meta Keywords According to your website Content
Turn on/of SEO Url
Paths
FFMPEG Binary Path (Set FFMPEG path, where FFMPEG is installed)
FLVTool2 Path (Set Flv Tool 2 Path)
Mencoder Path (Set Mencoder Path)
Mplayer Path (Set Mplayer Path)
PHP Path ( Set PHP Path)
Video, Uploading and Conversion Settings
Max Upload Size (Set the Maximum Size of the File you want to be uploaded )
Video Comments (Turn on or off Video Comments) Yes/No
Video Embedding (Turn on or off Video Embedding) Yes/No
Video Rating (Turn on or off Video Rating) Yes/No
Video Comments Rating (Turn on or off Video Comments Rating ) Yes/No
Resize The Uploaded Video or Not
if yes the Set Resize Height and Resized Width
Set Other Video Settings Accordingly
Keep Original File for Download (Turn on or off ) Yes/No
Video Activation Required (Turn on or off ) Yes/No
Display Settings
Template Name ( Select Available Template From The list)
Flash Player ( Select Available Flash Player From The list)
Video List Per Page ( Number Of Videos List Per Page )
Video List Per Box ( Number Of VIdeo List in a Box, Tab or other than Main or Videos Page)
Channel List Per Page ( Number Of Channels List Per Page)
Channels List Per Box ( Number OF Channels List Per Box , Tab or Other than main or Channels Page)
Set Number Of Search Results Display
Set Number of Recently Viewed Videos in a Flash Widget
User Registration
Turn On/Off User Registrations
Set on/Off Email Verification
Yazan Yeri Anlamadım
Bu İkisini Bana Anlatabilirmisiniz Bide Yaptığım Yerlerde Yanlışlık Varmı Yardımcı Olrsanız Sevinirim