Jeff Cole
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Newly created sub-sub-category not showing on admin Category pageNo I don’t have 2 categories with the same name. As I said the category was created fine – it just doesn’t display on the Admin page for Categories.
I happened across another plugin Simple Tags https://www.ads-software.com/extend/plugins/simple-tags that does exactly what I want with the function
st_get_tag_cloud('cloud_selection=count-desc&cloud_sort=count-desc&format=array&number=0&xformat=%tag_name%&category='.$cat_id)
Forum: Plugins
In reply to: slideshare plugin won’t display the slideshowI did a little investigation and it looks like the shortcode api is not parsing all the arguments, which it looks like the plugin tries to account for.
However we end up with index keys with ‘
#038;
‘ prefixing the expected name.I solved it by copying the original array to a new one with the correct index keys.
Line 100 was:
$r = wp_parse_args($args);
which becomes (with two new lines)
$rs = wp_parse_args($args); $r = array(); list($r['0'], $r['doc'], $r['w']) = array_values($rs);
It would be good if the plugin could be updated (perhaps in a more elegant manner than this hack?).
Thanks very much. It’s looking interesting.
Forum: Plugins
In reply to: Fatal error: Cannot redeclare cforms_activate()Thanks very much for sorting it out so simply. I look forward to the update.
It stopped that error but I still had a problem with the corrupted data so I went into phpMyAdmin and copied the cforms entry from the wp_options table from the old site to the new site and it all now works perfectly.
Forum: Plugins
In reply to: Fatal error: Cannot redeclare cforms_activate()Before importing the SQL into phpMyadmin on the new server I opened the gz file and extracted the text file. Then I did a search and replace in Notepad++ to change all references to the old host url to the new host url, then I also did a search and replace on the absolute path to the files on the server /home/etc/etc/htdocs/… Then I re gzipped it and imported it in phpMyadmin.
Is all that a problem for cforms?
Forum: Plugins
In reply to: Double separator on post pages with Yoast BreadcrumbsThanks for getting back so quickly. No it’s not a subcategory.
By the way it worked fine in 0.6.2.
Forum: Plugins
In reply to: Double separator on post pages with Yoast BreadcrumbsThanks very much for your replies. I am however definitely using Yoast Breadcrumbs 0.7.2.
The problem is on a category page on a test website (I’ll send you a URL through your contact form as I don’t want it published publicly at the moment) and when I look at the code using Firebug I find an incomplete anchor tag in between the two separators (sorry I was incorrect about the display:none) of the first post in the list of posts for that category.
Forum: Plugins
In reply to: Fatal error: Cannot redeclare cforms_activate()I get the same error after moving my WordPress 2.7 installation to a new host. (I copied and replaced all instances of the host name as well as the path name in the SQL. Everything else works perfectly fine.) cforms is version 9.4.
The first problem though was the message:
“It appears that WP has corrupted your cforms settings, the settings array can not be read properly.” when I go to the cforms settings page.
It shows me the array from the options table and says it will try and fix it, which it appears to do so, then asks me to deactivate and reactivate cforms. At this stage I get the above fatal error.
Any solutions anyone? Is it a bug in cforms?
Forum: Plugins
In reply to: aLinks pluginI found it by googling the lastest version ie alinks2.0.2.zip and found it here https://www.beste-telefoon.nl/wp-content/plugins/Zip/alinks2.0.2.zip
Forum: Fixing WordPress
In reply to: wp_query question about if..while<?php $featurePosts = new WP_Query('showposts=1'); ?>
ought to do what you want.
Forum: Themes and Templates
In reply to: Get posts based on page title?I’ve made the following work in the past:
<?php $page_cat = $post->post_title; //copy the page title ?> <?php $page_cat = strtolower($page_cat); // make it lower case only?> <?php $my_query = new WP_Query('category_name='.$page_cat); ?> <?php while ($my_query->have_posts()) : $my_query->the_post(); ?> stuff here <?php endwhile; ?>
Hope it helps.
Forum: Fixing WordPress
In reply to: Images on Widget’s Title or HTMLI’ve just discovered Samsarin PHP Widget which allows me to make the widget title into a link, just using html. I guess you could do the same for an image, although using css you would make it much more accessible.
Forum: Plugins
In reply to: Entry in a Custom Field becomes a Tag or CategoryThis plugin code above (Meta to Cat) is exactly what I need but I get a console error showing in Firebug and no action!
missing ; before statement dispatchCallback(null, "oninit", "onInit")tiny_mce_gzip.php (line 97) onLoad()tiny_mce_gzip.php (line 63) onLoad()tiny_mce_gzip.php (line 44) [Break on this error] var meditation-and-buddhism_cat_id = 'in-category-6';\n
The code as I ‘translated’ the plugin for my categories is:
<?php /* Plugin Name: Meta to Cat Version: 0.1 Plugin URI: https://labs.dagensskiva.com/ Description: Creates a cat for a specific key. Author: Henrik */ function set_cat_by_meta () { if (preg_match("/\/post/", $_SERVER['PHP_SELF'])) { ?> <script language="JavaScript" type="text/javascript"> document.onload = p2m_init(); // Hook functions to the key function p2m_init () { $('Event Type').onchange = function () { // Get the value in the select list var cat_value = $('Event Type').value; // The 'Meditation and Buddhism' category... var meditation-and-buddhism_cat_id = 'in-category-<?php echo get_cat_id('meditation and buddhism'); ?>'; if (cat_value == 'Meditation and Buddhism') $(meditation-and-buddhism_cat_id).checked = true; else $(meditation-and-buddhism_cat_id).checked = false; // The 'Buddhism' category... var buddhism_cat_id = 'in-category-<?php echo get_cat_id('buddhism'); ?>'; if (cat_value == 'Buddhism') $(buddhism_cat_id).checked = true; else $(buddhism_cat_id).checked = false; // The 'Meditation' category... var meditation_cat_id = 'in-category-<?php echo get_cat_id('meditation'); ?>'; if (cat_value == 'Meditation') $(meditation_cat_id).checked = true; else $(meditation_cat_id).checked = false; // The 'Retreats' category... var retreats_cat_id = 'in-category-<?php echo get_cat_id('retreats'); ?>'; if (cat_value == 'Retreats') $(retreatsr_cat_id).checked = true; else $(retreats_cat_id).checked = false; }; $('Level').onchange = function () { // Get the value in the select list var cat_value = $('Level').value; // The 'Newcomer' category... var newcomer_cat_id = 'in-category-<?php echo get_cat_id('newcomer'); ?>'; if (cat_value == 'Newcomer') $(newcomer_cat_id).checked = true; else $(newcomer_cat_id).checked = false; // The 'Friend' category... var friend_cat_id = 'in-category-<?php echo get_cat_id('friend'); ?>'; if (cat_value == 'Friend') $(friend_cat_id).checked = true; else $(friend_cat_id).checked = false; // The 'Sangha' category... var sangha_cat_id = 'in-category-<?php echo get_cat_id('sangha'); ?>'; if (cat_value == 'Sangha') $(sangha_cat_id).checked = true; else $(sangha_cat_id).checked = false; }; } </script> <?php } } add_action('admin_footer', 'set_cat_by_meta', 11); ?>
Any ideas what I’ve done wrong? (there are no extra whitespaces in my custom tags) I can’t see where there could be another ; put! I’ve tried changing single quotes to double quotes and adding extra double quotes but it looks like the php is being processed ok.
I’m not at all familiar with javascript so I may have made a silly mistake – I thought it might be to do with repeating the code for the second custom tag but that does not appear to be the case through testing.
Maybe there is a conflict with TinyMCE? I am using WordPress 2.3.3 on xampp.
Forum: Themes and Templates
In reply to: query_post Impacts is_page() ?I think I may have described what you are seeking in this topic:
https://www.ads-software.com/support/topic/91228
basically copying the page query into a temporary location before all the loops and returning it after.