/ / Videoer
14 => array (
'id' => 4,
»type« => $ locale ['AN641'],
'text' => $ locale ['AN642'],
'type1' => $ locale ['AN643'],
'type2' => $ locale ['AN644'],
'parse1' => 'tilbagevenden pagelink (\' PA \ ', $ data [\' item_id \ '], trimlink ($ data [\' item_text \ '], $ autonews_settings [\' maxlen \ '])),' ,
'parse2' => 'tilbagevenden pagelink (\' P \ ', $ data [\' item2_id \ '], trimlink ($ data [\' item2_text \ '], $ autonews_settings [\' maxlen \ '])),' ,
'query' => "SELECT MIN (tid) AS tidsstempel,
user_id,
user_name,
ta.cat_id AS item_id,
tælle (*) AS item_no,
cat_name AS item_text,
MIN (id) som item2_id,
0 AS item2_no,
'. "$ locale [' AN645 ']".' AS item2_text
FRA ". DB_VIDEO". AS tp
LEFT JOIN ". DB_VIDEO_CAT". AS ta ON (ta.cat_id = tp.cat_id)
LEFT JOIN ". DB_USERS". AS tu ON (uid = user_id)
HVOR
«. useraccess (cat_access"). "OG
tid> ". $ ts_cut."
GROUP BY ta.cat_id, uid
SOM item_no> 0; "
),
// Videos
14 => array(
'id' => 4,
'type' => $locale['AN641'],
'text' => $locale['AN642'],
'type1' => $locale['AN643'],
'type2' => $locale['AN644'],
'parse1'=> 'return pagelink(\'PA\', $data[\'item_id\'], trimlink($data[\'item_text\'], $autonews_settings[\'maxlen\']));',
'parse2'=> 'return pagelink(\'P\', $data[\'item2_id\'], trimlink($data[\'item2_text\'], $autonews_settings[\'maxlen\']));',
'query' => "SELECT MIN(time) AS timestamp,
user_id,
user_name,
ta.cat_id AS item_id,
count(*) AS item_no,
cat_name AS item_text,
MIN(id) as item2_id,
0 AS item2_no,
'".$locale['AN645']."' AS item2_text
FROM ".DB_VIDEO." AS tp
LEFT JOIN ".DB_VIDEO_CAT." AS ta ON (ta.cat_id = tp.cat_id)
LEFT JOIN ".DB_USERS." AS tu ON (uid = user_id)
WHERE
".useraccess('cat_access')." AND
time > ".$ts_cut."
GROUP BY ta.cat_id, uid
HAVING item_no > 0;"
),
if (!defined("DB_VIDEO")) { define("DB_VIDEO", DB_PREFIX."video"); }
$inf_newtable[1] = DB_VIDEO . " (
id mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
cat_id mediumint(8) NOT NULL,
uid mediumint(8) NOT NULL,
name varchar(200) NOT NULL DEFAULT '',
time int(10) NOT NULL DEFAULT '0',
description text NOT NULL,
video_type varchar(7) NOT NULL DEFAULT '',
file varchar(200) NOT NULL DEFAULT '',
file_image varchar(120) NOT NULL,
file_image_thumb varchar(120) NOT NULL,
url varchar(150) NOT NULL DEFAULT '',
custom text NOT NULL,
views mediumint(7) NOT NULL DEFAULT '0',
total_rating int(11) NOT NULL,
rating int(11) NOT NULL,
total_ratings int(11) NOT NULL,
allow_comments tinyint(1) NOT NULL DEFAULT '1',
allow_ratings tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (id)
) ENGINE=MyISAM;";
$inf_newtable[2] = DB_VIDEO_CAT . " (
cat_id mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
cat_name varchar(100) NOT NULL DEFAULT '',
cat_description text NOT NULL,
cat_sorting varchar(50) NOT NULL DEFAULT 'name ASC',
cat_access tinyint(3) NOT NULL DEFAULT '0',
cat_image varchar(100) NOT NULL,
cat_parent mediumint(8) NOT NULL DEFAULT '0',
PRIMARY KEY (cat_id)
) ENGINE=MyISAM;";
$inf_newtable[3] = DB_VIDEO_SET . " (
netrix varchar(100) NOT NULL DEFAULT 'netrix',
columns tinyint(1) NOT NULL DEFAULT '2',
maxsize int(10) NOT NULL DEFAULT '52428800',
width mediumint(5) NOT NULL DEFAULT '480',
height mediumint(5) NOT NULL DEFAULT '270',
color varchar(7) NOT NULL DEFAULT '#000000',
skin varchar(50) NOT NULL DEFAULT 'glow.zip',
control varchar(6) NOT NULL DEFAULT 'bottom',
auto varchar(5) NOT NULL DEFAULT 'false',
display varchar(8) NOT NULL DEFAULT 'exactfit',
ads tinyint(1) NOT NULL DEFAULT '1',
logo VARCHAR(100) NOT NULL,
sub_access TINYINT(3) NOT NULL DEFAULT '101',
sub_enable TINYINT(1) NOT NULL DEFAULT '0',
items mediumint(5) NOT NULL DEFAULT '20',
t_width mediumint(5) NOT NULL DEFAULT '80',
t_height mediumint(5) NOT NULL DEFAULT '80',
video_type varchar(7) NOT NULL DEFAULT 'youtube',
logo_position varchar(12) NOT NULL DEFAULT 'bottom-left',
UNIQUE KEY netrix (netrix)
) ENGINE=MyISAM;";
// Videos
14 => array(
'id' => 14,
'type' => $locale['AN641'],
'text' => $locale['AN642'],
'type1' => $locale['AN643'],
'type2' => $locale['AN644'],
'parse1'=> 'return pagelink(\'VC\', $data[\'item_id\'], trimlink($data[\'item_text\'], $autonews_settings[\'maxlen\']));',
'parse2'=> 'return pagelink(\'V\', $data[\'item2_id\'], trimlink($data[\'item2_text\'], $autonews_settings[\'maxlen\']));',
'query' => "SELECT MIN(time) AS timestamp,
user_id,
user_name,
ta.cat_id AS item_id,
count(*) AS item_no,
cat_name AS item_text,
MIN(id) as item2_id,
0 AS item2_no,
'' AS item2_text
FROM ".DB_PREFIX."video AS tp
LEFT JOIN ".DB_PREFIX."video_cat AS ta ON (ta.cat_id = tp.cat_id)
LEFT JOIN ".DB_USERS." AS tu ON (uid = user_id)
WHERE
".useraccess('cat_access')." AND
time > ".$ts_cut."
GROUP BY ta.cat_id, uid
HAVING item_no > 0;"
),
// Utility function to format link
function pagelink($type, $id, $text)
{
global $autonews_params, $settings;
$types = array( 'U' => 'profile.php?lookup=',
'N' => 'news.php?readmore=',
'N0' => 'news.php',
'A' => 'articles.php?article_id=',
'PA' => ($autonews_params['hsgallery']? 'infusions/hsgallery_panel/': '').'photogallery.php?album_id=',
'P' => ($autonews_params['hsgallery']? 'infusions/hsgallery_panel/': '').'photogallery.php?photo_id=',
'FF' => 'forum/viewforum.php?forum_id=',
'FT' => 'forum/viewthread.php?thread_id=',
'D' => 'downloads.php?cat_id=',
'W' => 'weblinks.php?cat_id=',
'S' => 'infusions/shoutbox_panel/shoutbox_archive.php'[color=#ff0033],
'VC' => 'infusions/video/video.php?cat_id='[/color]
);
return isNum($id) && array_key_exists($type, $types)? "<a href= '".$settings['siteurl'].$types[$type].($id > 0? $id: '')."'>".$text."</a>": $id;
}