Spamboy
Forum Replies Created
-
Forum: Plugins
In reply to: Twitter Tool – No Links Show Up When I Post?There is a similiar thread here:
https://www.ads-software.com/support/topic/299653
The issue is happening to me also. I’ve downgraded to 1.62b to see how that works (I will know later this afternoon).
Forum: Plugins
In reply to: SQL query to change post categoryI didn’t know the SQL, but I created a simple plugin that dumps a SQL trace to the screen whenever you edit a post. You could use this dump to pull the SQL statements you need:
<?php /* Plugin Name: Spamboy SQL Trace Plugin URI: https://www.spamboy.com/ Version: 0.1 Author: <a href="https://www.spamboy.com/">Spamboy</a> Description: Description goes here */ // Functions function sb_sql_trace($post_ID) { global $wpdb; $sb_filename= '../SQL_trace_' . date("Ymd_His") . '.txt'; $sb_file = fopen($sb_filename, 'w') or die("can't open file"); if(SAVEQUERIES) { foreach($wpdb->queries as $sb_query){ $stringData = $sb_query[0] . "\n\n"; fwrite($sb_file, $stringData); } } fclose($sb_file); } // Actions add_action('edit_post', 'sb_sql_trace'); ?>
Forum: Fixing WordPress
In reply to: Changing the Medium or Thumbnail size for images AFTER uploading?That’s a good point regarding existing URLs. It might make sense to request a change to the core code which generates filenames for medium-sized pictures, so that there’s some forward-compatability for users that switch themes in the future.
Forum: Themes and Templates
In reply to: How to detect current archive pageAlthough it’s not a solution provided by calling a delivered function, digging around the link-template.php file gave me the means to a homegrown solution.
I grabbed snippets of OOTB code and came up with this:
<?php $sb_min_page = intval($wp_query->min_num_pages); $sb_max_page = intval($wp_query->max_num_pages); $sb_cur_page = intval($paged); ?>
Then, at the beginning of my category archive I had the following code, which either will show a link to the previous page (if on a page above Page 1), or a placeholder for a link to the previous category (once I code it):
<?php if ($sb_cur_page == $sb_min_page) { echo "GO TO PREVIOUS CATEGORY"; } else { ?> <?php previous_posts_link('Previous Page') ?></div> <?php } ?>
If anyone has a cleaner solution, I’m down with that.
Forum: Plugins
In reply to: Show some code based on category pageCan you post the code you used? I’m trying to do something similar on my site (show certain code only on the first and last pages of a category archive). Thanks!