Title: Marble23's Replies | WordPress.org

---

# Marble23

  [  ](https://wordpress.org/support/users/marble23/)

 *   [Profile](https://wordpress.org/support/users/marble23/)
 *   [Topics Started](https://wordpress.org/support/users/marble23/topics/)
 *   [Replies Created](https://wordpress.org/support/users/marble23/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/marble23/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/marble23/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/marble23/engagements/)
 *   [Favorites](https://wordpress.org/support/users/marble23/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/users/marble23/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/marble23/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WordPress Sphinx Search Plugin] Security: sphinx must listen only on localhost](https://wordpress.org/support/topic/security-sphinx-must-listen-only-on-localhost/)
 *  [Marble23](https://wordpress.org/support/users/marble23/)
 * (@marble23)
 * [13 years ago](https://wordpress.org/support/topic/security-sphinx-must-listen-only-on-localhost/#post-3729996)
 * If you listen on other IPs you should have the correct firewall rules in place.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Custom rewrite rules go missing when using rewrite=> array(slug=>'foo')](https://wordpress.org/support/topic/custom-rewrite-rules-go-missing-when-using-rewrite-arrayslugfoo/)
 *  [Marble23](https://wordpress.org/support/users/marble23/)
 * (@marble23)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/custom-rewrite-rules-go-missing-when-using-rewrite-arrayslugfoo/#post-3492779)
 * Was not me on IRC. But thats good to know about the has_archive. What I don’t
   understand is why you would need to configure both. Seems archive should inherit
   from the rewrite by default? Maybe I am missing something.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Custom rewrite rules go missing when using rewrite=> array(slug=>'foo')](https://wordpress.org/support/topic/custom-rewrite-rules-go-missing-when-using-rewrite-arrayslugfoo/)
 *  [Marble23](https://wordpress.org/support/users/marble23/)
 * (@marble23)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/custom-rewrite-rules-go-missing-when-using-rewrite-arrayslugfoo/#post-3492777)
 * Ok, not sure if this is a bug or not. What I noticed is the “query_var” of the
   post type needs to match the “slug” in the rewrite rule.
 * What I was doing (not company name is hidden for client)
 * ‘query_var’ => ‘thecompanyname_store’
 * then in the rewrite rule:
    ‘slug’ => ‘store’
 * This doesn’t seem to work. I think this was breaking when generating the rewrite
   rules, which caused the categories and tags to not generate either. Flushing 
   rules, changing so both query var and slug matched fixed the problem.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Custom rewrite rules go missing when using rewrite=> array(slug=>'foo')](https://wordpress.org/support/topic/custom-rewrite-rules-go-missing-when-using-rewrite-arrayslugfoo/)
 *  [Marble23](https://wordpress.org/support/users/marble23/)
 * (@marble23)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/custom-rewrite-rules-go-missing-when-using-rewrite-arrayslugfoo/#post-3492776)
 * Hi Ross,
 * Are you experiencing this issues as well? I am running into the same problem.
   My custom post types work fine only if I set the permalink settings to “default”.
   All other options breaks them. I get the 404 page. I’ve set these up numerous
   times in the past. But on a brand new site with 3.5.1 its not working.
 * The plugin: “Rewrite Rules Inspector” shows them all missing. I’ve flushed the
   rules numerous times to no avail.
 * *edit* Also noticing Category and Tag rewrite rules are not getting generated
   either. Author, Search, comments etc are getting written.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP YouTube Lyte] Cache issue](https://wordpress.org/support/topic/cache-issue-2/)
 *  Thread Starter [Marble23](https://wordpress.org/support/users/marble23/)
 * (@marble23)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/cache-issue-2/#post-3673923)
 * Hi Frank.
 * Thanks! I will try to get this up this week. I was using your function and it
   worked perfectly.
 * ~ John
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP YouTube Lyte] Cache issue](https://wordpress.org/support/topic/cache-issue-2/)
 *  Thread Starter [Marble23](https://wordpress.org/support/users/marble23/)
 * (@marble23)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/cache-issue-2/#post-3673757)
 * Thanks for your help. I’ll use that next time. Having it in the admin would be
   very helpful. Cheers.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Simple Facebook Comments – Won't Work!](https://wordpress.org/support/topic/simple-facebook-comments-wont-work/)
 *  [Marble23](https://wordpress.org/support/users/marble23/)
 * (@marble23)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/simple-facebook-comments-wont-work/#post-2804781)
 * Hmm .. shouldn’t need any of that.
 *     ```
       <div id="fb-root"></div>
                   <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
       ```
   
 * Is all that is needed to load facebook comments.
 * The other stuff is theme specific divs.
 * Try making a copy of your comments file (back up) then with the comments.php 
   just delete everything and only put in the above and see if you see facebook 
   comments?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to integrate session/login authentication to non-wordpress pages w/ WP auth](https://wordpress.org/support/topic/how-to-integrate-sessionlogin-authentication-to-non-wordpress-pages-w-wp-auth/)
 *  [Marble23](https://wordpress.org/support/users/marble23/)
 * (@marble23)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/how-to-integrate-sessionlogin-authentication-to-non-wordpress-pages-w-wp-auth/#post-2806867)
 * I tried setting cookie path prior to calling wordpress and that didn’t work either.
 *     ```
       define( 'COOKIEPATH', '/' );
       define( 'SITECOOKIEPATH', '/' );
       ```
   
 * I have to take off but maybe can take a look later. I think its doable, but can’t
   find where it sets that cookie in the login process.
 * What I have right now is this, but it doesn’t solve the cookie issue:
 *     ```
       define( 'COOKIEPATH', '/' );
       define( 'SITECOOKIEPATH', '/' );
       define('COOKIE_DOMAIN', '.');
   
       define('ABSPATH', dirname(__FILE__) . '/wordpress/');
   
       include 'wordpress/wp-load.php';
   
       if ( is_user_logged_in() ) {
               echo 'logged in.';
       } else {
               include 'wordpress/wp-login.php';
       };
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to integrate session/login authentication to non-wordpress pages w/ WP auth](https://wordpress.org/support/topic/how-to-integrate-sessionlogin-authentication-to-non-wordpress-pages-w-wp-auth/)
 *  [Marble23](https://wordpress.org/support/users/marble23/)
 * (@marble23)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/how-to-integrate-sessionlogin-authentication-to-non-wordpress-pages-w-wp-auth/#post-2806855)
 * That might be because you have it in a sub directory? I can test it for a minute.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Where wordpress stores the sizes in db???](https://wordpress.org/support/topic/where-wordpress-stores-the-sizes-in-db/)
 *  [Marble23](https://wordpress.org/support/users/marble23/)
 * (@marble23)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/where-wordpress-stores-the-sizes-in-db/#post-2806410)
 * The actual sizes set in functions.php, if I am not mistaken, these are just stored
   in global array.
 * `$_wp_additional_image_sizes`
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Where wordpress stores the sizes in db???](https://wordpress.org/support/topic/where-wordpress-stores-the-sizes-in-db/)
 *  [Marble23](https://wordpress.org/support/users/marble23/)
 * (@marble23)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/where-wordpress-stores-the-sizes-in-db/#post-2806409)
 * For example:
 * `select * from wp_posts where post_parent=41233\G`
 * If there is an image attached to that post you’ll see something like this in 
   one of the results (I left out most of the result .. fyi)
 *     ```
       ID: 41234
        guid: http://somedomain.com/uploads/2012/06/back-fat.jpg
        menu_order: 0
        post_type: attachment
       ```
   
 * Then search search postmeta on that post_id:
 * `select * from wp_postmeta where post_id=41234\G`
 * and you’ll see what you are looking for, if I am reading your question correctly..
   heh.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Where wordpress stores the sizes in db???](https://wordpress.org/support/topic/where-wordpress-stores-the-sizes-in-db/)
 *  [Marble23](https://wordpress.org/support/users/marble23/)
 * (@marble23)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/where-wordpress-stores-the-sizes-in-db/#post-2806407)
 * An image is attached to a post as a post (of type attachment). Each post has 
   a set of post meta data, which is a serialize array of settings. It should have
   a key of “_wp_attachment_metadata” ..
 * So basically, if you view the post which has the attached image (like in edit
   view) you can see the post ID. Search the posts which have that parent post ID
   and you should find the image attached to that post. Then get that post ID and
   search the postmeta. You’ll see one with a key of the attachment metadata.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Simple Facebook Comments – Won't Work!](https://wordpress.org/support/topic/simple-facebook-comments-wont-work/)
 *  [Marble23](https://wordpress.org/support/users/marble23/)
 * (@marble23)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/simple-facebook-comments-wont-work/#post-2804704)
 * Not sure if this helps, but adding facebook comments is super simple. In my opinion,
   sometimes its easier not to use a plugin and edit a theme.
 * For example my comments.php file looks like this, and ignore the theme specific
   containers, you have the permalink and then the facebook container.
 * Then I just turn off comments in wp completely.
 *     ```
       <?php $link = get_permalink();?>
           <div id="respond">
               <div class="widget-title">
                   <h3 id="reply-title"><?php comment_form_title(); ?></h3>
               </div>
               <div style="float:left;">
                   <div id="fb-root"></div>
                   <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
                   <fb:comments href="<?php echo $link;?>" num_posts="2" width="620">
                   </fb:comments>
              </div>
           </div>
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [WPDB and PHP](https://wordpress.org/support/topic/wpdb-and-php/)
 *  [Marble23](https://wordpress.org/support/users/marble23/)
 * (@marble23)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/wpdb-and-php/#post-2806405)
 * Note: That code is bad. Its a text book case for sql injection. I’d advise against
   doing it like that and never pass variables directly from the URL into sql queries.
   You need to explicitly check $_GET[‘id’] before doing this.
 *     ```
       $select=$_GET['id'];
   
       mysql_select_db($database_Dbase, $Dbase);
       $query_Break = "SELECT * FROM TB WHERE TB.id='$select'";
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to integrate session/login authentication to non-wordpress pages w/ WP auth](https://wordpress.org/support/topic/how-to-integrate-sessionlogin-authentication-to-non-wordpress-pages-w-wp-auth/)
 *  [Marble23](https://wordpress.org/support/users/marble23/)
 * (@marble23)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/how-to-integrate-sessionlogin-authentication-to-non-wordpress-pages-w-wp-auth/#post-2806850)
 * If you include wp-config.php it should bootstrap all of wordpress so you can 
   use it in any php page.
 *     ```
       <?php
       include 'wp-config.php';
       if ( is_user_logged_in() ) {
       	echo 'Welcome, registered user!';
       } else {
       	header( 'Location: http://google.com' ) ;
       };
       ```
   

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/users/marble23/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/marble23/replies/page/2/?output_format=md)