INAP and feed problems

Posted on Saturday the 28th of July, 2007 at 10:34 pm in News

If you use INAP and have noticed oddness with your full-text feeds lately, it may have been caused by INAP. Users that had the “custom options” selected would have their feeds trimmed as if it were a post. INAP 2.4.3 fixes this.

In other news, INAP is in the process of a major overhaul including a complete rewrite of most of its antiquated structure. When this process is complete it will be rebranded to demonstrate the totality of its features (it won’t be called INAP anymore because the name is too restrictive), but will be released as version 3.0

Related posts

  1. Sarat posted the following on July 14, 2007 at 4:38 pm.

    Aaron, First, thanks for the great plugin. I’m using INAP 2.4 with WP 2.2. One of my friends noticed that the ‘Reply to’ link in comments is not working in IE 7. IE throws a ‘Object required’ at the line where inap_request event occurs. Have you noticed this problem earlier? Any help dealing with this is greatly appreciated.

    Reply to Sarat
    1. Aaron posted the following on July 14, 2007 at 5:03 pm.

      What Javascript library are you using?

      Reply to Aaron
      1. Sarat posted the following on July 14, 2007 at 5:09 pm.

        The default library.

        Reply to Sarat
        1. Sarat posted the following on July 14, 2007 at 5:12 pm.

          Btw, it works on my machine but another friend is complaining that the ‘Reply to’ links are not working in Firefox either for him. You can check the blog at http://www.sarats.com/blog to see if there are any glaring errors on my part.

          Reply to Sarat
        2. Aaron posted the following on July 14, 2007 at 5:39 pm.

          It seems the Javascript file that the code is supposed to be in doesn’t seem to be loading correctly. Are you using an early version of php 4 on your server?

          If you are try
          OPEN: js/inap-misc.js.php
          FIND: ob_flush();
          REPLACE WITH: ob_end_flush();

          If that doesn’t work try removing the line I said to find above and the line:
          if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start();

          Reply to Aaron
        3. Sarat posted the following on July 14, 2007 at 6:23 pm.

          I tried that and it hasn’t worked. Don’t think my hosting server is using Php4 anyways. I’m confused as to why it is working on my machine and not on others even in Firefox.

          Reply to Sarat
        4. Aaron posted the following on July 14, 2007 at 7:16 pm.

          Well I think it should be working now for one or both of your friends because it is now working on my machine (it wasn’t before).

          Do a hard refresh (hold control and hit refresh) to test it.

          Reply to Aaron
        5. Sarat posted the following on July 14, 2007 at 9:31 pm.

          I did the hard refresh earlier too:)
          It’s working for Firefox in Windows but was having problems with FF 2.x in Linux(Fedora 6,Ubuntu) earlier. I will check back with him and let you know if it works now.
          It also doesn’t work in IE but that doesn’t matter for me ;)

          Reply to Sarat
        6. Aaron posted the following on July 14, 2007 at 9:41 pm.

          I’m running FF 2.x on Linux and it works, so whatever you did fixed most of the problems, but let me know if there are some residual IE problems.

          Reply to Aaron
        7. Sarat posted the following on July 14, 2007 at 10:44 pm.

          I tested and it works in FF my Linux machine. What I meant earlier is that the issues with IE still remain even after the changes. Please don’t bother further about it, I’m fine even if it doesn’t.

          Reply to Sarat
        8. Aaron posted the following on July 14, 2007 at 11:47 pm.

          I found the problem. it turns out that IE didn’t like a variable name, so to make it work on IE just make the following changes in inap-misc.js.php

          Find the lines:
          var class = '_hide';
          var class = '';
          d.getElementById('post_'+type+'_link'+'_'+id).className = 'post_' + type + '_link' + class;

          Replace, respectively, with lines:
          var style = '_hide';
          var style = '';
          d.getElementById('post_'+type+'_link'+'_'+id).className = 'post_' + type + '_link' + style;

          The main download will be updated momentarily.

          Reply to Aaron
  2. Ben posted the following on July 17, 2007 at 2:13 pm.

    Love the plugin. I do have some weirdness going on though. Whenever I submit the comment form, both of my links [(Show or Hide Comments, whichever is current) and (Cancel reply)] both change to “Cancel reply” the value that I have for the Hide Text (for add comments). Any help would be greatly appreciated. Thanks

    Reply to Ben
    1. Aaron posted the following on July 18, 2007 at 12:11 am.

      I have fixed the problem in the main download.

      To Fix:
      OPEN: inap-add-comments.php
      FIND:submit_form(<?php echo $id;?>,'addcomment','<?php echo INAP::process_text($inapall['addcomment_open']);?>','<?php echo INAP::process_text($inapall['addcomment_hide']);?>'
      ADD AFTER:,'<?php echo INAP::process_text($inapall['comment_hide']);?>'

      OPEN: js/inap-misc.js.php
      FIND:function submit_form(the_id,the_type,show_text,hide_text
      ADD After: ,comment_hide

      FIND:try{d.getElementById('submit_'+id).disabled = true;} catch(e){}
      ADD BEFORE:

      1. if( comment_hide ){
      2. com_hide = comment_hide;}

      FIND:type = 'comments';
      ADD BEFORE: hide = com_hide;

      Reply to Aaron
      1. Ben posted the following on July 18, 2007 at 3:45 pm.

        Hey Aaron. Thanks for the fix code. Unfortunately, even after I applied those changes, it didn’t fix my problem. I don’t know if that has to do with how I’m using it? I’m using it on the home page of the site so people don’t have to go to the actual post page to post a comment, they can simply comment from the home page. You can see it in action here: http://tl.redwingstudio.com/blog/

        If you hit “Show Comments” on the first post then hit “Add Comment” and add a comment, once the comment is submitted, the “Hide Comments” changes to “Cancel Reply” as does the “Add Comment”. If you then hit the “Cancel Reply” that replaced the “Hide Comments” it changes back to “Show Comments”.

        Thanks for your help,
        Ben

        p.s. I emptied my cache several times to ensure that I had the updated js file.

        Reply to Ben
        1. Aaron posted the following on July 18, 2007 at 4:22 pm.

          Oops, I gave some bad instructions.

          To Fix:
          OPEN: inap-add-comments.php
          FIND:submit_form(<?php echo $id;?>,'addcomment','<?php echo INAP::process_text($inapall['addcomment_open']);?>','<?php echo INAP::process_text($inapall['addcomment_hide']);?>'
          ADD AFTER:,'<?php echo INAP::process_text($inapall['addcomment_hide']);?>'

          Should have been:

          To Fix:
          OPEN: inap-add-comments.php
          FIND:submit_form(<?php echo $id;?>,'addcomment','<?php echo INAP::process_text($inapall['addcomment_open']);?>','<?php echo INAP::process_text($inapall['addcomment_hide']);?>'
          ADD AFTER:,'<?php echo INAP::process_text($inapall['comment_hide']);?>'

          Reply to Aaron
        2. Ben posted the following on July 18, 2007 at 4:39 pm.

          Ok, that worked. yay! Thanks. Sorry to keep bugging you… for some reason when I submit a comment off the home page with IE, it attempts to submit the comment twice and I get a WP error:
          “Duplicate comment detected; it looks as though you’ve already said that.”

          If I hit the back button and submit a different comment, the comment is duplicated and goes through without being caught by WP.

          Reply to Ben
        3. Ben posted the following on July 18, 2007 at 4:41 pm.

          I should clarify, it’s happening in IE 6 to me, not IE 7

          Reply to Ben
        4. Aaron posted the following on July 18, 2007 at 7:22 pm.

          This error is caused by the JQuery Library under IE6.

          To work around this:
          OPEN: js/inap-ajax.js.php
          FIND:async:true
          REPLACE WITH: async:false

          Reply to Aaron
        5. Ben posted the following on July 18, 2007 at 8:25 pm.

          perfect. that was it. thanks for all your help. donation coming your way…

          Reply to Ben
        6. Aaron posted the following on July 18, 2007 at 8:50 pm.

          You are welcome. Thank you for your donation, you have been added to the sponsors list.

          Reply to Aaron
  3. Ben posted the following on July 17, 2007 at 2:15 pm.

    eh, well, looks like it does it on your site as well. hmm. guess i’ll have to dig in the javascript to find out what’s going on.

    Reply to Ben
    1. Aaron posted the following on July 17, 2007 at 2:37 pm.

      Hmm, let me dig around to find out what is going on.

      Reply to Aaron
  4. Tuomas posted the following on July 26, 2007 at 9:23 pm.

    First of all, thanks for the great plugin. Second. In my application in using expnding comments, i´d like to have comments appear inside a post.

    So I would have a list of posts by gatecory with one line of text and a button to expand and close the post while other posts move downwards.

    Anyone have done this or has ideas how to make it happen?

    Reply to Tuomas
    1. Aaron posted the following on July 26, 2007 at 11:15 pm.

      Well there are two ways:
      The official way is to have a second link to expand the comments as stated in the ReadMe.

      or you can open inap-functions-post.php and replace the function “break_content” with:

      1. function break_content($content){
      2. global $post, $id, $inapall;
      3. if(function_exists('wp_lightboxJS_replace')|| function_exists('wp_lightbox_plus')){
      4. $content = preg_replace('@(<a[^>]*?rel="lightbox")@', '${1} onclick="showLightbox(this); return false;"', $content);
      5. }
      6. $content = explode('</div>'."\n".'<p>@$%@$$%##$%#$%#$</p>',$content);
      7. ob_start();
      8. include ("inap-comments.php");
      9. $content[0] .= ob_get_contents().'</div>';
      10. ob_end_clean();
      11. return $content[0];
      12. }
      13. Use the following to copy and paste the code.
      Reply to Aaron
    2. Tuomas posted the following on July 26, 2007 at 11:42 pm.

      ok, my bad… problems fixed upgrading wp from 2.0.4 to 2.2.1.

      Reply to Tuomas
  5. Tuomas posted the following on July 27, 2007 at 11:00 am.

    Hi, I have some more questions… Have I understood correctly that transition effect are not supported on comments? Yet in http://tl.redwingstudio.com/blog/ ben has succeeded in it.

    When I post a comment in a category view I am thrown into single.php. My site structure is such that single page is not needed. Is there any way to avoid this?

    Have to say that you are on a good path in introducing this kind of eye candy on wp.

    Reply to Tuomas
    1. Tuomas posted the following on July 27, 2007 at 11:14 am.

      Me again… I promise not to post here anymore. I have this syndrome of not to read the manuals :(

      Reply to Tuomas
      1. Aaron posted the following on July 27, 2007 at 11:56 am.

        I get a case of that every now and again, so I understand completely. Did you get everything working?

        Reply to Aaron
  6. Bernard Doddema posted the following on July 29, 2007 at 1:44 am.

    I’m probably going to be blown away by the new version because it just keeps getting better and better!

    Keep up the amazing work.

    Reply to Bernard Doddema
    1. Aaron posted the following on July 30, 2007 at 2:43 am.

      I hope it does. This next version will be truly professional quality, and although it is only in the beginning stages, it is already far more powerful than the latest version on INAP.

      Reply to Aaron
  7. Manny posted the following on August 5, 2007 at 7:24 am.

    I’m running Firefox 2.0.0.6 on PC using the simple settings of the plugin, and for some reason if someone leaves a comment the page hangs and doesn’t reload.
    It works fine in IE7, but in Firefox I have to click back and refresh to see the comment.
    Any idea what may be wrong?

    Thanks!

    Here is the blog I’m talking about: http://www.sithomeandrot.com/celebs/

    Reply to Manny
    1. Aaron posted the following on August 5, 2007 at 11:36 am.

      I checked the site, but it seems you disabled the comments, so I can’t see what specific errors were the cause.

      However, if you were using the “simple comments” option you may want to try following the instructions in the readme file and making the full edits. Simple Comments has a tendency to not work correctly sometimes.

      Did the page refresh correctly when you posted here?

      Reply to Aaron
      1. Manny posted the following on August 6, 2007 at 12:34 am.

        Thanks for getting back to me so fast!
        The comments were disabled?!?! That’s a new problem. :-s I do (did) have simple comments option activated. I tried other comment plug ins but no other are installed or activated .
        I’ll see if I can wrap my head around the full edits (I’m new to Wordpress and haven’t used PHP much)
        It refreshed here when I posted before but I was on IE 7 that time, I’m on Fireox now and I’ll let you know if it doesn’t work this time.
        Thanks again for getting back to me!

        Reply to Manny
  8. Doede posted the following on August 5, 2007 at 6:17 pm.

    Hi there Aaron!

    I see everything is fine again with the next page thing. Good! Now I installed Inline Ajax, but I can’t get it working…. I get blank posts, blank everything. For me it’s time to go to bed, but I’ll leave my blog like this for now, so you could perhaps take a look? Honestly, I have no idea what goes wrong. I tried different themes etc, nothing helps. WP is on 2.2.2 already… Thanks for your help in advance!

    Best regards from Amsterdam,

    Doede

    Reply to Doede
    1. Aaron posted the following on August 5, 2007 at 7:04 pm.

      I just checked your site, and I have a few questions.

      1. Do you have “Simple Posts” activated or are you using the do_action(’inap_posts’);?
      2. Do you have other plugins that modify post content or add stuff to post content? If so, what are they? (if you like you can email me the list.)
      3. Is your server logging any errors?
      Reply to Aaron
      1. Doede posted the following on August 5, 2007 at 7:08 pm.

        1) I have Simple Posts activated and restored defaults: INAP settings restored to defaults.
        2) I disabled all other plugins just now, but I didn’y have one that adds content.
        3) Let me see… wil post in a few minutes.

        Reply to Doede
  9. uberdose posted the following on August 18, 2007 at 5:58 am.

    Hi Aaron, just activated it (2.4.3) on my local blog with WP 2.2.2. with default theme, Use Simple Posts was checked by default. I don’t see any difference on the main page. What’s wrong? On my custom made theme I just notice that the_excerpt displays the whole post.

    Reply to uberdose
    1. Aaron posted the following on August 18, 2007 at 10:54 am.

      I believe you just need to set the option that says “Use the following method to create excerpts or pages.”

      By default a post is only split on <!–more–> tags, so if you don’t use them, the_excerpt will show the full post. Just set it to split it by word count and put in 50 -300 words and it should work fine.

      Reply to Aaron
      1. uberdose posted the following on August 18, 2007 at 11:35 am.

        Ok, either I use the more tags or specify a post length. But in any case, only an ordinary link is displayed, no Ajax. What am I missing? I thought users could somehow “unfold the post” but stay on the main page.

        Reply to uberdose
        1. Aaron posted the following on August 18, 2007 at 11:57 am.

          They can, are you sure the plugin was activated successfully? I looked at the source to your theme and the Javascript it adds isn’t there, nor can I browse to the INAP folder in the plugins directory.

          Is there a new tab under the presentation menu in the Wordpress Admin panel? It should say INAP management.

          If not, try downloading the slightly updated version, just to make sure the filwes weren’t corrupt.

          Reply to Aaron
        2. uberdose posted the following on August 18, 2007 at 12:14 pm.

          I’m testing it on my local box, and yes, the INAP management is there.

          Two javascripts get included:
          tw-sack.js?ver=1.6.1
          inap-misc.js.php?ver=1

          JavaScript is enabled, no errors when I go to my local blog homepage at localhost.

          The link inserted looks good, it has its onclick:
          onclick=”inap_request(’149′,’content’,'Click to continue reading "All in One SEO Pack Release History"’,'Hide "All in One SEO Pack Release History"’); return false;”

          Reply to uberdose
        3. Aaron posted the following on August 18, 2007 at 12:32 pm.

          Oh okay, that explains it. So if you click the link you get an error?

          Reply to Aaron
        4. uberdose posted the following on August 18, 2007 at 12:45 pm.

          When I click it it just opens the post, but like an ordinary link. Just had a look at my javascript error log and the error there is “Error: inap_request is not defined. Source File: http://localhost/

          Reply to uberdose
        5. Aaron posted the following on August 18, 2007 at 1:11 pm.

          Okay, go the the inap-misc.js.php file that is added to the header (through the browser) and see if it just displays a blank page.

          Reply to Aaron
        6. uberdose posted the following on August 19, 2007 at 1:32 am.

          Yes, this is blank :( Doesn’t show any errors though.

          Reply to uberdose
        7. uberdose posted the following on August 19, 2007 at 3:54 am.

          Do you moderate your comments? I had replied to your last comment but don’t see it. Here it is again:

          inap-misc.js.php is blank, though I don’t see any errors.

          Reply to uberdose
        8. Aaron posted the following on August 19, 2007 at 12:07 pm.

          No I use Spam Karma and your comments got flagged. Sorry about that.

          Okay this problem has happened several times now, and I don’t know what is causing it.

          If you read up in the comments a little you will see that the problem kinda corrects itself, so I think it is a server issue. I have suggested a few fixes, but they haven’t worked. Some users have found that their theme was at fault, but I have never been able to duplicate this on my own, nor has it happened to someone who could determine the exact nature of the error.

          I’m wondering if the problem has something to do with the header its name (inap-misc.js.php).

          If you are on localhost now, after trying to fiddle with it, you can upload it to your main site and activate it just to see if that file works.

          Reply to Aaron
        9. uberdose posted the following on August 19, 2007 at 3:56 am.

          Here is another problem: I’ve got a plugin called AdMan. It uses the_content filter to insert an ad into the first post on the homepage. When I activate INAP this doesn’t work, I guess because you also modify the_content. Is there a way to chain the filters?

          Reply to uberdose
        10. Aaron posted the following on August 19, 2007 at 12:27 pm.

          I downloaded the plugin and ran some tests, the plugin runs perfectly according to the way it is programmed with INAP. You may want to make sure you have the latest version of Adman.

          As an aside, if you show ads inside of your posts I assume you will want posts that are loaded inline to show the ads.

          If so,

          OPEN: adman.php
          FIND: if (is_single()) {
          REPLACE WITH: if (is_single() || (class_exists('INAP_Post') && $_REQUEST['type'] == "content")) {

          Reply to Aaron
        11. uberdose posted the following on August 20, 2007 at 2:39 am.

          Hi Aaron, your suggestion does not work. Even if I have an unconditional the_content filter I can’t get anything into the posts displayed on the homepage :(
          function the_content($content = ”) {
          $content = “adman $content”;
          return $content;
          }

          I will look at why the PHP JS doesn’t get executed proper …

          Reply to uberdose
        12. uberdose posted the following on August 20, 2007 at 2:49 am.

          I have detected the culprit in inap-misc.php:
          require_once(’../../../../wp-config.php’);

          I have most plugins folders symlinked to another parent directory which works fine most of the time. Maybe other people have the same problem …

          Might be better to omit the @ so a clear error message is output when this happens.

          Reply to uberdose
        13. Aaron posted the following on August 20, 2007 at 3:05 am.

          Okay so the JavaScript is working now?

          Reply to Aaron
        14. uberdose posted the following on August 20, 2007 at 12:25 pm.

          Yes, INAP is now working, but not every feature from adman. I’m debugging them both.

          Reply to uberdose
        15. uberdose posted the following on August 20, 2007 at 3:00 am.

          Ok, some clarification: Your suggested patch did work in that it now shows the inline ads (the ones that would appear on single pages) when clicking a post open on the homepage. What is still not shown is the homepage ad, which normally gets shown on the first post displayed on the homepage. As I said before, I can’t even change the posts content when inserting/replacing the content unconditionally.

          Reply to uberdose
        16. Aaron posted the following on August 20, 2007 at 3:28 am.

          Btw. thanks for your suggestion!

          At least something worked.

          I assume that the ad is displayed correctly if you deactivate INAP or turn off Simple Posts?

          Theoretically, unless you are using a different version of Adman than I tested (1.6.1) INAP and Adman should never interact. INAP is almost always the very first plugin to modify the content and then all other plugins run. The other plugins shouldn’t behave any differently after INAP.

          As a test, add echo $content; just after function the_content($content = '') { and before return $content;. They should be different, and the actual post should be pretty close to the second one.

          Reply to Aaron
        17. uberdose posted the following on August 20, 2007 at 3:00 am.

          Btw. thanks for your suggestion!

          Reply to uberdose
  10. uberdose posted the following on August 19, 2007 at 5:38 am.

    Have my previous comments come through to you? If so, sorry for spamming you … If not I will repeat them.

    Reply to uberdose

Leave a reply

:) :D :( :o 8O :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: ;) :!: :?: :idea: :arrow: :| :mrgreen: