PDA

View Full Version : Rolling Archives


sams
February 20th, 2006, 12:06
I have been feeling around in the dark with this. Totally stumped, trying out a few no-brrainer but might just work ideas - desparate but I am close to smoking the cigar and having rolling archives working.

Whats the status with this ra.php which is placed in the k2 theme folder?

This appears to have a duplication of a mark up segment from the k2-rolling...php file.

-=-=-=-=-=-

Oompa posted this yesterday
----------------------------------------------------
http://www.ray.robothouse.org/wp-content/plugins/k2-rollingarchives.php gives me the error of Fatal error: Call to undefined function: get_bloginfo() in /home/.mak/robothouse/ray.robothouse.org/wp-content/plugins/k2-rollingarchives.php on line 15 which would certainly cause the infinate loading. I'll look into it.
----------------------------------------------------
As I understand the above I should be able to call this file error free in a browser? Or maybe not I can't on Matts site

-=-=-=-=-=-=-

at the bottom of my navigation.php - in the k2 theme folder I have



<?php include( 'ra.php' ); ?>

should that be there? - I can't recall adding it, thats the cause of my duplicated mark up, but its not that simple as its not all duplcicated just some. If I remove the above code the page is error free. However something is not right since It says I have no posts - which I of course do. I think that I will be swimming along just fine without ra.php - why have i got it??!?


-=-=-=-=-=-=-=-

I notice that a few site that use rolling arch endlessly show the spinner

foreinstance:
http://www.swingcheese.biz/

ajax is calling and content is in the request just not getting displayed in the rolling arch interface.

http://swingcheese.biz/wp-content/plugins/rollingarchives/rollingarchives.php?paged=1

testing my own site
http://robinhogarth.co.uk/v7/wp-content/plugins/rollingarchives/rollingarchives.php?paged=1
that part is working (at least)

whats wrong with swingcheese.biz how come the endless spinner?! The page shows 1 of 3 so that bit works

-=-=-=-=-=-=-=-

!UPDATE!

I have not solved it but have advanced my understanding of rolling archives a bit, not enough (otherwise I would have it working by now :( )

I have added a couple of alert thingies in the code to step through the process stage by stage. pagecount is always 0 for me, I supect that it should not be 0, if I dummy it to 2 (IE if I hardcode the pagecount var to '2') then I get a post displayed in the interface. So getting closer.

I understand how the pagecount var set. but why is it 0?
Why is it 0 when I have posts?????

Apologies for the appraent ramshackle pos, it might see all over the place, I have been up far too long, bit of brain ache - though I have made some progress. I will tidy this up and make my findings clearer to myself and all (who care)

-=-=-=-=-=-=-=-

to those who have managed to get it to workplease share some info,

great and extended thank to Michael (hope thats the spelling), Zeo, The Oompa, Matt, Steveo and all the others contributing time, effort to this project

you've gotta strive if you want to succeed
(but right now I must snooze)

- Sam S

dramaking
February 20th, 2006, 01:05
Sorry, can't help you there, I'm stuck too.

At my installation at http://dev.dramaking.de the pagecount is 0. If anyone can help?

Phil
February 20th, 2006, 01:07
Have you tried Zeo's plugin for the rollingarchives??

found here (http://zeo.unic.net.my/2006/02/14/michaels-rolling-archives/#more-589)

dramaking
February 20th, 2006, 01:09
Yeah, that one showed pagecount zero and no posts at all.

sams
February 20th, 2006, 01:25
Dramaking: your rolling arch seem to be working now! how did you manage to get the pagecount to set?

I do get an error though it not crucial enogh to stop things working: $('rollhome').onclick = function() { rollArchive('home'); };

Phil: Zeo's and Oompa's all suffer from the same issue in my experience

dramaking
February 20th, 2006, 01:31
Does it? I still see "page 1 of 0".

Oompa
February 20th, 2006, 01:50
you may have to many posts to show all at once. Try limiting it.

dramaking
February 20th, 2006, 01:54
Ok, all in all there are nearly 1500 Posts. What's a good value? I will try in the meantime.

dramaking
February 20th, 2006, 02:05
Yeah, that was it. Thank you so much Oompa, I think now it's time that I have to ask you: Will you marry me? :)

Changed $k2_rollingarchives_numberposts to 500 for example to get 100 pages in the rolling archives.

sams
February 20th, 2006, 03:01
Dramaking: have you got ra.php in action? what adjustments have you made to your navigation.php?

I have it working now, not the way I want I want to list the post of author id 2

am I correct in thnking that changing:get_usernumposts(1); to get_usernumposts(2); would/should do this? I tried it and it don't work.

I ma enjoying the cigar right now, I have burnt my chips to a cinder whislt tweaking this but hey thats the price of progress and this has been progress - I am hp hp h-a-pp-why? because rolling archives is working!!

www.robinhogarth.co.uk/v7/ look and see

tauquil
February 20th, 2006, 03:27
I know you probably don't want to hear this sams but your rolling archives doesn't seem to want to work for me (under Safari/Camino or Firefox). It just seems to get stuck at the progress animation...

dramaking
February 20th, 2006, 03:55
After uploading I removed

ob_start ("ob_gzhandler");

from js/livesearch.js.php (line 2)

The the comments worked and the archives too. But the archives showed pagecount zero. So i did this what I wrote before. That's all.

sams
February 20th, 2006, 04:53
Well what a load of oddness. Thanks to you both Dramaking & Tauquil.

I am going to scrub it from robinhoagrth, I will put it up on my to-be-confirmed fourth coming blog site, what a pain. Although I have learnt a thing or three about a thing or three.

thanks - S

robothouse
February 20th, 2006, 05:46
Yikes, can we get a listing of d/l links of various versions of rollingarchives?
I think I blew something up, but wasn't keeping origs.

Thx much! :)

Brett
February 20th, 2006, 11:55
I only have 140 some odd posts and mine doesn't actually load any of the archeives.

http://gatewayy.net

Does anony have some suggestions on how I might troubleshoot this? Thanks!

Oompa
February 21st, 2006, 12:46
Yikes, can we get a listing of d/l links of various versions of rollingarchives?
I think I blew something up, but wasn't keeping origs.

Thx much! :)
http://www.theoompa.com/archives/2006/02/18/rolling-archives-ext/
That will always have the latest working copy of my mod.

