function compile_collection_actions(array $collection_data, $top_actions) { global $baseurl_short, $lang, $k, $userrequestmode, $zipcommand, $collection_download, $contact_sheet, $manage_collections_contact_sheet_link, $manage_collections_share_link, $allow_share, $manage_collections_remove_link, $userref, $collection_purge, $show_edit_all_link, $result, $edit_all_checkperms, $preview_all, $order_by, $sort, $archive, $contact_sheet_link_on_collection_bar, $show_searchitemsdiskusage, $emptycollection, $remove_resources_link_on_collection_bar, $count_result, $download_usage, $home_dash, $top_nav_upload_type, $pagename, $offset, $col_order_by, $find, $default_sort, $starsearch, $restricted_share; $options = array(); $o = 0; if (empty($collection_data)) { return $options; } if (!collection_is_research_request($collection_data['ref']) || !checkperm('r')) { if (!$top_actions && checkperm('s') && $pagename === 'collections') { // Manage My Collections $data_attribute['url'] = $baseurl_short . 'pages/collection_manage.php'; $options[$o]['value'] = 'manage_collections'; $options[$o]['label'] = $lang['managemycollections']; $options[$o]['data_attr'] = $data_attribute; $o++; // Collection feedback if (isset($collection_data['request_feedback']) && $collection_data['request_feedback']) { $data_attribute['url'] = sprintf('%spages/collection_feedback.php?collection=%s&k=%s', $baseurl_short, urlencode($collection_data['ref']), urlencode($k)); $options[$o]['value'] = 'collection_feedback'; $options[$o]['label'] = $lang['sendfeedback']; $options[$o]['data_attr'] = $data_attribute; $o++; } } } else { $research = sql_value('SELECT ref value FROM research_request WHERE collection="' . $collection_data['ref'] . '";', 0); // Manage research requests $data_attribute['url'] = sprintf('%spages/team/team_research.php', $baseurl_short); $options[$o]['value'] = 'manage_research_requests'; $options[$o]['label'] = $lang['manageresearchrequests']; $options[$o]['data_attr'] = $data_attribute; $o++; // Edit research requests $data_attribute['url'] = sprintf('%spages/team/team_research_edit.php?ref=%s', $baseurl_short, urlencode($research)); $options[$o]['value'] = 'edit_research_requests'; $options[$o]['label'] = $lang['editresearchrequests']; $options[$o]['data_attr'] = $data_attribute; $o++; } // Select collection option - not for collection bar if ($pagename != 'collections' && $k == '' && !checkperm('b') && ($pagename == 'themes' || $pagename === 'collection_manage' || $pagename === 'resource_collection_list' || $top_actions)) { $options[$o]['value'] = 'select_collection'; $options[$o]['label'] = $lang['selectcollection']; $o++; } // Edit Collection if ($userref == $collection_data['user'] || checkperm('h')) { $extra_tag_attributes = sprintf(' data-url="%spages/collection_edit.php?ref=%s" ', $baseurl_short, urlencode($collection_data['ref'])); $options[$o]['value'] = 'edit_collection'; $options[$o]['label'] = $lang['action-edit']; $options[$o]['data_attr'] = array(); $options[$o]['extra_tag_attributes'] = $extra_tag_attributes; $o++; } // Upload to collection if ((checkperm('c') || checkperm('d')) && $collection_data['savedsearch'] == 0 && ($userref == $collection_data['user'] || $collection_data['allow_changes'] == 1 || checkperm('h'))) { $data_attribute['url'] = sprintf('%spages/edit.php?uploader=%s&ref=-%s&collection_add=%s', $baseurl_short, urlencode($top_nav_upload_type), urlencode($userref), urlencode($collection_data['ref'])); $options[$o]['value'] = 'upload_collection'; $options[$o]['label'] = $lang['action-upload-to-collection']; $options[$o]['data_attr'] = $data_attribute; $o++; } // Home_dash is on, AND NOT Anonymous use, AND (Dash tile user (NOT with a managed dash) || Dash Tile Admin) if (!$top_actions && $home_dash && checkPermission_dashcreate()) { $data_attribute['url'] = sprintf(' %spages/dash_tile.php?create=true&tltype=srch&promoted_resource=true&freetext=true&all_users=1&link=/pages/search.php?search=!collection%s&order_by=relevance&sort=DESC ', $baseurl_short, $collection_data['ref']); $options[$o]['value'] = 'save_collection_to_dash'; $options[$o]['label'] = $lang['createnewdashtile']; $options[$o]['data_attr'] = $data_attribute; $o++; } // Request all if ($count_result > 0) { # Ability to request a whole collection (only if user has restricted access to any of these resources) $min_access = collection_min_access($result); if ($min_access != 0) { $data_attribute['url'] = sprintf('%spages/collection_request.php?ref=%s&k=%s', $baseurl_short, urlencode($collection_data['ref']), urlencode($k)); $options[$o]['value'] = 'request_all'; $options[$o]['label'] = $lang['requestall']; $options[$o]['data_attr'] = $data_attribute; $o++; } } // Download option if ($download_usage && ((isset($zipcommand) || $collection_download) && $count_result > 0)) { $data_attribute['url'] = $baseurl_short . "pages/terms.php?k=" . urlencode($k) . "&url=pages/download_usage.php?collection=" . urlencode($collection_data['ref']) . "%26k=" . urlencode($k); $options[$o]['value'] = 'download_collection'; $options[$o]['label'] = $lang['action-download']; $options[$o]['data_attr'] = $data_attribute; $o++; } else { if ((isset($zipcommand) || $collection_download) && $count_result > 0) { $data_attribute['url'] = $baseurl_short . "pages/terms.php?k=" . urlencode($k) . "&url=pages/collection_download.php?collection=" . urlencode($collection_data['ref']) . "%26k=" . urlencode($k); $options[$o]['value'] = 'download_collection'; $options[$o]['label'] = $lang['action-download']; $options[$o]['data_attr'] = $data_attribute; $o++; } else { if (isset($zipcommand) || $collection_download) { $data_attribute['url'] = $baseurl_short . "pages/terms.php?k=" . urlencode($k) . "&url=pages/collection_download.php?collection=" . urlencode($collection_data['ref']) . "%26k=" . urlencode($k); $options[$o]['value'] = 'download_collection'; $options[$o]['label'] = $lang['action-download']; $options[$o]['data_attr'] = $data_attribute; $o++; } } } // Contact Sheet if ($k == "" && $contact_sheet == true && ($manage_collections_contact_sheet_link || $contact_sheet_link_on_collection_bar)) { $data_attribute = array('url' => sprintf('%spages/contactsheet_settings.php?ref=%s', $baseurl_short, urlencode($collection_data['ref']))); $options[$o]['value'] = 'contact_sheet'; $options[$o]['label'] = $lang['contactsheet']; $options[$o]['data_attr'] = $data_attribute; $o++; } // Share if ($k == "" && $manage_collections_share_link && $allow_share && (checkperm('v') || checkperm('g') || collection_min_access($collection_data['ref']) <= 1 && $restricted_share)) { $extra_tag_attributes = sprintf(' data-url="%spages/collection_share.php?ref=%s" ', $baseurl_short, urlencode($collection_data['ref'])); $options[$o]['value'] = 'share_collection'; $options[$o]['label'] = $lang['share']; $options[$o]['data_attr'] = array(); $options[$o]['extra_tag_attributes'] = $extra_tag_attributes; $o++; } // Remove if ($k == "" && $manage_collections_remove_link && $userref != $collection_data['user']) { $options[$o]['value'] = 'remove_collection'; $options[$o]['label'] = $lang['action-remove']; $o++; } // Delete if ($k == "" && ($userref == $collection_data['user'] || checkperm('h')) && $collection_data['cant_delete'] == 0) { $options[$o]['value'] = 'delete_collection'; $options[$o]['label'] = $lang['action-delete']; $o++; } // Collection Purge if ($k == "" && $collection_purge && isset($collections) && checkperm('e0') && $collection_data['cant_delete'] == 0) { $options[$o]['value'] = 'purge_collection'; $options[$o]['label'] = $lang['purgeanddelete']; $o++; } // Collection log if ($k == "" && $userref == $collection_data['user'] || checkperm('h')) { $extra_tag_attributes = sprintf(' data-url="%spages/collection_log.php?ref=%s" ', $baseurl_short, urlencode($collection_data['ref'])); $options[$o]['value'] = 'collection_log'; $options[$o]['label'] = $lang['action-log']; $options[$o]['data_attr'] = array(); $options[$o]['extra_tag_attributes'] = $extra_tag_attributes; $o++; } // View all if ($k == "" && (isset($collection_data["c"]) && $collection_data["c"] > 0) || count($result) > 0) { $data_attribute['url'] = $baseurl_short . 'pages/search.php?search=!collection' . urlencode($collection_data['ref']) . "&k=" . urlencode($k); $options[$o]['value'] = 'view_all_resources_in_collection'; $options[$o]['label'] = $lang['view_all_resources']; $options[$o]['data_attr'] = $data_attribute; $o++; } // Edit all # If this collection is (fully) editable, then display an edit all link if ($k == "" && $show_edit_all_link && count($result) > 0) { if (!$edit_all_checkperms || allow_multi_edit($collection_data['ref'])) { $extra_tag_attributes = sprintf(' data-url="%spages/edit.php?collection=%s" ', $baseurl_short, urlencode($collection_data['ref'])); $options[$o]['value'] = 'edit_all_in_collection'; $options[$o]['label'] = $lang['edit_all_resources']; $options[$o]['data_attr'] = array(); $options[$o]['extra_tag_attributes'] = $extra_tag_attributes; $o++; } } // Delete all // Note: functionality moved from edit collection page if ($k == "" && !$top_actions && (count($result) != 0 || $count_result != 0) && !(isset($allow_resource_deletion) && !$allow_resource_deletion) && collection_writeable($collection_data['ref']) && allow_multi_edit($collection_data['ref']) && !checkperm('D')) { $options[$o]['value'] = 'delete_all_in_collection'; $options[$o]['label'] = $lang['deleteallresourcesfromcollection']; $o++; } // Preview all if (count($result) != 0 && $k == '' && $preview_all) { $extra_tag_attributes = sprintf(' data-url="%spages/preview_all.php?ref=%s" ', $baseurl_short, urlencode($collection_data['ref'])); $options[$o]['value'] = 'preview_all'; $options[$o]['label'] = $lang['preview_all']; $options[$o]['data_attr'] = array(); $options[$o]['extra_tag_attributes'] = $extra_tag_attributes; $o++; } // Remove all if ($k == '' && isset($emptycollection) && $remove_resources_link_on_collection_bar && collection_writeable($collection_data['ref'])) { $data_attribute['url'] = sprintf('%spages/collections.php?emptycollection=%s&removeall=true&submitted=removeall&ajax=true', $baseurl_short, urlencode($collection_data['ref'])); $options[$o]['value'] = 'empty_collection'; $options[$o]['label'] = $lang['emptycollection']; $options[$o]['data_attr'] = $data_attribute; $o++; } // Edit Previews if ($k == '' && $count_result > 0 && ($userref == $collection_data['user'] || $collection_data['allow_changes'] == 1 || checkperm('h')) && allow_multi_edit($collection_data['ref'])) { $main_pages = array('search', 'collection_manage', 'collection_public', 'themes'); $back_to_page = in_array($pagename, $main_pages) ? htmlspecialchars($pagename) : ''; $data_attribute['url'] = sprintf('%spages/collection_edit_previews.php?ref=%s&offset=%s&order_by=%s&col_order_by=<%s&sort=%s&find=%s&backto=%s', $baseurl_short, urlencode($collection_data['ref']), urlencode($offset), urlencode($order_by), urlencode($col_order_by), urlencode($sort), urlencode($find), $back_to_page); $options[$o]['value'] = 'edit_previews'; $options[$o]['label'] = $lang['editcollectionresources']; $options[$o]['data_attr'] = $data_attribute; $o++; } // Show disk usage if ($k == '' && !$top_actions && $show_searchitemsdiskusage) { $extra_tag_attributes = sprintf(' data-url="%spages/search_disk_usage.php?search=!collection%s&k=%s" ', $baseurl_short, urlencode($collection_data['ref']), urlencode($k)); $options[$o]['value'] = 'search_items_disk_usage'; $options[$o]['label'] = $lang['collection_disk_usage']; $options[$o]['data_attr'] = array(); $options[$o]['extra_tag_attributes'] = $extra_tag_attributes; $o++; } // CSV export of collection metadata if (!$top_actions && $k == '') { if (empty($order_by)) { $order_by = $default_sort; } $options[$o]['value'] = 'csv_export_results_metadata'; $options[$o]['label'] = $lang['csvExportResultsMetadata']; $options[$o]['data_attr']['url'] = sprintf('%spages/csv_export_results_metadata.php?search=!collection%s&restype=%s&order_by=%s&archive=0&sort=%s&starsearch=%s', $baseurl_short, urlencode($collection_data['ref']), isset($_COOKIE['restypes']) ? urlencode($_COOKIE['restypes']) : '', urlencode($order_by), urlencode($sort), urlencode($starsearch)); $o++; } // Add extra collection actions and manipulate existing actions through plugins $modified_options = hook('render_actions_add_collection_option', '', array($top_actions, $options)); if (is_array($modified_options) && !empty($modified_options)) { $options = $modified_options; } return $options; }
&collection_add=<?php echo $collection; ?> |main|collections">> <?php echo $lang["action-upload-to-collection"]; ?> ...</option> <?php } ?> <!-- end upload--> <!-- edit collection --> <?php if (!hook("replacecompactstyleeditcollection", "", array("collection" => $collection, "count_result" => $count_result, "cinfo" => $cinfo))) { if (!checkperm("b") && !collection_is_research_request($collection) || !checkperm("r")) { ?> <?php if ($userref == $cinfo["user"] || checkperm("h")) { ?> <option value="<?php echo $collection; ?> |0|0|collection_edit.php?pagename=<?php echo $pagename; ?> &ref=<?php echo $collection; ?> &offset=<?php echo $offset;
function HookLegacy_actionsAllAftertogglethumbs() { global $baseurl_short, $lang, $usercollection, $contact_sheet, $allow_share, $cinfo, $userref, $preview_all, $feedback, $k, $result, $collection_download, $count_result, $disable_collection_toggle; ?> <ul style="float: right;"> <?php if (!collection_is_research_request($usercollection) || !checkperm('r')) { hook('beforecollectionminlinks'); if (checkperm('s')) { if ($contact_sheet == true) { ?> <li><a onclick="return CentralSpaceLoad(this, true);" href="<?php echo $baseurl_short; ?> pages/contactsheet_settings.php?ref=<?php echo urlencode($usercollection); ?> "> <?php echo $lang['contactsheet']; ?> </a></li> <?php } if ($allow_share) { ?> <li><a onclick="return CentralSpaceLoad(this, true);" href="<?php echo $baseurl_short; ?> pages/collection_share.php?ref=<?php echo urlencode($usercollection); ?> "><?php echo $lang['share']; ?> </a></li> <?php } if ($userref == $cinfo['user'] || checkperm('h')) { ?> <li><a onclick="return CentralSpaceLoad(this, true);" href="<?php echo $baseurl_short; ?> pages/collection_edit.php?ref=<?php echo urlencode($usercollection); ?> "> <?php echo $allow_share ? $lang['action-edit'] : $lang['editcollection']; ?> </a></li> <?php } if ($preview_all) { ?> <li><a onclick="return CentralSpaceLoad(this, true);" href="<?php echo $baseurl_short; ?> pages/preview_all.php?ref=<?php echo urlencode($usercollection); ?> "><?php echo $lang['preview_all']; ?> </a></li> <?php } hook('collectiontool2min'); if ($feedback) { ?> <li><a onclick="return CentralSpaceLoad(this, true);" href="<?php echo $baseurl_short; ?> pages/collection_feedback.php?collection=<?php echo urlencode($usercollection); ?> &k=<?php echo urlencode($k); ?> "> <?php echo $lang['sendfeedback']; ?> </a></li> <?php } } } else { if (!hook('replacecollectionsresearchlinks')) { $research = sql_value("SELECT ref value FROM research_request WHERE collection = '" . $usercollection . "'", 0); ?> <li><a onclick="return CentralSpaceLoad(this, true);" href="<?php echo $baseurl_short; ?> pages/team/team_research.php"><?php echo $lang['manageresearchrequests']; ?> </a></li> <li><a onclick="return CentralSpaceLoad(this, true);" href="<?php echo $baseurl_short; ?> pages/team/team_research_edit.php?ref=<?php echo urlencode($research); ?> "><?php echo $lang['editresearchrequests']; ?> </a></li> <?php } /* end hook replacecollectionsresearchlinks */ } # If this collection is (fully) editable, then display an extra edit all link if (count($result) > 0 && checkperm('e' . $result[0]['archive']) && allow_multi_edit($result)) { ?> <li><a onclick="return CentralSpaceLoad(this, true);" href="<?php echo $baseurl_short; ?> pages/search.php?search=<?php echo urlencode('!collection' . $usercollection); ?> "><?php echo $lang['viewall']; ?> </a></li> <li><a onclick="return CentralSpaceLoad(this, true);" href="<?php echo $baseurl_short; ?> pages/edit.php?collection=<?php echo $usercollection; ?> "><?php echo $lang['action-editall']; ?> </a></li> <?php } else { ?> <li><a onclick="return CentralSpaceLoad(this, true);" href="<?php echo $baseurl_short; ?> pages/search.php?search=<?php echo urlencode('!collection' . $usercollection); ?> "><?php echo $lang['viewall']; ?> </a></li> <?php } echo isset($emptycollection) && $remove_resources_link_on_collection_bar && collection_writeable($usercollection) ? '<li><a href="' . $baseurl_short . 'pages/collections.php?emptycollection=' . urlencode($usercollection) . '&removeall=true&submitted=removeall&ajax=true" onclick="if(!confirm(\'' . $lang['emptycollectionareyousure'] . '\')){return false;}return CollectionDivLoad(this);">' . $lang['emptycollection'] . '</a></li>' : ''; if ((isset($zipcommand) || $collection_download) && $count_result > 0) { ?> <li><a onclick="return CentralSpaceLoad(this, true);" href="<?php echo $baseurl_short; ?> pages/terms.php?k=<?php echo $k; ?> &url=<?php echo urlencode("pages/collection_download.php?collection=" . $usercollection . "&k=" . $k); ?> "><?php echo $lang['action-download']; ?> </a></li> <?php } if ($count_result > 0 && $k == '' && checkperm('q')) { # Ability to request a whole collection (only if user has restricted access to any of these resources) $min_access = collection_min_access($result); if ($min_access != 0) { ?> <li><a onclick="return CentralSpaceLoad(this, true);" href="<?php echo $baseurl_short; ?> pages/collection_request.php?ref=<?php echo urlencode($usercollection); ?> "><?php echo $lang['action-request']; ?> </a></li> <?php } } hook('collectiontoolmin'); ?> </ul> <?php }
<div id="CollectionMinRightNav"><div id="MinSearchItem"> <?php if ($collections_compact_style) { hook("beforetogglethumbs"); if (!$disable_collection_toggle) { ?> <a id="toggleThumbsLink" href="#" onClick="ToggleThumbs();return false;">> <?php echo $lang["showthumbnails"]; ?> </a><?php } } else { ?> <ul> <?php if (!collection_is_research_request($usercollection) || !checkperm("r")) { ?> <?php if (checkperm("s")) { if (!$collections_compact_style) { ?> <li><a onclick="return CentralSpaceLoad(this,true);" href="<?php echo $baseurl_short; ?> pages/collection_manage.php"><?php echo $lang["managemycollections"]; ?> </a></li><?php } ?> <?php
<!-- end share --> <!-- collection download --> <?php if ((isset($zipcommand) || isset($collection_download)) && $count_result>0) { ?> <option value="<?php echo htmlspecialchars($collection) ?>|0|0|<?php echo $baseurl_short?>pages/terms.php?url=<?php echo urlencode("pages/collection_download.php?collection=" . $collection )?>|main">> <?php echo $lang["zipall"]?>...</option> <?php } ?> <!-- end collection download --> <!-- upload *--> <?php global $top_nav_upload_type;if ((checkperm("c") || checkperm("d")) && $cinfo["savedsearch"]==0 && ($userref==$cinfo["user"] || $cinfo["allow_changes"]==1 || checkperm("h"))) {?> <option id="uploadtocollection" value="<?php echo htmlspecialchars($collection) ?>|0|0|<?php echo $baseurl_short?>pages/edit.php?uploader=<?php echo urlencode($top_nav_upload_type) ?>&ref=-<?php echo urlencode($userref) ?>&collection_add=<?php echo urlencode($collection) ?>|main|collections">> <?php echo $lang["action-upload-to-collection"]?>...</option> <?php } ?> <!-- end upload--> <!-- edit collection --> <?php if (!hook("replacecompactstyleeditcollection","",array("collection"=>$collection,"count_result"=>$count_result,"cinfo"=>$cinfo,"colresult"=>$colresult,"col_editable"=>$col_editable))){?> <?php if (!checkperm("b") && (!collection_is_research_request($collection)) || (!checkperm("r"))) { ?> <?php if (($userref==$cinfo["user"]) || (checkperm("h"))) {?><option value="<?php echo htmlspecialchars($collection) ?>|0|0|<?php echo $baseurl_short?>pages/collection_edit.php?pagename=<?php echo urlencode($pagename) ?>&ref=<?php echo urlencode($collection)?>&offset=<?php echo urlencode($offset)?>&col_order_by=<?php echo urlencode($col_order_by) ?>&sort=<?php echo urlencode($sort) ?>&find=<?php echo urlencode($find)?>|main|false">> <?php echo $lang["editcollection"]?>...</option><?php } ?> <?php } else { $research=sql_value("select ref value from research_request where collection='$collection'",0); ?> <option value="<?php echo htmlspecialchars($collection) ?>|0|0|<?php echo $baseurl_short?>pages/team/team_research.php|main|false">> <?php echo $lang["manageresearchrequests"]?>...</option> <option value="<?php echo htmlspecialchars($collection) ?>|0|0|<?php echo $baseurl_short?>pages/team/team_research_edit.php?ref=<?php echo htmlspecialchars($research) ?>|main|false">> <?php echo $lang["editresearchrequests"]?>...</option> <?php } ?> <?php } ?> <!-- end edit collection --> <!-- delete --> <?php if (!checkperm("b") && (($userref==$cinfo["user"]) || checkperm("h")) && ($cinfo["cant_delete"]==0)) {?> <option id="delete" value="<?php echo htmlspecialchars($collection) ?>|<?php echo $lang["collectiondeleteconfirm"]?>|<?php echo $baseurl_short?>pages/collection_manage.php?delete=<?php echo urlencode($collection) ?>|<?php if (in_array($pagename,$main_pages)){echo $pagename.'.php?offset='.$offset.'&col_order_by='.$col_order_by.'&sort='.$sort.'&find='.urlencode($find);} else { echo $baseurl_short.'pages/collections.php';}?>|<?php if (in_array($pagename,$main_pages)){echo 'main';} else { echo 'collections';}?>|both">> <?php echo $lang["action-deletecollection"];?>...</option> <?php } ?> <!-- end delete and remove-->
} else { ?> <div id="CollectionMinTitle"><?php if (!hook("replacecollectiontitle")) { ?><h2><?php if ($collections_compact_style){?><a onclick="return CentralSpaceLoad(this,true);" href="<?php echo $baseurl_short?>pages/collection_manage.php"><?php } ?><?php echo $lang["mycollections"]?><?php if ($collections_compact_style){?></a><?php }?></h2><?php } ?></div> <!--Menu--> <div id="CollectionMinRightNav"><div id="MinSearchItem"> <?php if ($collections_compact_style){ draw_compact_style_selector($usercollection); if ($thumbs=="show") { ?><a style="display:inline;" onClick="ToggleThumbs();return CollectionDivLoad(this,true);" href="<?php echo $baseurl_short?>pages/collections.php?thumbs=hide">> <?php echo $lang["hidethumbnails"]?></a><?php } ?><?php if ($thumbs=="hide") { ?> <a href="<?php echo $baseurl_short?>pages/collections.php?thumbs=show" onClick="ToggleThumbs();return CollectionDivLoad(this,true);">> <?php echo $lang["showthumbnails"]?></a></div><?php } ?><?php } else { ?> <ul> <?php if ((!collection_is_research_request($usercollection)) || (!checkperm("r"))) { ?> <?php if (checkperm("s")) { ?><?php if (!$collections_compact_style){?><li><a onclick="return CentralSpaceLoad(this,true);" href="<?php echo $baseurl_short?>pages/collection_manage.php"><?php echo $lang["managemycollections"]?></a></li><?php } ?> <?php if ($contact_sheet==true) { ?> <li><a onclick="return CentralSpaceLoad(this,true);" href="<?php echo $baseurl_short?>pages/contactsheet_settings.php?ref=<?php echo urlencode($usercollection) ?>"> <?php echo $lang["contactsheet"]?></a></li> <?php } ?> <?php if ($allow_share) { ?><li><a onclick="return CentralSpaceLoad(this,true);" href="<?php echo $baseurl_short?>pages/collection_share.php?ref=<?php echo urlencode($usercollection) ?>"><?php echo $lang["share"]?></a></li><?php } ?> <?php if (($userref==$cinfo["user"]) || (checkperm("h"))) {?><li><a onclick="return CentralSpaceLoad(this,true);" href="<?php echo $baseurl_short?>pages/collection_edit.php?ref=<?php echo urlencode($usercollection) ?>"> <?php echo $allow_share?$lang["action-edit"]:$lang["editcollection"]?></a></li><?php } ?> <?php if ($preview_all){?><li><a onclick="return CentralSpaceLoad(this,true);" href="<?php echo $baseurl_short?>pages/preview_all.php?ref=<?php echo urlencode($usercollection) ?>"><?php echo $lang["preview_all"]?></a></li><?php } ?> <?php hook('collectiontool2min');?> <?php if ($feedback) {?><li><a onclick="return CentralSpaceLoad(this,true);" href="<?php echo $baseurl_short?>pages/collection_feedback.php?collection=<?php echo urlencode($usercollection)?>&k=<?php echo urlencode($k) ?>"> <?php echo $lang["sendfeedback"]?></a></li><?php } ?> <?php } ?> <?php } else { if (!hook("replacecollectionsresearchlinks")){