1 balupton Dec 16, 2006 16:39
3 yabba Jul 28, 2007 01:40
4 cslepage Aug 11, 2007 04:00
This plugin works precisely as advertised, and is very cool.
One byproduct I've discovered is that the the "sticky" message not only becomes the first item on the given blog, but the first item in the RSS feed, until the post is no longer sticky. I have some Feedburner Buzzboosts set up, and discovered the first message in them was the "sticky." Is there any way to have the sticky be at the top of the blog but not affect the web feed?
Example here:
5 balupton Aug 11, 2007 05:32
Hrmmm, Odd, I will look into it and make it a setting.
6 afwas Aug 11, 2007 05:44
Is it correct this plugin doesn't work in 2.0a?
7 balupton Aug 11, 2007 05:47
I haven't even touched b2evo v2 so I would have no idea. I only plan to touch it when a official release comes out, and even then, I may not decide to support it until it gets badged stable.
8 afwas Aug 11, 2007 05:56
That's fine with me, it was my choice to put 2.0 on. But then I can make it a statement: The [Plugin] Sticky Announcements Version 1.2.0.0-final doesn't function in B2evo 2.0.
9 stevet Feb 01, 2008 13:41
b2evo v 1.10.2
I'm not sure how to use this. I installed it OK - I noticed that a new blog got created called "announce". I posted into that and now it's gone into all the blogs. Great if that's what I wanted but I don't. I can't see a way to just post a sticky post into one Blog only
10 stevet Feb 01, 2008 13:49
sorry - that was a really dumb question - I have figured it out now
great plugin
11 compakia Feb 22, 2008 03:17
I used v2.4 rc2, so I wanna use sticky announcement, can I? If can, pls show me how to use it because I already install the plugin but I dont know how to make it happen.
12 stevet Feb 22, 2008 07:09
I dunno if it will work for your version (I'm using 1.10.2) but maybe you missed the same thing as I did. When you write a blog post under "Title" you will see "post type" and a drop down menu. Where it used to say "post" or "link" you should now have a third option "sticky". Also you should have a new blof created called "ANNOUNCEMENTS". Writing to this will post a sticky in ALL the other bl;ogs
13 compakia Feb 22, 2008 08:02
TQ! Stevet! It seems like I cant use it on v2.4.0, there's no third option called 'sticky' or new blog call 'announcements'.
But one more thing, I'm from Malaysia, so how I want to change my blog/post time to Malaysian time GMt+8
and should I turn to v1.10.3? because there's a lot of problems using v2.4.0. I even cant set my 3rd blog as default display.
Any suggestion?
14 stevet Feb 22, 2008 08:06
I have no experience of V2 and may not have for quite some time. It seems to me that much that is good is lost and there is a lot to learn (or unlearn)
hopefully some one else will have the answer for you
15 john Feb 22, 2008 08:42
I installed this years ago and can only say that it still allows me to make a Sticky post in 2.4 !!!! and I think I've even deleted it :)
16 afwas Feb 22, 2008 17:51
The stickyannouncements plugin does little. It sets up a blog, somewhat hidden, where you can create announcements that will be distributed to your other blogs simply by sharing a category from the Announcement blog.
The sticky thing is done by a new post type. In your stub or index.php you can then sort the posts by posttypeID. This basically sorts the sticky on top, leaving every other post as is. This is a very easy (manual) adjustment that is described here: [url=http://forums.b2evolution.net/viewtopic.php?t=14080]"The same opening page whenever people go to my blog"[/url].
So again: the plugin will only do the installation and preparation for you. You can do this yourself in a 2.x setup.
Good luck
17 baileyjs Feb 26, 2008 23:19
Yeah, this one definitely confuses the heck out of me.
I just upgraded one of my installs to 2.4, and I wanted to make an entry about the upgrade and changes 'Sticky.' However, when I create a Type:Sticky entry it doesn't 'stick' to the top of the page.
Looking around the Dashboard I don't see where in the settings it allows me to "sort the posts by posttypeID" as Afwas suggests.
So, I'm stuck. Anyone?
18 afwas Feb 26, 2008 23:23
¥åßßå wrote:
1) create a new post type "on top" or whatever
2) use a stub file
3) change/add the following to the stub file
$orderby = 'ptyp_ID datemodified';
4) make your intro post and set its post type to whatever you called your new type
¥
¥åßßå suggests using stubs here, but you can do the sorting in index.php as well.
Good luck
19 baileyjs Feb 27, 2008 13:58
Just so I'm clear -- I would edit this line in index.php:
# Additionnaly, you can set other values (see URL params in the manual)...
# $order = 'ASC'; // This for example would display the blog in chronological order...
This line would be uncommented and changed from $order = 'ASC' to $orderby = 'ptyp_ID datemodified'; ? Do I understand correctly?
20 afwas Feb 27, 2008 14:03
Yes
21 baileyjs Feb 27, 2008 14:45
Well, that didn't do what I hoped.
My 'Sticky' item was second in the list. First was a 'Post' which was created after my Sticky was modified from 'Post' to 'Sticky'.
Is there a way to tell b2 to put Sticky above Posts, regardless of date? I see in Global Settings >> Post types that Sticky (3) is below Link (2) and Post (1). Can this order be changed, and am I correct in thinking that this would affect 'ptyp_ID' ? Is it simply a matter of editing this page and changing the name?
22 afwas Feb 27, 2008 14:52
Sticky should be post type #5001. That's even higher than the Reserved ones.
If you sort them DSC on post type the stickies will come on top automatically.
Good luck
23 baileyjs Feb 27, 2008 15:02
What I see on my 'Global Settings >> Post types' is this:
Item/Post/Page types
ID Name
2 Link
1000 Page
2000 Podcast
1 Post
3000 Reserved
4000 Reserved
5000 Reserved
3 Sticky
24 afwas Feb 27, 2008 15:07
ok,
Put in your index.php:
$order= 'DSC';
$orderby = 'ptyp_ID datemodified';
and the stickies show before the posts.
Good luck
25 baileyjs Feb 27, 2008 15:22
Alas, I still see a 'Post' above a 'Sticky'
And you might want to fix that typo for DSC to $order= 'DESC';
26 afwas Feb 27, 2008 15:30
I'll fire up the testblog and come back to this topic later
27 afwas Feb 27, 2008 16:09
Hi BaileyWTNH,
You are right. This doesn't work as advertised.
I found some traces of work in progress in the code. May be this possibility is (deliberate or not) disabled at the time.
I will see if I can get some more information.
Perhaps ¥åßßå knows what's going on.
--Afwas
28 yabba Feb 27, 2008 19:32
as long as you have the $orderby ( you don't need the $order="DESC" ... it's assumed by the core as default ), above the two includes at the end of the file then everything should work as planned.
If not then enable debug mode ( conf/........urm .... _advanced.php or summat ) and see what query is actually being run for building the mainlist.
¥
29 afwas Feb 27, 2008 20:03
Query #16: ItemList2::Query() Step 1: Get ID list
SELECT DISTINCT post_ID
FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID INNER JOIN evo_categories ON postcat_cat_ID = cat_ID
WHERE (cat_blog_ID = 9)
AND (( post_ptyp_ID IS NULL
OR post_ptyp_ID NOT IN (1000) ))
AND (post_datestart <= '2008-02-27 19:49:57')
AND ( ( ( post_status = 'private'
AND post_creator_user_ID = 1 )
OR post_status IN ('published','protected') ) )
ORDER BY post_datestart DESC, post_ID DESC
LIMIT 5
The interesting part being:
ORDER BY post_datestart DESC, post_ID DESC
and
CollectionSettings::get( 9/posts_per_page/ ): '5'
CollectionSettings::get( 9/orderby/ ): 'datestart'
CollectionSettings::get( 9/orderdir/ ): 'DESC'
[/list:u]
30 baileyjs Feb 27, 2008 20:16
Wow -- that's a lot of debug information. Anyway, here's what mine says:
Query #16: ItemList2::Query() Step 1: Get ID list
SELECT DISTINCT post_ID
FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID INNER JOIN evo_categories ON postcat_cat_ID = cat_ID
WHERE (cat_blog_ID IN (2,3,5,6,7,8,9,10,11,13,15))
AND (( post_ptyp_ID IS NULL
OR post_ptyp_ID NOT IN (1000) ))
AND (post_datestart <= '2008-02-27 14:10:50')
AND ( ( ( post_status = 'private'
AND post_creator_user_ID = 1 )
OR post_status IN ('published','protected') ) )
ORDER BY post_ptyp_ID DESC, post_datemodified DESC, post_ID DESC
LIMIT 8
31 afwas Feb 27, 2008 20:28
The sticky post now works in the testlab. I wonder where I uploaded the index.php to?
Here is the current DB query that leaves me puzzled as to why this doesn't work for BaileyWTNH.
Query #16: ItemList2::Query() Step 1: Get ID list
SELECT DISTINCT post_ID
FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID INNER JOIN evo_categories ON postcat_cat_ID = cat_ID
WHERE (cat_blog_ID = 9)
AND (( post_ptyp_ID IS NULL
OR post_ptyp_ID NOT IN (1000) ))
AND (post_datestart <= '2008-02-27 20:24:57')
AND ( ( ( post_status = 'private'
AND post_creator_user_ID = 1 )
OR post_status IN ('published','protected') ) )
ORDER BY post_ptyp_ID DESC, post_datemodified DESC, post_ID DESC
LIMIT 5
32 john Feb 27, 2008 20:32
Afwas, when the Sticky post is in single post mode it's generating the following error at the top of your page...
WARNING: unhandled sorting: ptyp_IDWARNING: unhandled sorting: ptyp_ID
33 afwas Feb 27, 2008 20:47
Thanks John,
There is an even more curious error in the single post mode.
The link at the arrow shouldn't exist, it links to itself!
34 baileyjs Feb 27, 2008 21:43
Yeah, I got that too.
http://wtnh.tv/blogs/media/20080227-b2error.gif
Mine's on a modified Evopress skin.
35 yabba Feb 28, 2008 09:21
hmmm, looks like you just found a core bug :P
You can probably get around it by changing the $orderby to something like this :
if( empty($_GET['disp'] ) )
{
$orderby = 'ptyp_ID datemodified';
}
¥
36 baileyjs Feb 28, 2008 13:21
So by finding a core bug, do I get a B2 t-shirt or lunch with Francois if I ever make a trip back to Paris? B)
I'll try your workaround later in the day.
37 john Feb 28, 2008 22:38
As I don't use a long description in a Sidebar ( I don't have a Sidebar) I just use this
<?php $Blog->disp( 'longdesc', 'htmlbody' ); // the long description of your blog ?>
to display a sticky.
With an appropriate container, you could just use the widget to display this as well.
Pro's: Easy to edit/change the content via the text area in Blog Settings -> General.
Cons: It is just a static block of content.
38 afwas Apr 12, 2008 23:19
I have solved the bug we encountered. It's only a single line of code you want to add. See [url=http://forums.b2evolution.net/viewtopic.php?t=15184][2.4.1] Not a bug when sorting posts and viewing single post[/url]
Good luck
39 boneill Oct 14, 2008 04:57
I get the following message on install:
Fatal error: Call to a member function get_by_name() on a non-object in /var/www/comedy/plugins/stickyannouncements_plugin/_stickyannouncements.plugin.php on line 144
I'm running version 2.4.5
Will this work with 2.4.5? Thanks.
40 afwas Oct 14, 2008 08:41
Do not use the plugin. That one is for 1.10.x
For sticky posts you can do the (easy) hack
1) create new a Post type in Dashboard -> Global options -> Post types. Your new Post type will have a huge number (5001 most likely)
2) Crack open /blogs/index.php and add this as 'one but last line':
$orderby = 'ptyp_ID datemodified';
the last line will be:
// That's it, now let b2evolution do the rest! :)
require $inc_path.'_blog_main.inc.php';
When you write a post you now have the new Post type. If you select it, the post will float on top of other posts. In 2.4.5 there's no need to do the other hack.
Good luck
41 boneill Oct 16, 2008 05:39
Afwas wrote:
Do not use the plugin. That one is for 1.10.x
For sticky posts you can do the (easy) hack1) create new a Post type in Dashboard -> Global options -> Post types. Your new Post type will have a huge number (5001 most likely)
2) Crack open /blogs/index.php and add this as 'one but last line':
$orderby = 'ptyp_ID datemodified';
the last line will be:
// That's it, now let b2evolution do the rest! :) require $inc_path.'_blog_main.inc.php';
When you write a post you now have the new Post type. If you select it, the post will float on top of other posts. In 2.4.5 there's no need to do the other hack.
Good luck
THanks for the quick response! I'll try that out!
42 boneill Oct 23, 2008 04:42
hmm, just noticed today that Im getting a warning message when you look at a single post.
the warning message is: WARNING: unhandled sorting: ptyp_IDWARNING: unhandled sorting: ptyp_ID
It works fine on the main page, so Im only getting this when you look at a single post.
43 afwas Oct 23, 2008 12:05
Hi boneill,
Either you upgrade to B2evolution 2.4.5 or you apply the fix yourself see [url=http://forums.b2evolution.net/viewtopic.php?t=15184][2.4.1] Not a bug when sorting posts and viewing single post[/url].
Good luck
44 boneill Oct 23, 2008 17:36
Got it! Thanks! I guess I should have looked up a couple posts first.. :oops:
45 afwas Oct 23, 2008 18:11
No problem. I knew the answer to the question :p
46 palit Sep 04, 2009 19:06
Can anyone tell me, how to make it work????
I have installed it, but NOTHING happened.
b2evolution 2.4.2
47 bradwest Oct 23, 2009 07:36
I really didn't expect this to work "Sticky Announcements Plugin"
I wish I had the time to spend to learn how to code things, I really hate being dependent on others. Plus I could have my name on some cool useful stuff.
What We are trying to do is figure out the best way to use B2 as a store. Well kind of right now we are looking to try and get the store look for affiliate stuff.
In the future something like an osCommerce type deal, WordPress has a skin for this just trying to be loyal here.
For now I'm thinking just a sticky on top and blog posts under it for content.
That was the long way around, Gan anyone help me out and check out the Sticky Announcements Plugin to see if it's worth fixing?
Thanks for your time in advance!
Brad West ~ onomoney
48 jakets Dec 04, 2009 19:18
Afwas wrote:
Do not use the plugin. That one is for 1.10.x
For sticky posts you can do the (easy) hack1) create new a Post type in Dashboard -> Global options -> Post types. Your new Post type will have a huge number (5001 most likely)
2) Crack open /blogs/index.php and add this as 'one but last line':
$orderby = 'ptyp_ID datemodified';
the last line will be:
// That's it, now let b2evolution do the rest! :) require $inc_path.'_blog_main.inc.php';
When you write a post you now have the new Post type. If you select it, the post will float on top of other posts. In 2.4.5 there's no need to do the other hack.
Good luck
I did this in 3.3.2 and it basically just sorted my posts by last edited, which is totally not what I want since I edit old posts all the time (Guide site). Is there someway to still make a sticky post?
49 lturner Dec 04, 2009 19:44
Hi Jackets
No hacks required in 3.3.2 as there are intro posts. Take a look at the manual:
http://manual.b2evolution.net/Intro_and_featured_posts
L
50 jakets Dec 04, 2009 20:14
lturner wrote:
Hi Jackets
No hacks required in 3.3.2 as there are intro posts. Take a look at the manual:
http://manual.b2evolution.net/Intro_and_featured_posts
L
Ah! Very awesome, thanks. Learn a new feature every day. =D
Finally Released.