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
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.
What Javascript library are you using?
The default library.
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.
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();
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.
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.
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
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.
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.
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.
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
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:
if( comment_hide ){ com_hide = comment_hide;}FIND:type = 'comments';
ADD BEFORE: hide = com_hide;
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.
Oops, I gave some bad instructions.
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']);?>'
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.
I should clarify, it’s happening in IE 6 to me, not IE 7
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
perfect. that was it. thanks for all your help. donation coming your way…
You are welcome. Thank you for your donation, you have been added to the sponsors list.
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.
Hmm, let me dig around to find out what is going on.
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?
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:
function break_content($content){ global $post, $id, $inapall; if(function_exists('wp_lightboxJS_replace')|| function_exists('wp_lightbox_plus')){ $content = preg_replace('@(<a[^>]*?rel="lightbox")@', '${1} onclick="showLightbox(this); return false;"', $content); } $content = explode('</div>'."\n".'<p>@$%@$$%##$%#$%#$</p>',$content); ob_start(); include ("inap-comments.php"); $content[0] .= ob_get_contents().'</div>'; ob_end_clean(); return $content[0]; }ok, my bad… problems fixed upgrading wp from 2.0.4 to 2.2.1.
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.
Me again… I promise not to post here anymore. I have this syndrome of not to read the manuals
…
I get a case of that every now and again, so I understand completely. Did you get everything working?
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.
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.
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/
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?
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!
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
I just checked your site, and I have a few questions.
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.
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.
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.
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.
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.
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;”
Oh okay, that explains it. So if you click the link you get an error?
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/“
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.
Yes, this is blank
Doesn’t show any errors though.
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.
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.
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?
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")) {
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 …
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.
Okay so the JavaScript is working now?
Yes, INAP is now working, but not every feature from adman. I’m debugging them both.
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.
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.
Btw. thanks for your suggestion!
Have my previous comments come through to you? If so, sorry for spamming you … If not I will repeat them.