PASTEBIN
| #1 paste tool since 2002
create new paste
tools
api
archive
real-time
faq
PASTEBIN
create new paste
trending pastes
sign up
login
my alerts
my settings
my profile
Public Pastes
Untitled
6 sec ago
Untitled
11 sec ago
Untitled
12 sec ago
Untitled
13 sec ago
Untitled
Bash | 14 sec ago
Untitled
16 sec ago
Untitled
18 sec ago
Untitled
23 sec ago
bas
By: a guest on Dec 30th, 2009 | syntax:
PHP
| size: 4.97 KB | hits: 123 | expires: Never
download
|
raw
|
embed
|
report abuse
Copied
$view
=
new
view
;
$view
->
name
=
'user_attachments'
;
$view
->
description
=
'Prikaz korisnikovih attachmenta'
;
$view
->
tag
=
''
;
$view
->
view_php
=
''
;
$view
->
base_table
=
'node'
;
$view
->
is_cacheable
=
FALSE
;
$view
->
api_version
=
2
;
$view
->
disabled
=
FALSE
;
$handler
=
$view
->
new_display
(
'default'
,
'Defaults'
,
'default'
)
;
$handler
->
override_option
(
'relationships'
,
array
(
'upload_fid'
=>
array
(
'id'
=>
'upload_fid'
,
'table'
=>
'node'
,
'field'
=>
'upload_fid'
,
)
,
'uid'
=>
array
(
'label'
=>
'korisnik'
,
'required'
=>
0
,
'id'
=>
'uid'
,
'table'
=>
'node_revisions'
,
'field'
=>
'uid'
,
'relationship'
=>
'none'
,
)
,
)
)
;
$handler
->
override_option
(
'fields'
,
array
(
'fid'
=>
array
(
'label'
=>
'File ID'
,
'alter'
=>
array
(
'alter_text'
=>
0
,
'text'
=>
''
,
'make_link'
=>
0
,
'path'
=>
''
,
'link_class'
=>
''
,
'alt'
=>
''
,
'prefix'
=>
''
,
'suffix'
=>
''
,
'target'
=>
''
,
'help'
=>
''
,
'trim'
=>
0
,
'max_length'
=>
''
,
'word_boundary'
=>
1
,
'ellipsis'
=>
1
,
'strip_tags'
=>
0
,
'html'
=>
0
,
)
,
'empty'
=>
''
,
'hide_empty'
=>
1
,
'empty_zero'
=>
0
,
'link_to_file'
=>
0
,
'exclude'
=>
0
,
'id'
=>
'fid'
,
'table'
=>
'files'
,
'field'
=>
'fid'
,
'relationship'
=>
'upload_fid'
,
)
,
'filename'
=>
array
(
'label'
=>
'Naziv'
,
'alter'
=>
array
(
'alter_text'
=>
0
,
'text'
=>
''
,
'make_link'
=>
0
,
'path'
=>
''
,
'link_class'
=>
''
,
'alt'
=>
''
,
'prefix'
=>
''
,
'suffix'
=>
''
,
'target'
=>
''
,
'help'
=>
''
,
'trim'
=>
0
,
'max_length'
=>
''
,
'word_boundary'
=>
1
,
'ellipsis'
=>
1
,
'strip_tags'
=>
0
,
'html'
=>
0
,
)
,
'empty'
=>
''
,
'hide_empty'
=>
0
,
'empty_zero'
=>
0
,
'link_to_file'
=>
0
,
'exclude'
=>
0
,
'id'
=>
'filename'
,
'table'
=>
'files'
,
'field'
=>
'filename'
,
'relationship'
=>
'upload_fid'
,
)
,
'filepath'
=>
array
(
'id'
=>
'filepath'
,
'table'
=>
'files'
,
'field'
=>
'filepath'
,
'relationship'
=>
'upload_fid'
,
)
,
'filesize'
=>
array
(
'id'
=>
'filesize'
,
'table'
=>
'files'
,
'field'
=>
'filesize'
,
)
,
'timestamp'
=>
array
(
'label'
=>
'Upload date'
,
'alter'
=>
array
(
'alter_text'
=>
0
,
'text'
=>
''
,
'make_link'
=>
0
,
'path'
=>
''
,
'link_class'
=>
''
,
'alt'
=>
''
,
'prefix'
=>
''
,
'suffix'
=>
''
,
'target'
=>
''
,
'help'
=>
''
,
'trim'
=>
0
,
'max_length'
=>
''
,
'word_boundary'
=>
1
,
'ellipsis'
=>
1
,
'strip_tags'
=>
0
,
'html'
=>
0
,
)
,
'empty'
=>
''
,
'hide_empty'
=>
0
,
'empty_zero'
=>
0
,
'date_format'
=>
'small'
,
'custom_date_format'
=>
''
,
'exclude'
=>
0
,
'id'
=>
'timestamp'
,
'table'
=>
'files'
,
'field'
=>
'timestamp'
,
'relationship'
=>
'upload_fid'
,
)
,
)
)
;
$handler
->
override_option
(
'filters'
,
array
(
'fid'
=>
array
(
'operator'
=>
'not empty'
,
'value'
=>
array
(
'value'
=>
''
,
'min'
=>
''
,
'max'
=>
''
,
)
,
'group'
=>
'0'
,
'exposed'
=>
FALSE
,
'expose'
=>
array
(
'operator'
=>
FALSE
,
'label'
=>
''
,
)
,
'id'
=>
'fid'
,
'table'
=>
'files'
,
'field'
=>
'fid'
,
'relationship'
=>
'upload_fid'
,
)
,
'uid_current'
=>
array
(
'operator'
=>
'='
,
'value'
=>
'1'
,
'group'
=>
'0'
,
'exposed'
=>
FALSE
,
'expose'
=>
array
(
'operator'
=>
FALSE
,
'label'
=>
''
,
)
,
'id'
=>
'uid_current'
,
'table'
=>
'users'
,
'field'
=>
'uid_current'
,
'relationship'
=>
'uid'
,
)
,
)
)
;
$handler
->
override_option
(
'access'
,
array
(
'type'
=>
'none'
,
)
)
;
$handler
->
override_option
(
'cache'
,
array
(
'type'
=>
'none'
,
)
)
;
$handler
->
override_option
(
'use_pager'
,
'0'
)
;
$handler
->
override_option
(
'distinct'
,
1
)
;
$handler
->
override_option
(
'style_plugin'
,
'table'
)
;
$handler
->
override_option
(
'style_options'
,
array
(
'grouping'
=>
''
,
'override'
=>
1
,
'sticky'
=>
0
,
'order'
=>
'asc'
,
'columns'
=>
array
(
'fid'
=>
'fid'
,
'filename'
=>
'filename'
,
'filepath'
=>
'filepath'
,
)
,
'info'
=>
array
(
'fid'
=>
array
(
'sortable'
=>
0
,
'separator'
=>
''
,
)
,
'filename'
=>
array
(
'sortable'
=>
0
,
'separator'
=>
''
,
)
,
'filepath'
=>
array
(
'sortable'
=>
0
,
'separator'
=>
''
,
)
,
)
,
'default'
=>
'-1'
,
)
)
;
$handler
=
$view
->
new_display
(
'page'
,
'Stranica'
,
'page_1'
)
;
$handler
->
override_option
(
'path'
,
'user/%/attachmenti'
)
;
$handler
->
override_option
(
'menu'
,
array
(
'type'
=>
'tab'
,
'title'
=>
'Attachmenti'
,
'description'
=>
''
,
'weight'
=>
'0'
,
'name'
=>
'navigation'
,
)
)
;
$handler
->
override_option
(
'tab_options'
,
array
(
'type'
=>
'none'
,
'title'
=>
''
,
'description'
=>
''
,
'weight'
=>
0
,
)
)
;
create a
new version
of this paste
RAW Paste Data
$view = new view; $view->name = 'user_attachments'; $view->description = 'Prikaz korisnikovih attachmenta'; $view->tag = ''; $view->view_php = ''; $view->base_table = 'node'; $view->is_cacheable = FALSE; $view->api_version = 2; $view->disabled = FALSE; $handler = $view->new_display('default', 'Defaults', 'default'); $handler->override_option('relationships', array( 'upload_fid' => array( 'id' => 'upload_fid', 'table' => 'node', 'field' => 'upload_fid', ), 'uid' => array( 'label' => 'korisnik', 'required' => 0, 'id' => 'uid', 'table' => 'node_revisions', 'field' => 'uid', 'relationship' => 'none', ), )); $handler->override_option('fields', array( 'fid' => array( 'label' => 'File ID', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'target' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'strip_tags' => 0, 'html' => 0, ), 'empty' => '', 'hide_empty' => 1, 'empty_zero' => 0, 'link_to_file' => 0, 'exclude' => 0, 'id' => 'fid', 'table' => 'files', 'field' => 'fid', 'relationship' => 'upload_fid', ), 'filename' => array( 'label' => 'Naziv', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'target' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'strip_tags' => 0, 'html' => 0, ), 'empty' => '', 'hide_empty' => 0, 'empty_zero' => 0, 'link_to_file' => 0, 'exclude' => 0, 'id' => 'filename', 'table' => 'files', 'field' => 'filename', 'relationship' => 'upload_fid', ), 'filepath' => array( 'id' => 'filepath', 'table' => 'files', 'field' => 'filepath', 'relationship' => 'upload_fid', ), 'filesize' => array( 'id' => 'filesize', 'table' => 'files', 'field' => 'filesize', ), 'timestamp' => array( 'label' => 'Upload date', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'target' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'strip_tags' => 0, 'html' => 0, ), 'empty' => '', 'hide_empty' => 0, 'empty_zero' => 0, 'date_format' => 'small', 'custom_date_format' => '', 'exclude' => 0, 'id' => 'timestamp', 'table' => 'files', 'field' => 'timestamp', 'relationship' => 'upload_fid', ), )); $handler->override_option('filters', array( 'fid' => array( 'operator' => 'not empty', 'value' => array( 'value' => '', 'min' => '', 'max' => '', ), 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'fid', 'table' => 'files', 'field' => 'fid', 'relationship' => 'upload_fid', ), 'uid_current' => array( 'operator' => '=', 'value' => '1', 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'uid_current', 'table' => 'users', 'field' => 'uid_current', 'relationship' => 'uid', ), )); $handler->override_option('access', array( 'type' => 'none', )); $handler->override_option('cache', array( 'type' => 'none', )); $handler->override_option('use_pager', '0'); $handler->override_option('distinct', 1); $handler->override_option('style_plugin', 'table'); $handler->override_option('style_options', array( 'grouping' => '', 'override' => 1, 'sticky' => 0, 'order' => 'asc', 'columns' => array( 'fid' => 'fid', 'filename' => 'filename', 'filepath' => 'filepath', ), 'info' => array( 'fid' => array( 'sortable' => 0, 'separator' => '', ), 'filename' => array( 'sortable' => 0, 'separator' => '', ), 'filepath' => array( 'sortable' => 0, 'separator' => '', ), ), 'default' => '-1', )); $handler = $view->new_display('page', 'Stranica', 'page_1'); $handler->override_option('path', 'user/%/attachmenti'); $handler->override_option('menu', array( 'type' => 'tab', 'title' => 'Attachmenti', 'description' => '', 'weight' => '0', 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'description' => '', 'weight' => 0, ));