umchal
Forum Replies Created
-
Okay, adding this rule to theme’s style.css (twenty-twelve) seems to have an effect.
.entry-content .treeview .placeholder { display:none; }However, only the root categories are shown and the child elements (files) do not appear. And when the root category links are clicked, it displays the Not Found page.
[Edit]
Strange, now it does not open the Not Found page when the category links are clicked. It properly displays the child elements. Thank you.I wonder if it is possible to show the expanded view from the beginning without navigating to child elements.
Thanks for the reply.
I added the rule to my theme’s style.css but did not seem to work. Maybe the plugin’s stylesheets are loaded after the theme’s stylesheet? In that case which file do I need to edit?
Adding the rule via the admin page, WP-Filebase -> Edit Stylesheet did not work either.
Forum: Plugins
In reply to: [Feature A Page Widget] Feature Request: Set max-width and max-heightYes, to make it 300px x 300px, the following code works. Thanks.
// create custom image size, 80x80 with hard crop add_image_size( 'fpw_custom_thumbnail', 300, 300, true); // override the featured image with custom size image function fpw_custom_featured_image( $featured_image, $featured_page_id ) { return get_the_post_thumbnail( $featured_page_id, 'fpw_custom_thumbnail' ); } add_filter( 'fpw_featured_image', 'fpw_custom_featured_image', 10, 2 );Adding the style rule seemed not necessary when the image is set to a larger scale by the way.
Also changing the values in the following line in feature-a-page-widget.php worked. But this edits the plugin code so it’s not recommended since it will be gone after an plugin update.
add_image_size( 'fpw_square', 200, 200, true );Currently setting a custom width and height requires a little bit complicated coding for end users so maybe it’s an good option to consider implemented as an option.
Forum: Plugins
In reply to: [Feature A Page Widget] Possible to include html code in experpt?Thanks for the great response. I’m looking forward to the update.
[Edit]
I just briefly looked into the code in fpw_widget.class.php and changed the lines around #162,if( class_exists( 'RichTextExcerpts' ) ) $excerpt = wp_kses_decode_entities( $excerpt );to
$excerpt = wp_kses_decode_entities( $excerpt ); $excerpt = htmlspecialchars_decode($excerpt);and it worked.
So I’d like to suggest a feature to implement an option which allows to enforce HTML code (perform htmlspecialchars_decode() internally). Maybe a check box in the widget would be sufficient I guess.
Forum: Plugins
In reply to: [Feature A Page Widget] Possible to include html code in experpt?Thanks for the reply, Mark.
I just tried the plugin and indeed the rich text editor appeared in the excerpt field but the result was the same. The widget shows the literal HTML code. I’m using WordPress 3.5.
And for the first time when I tried to save the options of Rich Text Excerpts via the admin page, it threw these errors if that is relevant. It does not throw the errors after that any more.
Warning: trim() expects parameter 1 to be string, array given in .../wp-content/plugins/rich-text-excerpts/rich-text-excerpts.php on line 339 Warning: trim() expects parameter 1 to be string, array given in .../wp-content/plugins/rich-text-excerpts/rich-text-excerpts.php on line 344 Warning: Cannot modify header information - headers already sent by (output started at .../wp-content/plugins/rich-text-excerpts/rich-text-excerpts.php:339) in .../wp-includes/pluggable.php on line 876Oh. I wish it were possible. Thanks for the reply.
I’m having the same problem with IE8. I disabled all other plugins but it still occurs.
Oh really, thank you!
Forum: Plugins
In reply to: [Paid Downloads] Paid Downloads Plugin not working with WordPress 3.5After I upgraded WordPress to 3.5, I just got a customer who asked me to send the download link after the payment was completed through Paypal. I sent him a link manually and he does not tell if he did not get a link from Paypal. This is an indication that it might not be functioning.
I don’t have a credit card with me for the time being so I cannot test it by myself to see if the Paypal payment is working fine or not. I tried the Sandbox mode but could not figure out how to set it up.
I’m wondering what to do now. Downgrading the site is a pain. Trying another plugin for e-commerce may be an option but many of them require the site to be a whole shopping site and it’s hard to set up. This plugin on the other hand, just let us place a purchasable download link very easily, which I really like about.
I hope the compatibility issue gets fixed soon.
Forum: Hacks
In reply to: wp_unschedule_event() and wp_clear_scheduled_hook() do not clear eventsWhen I put wp_schedule_event() in register_activation_hook(), it started not creating multiple events. Thanks..
Forum: Hacks
In reply to: wp_unschedule_event() and wp_clear_scheduled_hook() do not clear eventsIt seems
wp_unschedule_event()andwp_clear_scheduled_hook()cannot delete events without the exact the same argument having passed when they were registered.I looked into the core and wrote a custom function for it.
function WPUnscheduleEventsByName($strEventName) { // this function removes registered WP Cron events by a specified event name. $arrCronEvents = _get_cron_array(); foreach ($arrCronEvents as $nTimeStamp => $arrEvent) if (isset($arrCronEvents[$nTimeStamp][$strEventName])) unset( $arrCronEvents[$nTimeStamp] ); _set_cron_array( $arrCronEvents ); }The whole sample code.
<?php /* Plugin Name: Testing Event Schedules */ define("TESTEVENTNAME", 'Sample_Event'); if( !wp_next_scheduled( TESTEVENTNAME ) ) wp_schedule_event( time(), 'twicedaily', TESTEVENTNAME, array('Hello world!')); register_deactivation_hook(__FILE__, 'Clear_Events'); function Clear_Events() { WPUnscheduleEventsByName(TESTEVENTNAME); } function WPUnscheduleEventsByName($strEventName) { // this function removes registered WP Cron events by a specified event name. $arrCronEvents = _get_cron_array(); foreach ($arrCronEvents as $nTimeStamp => $arrEvent) if (isset($arrCronEvents[$nTimeStamp][$strEventName])) unset( $arrCronEvents[$nTimeStamp] ); _set_cron_array( $arrCronEvents ); } add_action( TESTEVENTNAME , array(new TestClass, 'Log') // the method , 10 // the priority. 10 is the default , 1 // the number of argument specified in the wp_schedule_event() function ); class TestClass { function Log($parameter='') { file_put_contents(dirname(__FILE__) . '/log.txt', 'parameter: ' . $parameter . PHP_EOL, FILE_APPEND); } }However, it is still a mystery that two events are added when activating this plugin. I’d like to make it only a single event being added.
Great to hear it is in your to-do list.
I tried customizing it myself and found this working. The styling might need to be improved but I would like to leave it for you or other experts.
In class-bwp-syntax.php around the line #540 in the
extract()function, inserting the following will add the src attribute.'src' => '',Around the line #730, the src value needs to be inserted into the variable $output. So adding this works.
$output .= empty($atts['src']) ? '' : '<div style="height:2em;"><span style="font-weight:bold;">' . $atts['src'] . '</span></div>';That’s it.
I found a solution by customizing class-bwp-syntax.php.
Around the line number #531, change this code block
extract(shortcode_atts(array( 'lang' => $this->options['select_default_language'], // assume it is the default lang 'toggle' => $this->options['enable_toggle'], // set to 'yes' or 'no' 'start' => 1, 'extra' => '', // string - list of lines to be double highlighted - e.g. 1,3,5 'inline' => '', // set to 'yes' 'nested' => '', // set to 'yes' 'parse' => 'yes', // set to 'no' 'strict' => '' // set to 'yes' ), $atts));to
extract(shortcode_atts(array( 'lang' => $this->options['select_default_language'], // assume it is the default lang 'toggle' => $this->options['enable_toggle'], // set to 'yes' or 'no' 'start' => 1, 'extra' => '', // string - list of lines to be double highlighted - e.g. 1,3,5 'inline' => '', // set to 'yes' 'nested' => '', // set to 'yes' 'parse' => 'yes', // set to 'no' 'wlw' => '', // set to yes 'strict' => '' // set to 'yes' ), $atts));This adds a custom shortcode parameter “wlw”
Insert the following code around the line #574.
if ($atts['wlw'] != '') { $content = strip_tags($content, "<br><br /><br/>"); $content = str_replace(array("<br>", "<br />", "<br/>"), PHP_EOL, $content); }When posting an article, enclose the code with
[code wlw=”yes” lang="php"] ...code...[/code](“codes inside [code] shortcodes." in the Parse Options has to be enabled via the admin panel.)Hi OddOneOut,
Have you had any chance to look into it? I’m hoping this is implemented. If you need someone to test, let me know.
Regards,
I wanted to ask the same thing and found this post. I also wanted a dynamic area in a page. Sorry to hear that it’s not possible.