Skip to content

Instantly share code, notes, and snippets.

View SagaraZD's full-sized avatar

Ganushka Gamage SagaraZD

  • Sagazweb
  • Sri Lanka
View GitHub Profile
@SagaraZD
SagaraZD / Uploads.xsl
Last active September 9, 2017 13:30
S3 Files Upload with Symphony - form-submit.js
<xsl:template match="data">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"> </script>
<script src="{$workspace}/js/form-submit.js"> </script>
<script src="{$workspace}/js/dropzone.js"> </script>
<style>
#upload_form { display: block; margin: 20px auto; background: #eee; border-radius: 10px; padding: 15px }
.progress { position:relative; width:100%; border: 1px solid #ddd; padding: 1px; height: 23px; border-radius: 3px; }
.bar { background-color: #B4F5B4; width:0%; height:20px; border-radius: 3px; }
.percent { position:absolute; display:inline-block; top:3px; left:48%; }
.dz-remove{ display:none;}
@SagaraZD
SagaraZD / functions.php
Created March 27, 2017 06:56
Organizing search results by post type on WordPress with Relevanssi - A Better Search
//Relevanssi Search results Organizing
add_filter('relevanssi_hits_filter', 'separate_result_types');
function separate_result_types($hits) {
$types = array();
$types['directories'] = array();
$types['post'] = array();
$types['download'] = array();
$types['videos'] = array();
$types['event-exhibition'] = array();
$types['magazines'] = array();