1 edb Jan 06, 2005 01:14
3 edb Feb 27, 2005 00:30
I'll try to look at this tomorrow for you. The thing is I do these hacks using skins that are all based on the custom skin. I've never actually used a WPC_* skin, so I can speak to any specific issue with them. My (sorry excuse for a) brain tells me a big feature with the WPC_* skins is that it is really easy for a WP skin to be moved into the b2evo world, but the disclaimer says some b2evo stuff ain't there. That doesn't help me understand why these hacks wouldn't work for you, and there's no way I can figure it out right now, but I'll try. Tomorrow.
4 moodygirl Feb 28, 2005 00:54
Thanks EdB. Btw...I just discovered your modified Kubrick! Love it. :D
5 cfore1 Mar 09, 2005 19:22
thanks for the hack, i just put it on mine.
i was thinking of doing it myself, but gave the forums a shot, and thank jeebus that you've already done it. thanks again.
6 austriaco Aug 08, 2006 12:56
I have updated this very nice hack (thanks EdB) to conform to 1.8 new function calls. AFAIK, only three lines of code have to be changed:
$bourbon = $result->ID;
was changed to:
$bourbon = $result->post_ID;
And
$NewItem = Item_get_by_ID( $bourbon );
$permalink = $NewItem->gen_permalink( '', '', false, '&' );
was changed to:
$NewItem = $ItemCache->get_by_ID( $bourbon );
$permalink = $NewItem->get_permanent_url( '', '', false, '&' );
That's it. Now it is working for me. I don't know how I could survive for more than week with out it.
7 edb Aug 08, 2006 16:05
I'm glad you liked it enough to upgrade it, and really glad you shared the results of your efforts with others who might want to use that hack!
(I remember when I wanted to write a hack using booze as variable names but didn't recall exactly what I used them on.)
8 nealo Aug 27, 2006 01:24
Weird. When I try the updated script, I get a "please do not access this page directly" in the sidebar. Any thoughts on what it might be? I did a direct copy and paste on the script and updated it per Austriaco's script but no luck.
Also, is there a straight up "last comments" and "recently posted" plugin for 1.8 yet? I can't seem to find it if it exists.
Thanks for all the help!
9 john Aug 27, 2006 02:01
@Neal0
You might have to change the following for 1.8..
if( !defined('DB_USER') ) die( 'Please, do not access this page directly.' )
to
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
10 nealo Aug 27, 2006 05:22
John - thanks.
That got me closer, but now I'm getting this error:
Additional information about this error:
MySQL error!
Unknown column 'ID' in 'field list'(Errno=1054)
Your query:
SELECT ID, post_title, comment_ID
FROM evo_posts JOIN evo_comments ON ( ID = comment_post_ID )
WHERE post_status = 'published'
GROUP BY comment_ID DESC, comment_post_ID
I'm hoping this is obvious to you b/c it's greek to me.
11 topanga Aug 27, 2006 10:32
I suppose this one is doing exactly the same thing :
12 nealo Aug 27, 2006 15:01
It is. All formerly working in 0.9.2, but I would expect them to stop working in 1.8. Thoughts on what it might be?
13 topanga Aug 27, 2006 15:31
The solution for 1.8.1 is in that same post...
I'm using it at the moment...
14 nealo Aug 28, 2006 04:06
Topanga - I got the includecomments.php to work - any idea on how to get recent comments to work? Another thing I'm trying to figure out is how to show the recent posts ... any thoughts on that?
Thanks for the great programming.
15 topanga Aug 28, 2006 07:02
Elaborate me on the difference between
including the 5 latest comments in the sidebar
or
including the 5 recent comments in the sidebar...
for me the 5 latests are the 5 recent..
16 nealo Aug 28, 2006 12:53
Ha - you have a point there. But I guess what I'd like to do is have Isaac's recent hack work for 1.8, which was my original intention. Then I stumbled on this hack which I figured I'd give a go. Now that I've got includecomments working, I'm back to my original intention - which is to get the recent hack going again.
17 topanga Aug 28, 2006 13:24
Include recent posts : http://manual.b2evolution.net/Recent_posts_in_the_sidebar
The recentcomment hack from isaac is something I reworked into the includecomments..
What is for you the main-issue that the recentcomments from isaac has that includecomment does not has...
18 nealo Aug 28, 2006 15:31
Now I think I've just confused the issue.
Recentcomments and includecomments are essentially doing the same thing - like you pointed out. What I'd like to have is a recent posts - that just lists the last 10 posts on the site regardless of whether they've been commented on or not. This was done previously with _recent.php. You don't know how to fix this for 1.8.1 do you?
19 john Aug 28, 2006 15:58
@Neal0
What I'd like to have is a recent posts - that just lists the last 10 posts on the site regardless of whether they've been commented on or not. This was done previously with _recent.php. You don't know how to fix this for 1.8.1 do you?
For the last 12 posts I simply use ...
<h3><?php echo T_('Recent posts') ?></h3>
<ul>
<?php // Get the 12 last posts for each blog:
$BlogBList = & new ItemList( $blog, '', '', '', '', '', array(), '', 'DESC', '', 12, '', '', '', '', '', '', '', 'posts' );
while( $Item = $BlogBList->get_item() )
{
?>
<li><a href="<?php $Item->permanent_url() ?>" rel="bookmark" title="<?php echo T_('Permanent link to ...') ?><?php $Item->title(); ?>"><?php $Item->title(); ?></a></li>
<?php
}
?>
</ul>
Change the number 12 to whatever you want
Works in 1.8.1
20 nealo Aug 28, 2006 16:06
That worked great - Thanks John!
21 topanga Aug 28, 2006 19:31
Neal.. that is exactly what I pointed you to too....
grrr ;)
This worked really great when I was using B2Evo skins, but when I used it on WPC skins I kept getting parse errors. Members couldn't log in or out (if they were logged in from their last visit) either. I was using both this hack and the "recent posts" one. As soon as I took them both off, members were able to log in and log out again. I didn't have this problem AT ALL when I was using B2 skins. Anybody have any idea what happened there?