[XenMods] Announcements [Deleted]

I gave this one a try - and initially I see a couple things which would be nice to address.....

1. I set an announcement and then edited it (didn't change the stickiness, etc.) and it disabled the announcement...

Yes, unfortunately this a bug.

2. It would be really nice to not (or optionally) have the announcement show up in the main forum node list - that is, it should show only within the forums (or be optionally set to).

a) you could stop them from showing on the main page by editing the listener file for template hooks to remove that template. I'll help you if you don't know about this.
b) the idea is for it be global announcements :p

3. Ideally, it should be able to be set as a announcement in one forum - or in all forums. Or, better yet, select checkboxes for each one you want it it. (although some people have to many forums, it gets complicated).

If it's only in one forum wouldn't that just be a normal sticky thread?
 
a) Global announcements in every forum is a good idea. Having them on the front page, maybe less so. I use notices and notifications for that.
I'd rather see that off by default and editing if someone wants it on.

b) Well, in most cases, you are correct. You don't want only one forum...But, think about it this way. Many of my forums have 10 or more stickies. An announcement on top and separated is different!
 
I too would like to find a way to take this out of the main and category pages, and have only on top of the inside of nodes. I saw your note:

"a) you could stop them from showing on the main page by editing the listener file for template hooks to remove that template."

..and will see if I can figure it out. :)

Edit: Great got it, thanks :)

For any wondering, edit hook.php inside the Listener directory and change:

if ($hookName == 'forum_list_nodes' || $hookName == 'forum_view_pagenav_before')

to

if ($hookName == 'forum_view_pagenav_before')
 
Last edited:
A neat idea, but al of a sudden, after using for several months, I notice that several key threads, sticky and "announced" are completely missing.

One thread I created today for a test disappeared after I removed your add-on, and I could only recover it when I went there via a direct link from an emailed forum announcement and updated the thread. So how do I locate my other missing threads (several hundred messages)?????
 
That's odd. I'm surprised that has never come up. Try running this query: select * from xf_thread where sticky = 2
 
Sure, but only these 4 should be hidden. The rest should still display like normal sticky threads. I'm not sure how your threads would have disappeared aside from these 4.

To find your sticky threads do: select * from xf_thread where sticky = 1
To find the announcements that disappeared do: select * from xf_thread where sticky = 2
To find a combo of both do: select * from xf_thread where sticky > 0
 
Yeah... I'm trying to help you do that but I don't know what caused them to disappear. How many results showed up with that last query?
 
A number of sticky threads. But at least four threads, some with lots of messages, completely disappeared. Gone. Kaput. Nobody deleted them. ALL were featured in your plugin when this happened.
 
Listen, I am trying to help you resolve the issue. I understand that some of your threads disappeared, continuing to say that is not helpful at all. How did you go from several to "at least 4"?

How many threads return with the final query I gave you?

To fix the issue with the 4 threads run this query
Code:
update xf_thread set sticky = 1 where sticky = 2
. If there are still threads hidden after that point (which I don't understand how there would be) we will have to run more tests.
 
Hundreds of messages. Four threads (at least four), all of which were listed as Featured before they vanished yesterday.

The last command you gave displayed nothing.

And one more thing: You aren't being blamed. I know you're being helpful. And I know things happen. Just trying to find out what, and get the messages back if I can.
 
4 threads appeared in the list. But they are all visible and accessible anyway, and none of them are the ones that vanished.
 
Literally all my addon does in the database is change the sticky field to 2. If changing it back to 1 doesn't fix your issue then I don't know what to tell you.
 
Well, in each case, the missing threads were featured via your add-on. No other threads were impacted. Is there a way to make all invisible threads visible? When a thread is deleted, is the table removed immediately or what? I'm just trying to figure out what happened at this point and see if there's a recovery point.

The other possibility is to get ahold of an older back but restoring just these threads would be way, way beyond my capabilities.
 
If the 4 threads that appear in the list of
Code:
select * from xf_thread where sticky = 2
are not the threads that you are having an issue with, then my add on has nothing to do with it. If those threads are the one you are having an issue with, then changing sticky from 2 to 1 will resolve your issue.
 
Top Bottom