Changeset 765497
- Timestamp:
- 09/01/2013 09:00:19 PM (13 years ago)
- Location:
- soundcloud-sound-competition/trunk
- Files:
-
- 2 added
- 4 edited
-
Classes/class-remixers.php (modified) (4 diffs)
-
css/style.css (modified) (2 diffs)
-
images/button-latest.png (added)
-
images/button-rating.png (added)
-
readme.txt (modified) (2 diffs)
-
soundcloud-sound-competition.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
soundcloud-sound-competition/trunk/Classes/class-remixers.php
r727715 r765497 41 41 $public_query_vars[] = 'rmxid'; 42 42 $public_query_vars[] = 'voting_rmx'; 43 $public_query_vars[] = 'sortid'; 43 44 return $public_query_vars; 44 45 } … … 76 77 //echo($session_ip."-".$session."<br>"); 77 78 78 // Get rmx79 //Variables 79 80 $remix_id = urldecode(get_query_var('rmxid')); 80 81 $voting_rmx = urldecode(get_query_var('voting_rmx')); 82 $sort_id = urldecode(get_query_var('sortid')); 81 83 $remix_db_slug = $atts['type']; 84 85 86 if ($sort_id != null) { 87 88 if ($sort_id != null && $sort_id == 1) { 89 $_SESSION['sort'] = "1"; 90 } 91 else { 92 $_SESSION['sort'] = "2"; 93 } 94 } 95 82 96 83 97 //Hvis voting_rmx så skal låten registreres hvis den ikke har blitt votet før på den brukeren. … … 135 149 //------------------------------------------------------------------------------------------ 136 150 if ($remix_id ) { 151 //Dokumentasjon http://codex.wordpress.org/Function_Reference/add_query_arg 152 //http://codex.wordpress.org/Function_Reference/get_query_var 153 //http://wordpress.stackexchange.com/questions/31821/pretty-url-with-add-query-var 137 154 $base_url = $the_url; 138 155 $base_url_voting = $the_url; 139 156 $base_url_remixers = $the_url; //Getting current url 140 157 $params3 = array( 'rmxid' ); 141 $params4 = array( 'voting_rmx' ); 158 $params4 = array( 'voting_rmx' ); 159 //$params5 = array( 'sortid' ); 142 160 $base_url_voting = remove_query_arg( $params3, $base_url_voting ); 143 $base_url_remixers = remove_query_arg( $params4, $base_url_remixers ); 161 $base_url_remixers = remove_query_arg( $params4, $base_url_remixers ); 162 //$base_url_sortid = remove_query_arg( $params5, $base_url_sortid ); 144 163 $base_url = remove_query_arg( $params3, $base_url ); 145 $base_url = remove_query_arg( $params4, $base_url ); 164 $base_url = remove_query_arg( $params4, $base_url ); 165 //$base_url = remove_query_arg( $params5, $base_url ); 146 166 /*************************************************************************************** 147 167 LIST ONE … … 176 196 }//end if sql res 177 197 178 echo("<a href='".$base_url."'><h2>All entrees</h2></a> <br>");198 echo("<a href='".$base_url."'><h2>All entrees</h2></a>"); 179 199 180 200 }//End if remix_id 181 201 202 //echo("<a href='".add_query_arg( array( 'sortid' => 1 ), $base_url )."'>Latest uploads</a> "."<a href='".add_query_arg( array( 'sortid' => 2 ), $base_url )."'>Highest rated</a><br>"); 203 _e("<div style=\"float:right;\"><a id=\"ken_latest\" href='".add_query_arg( array( 'sortid' => 1 ), $base_url )."'>Latest uploads</a> <a id=\"ken_rated\" href='".add_query_arg( array( 'sortid' => 2 ), $base_url )."'>Highest rated</a></div><div id=\"clear\">"); 182 204 183 205 /*************************************************************************************** 184 206 LIST ALL 185 207 ****************************************************************************************/ 186 208 //Sort 209 if ($_SESSION['sort'] == 1) { 210 $sort_query = "ORDER BY rce_id DESC"; 211 } 212 else { 213 $sort_query = "ORDER BY rce_vote_count DESC"; 214 } 215 187 216 // This query selects all contracts that are published 188 $sql = " 189 SELECT * FROM ".$wpdb->prefix."ken_remixcomp_entrees 217 $sql = "SELECT * FROM ".$wpdb->prefix."ken_remixcomp_entrees 190 218 JOIN ".$wpdb->prefix."ken_remixcomp_users ON rcu_id = rce_rcu_id 191 WHERE rce_remix='".$remix_db_slug."';"; 192 $results = $wpdb->get_results($sql); // Run our query, getting results as an object 219 WHERE rce_remix='".$remix_db_slug."' ".$sort_query.";"; 220 221 $results = $wpdb->get_results($sql); // Run our query, getting results as an object 193 222 194 223 if (!empty($results)) { // If the query returned something -
soundcloud-sound-competition/trunk/css/style.css
r727715 r765497 27 27 } 28 28 29 #ken_latest { 30 margin-bottom: 5px; 31 background: url(../images/button-latest.png) no-repeat 0 0; 32 height: 21px; 33 width: 89px; 34 display: inline-block; 35 text-indent: -9999px; 36 opacity: 0.6; 37 } 38 #ken_latest:hover { 39 opacity: 1; 40 } 41 #ken_rated { 42 margin-bottom: 5px; 43 background: url(../images/button-rating.png) no-repeat 0 0; 44 height: 21px; 45 width: 90px; 46 display: inline-block; 47 text-indent: -9999px; 48 opacity: 0.6; 49 } 50 #ken_rated:hover { 51 opacity: 1; 52 } 53 29 54 #ken_upload { 30 55 margin-bottom: 5px; … … 139 164 top:0; 140 165 right:0; 141 width: 5 0px;166 width: 55px; 142 167 text-align: right; 143 168 border: 0px solid #000; -
soundcloud-sound-competition/trunk/readme.txt
r731803 r765497 4 4 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=U7ZQC4QH7MVP2 5 5 Requires at least: 3.0 6 Tested up to: 3. 57 Stable tag: 0.9.2. 36 Tested up to: 3.6 7 Stable tag: 0.9.2.4 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 99 99 == Changelog == 100 100 101 = 0.9.2.4 = 102 * Added sorting on last uploaded and highest rating on the competition page. 103 101 104 = 0.9.2.3 = 102 105 * Updated to new Soundcloud API. -
soundcloud-sound-competition/trunk/soundcloud-sound-competition.php
r729381 r765497 4 4 Plugin URI: http://webhjelpen.no/wordpress-plugin/soundcloud-sound-competition/ 5 5 Description: Host your own Sound Contest integrated with SoundCloud, users connect easy with SoundCloud to choose track to add to your competition. Everything within your WordPress web site. 6 Version: 0.9.2. 36 Version: 0.9.2.4 7 7 Author: Kenneth Berentzen 8 8 Author URI: http://webhjelpen.no/wordpress-plugin
Note: See TracChangeset
for help on using the changeset viewer.