2 sam2kb Dec 18, 2010 13:33

sam2kb wrote:
Demo doesn't work.
Nice plugin by the way, I'll try it on my website :)
http://i54.tinypic.com/15qcj2e.jpg
How is it possible :O Try refreshing the page
Is page cache enabled?
Use this instead. No need to load jQuery from google if it's included in b2evo already
function SkinBeginHtmlHead()
{
$plug_url = $this->get_plugin_url();
$inf_content = $this->Settings->get( 'inf_content' );
$inf_nav = $this->Settings->get( 'inf_nav' );
$inf_post = $this->Settings->get( 'inf_post' );
$inf_bufferPx = $this->Settings->get( 'inf_bufferPx' );
$inf_animate = $this->Settings->get( 'inf_animate' );
$inf_extraScrollPx = $this->Settings->get( 'inf_extraScrollPx' );
$inf_loadingText = $this->Settings->get( 'inf_loadingText' );
$inf_donetext = $this->Settings->get( 'inf_donetext' );
$inf_debug = $this->Settings->get( 'inf_debug' );
$js = 'jQuery(document).ready(function() {
jQuery("'.$inf_content.'").infinitescroll({
navSelector : "'.$inf_nav.'",
nextSelector : "'.$inf_nav.' a:first",
itemSelector : "'.$inf_post.'",
loadingImg : "'.$plug_url.'ajax-loader.gif"';
if(!empty($inf_bufferPx)) $js .= ', bufferPx:'.$inf_bufferPx;
if(!empty($inf_animate)) $js .= ', animate:'.$inf_animate;
if(!empty($inf_extraScrollPx)) $js .= ', extraScrollPx:'.$inf_extraScrollPx;
if(!empty($inf_loadingText)) $js .= ', loadingText:"'.$inf_loadingText.'"';
if(!empty($inf_donetext)) $js .= ', donetext:"'.$inf_donetext.'"';
if(!empty($inf_debug)) $js .= ', debug:'.$inf_debug;
$js .= '});
});';
require_js( '#jquery#' );
require_js( $plug_url.'jquery.infinitescroll.js', true );
add_js_headline( $js );
}
sam2kb wrote:
Use this instead. No need to load jQuery from google if it's included in b2evo already
function SkinBeginHtmlHead() { $plug_url = $this->get_plugin_url(); $inf_content = $this->Settings->get( 'inf_content' ); $inf_nav = $this->Settings->get( 'inf_nav' ); $inf_post = $this->Settings->get( 'inf_post' ); $inf_bufferPx = $this->Settings->get( 'inf_bufferPx' ); $inf_animate = $this->Settings->get( 'inf_animate' ); $inf_extraScrollPx = $this->Settings->get( 'inf_extraScrollPx' ); $inf_loadingText = $this->Settings->get( 'inf_loadingText' ); $inf_donetext = $this->Settings->get( 'inf_donetext' ); $inf_debug = $this->Settings->get( 'inf_debug' ); $js = 'jQuery(document).ready(function() { jQuery("'.$inf_content.'").infinitescroll({ navSelector : "'.$inf_nav.'", nextSelector : "'.$inf_nav.' a:first", itemSelector : "'.$inf_post.'", loadingImg : "'.$plug_url.'ajax-loader.gif"'; if(!empty($inf_bufferPx)) $js .= ', bufferPx:'.$inf_bufferPx; if(!empty($inf_animate)) $js .= ', animate:'.$inf_animate; if(!empty($inf_extraScrollPx)) $js .= ', extraScrollPx:'.$inf_extraScrollPx; if(!empty($inf_loadingText)) $js .= ', loadingText:"'.$inf_loadingText.'"'; if(!empty($inf_donetext)) $js .= ', donetext:"'.$inf_donetext.'"'; if(!empty($inf_debug)) $js .= ', debug:'.$inf_debug; $js .= '}); });'; require_js( '#jquery#' ); require_js( $plug_url.'jquery.infinitescroll.js', true ); add_js_headline( $js ); }
thank you.. i have updated the download link.
I am already having problems understanding which comes first when you insert via require_js, add_headline, or directly within skinbeginhtmlhead
You should always include headlines with add_headline or similar build-in functions.
sam2kb wrote:
BTW instead of that highly inefficient hack with paged results, you can comment the following line in /inc/_core/ui/results/_results.class.php : 700
// Make sure we're not requesting a page out of range: if( $this->page > $this->total_pages ) { //$this->page = $this->total_pages; }
thanks for the input. it says "ugly fix" in the description already P:
but that would still be a core hack. i wonder why it still has not been fixed in v4
Just for kicks, you don't need the skin, or core, hack.
SkinBeginHtmlHead() is your friend ;) Run your code in there and return an error to your ajax.
¥
¥åßßå wrote:
Just for kicks, you don't need the skin, or core, hack.
SkinBeginHtmlHead() is your friend ;) Run your code in there and return an error to your ajax.
¥
well, i have tried that already, and unfortunately that doesn't do.
Assuming your code relies on a 404 header .. it wouldn't (content has already been sent), but it's easy enough to kick out a detectable string.
¥
The code searches for specific DOM tags, so we can just break the output.
SkinBeginHtmlHead()
global $paged, $MainList;
if( $paged > $MainList->total_pages )
{
echo '</head>';
echo '<h2>404 Not Found</h2>';
exit;
}
¥åßßå wrote:
Assuming your code relies on a 404 header .. it wouldn't (content has already been sent), but it's easy enough to kick out a detectable string.
¥
There must be a hook like AfterMainListLoaded, what do you think?
I added per-blog settings if you don't mind :)
Those are really needed since different skins use different classes for posts and navigation.
sam2kb wrote:
I added per-blog settings if you don't mind :)
Those are really needed since different skins use different classes for posts and navigation.
right, great!
i have updated the plugin and the download link.
included and changed the script to minified.
updated default values
removed hack thing
updated readme
One thing about the plugin: Don't forget to re-initiate your jquery goodness for the newly added content(like lightbox, anything). There is a
function(arrayOfNewElems){
// optional callback when new content is successfully loaded in.
but it did not work for me.Would anyone gets this thing right like to share it here
One thing about the plugin: Don't forget to re-initiate your jquery goodness for the newly added content(like lightbox, anything).
What are you talking about?
i mean jquery wont work in loaded posts (like lightbox etc.) unless you re-run your jquery code.
Plugin updated.Probably for the last time :D
http://i53.tinypic.com/2qdwdnk.jpg
Changes:
added manual trigger option.
moved to sourceforge
limited number of installs.
[url=http://sourceforge.net/projects/evocms-plugins/files/infinite_scroll_plugin/1.1.1/infinite_scroll_plugin.zip/download]Download[/url]:
http://sourceforge.net/projects/evocms-plugins/files/infinite_scroll_plugin/1.1.1/infinite_scroll_plugin.zip/download
AFAIK there is no option to enable/disable plugin per blog right ? -wonder why there isn't-
Added an option to disable plugin per blog, but the download link is not updated.
grab the changed file from here if you feel like:
http://evocms-plugins.svn.sourceforge.net/viewvc/evocms-plugins/infinite_scroll_plugin/
I need to figure out how to fix a few things before we put this plugin on the shelf:
* The plugin gets stuck if you access the blog from another page like paged=2, as it basically tries to load the first link in the navigation div.
* Featured posts gets included in the loop, and loads at the beginning of every loaded page.
Any ideas on how to fix these ?
hey
When I use the plugin (manual or auto), once it reaches the last post, it infinitely loads the last post. Why is that?
Achillis wrote:
hey
When I use the plugin (manual or auto), once it reaches the last post, it infinitely loads the last post. Why is that?
that was a known issue earlier, but i am pretty sure it has been fixed. are you sure you are using the latest version ?
Hello,
Hello,
I tried to install the "Infinite Scroll Plugin" with "b2evo_ru" skin but it seems that it doesn't work.
I added in the plugin settings: .top_menu at "Content Div" and .bPost at "Post Div" but it seems that the script doesn't have the .navigation div (is missing also in the styile.css file)
Here are my modified settings:
Content Div: #content, #tq-main .Posts .tq-g .top_menu
Navigation Div: .navigation
Post Div: .post .bPost
Can you please tell me what should I change in the above settings?
Thanks
One correction:
Post Div: .bPost
Demo doesn't work.
Nice plugin by the way, I'll try it on my website :)