Mr.Harmlos
Forum Replies Created
-
Forum: Plugins
In reply to: [WordPress HTTPS (SSL)] [Plugin: WordPress HTTPS] HTTPS partially secureWhile digging around in the problem
i added the priority 1 to all of your filters … didnt help ..^^
i found
// If URL matches home_url, but lacks www, add www // if ( strpos(get_option('home'), '://www.') !== false && strpos($url, '://www.') === false && parse_url($url, PHP_URL_HOST) != NULL ) { // $url_host = parse_url($url, PHP_URL_HOST); // $url_host_www = 'www.' . $url_host; // if ( strpos(get_option('home'), $url_host_www) !== false ) { // $string = str_replace($url_host, $url_host_www, $string); // } // }since i use no-ip.org and the free version doesnt allow www dns i deactivated the option … checkbox optionable for others maybe ?
looked into the devtools errors again ….
[blocked] The page at https://domain/ ran insecure content from http://domain/wp-content/themes/whiteboard/whiteboard/style.css.
[blocked] The page at https://domain/ ran insecure content from http://domain/wp-includes/js/l10n.js?ver=20101110.
[blocked] The page at https://domain/ ran insecure content from http://domain/wp-includes/js/jquery/jquery.js?ver=1.6.1.
[blocked] The page at https://domain/ ran insecure content from http://domainhttps/?ver=3.2.1.
[blocked] The page at https://domain/ ran insecure content from http://platform.twitter.com/anywhere.js?id=xxxxxxxxxx&v=1.
[blocked] The page at https://domain/ ran insecure content from http://domain/index.php?ak_action=aktt_css&v=2.4.
[blocked] The page at https://domain/ ran insecure content from http://domain/index.php?ak_action=aktt_js&v=2.4.
[blocked] The page at https://domain/ ran insecure content from http://domain/wp-content/plugins/wp-syntax/wp-syntax.css.This seems not normal [ http://domainhttps/?ver=3.2.1. ]
So as it seems to me like
function bloginfo didnt do anything …
and may be the non existing www messes up the regexp filter …
…
Forum: Plugins
In reply to: [WordPress HTTPS (SSL)] [Plugin: WordPress HTTPS] HTTPS partially secureThe problem is still peresistent …. and not resolved but ignored …
Forum: Plugins
In reply to: Big Problem – Filter / Hook – Pre DB insertSo F U C K yeah ::: dONE
function hashtags_to_tags($post_id, $post) { // both are needed ! $content = $post->post_content; // get the content of post preg_match_all( '/\B#(\w*[a-zA-Z-]+\w*)/', $content, $matches ); // filter hashtags $out = (array_values($matches)); // cleanup array fucking ugly but works wp_set_object_terms( $post_id, $tags = $out[0], $taxonomy = 'post_tag', $append = true ); // Universal for anny input } add_filter('save_post','hashtags_to_tags',2, 2); // High priority might not needed but the 2nd parameter isThis is an Universal Filter. Every post content is filterd AUTOMATICALLY.
it would be awesome if somebody with more Skills could make this a Plugin like :
http://ww.wp.xz.cn/extend/plugins/wordpress-filter/
Which isnt working automatically … and its old and should be updated.
Had some Bug´s wit 3.04 …Thx @rich ‘elfin’ Pedley … he tried to help …
Anyway im DONE … my problem is solved by me … So i´m the only problem that is left ^^
…off…
Forum: Plugins
In reply to: Big Problem – Filter / Hook – Pre DB insertI break together …. I think i got it now … with the almighty help of the worsepress commmunity …
Forum: Plugins
In reply to: Big Problem – Filter / Hook – Pre DB insertarray( ‘taxonomy’ => $tax_name ) ( $taxonomy = ‘post_tag’ )
This is where i have to write the tags in context with the Post id
…
Forum: Plugins
In reply to: Big Problem – Filter / Hook – Pre DB insert$label = $taxonomy->labels->name; if ( !is_taxonomy_hierarchical($tax_name) ) add_meta_box('tagsdiv-' . $tax_name, $label, 'post_tags_meta_box', $post_type, 'side', 'core', array( 'taxonomy' => $tax_name )); else add_meta_box($tax_name . 'div', $label, 'post_categories_meta_box', $post_type, 'side', 'core', array( 'taxonomy' => $tax_name ));do_action('add_meta_boxes', $post_type, $post); do_action('add_meta_boxes_' . $post_type, $post); do_action('do_meta_boxes', $post_type, 'normal', $post); do_action('do_meta_boxes', $post_type, 'advanced', $post); do_action('do_meta_boxes', $post_type, 'side', $post);File: Edit-form-advanced.php
As i understand this is the code used to get the tags in the editor linked to the post …
So the Tags are actually meta_boxes …
Forum: Plugins
In reply to: Big Problem – Filter / Hook – Pre DB insertTo remember: autosaved drafts get a $_POST[‘temp_ID’] …
hey what is ‘_Post’ …. ah okay – http://codex.ww.wp.xz.cn/Function_Reference/stripslashes_deep
Forum: Plugins
In reply to: Big Problem – Filter / Hook – Pre DB insertfunction hashtags_to_tags($post_id) { global $post; $content = $post->post_content; // get the content of post preg_match_all( '/\B#(\w*[a-zA-Z-]+\w*)/', $content, $matches ); // filter hashtags $out = (array_values($matches)); // cleanup array [expletive deleted] ugly but works wp_set_post_terms( $post_id, $tags = $out[0], $taxonomy = 'post_tag', $append = true ); }This works when published und updated afterwards …
Still not when just published …
I crawled through wordpress sourcecode and looked in the mysqldb …
I know now that the ‘tags’ are just linked with the posts and not saved in the same dataset …But i still dont get it why this doesnt work like i want …
I mean when you make a post manually you can add taggs but not when imported automatically from rss or whatever input …Help is appreciated …
Forum: Plugins
In reply to: Big Problem – Filter / Hook – Pre DB insertIm done for today …
This is still the best shot:
function hashtags_to_tags($post_id = 0) { $content = get_post($post_ID); /doesnt work atm preg_match_all( '/\B#(\w*[a-zA-Z-]+\w*)/', $content, $matches ); // preg_replace ( '(#)', '', $matches[0]); wp_set_post_tags( $post_id, $matches[0], $taxonomy = 'post_tag', $append = true ); } add_action('publish_post','hashtags_to_tags');It adds the tags as i want but i cant get any content input in the function …
I think this isnt possible … will have to find another solution
the 3rd time i try a new way … frustrating …
Want: Simply autoconvert twitter hashtags to wordpress tags.
Is wordpress not compatible with this simple small wish …
if i count the hours … i would be a week i´m sitting on this single problem.
Not cool – Im done for today ….
Forum: Plugins
In reply to: Big Problem – Filter / Hook – Pre DB insertwp_set_object_terms aka wp_set_post_terms as i posted above in combination with $post_id was the only thing that worked as i wanted …
But i cant get the content the same way …
Forum: Plugins
In reply to: Big Problem – Filter / Hook – Pre DB insertFound solution for “Submit for Review” Problem
add_filter( 'wp_insert_post_data', 'avoid_blog_page_permalink_collision', 10, 2 );in includes/ms.php line 738-759 …
have to set priority behind 10 so i set it to 11 😉
But no effect on the posted tags … X(
Forum: Plugins
In reply to: Big Problem – Filter / Hook – Pre DB insertI came up with
function hashtag_to_tag( $data , $postarr ) // wp_insert_post_data { $content = $data['post_content']; preg_match_all( '/\B#(\w*[a-zA-Z-]+\w*)/', $content, $matches ); $stringed = implode(",", $matches); $data['tags_input'] = $stringed; //'tags_input' => [ '<tag>, <tag>, <...>' ] //For tags. return $data; return $postarr; } add_filter('wp_insert_post_data', 'hashtag_to_tag', 2, 2);But
‘tags_input’ is only in – http://codex.ww.wp.xz.cn/Function_Reference/wp_insert_postNot in http://codex.ww.wp.xz.cn/Plugin_API/Filter_Reference/wp_insert_post_data
if i save this in functions.php of my template the Publish button changes to “Submit for Review” and the post is going nowhere and cant be found ….
Do i have to change the default array in wp_insert_post in post.php or where is the problem ???
if ( isset( $tags_input ) && is_object_in_taxonomy($post_type, 'post_tag') ) wp_set_post_tags( $post_ID, $tags_input );this is in function wp_insert_post line:2342
is this executed after thewp_insert_post_data ..i dont think so ..but i dont get it …Forum: Plugins
In reply to: Big Problem – Filter / Hook – Pre DB insertill try … if it works you have my gratitude for a looong time 😉
Forum: Plugins
In reply to: Big Problem – Filter / Hook – Pre DB insert$postdata= $wpdb->get_results(“SELECT * FROM $wpdb->posts WHERE ID=$post_id”); nope
I understand what you mean … i tried dozends of plugins codesnippets and whatever …
Most people used the the_content hook in the loop or cronjobs triggerd afterwards etc … but…
This is crazy … this is a one time job when the post is saved and a possible million times job when in the loop …
Forum: Plugins
In reply to: Big Problem – Filter / Hook – Pre DB insertglobal $data; $content = $data[‘post_content’]; nope
global $post; $content = $post[‘post_content’]; nope
global $postarr; $content = $postarr[‘post_content’]; nope$content = wp_get_object_terms( $post_id, $taxonomy = ‘post_content’, $args = string); Nope
$content = get_post($post_id, ARRAY_A); nope
$content = wp_get_single_post($post_id, ARRAY_A); nope