Robert
Forum Replies Created
-
Forum: Reviews
In reply to: [SharDB] Does exactly what it is supposed to doDo as the error tells you to do, add the line
//SharDB Settings require_once('db-settings.php');
To your wp-config.php
Forum: Plugins
In reply to: [Easy Instagram] Instagram Sandbox mode does not work!I see Instagram is saying that it’s not possible to get apps that only showcase content in a widget approved, and that they should work in sandbox mode. If they are not working, then the author needs to make changes. Any chance to take a look?
I have the same issue I tried re-saving and it worked for one post-type, but for the other I get a warning saying “It is not recommended to have same plural and singular name for a Post Type. Please use a different name for the singular and plural names.” after ignoring the warning it does not seem to save the post-type, and any changes I make remain unsaved.
I did some further digging, this error seems to hide any other error messages, so it seems to save the page, but due to other errors it does not save the page and does not display an error message.
I got it to work by adding the category to the wpcf-custom-types and wpcf-custom-taxonomies options serialized data directly in the wp_options table in the database
Forum: Plugins
In reply to: [Hupso Social Media Share Buttons] Out of order?The plugin seems to lag on all pages that it is used because your server is down. Why does the plugin need to contact your server to work?
Please don’t use the excuse that dot.png is needed for loading .js or keeping the .js up to date without updating the plugin.
Forum: Networking WordPress
In reply to: Updating to 3.7 archived all of my multisite installationsI have the exact same issue on my install, all blogs had been set to archived.
I had to run
UPDATE
wp_blogsSET
archived=0
on my database, seems to be working now, but I am a bit afraid to run the
wp-admin/network/upgrade.php script…Forum: Plugins
In reply to: [WP-Admin Search Post Meta] Result displayed multiple times.I also have this bug, a fix would be great ??
Forum: Plugins
In reply to: [Simple Facebook Connect] February 2013 Breaking ChangesYeah, I just got this email too. Will there be an update?
I have the exact same problem, no matter what I do, posts won’t expire.
Forum: Fixing WordPress
In reply to: scheduling for custom post types?I have the same problem.
Forum: Plugins
In reply to: [Plugin: Contact Form 7] Saving form data into a cookieI want to do this to, any luck to get it working?
Forum: Fixing WordPress
In reply to: Custom Post Types Paginated Category Archive = 404Thanks a lot! Been puling out my hair for a couple of hours now…
Forum: Plugins
In reply to: [p2 theme] making posts outside of frontpageI made it work
Although it requires a lot of file editing. I will add my changes below, it works for me.
Make the script load post from correct category:
js.php
Find
var isFirstFrontPage = <?php echo $page_options['is_first_front_page'] ?>; var isFrontPage = <?php echo $page_options['is_front_page'] ?>;
Replace with
var isFirstFrontPage = <?php echo 1 //$page_options['is_first_front_page'] ?>; var isFrontPage = <?php echo 1 //$page_options['is_front_page'] ?>; var thecategoryid = <?php if($page_options['is_front_page']!=1){ $category11 = get_the_category(); echo $category11[0]->cat_ID; }else{ echo "false"; } ?>;
p2.js
Correct js category query, around line 107var queryString = ajaxUrl +'&action=get_latest_posts&load_time=' + pageLoadTime + '&frontpage=' + isFirstFrontPage+ '&thecategoryid=' + thecategoryid;
ajax.php
Correct database query
Replace function get_latest_posts()function get_latest_posts() { $load_time = $_GET['load_time']; $frontpage = $_GET['frontpage']; $thecategoryidunsafe = $_GET['thecategoryid']; $thecategoryid = filter_var($thecategoryidunsafe, FILTER_SANITIZE_NUMBER_INT); if (is_numeric ($thecategoryid )){ $catquer = "&cat=$thecategoryid"; } $num_posts = 10; // max amount of posts to load $number_of_new_posts = 0; query_posts('showposts=' . $num_posts . '&post_status=publish'.$catquer); ob_start(); while (have_posts()) : the_post(); $current_user_id = get_the_author_meta( 'ID' ); if ( get_gmt_from_date( get_the_time( 'Y-m-d H:i:s' ) ) <= $load_time ) continue; $number_of_new_posts++; $post_request_ajax = true; require dirname(__FILE__) . '/../entry.php'; endwhile; $posts_html = ob_get_clean(); if ( $number_of_new_posts != 0 ) { nocache_headers(); echo json_encode( array( 'numberofnewposts' => $number_of_new_posts, 'html' => $posts_html, 'lastposttime' => gmdate('Y-m-d H:i:s') ) ); } else { header("HTTP/1.1 304 Not Modified"); } }
I also need multiple categories per post, the p2-theme does not do this out of the box.
Make the postform post “post_cat” in this format: “cat1,cat2,cat3” That’s easy so I wont write that here.
Then you need to make the p2-theme support multiple categories per post.
ajax.php
My solution:
//snip /* $accepted_post_cats = apply_filters( 'p2_accepted_post_cats', array( 'post', 'quote', 'status', 'link' ) ); $post_cat = ( in_array( $_POST['post_cat'], $accepted_post_cats ) ) ? $_POST['post_cat'] : 'post'; */ $post_cat = filter_input(INPUT_POST, 'post_cat' , FILTER_SANITIZE_SPECIAL_CHARS); $post_cat = explode(",",$post_cat); $catids = array(); foreach($post_cat as $singlecat){ if ( !category_exists( $singlecat ) ) wp_insert_category( array( 'cat_name' => $singlecat ) ); $singlecat = get_category_by_slug( $singlecat ); array_push($catids,$singlecat->cat_ID); } /* Add the quote citation to the content if it exists */ if ( !empty( $_POST['post_citation'] ) && 'quote' == $post_cat->slug ) { $post_content = '<p>' . $post_content . '</p><cite>' . $_POST['post_citation'] . '</cite>'; } $post_id = wp_insert_post( array( 'post_author' => $user_id, 'post_title' => $post_title, 'post_content' => $post_content, 'post_type' => $post_type, 'post_category' => $catids, //snip
I think that’s all, good luck!
Forum: Fixing WordPress
In reply to: Apply filters to get_the_content()Wow, just what I was looking for! Thanks for sharing ??