steveo
February 21st, 2006, 01:36
I only have 140 some odd posts and mine doesn't actually load any of the archeives.

http://gatewayy.net

Does anony have some suggestions on how I might troubleshoot this? Thanks!
Your userid is probably not 1. Change this line in k2-rollingarchives.php:
$k2_rollingarchives_numberposts = get_usernumposts(1);
to:
$k2_rollingarchives_numberposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'publish'");
if (0 < $k2_rollingarchives_numberposts) $k2_rollingarchives_numberposts = number_format($k2_rollingarchives_numberposts);

Brett
February 21st, 2006, 02:50
Your userid is probably not 1. Change this line in k2-rollingarchives.php:
$k2_rollingarchives_numberposts = get_usernumposts(1);
to:
$k2_rollingarchives_numberposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'publish'");
if (0 < $k2_rollingarchives_numberposts) $k2_rollingarchives_numberposts = number_format($k2_rollingarchives_numberposts);

Thank you very much, I never even thought to check if it was using th 1x or 2x userid system. It seems to be working now. :)

Zeo
February 21st, 2006, 05:44
Is there any reason why RA is downgraded?

philip
February 21st, 2006, 08:16
hey, i am having problems with it not displaying all the entries?
have a look: (site is under construction, so it might change a bit) www.philip.hotserv.dk

hauntedtapedeck
February 21st, 2006, 08:22
hey, i am having problems with it not displaying all the entries?
have a look: (site is under construction, so it might change a bit) www.philip.hotserv.dk

Philip, I'm not seeing archives at all, just a big light grey rectangle, with nothing inside it.

philip
February 21st, 2006, 08:29
are you using IE?

batorma
February 21st, 2006, 09:10
ZEO: 'cause Oompa broke the code when he went from 0.53 to .6whatever- At the time it seemed like I had the only working copy so he was able to fix it based off of what I was still using which was v.53 EXT.

