lacroixca
Forum Replies Created
-
Forum: Plugins
In reply to: [Sports Manager] Big changes coming up…Send me an email. Thank you.
Forum: Plugins
In reply to: [Sports Manager] Big changes coming up…It’s showing up just fine for me… What WP version do you have?
Perhaps, try to delete and reinstall?
Forum: Plugins
In reply to: [Sports Manager] Big changes coming up…For soccer aka football, what other stats than those are important? MLS random player stats
Actually, I would need a detailed list with abbreviations…
Someone?
Forum: Plugins
In reply to: [Sports Manager] Big changes coming up…Don’t worry, I’ve been working on it all weekend. It’ll be ready soon ??
Forum: Plugins
In reply to: [Sports Manager] Big changes coming up…Forum: Plugins
In reply to: [Sports Manager] Big changes coming up…Hey Seeyar,
Thanks for the feedback.
First, what do you mean, not on the right side? (it should normally at the bottom left of the menu bar)
Second, in a sense, soccer is already covered… except for individual stats. You can still manage players, games, locations, teams, clubs.
For me to add new sport, I need to know all the relevant stats for that sport. For soccer, I would need a list of all measured & calculated stats.
e.g. # of goals is a measured stat. # of goals per game is a calculated one.
I’m thinking of adding soccer as my next supported sport. Perhaps you could help me finding all the important stats.
Thanks.
Forum: Plugins
In reply to: [Sports Manager] Big changes coming up…It will be! At least wait for v1.1
Forum: Plugins
In reply to: [Sports Manager] Big changes coming up…For example, the teams database table will be reformated. It will be split in two: clubs and teams. A team will be this year’s formation of a club.
e.g. The NY Yankees with their logo and information will be added to the database as a club. The 2013 formation of the Yankees’ club will be added as a team.
Such changes will require a new Sports Manager installation!
Forum: Plugins
In reply to: [Sports Manager] Frontend will come soon…Yup,
Sorry for that. I’m still in the midst of touching up so many features.
In the meantime, go look at baseballoutremont.com
Here are different examples: ranking, stats leaders, league stats, schedule, playoff schedule, individual stats…
It’s using the Sports Manager Frontend!
Forum: Fixing WordPress
In reply to: Add Taxonomy Filter to Admin List for my Custom Post TypeWORKS IN WP 3.2!
custom_post_type: books
custom_taxonomy: genreOnly modify were it says: // change HERE
function restrict_books_by_genre() { global $typenow; $post_type = 'books'; // change HERE $taxonomy = 'genre'; // change HERE if ($typenow == $post_type) { $selected = isset($_GET[$taxonomy]) ? $_GET[$taxonomy] : ''; $info_taxonomy = get_taxonomy($taxonomy); wp_dropdown_categories(array( 'show_option_all' => __("Show All {$info_taxonomy->label}"), 'taxonomy' => $taxonomy, 'name' => $taxonomy, 'orderby' => 'name', 'selected' => $selected, 'show_count' => true, 'hide_empty' => true, )); }; } add_action('restrict_manage_posts', 'restrict_books_by_genre'); function convert_id_to_term_in_query($query) { global $pagenow; $post_type = 'books'; // change HERE $taxonomy = 'genre'; // change HERE $q_vars = &$query->query_vars; if ($pagenow == 'edit.php' && isset($q_vars['post_type']) && $q_vars['post_type'] == $post_type && isset($q_vars[$taxonomy]) && is_numeric($q_vars[$taxonomy]) && $q_vars[$taxonomy] != 0) { $term = get_term_by('id', $q_vars[$taxonomy], $taxonomy); $q_vars[$taxonomy] = $term->slug; } } add_filter('parse_query', 'convert_id_to_term_in_query');
The thing is that it displays the current time… There should be a line in shortcode.php or something like that… I just don’t know how to fix it.
Forum: Plugins
In reply to: [LeagueManager] [Plugin: LeagueManager] Split Score for CSS StylingThis is the table I use to display my schedule (matches.php). Replace the table in matches.php and it should do.
By the way, I used the gameday option to display the days of the week (here in French: lundi, mardi, mercredi…).
Hope it helps !
[Code moderated as per the Forum Rules. Please use the pastebin]
Forum: Fixing WordPress
In reply to: 'Like' feature for comments… not a Facebook plugin. Please feedback!Found everything I needed.
BUT I still don’t know how to replace mysql_connect part from my code.
Can you use $wpdb anywhere? Even in a folder inside the theme’s folder?
Grrr…
But the rest works!
Forum: Fixing WordPress
In reply to: 'Like' feature for comments… not a Facebook plugin. Please feedback!It WORKS !
in the HTML form section, when I call the ajaxFunction, the variables should be in between “”.
onclick="ajaxFunction('<?php comment_ID(); ?>', '<?php echo "ajaxLikes-"; comment_ID(); ?>')"
It looks goood! Now I need to add the user restriction.
Forum: Fixing WordPress
In reply to: 'Like' feature for comments… not a Facebook plugin. Please feedback!GOOOD NEWS !
I got it working with some AJAX, but now there’s just one little javacript/PHP error.
So please, forget about the previous post and code. Here’s the new thing.
- AJAX/Javascript in
<head></head>
, onclick:<script language="javascript" type="text/javascript"> <!-- //Browser Support Code function ajaxFunction(liked_comment_ID, like-button-ID){ var ajaxRequest; // The variable that makes Ajax possible! try{ // Opera 8.0+, Firefox, Safari ajaxRequest = new XMLHttpRequest(); } catch (e){ // Internet Explorer Browsers try{ ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try{ ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e){ // Something went wrong alert("Your browser broke!"); return false; } } } // Create a function that will receive data sent from the server ajaxRequest.onreadystatechange = function(){ if(ajaxRequest.readyState == 4){ var ajaxDisplay = document.getElementById(like-button-ID); ajaxDisplay.innerHTML = ajaxRequest.responseText; } } var queryString = "?liked_comment_ID=" + liked_comment_ID; ajaxRequest.open("GET", "<?php echo home_url( '/' ); ?>wp-content/themes/twentyten/getlikes.php" + queryString, true); ajaxRequest.send(null); } //--> </script>
- HTML form, in my theme’s (Twentyten) comment template:
class="like-button"> <input type="button" onclick='ajaxFunction(<?php comment_ID(); ?>, <?php echo "ajaxLikes-"; comment_ID(); ?>)' class="like-button" value="J'aime" /> </form> <div class="ajaxLikes" id="ajaxLikes-<?php comment_ID(); ?>"> <?php $comment_ID = get_comment_ID(); $likes = get_comment($comment_ID)->comment_likes; if ($likes==0) echo ''; else echo ' (' . $likes . ')'; ?></div>
- PHP action, activated by AJAX section:
<?php //error_reporting(E_ALL); //ini_set("display_errors", 1); //Connect to MySQL Server mysql_connect('localhost', 'login', 'password'); //Select Database mysql_select_db('db') or die(mysql_error()); //Retrieve data from Query String $liked_comment_ID = $_GET['liked_comment_ID']; //Escape User Input to help prevent SQL Injection $liked_comment_ID = mysql_real_escape_string($liked_comment_ID); //Build query_update $query_update = " UPDATE wp_comments SET comment_likes = comment_likes +1 WHERE comment_ID = '$liked_comment_ID' "; //Execute query_update mysql_query($query_update); //Build query_select $query_select = " SELECT comment_likes FROM wp_comments WHERE comment_ID = '$liked_comment_ID' "; //Execute query_select $query_result_select = mysql_query($query_select); //Display query_result_select $new_comment_likes = mysql_result($query_result_select, 0); echo "(" . $new_comment_likes . ")"; mysql_close(); ?>
Right now, when you click on J’aime, it doens’t work. Check it out: https://paycers.mechantdesign.com/archives/fan-club/jaime-les-paycers. BUT, I know for sure that the PHP action DOES WORK when activated. There’s a problem with the AJAX call…
Here again, what should I do to replace the mysql_connect by $wpdb?
I WOULD VERY LOVE FEEDBACK FROM ACTUAL DEVELOPPERS. I, of that I’m sure, am not one.
Thanks
- AJAX/Javascript in