If any of you guys finally get yours working and want to include your del.icio.us links and "featured" posts feel free to rip the code that I zipped up and posted here (http://mattbator.net/?p=40)

If I have permission to use your existing code (Michael, Zeo, Oompa, whoever?) I'll package up those features all nice for others to use.

And for everyone else still working towards getting their rolling archives to work (I know I'm posting this again but I don't think many got to see it due to switching forums) you can check out the list I put together of sites w/ functioning rolling archives: http://mattbator.net/?p=41

Aergonaut
February 22nd, 2006, 12:04
Hey guys, first post here. Let me start by saying that I love Rolling Archives and K2. Thanks to everyone who worked at putting this together.

Anyway, I've been trying to get things working at my site and have run into a problem. When navigating back in the archives, everything works splendidly until you get to the very last page where rollingarchives.php throws this error:

Warning: Invalid argument supplied for foreach() in /home/bayaread/public_html/wordpress2/wp-content/themes/k2b2r167/rollingarchives.php on line 3

I vaguely remember a fix for this being on the old board, but I can't find a way to get to the old board anymore. Was this problem fixed in a subsequent release that I just don't know about?

Thanks in advance for any help!

batorma
February 22nd, 2006, 01:17
Aero: I ran into this problem a day or two ago as well. Though I don't have an explicit cause I recall it had something to do with me having changed my timezone (having posted for a few weeks without realizing the time was still set to UTC). This threw it all into a hissyfit and I got that same error on the last page. I changed it back to UTC, and it went away. I ended up setting it to the correct time difference and going to bed, and by morning the problem had worked itself out. As I hadn't been doing anything else at the time this was all I could attribute the cause to. Was yours every COMPLETELY working at some point?

Aergonaut
February 22nd, 2006, 01:34
Aero: I ran into this problem a day or two ago as well. Though I don't have an explicit cause I recall it had something to do with me having changed my timezone (having posted for a few weeks without realizing the time was still set to UTC). This threw it all into a hissyfit and I got that same error on the last page. I changed it back to UTC, and it went away. I ended up setting it to the correct time difference and going to bed, and by morning the problem had worked itself out. As I hadn't been doing anything else at the time this was all I could attribute the cause to. Was yours every COMPLETELY working at some point?

No, it's never been completely working. In fact I only just recently got it to actually show me a list of posts instead of stalling on the loading spinner. I'll try changing my timezone back and forth and see if that works.

Carbonite
February 22nd, 2006, 07:21
Oddly enough, Rolling Archives isn't working for me. The archives don't load, the spinner just keeps on spinnin'.

Has anyone encountered and fixed this problem yet?

Zeo
February 22nd, 2006, 07:24
Probably rolling archives on your blog runs out of battery.

Heilemann
February 22nd, 2006, 08:27
Probably rolling archives on your blog runs out of battery.

Now that is funny!

Scott F
February 22nd, 2006, 02:44
Can anyone help me by moving the Rolling Archives over?
http://port.scofo.net

Aergonaut
February 22nd, 2006, 04:34
Oddly enough, Rolling Archives isn't working for me. The archives don't load, the spinner just keeps on spinnin'.

Has anyone encountered and fixed this problem yet?

Carbonite, I had this same problem earlier but fixed it by making enough posts to cause the "Previous Posts" link to appear on the front page. You can change that option in the admin panel, Options>Reading>Show at most. Make the number something small like 5 or 4.

Carbonite
February 22nd, 2006, 10:37
I already have that changed to 7, maybe I'll limit it down to 5.

It seems to be working fine now. Link (http://carbonitegeek.info/blog/)

Scott F
February 22nd, 2006, 11:27
I was wondering if anyone knows how to move the Rolling Archives over?
http://port.scofo.net

Mine is 20 px over, I know why (It is because it is using the class Primary). How do I move it over the 20 pixels?

sams
February 22nd, 2006, 11:47
HI Scott F,

Its also not displaying the paged archives in the rollling content div. I had this same problem and was unable to resolve it. Curiously others manged to get it to work right away. I am on FF1.5/Win2k.

I edited the css using firefoxes editCss

.metasection-bottom {
position: relative;
width: 540px;
margin: 0 0 0 -20px; /* minus 20px left */
padding: 30px 0 0px 0px; /* I have heard that 0 is better practice than 0px */
}


hope this does the biz for you.

atb - S

hauntedtapedeck
February 23rd, 2006, 12:52
After uploading I removed

ob_start ("ob_gzhandler");

from js/livesearch.js.php (line 2)



I don't have this in my livesearch.js.php :confused:

Phil
February 23rd, 2006, 01:05
How are the rolling archives called to the index??

I want to set up a "bottom bar" with the RA inthem along with a few other bits and bobs, but I can't see how the RA are called.

Also, now I have removed the sidebar from the index, the RA don't appear to be working at all. does this have any relation??

Scott F
February 23rd, 2006, 03:03
I have managed to get it positioned correctly and the comments look right. I now need to get it working. Right now I do not know what is wrong, but nothing is loading. I have 5 posts and maybe I need more, but I had 10 other posts (now deleted).

http://port.scofo.net/

Thanks!

Zeo
February 23rd, 2006, 03:18
Scott F,
goto K2 Option and disable your livesearch

Scott F
February 23rd, 2006, 01:36
I turned it off, and it isnt there...

Saracen
February 23rd, 2006, 04:47
Hi, first post, tough I've been lurking for a few days.

Can anyone let me know how to remove the overlap. I've tried playing with the CSS adding various margins, but to no avail.

http://www.saracen.nu

Thanks.

Saracen
February 23rd, 2006, 06:57
Finally solved.

Just add a "right-padding: 20px" to the .latestactivity li class.

Might see what I can do to add further stuff and render my 3-column bottom bar obsolete.

Thanks anyway.

Colin
February 24th, 2006, 09:52
Any problems with the latest comments not working even if you have Brian's Latest Comments installed? It was working fine in the sidebar, and when I removed the sidebar and installed Rolling Archives, the comments won't show up...

Image (http://www.iamcolin.com/images/ra.jpg)

Edit: nevermind, don't I feel smart. Downloaded the wrong one.

batorma
February 25th, 2006, 05:52
Hey I just wanted to let everyone know I packaged up my mods to Oompa's latest version of Rolling Archives. I included support for del.icio.us links, "the feature," and UTW. You can check it out here (http://mattbator.net/?p=61), let me know what you think. I decided not to do the whole "drop down" thing with each component, as I felt all the goodies on the left balance the archives on the right rather well.

Aergonaut
February 25th, 2006, 06:17
Hey I just wanted to let everyone know I packaged up my mods to Oompa's latest version of Rolling Archives. I included support for del.icio.us links, "the feature," and UTW. You can check it out here (http://mattbator.net/?p=61), let me know what you think. I decided not to do the whole "drop down" thing with each component, as I felt all the goodies on the left balance the archives on the right rather well.

I get a not found error when I try to download the .zip...

batorma
February 25th, 2006, 08:01
fixed, sorry

kcsportsguy
February 25th, 2006, 04:04
I have it set up and it worked at first. Then I moved the site around and now it says "There are no archived posts." Any suggestions?

Oh and I'm using Zeo's not Oompa's package.

philip
February 25th, 2006, 04:34
kssportsguy, has your site crashed? i see kubrick and hello world

kcsportsguy
February 25th, 2006, 04:48
kssportsguy, has your site crashed? i see kubrick and hello world
No, it just won't restore properly so I'm waiting and deciding what todo. I may end up just manually putting in all the posts and scrapping all the lost comments. It bothers me though. My question is on a design I'm working on.

batorma
February 25th, 2006, 05:04
that's a real bummer kc, in the future I recommend using WP-DBManager to avoid such things, I had a database just up and corrupt itself on the website I maintain for my family and it really saved me there. I hope you don't give up on K2 or Rolling Archives though, as they're both pretty great. Like a PB&J or something.

kcsportsguy
February 25th, 2006, 05:29
The thing is, I have that plugin (well one like it). I just can't get it to restore on the new server. (I'm transferring it from Dreamhost to MediaTemple.)

Colin
February 25th, 2006, 06:37
More problems.

It's seems as though some of my test posts are being lost in a void, where they aren't displayed on the front page yet they aren't being displayed in the Rolling Archives.

Admin > Options > Reading > Blog pages > Show at Most... is set to 2.

http://www.iamcolin.com/images/ra-problem.jpg

Details the posts I have so far. In Rolling Archives, there is "Hello World..." (Post ID #1). Displaying on the main page, it has "More Content" (Post ID #7) and "Puuullleeez work." (Post ID #6). Nowhere to be found are Post IDs #2-5....

Thanks for any possible help,
Colin

PS. I don't feel comfortable sharing the link, it's a mod in development and it's not ready for public viewing just yet ;)

batorma
February 25th, 2006, 06:58
It really would be more helpful to just suck it up and share the link. I've actually had quite the opposite experience, I get some overlap with my RA. In other words, like the bottom 1 or 2 posts on my front page will show up at the top of my rolling archives as well. I'd try playing with the # of posts on your frontpage and also the number of posts RA displays.

KC: Is it giving you some kind of error, or just not doing anything? Perhaps you should try starting a new thread to resort this, maybe over at the main Wordpress Forums, as I don't really see this as a K2 issue.

Colin
February 25th, 2006, 07:18
Got it.

Needed to go into rollingarchives.js.php and change the "position" variable to "2".

batorma
February 25th, 2006, 07:26
That's good, congrats!

Hoovey
February 26th, 2006, 04:44
The plugin does not work for me. It just says "
Fatal error: Call to undefined function: blc_latest_comments() in /home2/hoovey/public_html/wp-content/plugins/k2-rollingarchives.php on line 52"


Help?

batorma
February 26th, 2006, 05:31
You probably have BLC called somewhere in your sidebar as well, as you can't call it in both places you'll need to find the code in the other one and delete it. Also you may want to check and see that you do in fact have Brian's Latest Comments installed and activated, as your error was an undefined function call, this seems more apt to be the problem.

Hoovey
February 26th, 2006, 08:53
Thanks, and yes the issue was that I didn't have that plugin installed..
Another problem: The height is screewwwedd up.

Oompa
February 27th, 2006, 01:56
Give us a link please...

batorma
February 27th, 2006, 03:18
Oompa's right, it's soooo much easier to solve these things when you provide a link so we can peak at your CSS.

Hoovey
February 27th, 2006, 05:59
Here.

http://hoovey.be/

batorma
February 27th, 2006, 02:22
As far as I can tell your stylesheet looks fine, it might be helpful to post where and how you called rolling archives. You might also want to try just getting rid of the top part (the spikes) and see if that makes any difference.

Hoovey
February 27th, 2006, 03:27
Whenever the images don't load, it's fine.. And I'm calling it from the sidebar, with no div. Should I make a div for it?

Colin
February 27th, 2006, 07:50
Why aren't you calling it from navigation.php?

batorma
February 27th, 2006, 09:10
He's right Hoov, it should be in navigation.php, more or less at the bottom. I believe that was clearly stated in the readme. Fix it up and see if it makes a difference. Also, you mean it worked when you didn't call the spikes image, or got rid of ALL the images? If it's just the spikes I'd ditch 'em, never been a fan anyways.

sannixtudio
February 27th, 2006, 09:32
I'm calling RA from line one in navigation.php

wayann
February 27th, 2006, 10:58
Ok so this seems the official thread for RA,
I've posted in this other thread the problem I've encountered:
http://getk2.com/forum/showthread.php?p=1473#post1473
anyone had the same prob?
TO MODS:
perhaps it will be a good idea to lock the other thread and concentrate all RA related issues in this thread...

batorma
February 27th, 2006, 11:03
It's just a matter of placement preference sannix

Hoovey
February 27th, 2006, 11:28
sooo many problems.

Thanks for help. But now, it's unaligned. /:

sannixtudio
February 28th, 2006, 01:04
Out of curiosity..... is anyone successfully running the RA without ELA enabled?

To realign... play with the margin of metasection-content and metasection-bottom-bottom.

Mine for instance, is set to:
margin: 0 -40px

Hoovey
February 28th, 2006, 03:39
Thanks for the help everyone!

Still un-aligned though, oh well.

sannixtudio
March 1st, 2006, 05:03
Anyone have any thoughts on how to exclude a particular category from the RA?

steveo
March 2nd, 2006, 06:23
Anyone have any thoughts on how to exclude a particular category from the RA?

Sure thing. Open up rollingarchives.php and look for this line:
<?php rewind_posts; $posts = get_posts('offset='.$paged); foreach ($posts as $post) { setup_postdata($post); ?>

change it to this:
<?php rewind_posts; $posts = get_posts('offset='.$paged.'&category=-1'); foreach ($posts as $post) { setup_postdata($post); ?>
where 1 is your category id. Note due to the limitation of get_posts, you can only exclude one category.

steveo
March 2nd, 2006, 06:29
D'oh. We also gotta update k2-rollingarchives.php. so look for this line:
$k2_rollingarchives_numberposts = get_usernumposts(1);
and change it to:
$k2_rollingarchives_numberposts = count(get_posts('category=-1'));

I haven't tested this, so it might not work.

sannixtudio
March 2nd, 2006, 11:30
Thanks Steveo..... but I get an invalid argument on line 3 of ra.php after performing the hack. Odd, it seems as though it should work.

Grace
March 3rd, 2006, 04:02
from the past many days the rolling archives at my personal blog, keeps on loading but shows nothing.

my blog (http://www.gracejacob.in/blog)

sannixtudio
March 3rd, 2006, 05:25
I've been fiddling with the css trying get rid of some empty space but am having no luck....

Here is a visual: Need this space gone. (http://sannixtudio.com/blog/blah.jpg)

Here is the URL: sannixtudio.com (http://sannixtudio.com)

I appreciate any help...... Thanks.

batorma
March 5th, 2006, 04:25
Sannix, look at the bottom of your k2-rollingarchive.php file: you'll see:

<br class='clear' />
</div>
<br class='clear' />

Just get rid of those breaks, keep the </div> though or I'm sure you'll mess something up:) that should do the trick!

philip
March 5th, 2006, 09:18
Batorma, your rolling friends has an error on line 45, i tried installing yesterday.

batorma
March 5th, 2006, 02:16
Gee, I suppose telling me what the actual error is would be totally out of the question, or at least what file it's from. I'd bet 3 nickels and a kitten's liver that it's because you're already got a call somewhere else to BLC or another nonsensical reason like that. Unless people actually take the time to read through this thread, or more importantly the thread that'd been on Binary Bonsai they're going to continue to have problems like this until RA it's included with K2 from the get-go.

And if you read through the README you'd see I made the suggestion if you already had Oompa's version working for you, you just just rip out my mods and paste 'em into their.

sdollen
March 5th, 2006, 07:05
Thanks to Oompa, Zeo, and batorma for all the work they are doing on these versions of the RA plugin. I've been switching back and forth between the three trying to get something implemented on my site. Are the main differences between the three k2-rollingarchives.php the mods that are included in them? Would it be fairly simple for anyone to adapt one of the versions to include mods they preferred?

I just installed Oompa's version on my site and my link list is soooo long. Also, I wonder if I might be able to adapt this to a three column deal like frotzed has on www.openswitch.org (http://www.openswitch.org) ?

Also, I was hoping to install flickrRSS and have it run horizontal (like Michael's) underneath the RA and on top of the footer. Is that possible and is there a clean way to do it?

I know - a lot of questions.

My site is www.vondollens.us (http://www.vondollens.us)

any feedback is appreciated :)

Thanks!

Zain
March 5th, 2006, 07:36
http://eightface.com/wordpress/flickrrss/

Thats for that horizontal flickrrss bar at the bottom of BB.

sdollen
March 5th, 2006, 09:57
@ Zain - thanks for the info. I actually was trying to implement that the other night, but couldn't figure out where to put the call to make it look right with the rollingarchives (fall under the RA and on top of the footer).

The thing I am guessing is to call it from the navigation.php file, right under the RA code? Maybe put a hard return between the two?

-----Edit----------------

I guess that the whole issue for me is that I'm trying to place RA and flickrRSS on my site while I'm still using a sidebar. That makes it difficult to span things across the length of the page. Do I need to make a new area called "sub-foot" or something of the sort and call it in the index right before the footer and have the flickrRSS in that area? I'm not sure the best way to span it across the width of the page while still having a sidebar.

Anyone?

batorma
March 6th, 2006, 06:06
It looks to me as though you've gotten it. You may want to try spacing your pictures out though, kind of looks strange as just a block. Also, there is a footer image to RA you may want to get rid of now that you've stretched it out to fit the length of your page. Other than that it looks good, I'm sure the whole Von Dollen family is very proud. I've been working on a website for my family to keep in touch for a few weeks now, it looks real nice, just a matter of teaching them how to USE IT!

Brett
March 7th, 2006, 06:45
http://eightface.com/wordpress/flickrrss/

Thats for that horizontal flickrrss bar at the bottom of BB.

So you remove the call from the K2 sidebar and place it at the bottom of the main template?

steveo
March 7th, 2006, 02:58
from the past many days the rolling archives at my personal blog, keeps on loading but shows nothing.

my blog (http://www.gracejacob.in/blog)

In Wordpress &raquo; General Options, change your Blog address (URI): to www.gracepj.org/blog.

sannixtudio
March 12th, 2006, 12:23
Has anyone been successful in excluding a category from the RA yet?

batorma
March 12th, 2006, 01:03
I can't understand why anyone would want to, what was your reason again sannix?

sannixtudio
March 12th, 2006, 01:20
I want to exclude my asides category.

steveo
March 12th, 2006, 02:31
Has anyone been successful in excluding a category from the RA yet?
Looks like the function get_posts needs some modification for it to exclude a category.

Add the following function to k2-rollingarchives.php

function ra_get_posts($args) {
global $wpdb;
parse_str($args, $r);
if ( !isset($r['numberposts']) )
$r['numberposts'] = 5;
if ( !isset($r['offset']) )
$r['offset'] = 0;
if ( !isset($r['category']) )
$r['category'] = '';
if ( !isset($r['exclude']) )
$r['exclude'] = '';
if ( !isset($r['orderby']) )
$r['orderby'] = 'post_date';
if ( !isset($r['order']) )
$r['order'] = 'DESC';

$now = current_time('mysql');

$query = "SELECT DISTINCT * FROM $wpdb->posts";

if (!empty( $r['category'] ) || !empty( $r['exclude'] )) {
$query .= " LEFT JOIN $wpdb->post2cat ON ($wpdb->posts.ID = $wpdb->post2cat.post_id)";
}

$query .= " WHERE 1=1 AND post_date <= '$now' AND (post_status = 'publish') ";

if (!empty( $r['category'] )) {
$query .= "AND ($wpdb->post2cat.category_id = " . $r['category'] . ') ';
}

if (!empty( $r['exclude'] )) {
$query .= "AND ($wpdb->post2cat.category_id != " . $r['exclude'] . ') ';
}

$query .= "GROUP BY $wpdb->posts.ID ORDER BY " . $r['orderby'] . " " . $r['order'];

if ($r['numberposts'] != -1) {
$query .= " LIMIT " . $r['offset'] . ',' . $r['numberposts'];
}
$posts = $wpdb->get_results( $query );

return $posts;
}


Also in k2-rollingarchives.php, look for $k2_rollingarchives_numberposts = get_usernumposts(1); and change this to:
$k2_rollingarchives_numberposts = count(ra_get_posts('numberposts=-1&exclude=9'));
where 9 is the category id that you want to exclude.

In rollingarchives.php change line 3 to:
<?php rewind_posts; $posts = ra_get_posts('offset='.$paged.'&exclude=9'); foreach ($posts as $post) { setup_postdata($post); ?> where 9 is the category id that you want to exclude.

sannixtudio
March 12th, 2006, 02:53
Beautiful man!! Your code worked exactly as I wanted..... perfectly.

Thank you Steveo!

steveo
March 12th, 2006, 03:21
Beautiful man!! Your code worked exactly as I wanted..... perfectly.

Thank you Steveo!

I made some changes to the code. Be sure to update your code.

sannixtudio
March 12th, 2006, 04:09
$k2_rollingarchives_numberposts = count(ra_get_posts('numberposts=-1&exclude=9'));

Making this change broke the RA page navigation..... reverting fixes the navigation.

Colin
March 12th, 2006, 09:59
Any ideas on how to change the number of posts per page on the Rolling Archives? I would like to change it from 5 to 4, but haven't had any luck.

I've tried changing the offset variable in rollingarchives.js.php which works to scrolll only 4 entries at a time (ie. the one at the bottom of page 1 is at the top of page 2). I've also tried changing the pagecount variable from k2-rollingarchives.php to:

var pagecount = Math.ceil(".($k2_rollingarchives_numberposts - get_settings('posts_per_page'))."/ 4);

to no avail. Any ideas?

steveo
March 13th, 2006, 05:49
Any ideas on how to change the number of posts per page on the Rolling Archives? I would like to change it from 5 to 4, but haven't had any luck.


In k2-rollingarchives.php look for

var pagecount = Math.ceil(".($k2_rollingarchives_numberposts - get_settings('posts_per_page'))."/ 5);

and change that number 5.

In rollingarchives.js.php, look for:

offset = 5; // Posts to move per increment + starting position

and change that number to the same number in the previous step.

Next, still in rollingarchives.js.php, look for:

new Ajax.Updater('rollingcontent', '<?php echo get_option('siteurl'); ?>/wp-content/plugins/rollingarchives/rollingarchives.php', {method: 'get', parameters: 'paged='+position, onFailure: rollError});

and replace it with:

new Ajax.Updater('rollingcontent', '<?php echo get_option('siteurl'); ?>/wp-content/plugins/rollingarchives/rollingarchives.php', {method: 'get', parameters: 'showposts='+offset+'&paged='+position, onFailure: rollError});

Now in rollingarchives.php change this line:

<?php rewind_posts; $posts = get_posts('offset='.$paged); foreach ($posts as $post) { setup_postdata($post); ?>

to this:

<?php rewind_posts; $posts = get_posts('numberposts='.$_GET['showposts'].'&offset='.$_GET['paged']); foreach ($posts as $post) { setup_postdata($post); ?>

Grace
March 13th, 2006, 10:42
In Wordpress &raquo; General Options, change your Blog address (URI): to www.gracepj.org/blog.there was some probs with the functions calling, have fixed it now

and it works with gracejacob.in/blog too

Colin
March 14th, 2006, 03:05
Steveo, your changes while appreciated, didn't seem to work. Sure there isn't anything missing or wrong?

steveo
March 14th, 2006, 04:36
Steveo, your changes while appreciated, didn't seem to work. Sure there isn't anything missing or wrong?
hmm. I think you forgot to change this in rollingarchives.js.php:

new Ajax.Updater('rollingcontent', '<?php echo get_option('siteurl'); ?>/wp-content/plugins/rollingarchives/rollingarchives.php', {method: 'get', parameters: 'showposts='+offset+'&paged='+position, onFailure: rollError});

Heilemann
March 14th, 2006, 08:49
Just to let you all know, the rolling archives have been implemented in the core of K2. If I do say so myself, it's a fairly graceful solution which tries to anticipate all (I think) of your WordPress settings without you having to edit the file directly.

If you're courageous, check out the latest SVN and give it a whirl.

The UI is still a work in progress.

batorma
March 14th, 2006, 12:39
It works Colin, go back through step by step. Worked like a charm for me.

sannixtudio
March 14th, 2006, 01:29
Yeah Michael, I really like the way you guys implemented RA (SVN 243).

Colin
March 15th, 2006, 07:40
I've gone through it again with the same result: the results don't seem to load. I'll go through and see if this isn't another problem merely being exposed by these changes.

sdollen
March 16th, 2006, 01:54
I finally got this implemented the way I wanted it to look, using Oompa's RA version. It looks pretty good in Firefox. But, looks like crap in IE6.

Anyone mind looking and giving me some direction as to what I should edit to make it look right? I'm still using a sidebar theme, and it (sidebar) is dropping down now. Any direction is greatly appreciated.


*** EDIT *******

I used to have my webpage URL in my sig, but started getting spam, duh! You know you can just click my user name and it is listed there :) Thanks!

sdollen
March 17th, 2006, 09:57
So, is it missing a DIV or do I need to tweak the CSS to make it work in IE6? I've also noticed that when I click the browser refresh button the blocks of info move around.

I tried to check some K2 blogs with RA but it seems that most people have tried it and dropped it?

Any help/direction is always appreciated :)

sannixtudio
March 17th, 2006, 10:35
If I remember correctly..... if the sidebar drops down like that, you are most likely missing a div. Can you check your code in DW to check for a missed closing tag?

sdollen
March 18th, 2006, 01:12
Sann - dw?

---------- edit -------------

Oh, Dreamweaver. Good idea. Thanks sann :) I'll give that a shot.


Sann, what tool are you using in Dreamweaver to test for missed closing tags?

sdollen
March 23rd, 2006, 03:08
I guess everyone has either installed RA and it worked for them or just thrown in the towel?

Heilemann
March 23rd, 2006, 07:52
FYI: getk2.com is using the latest version of the RA in K2. It's still a WIP though.

tjrac
March 23rd, 2006, 12:13
Thanks to everyone willing to share their time and talent! I have a silly problem that I'm not able to solve.

I'm at http://www.itsillusive.net/

Can anyone tell me why my current month posts do not show up in RA? I have 5 March posts, and I set one to appear hoping that the others would default to the RA but they do not. It's Probably a simple oversight on my part but I'm pretty new at this. I'm using Oompa's k2.simp theme with no unusual plugins (nears as I can tell ... ). Could it have anything to do with the post title js?

Thanks in advance!

Tom

sams
March 23rd, 2006, 05:26
FYI: getk2.com is using the latest version of the RA in K2. It's still a WIP though.


Its looking sweet, for those of you interested in RollingArchives-built-Into-k2 you can see it here

http://robinhogarth.co.uk/v7/
still a WIP also

I guess this proves that some wishes really can come true...

exiva
March 31st, 2006, 06:27
I'm having problems with my Rolling Archives, if you look here (http://www.exiva.net/) at my site you'll see that there's nothing in the Archives section (It worked under the latest SVN of k2), and the "« Previous Entries" link is below the Rolling Archives, when in all the implementations I've seen it's above the Rolling Archives. I'm using batorma's Rolling Archives by the way.

Thanks!

batorma
April 1st, 2006, 01:42
they're not mine, they're Michael's through and through, it's just packaged with some mods I added

batorma
April 2nd, 2006, 01:35
Anyone else had success excluding a category? I've tried the method Steveo describes above but have had no luck & with my current layout I'd very much like to be able to exclude my Asides

animation
June 1st, 2006, 02:35
Is there any way to show the RA without excluding the latest 5 posts?

freakerz
August 12th, 2006, 04:22
there was some probs with the functions calling, have fixed it now

and it works with gracejacob.in/blog too

Hwo did you fix it, cuz I get the same error..

RollingArchives has an issue..

Seem to be happening since I installed the French localization.. :confused:

steveo
August 13th, 2006, 08:14
are you talking about Zeo's Rolling Archives plugin which this thread is about or the built-in Rolling Archives in k2 svn and 0.9?

astrokid
October 10th, 2006, 11:16
The rolling archives just keeps loading and loading after I refresh the page on Firefox(IE is not working at all. It just keeps loading).

I'm using K2 0.9.1 on wordpress 2.0.4.

Anyone has any idea what might cause this problem? Here is the URL for my site. www.glorystool.com/v1/ If you need more info please let me know.

Thx~