Gossamer Forum
Home : Products : Gossamer Forum : Development, Plugins and Globals :

Pinned Topics for GForum

(Page 1 of 2)
> >
Quote Reply
Pinned Topics for GForum
I want to be able to 'pin' topics within forums. Pinning a topic means that it would always stay at the top of the forum no matter what sort order was selected.

Does anyone know how I would achieve this?

Thanks in advance

Jammer
Quote Reply
Re: [Jammer] Pinned Topics for GForum In reply to
This request has come up often. Jason has said it's on his list for ver2. I wish I had it too!

Dave
Quote Reply
Re: [bretzke] Pinned Topics for GForum In reply to
*asks obvious question* "when is version 2 coming?"
Quote Reply
Antwort: [Jammer] Re: [bretzke] Pinned Topics for GForum In reply to
i have my way to do it.

it's works fine.Sly

my MSN: perlchina_at_hotmail.com

Last edited by:

tsingson: Mar 20, 2003, 8:08 AM
Quote Reply
Re: [tsingson] Antwort: [Jammer] Re: [bretzke] Pinned Topics for GForum In reply to
tsingson

care to share?

I am working on my own, but if you have already done it?

Thanks



Mike

----------
Michael J. Challis - CRUZN8R - PT Cruiser Club - http://www.ptcruiserclub.org

http://www.ptcruiserclub.org/forum
Quote Reply
Antwort: [CRUZN8R] Re: [tsingson] Antwort: [Jammer] Re: [bretzke] Pinned Topics for GForum In reply to
anyone free to use it.

my MSN: perlchina_at_hotmail.com
Quote Reply
Re: [tsingson] Antwort: [CRUZN8R] Re: [tsingson] Antwort: [Jammer] Re: [bretzke] Pinned Topics for GForum In reply to
Can you tell us what you did? The link to your site isn't avalable to me.
Quote Reply
Re: [bretzke] Pinned Topics for GForum In reply to
I was playing with this a while back...I never finished it but I decided it was actually very easy. All you need to do is add a column to the post table called, say, "is_pinned" and then add the is_pinned option to the composition page for staff or moderators or whoever. Then if you change the sort order of your threads to sort first by is_pinned then they will always be at the top.
Quote Reply
Re: [Paul] Pinned Topics for GForum In reply to
I made a "StickyTopics" plugin that works, I just finished it today.



If you have the plugin
"SearchHighlighter" installed and want to use
"StickyTopics", you need to have the "SearchHighlighter" plugin version 1.3
Thanks

Mike

----------
Michael J. Challis - CRUZN8R - PT Cruiser Club - http://www.ptcruiserclub.org

http://www.ptcruiserclub.org/forum

Last edited by:

CRUZN8R: Mar 28, 2003, 12:41 AM
Quote Reply
Re: [CRUZN8R] Pinned Topics for GForum In reply to
hello CRUZN8R

Please give the Plugin for all Members here.

Thanks höfti
linktobuy Web Directory
Ratgeber Recht
Quote Reply
Re: [hoefti] Pinned Topics for GForum In reply to
Maybe he doesn't want to Tongue
Quote Reply
Re: [hoefti] Pinned Topics for GForum In reply to
Here is how my "StickyTopics" plugin works:

The StickyTopics plugin will create a new Sticky table, and will hook into post_normalize forum view. Top and Detop topic will apear as options in the moderator links section of a post. Topped topics appear with "Important" next to the subject. If the Topped thread is also locked, "Announcement" will be next to the subject.

One shortcoming with StickyTopicsis: if the post you want to "Top" is like on page 3, it will be top on page 3, not page 1. This seems to be because of the topics per page limit setting. I will have to track this down, see if there is a way. I am still learning this stuff. Not sure when I can fix it.

If you have the plugin
"SearchHighlighter" installed and want to use
"StickyTopics", you need to have the "SearchHighlighter" plugin version 1.3


Let me know if you like it, use at your own risk.

I just fixed a small bug and uploaded version 1.2

If you installed 1.0, or 1.1, you might want to uninstall and then install 1.2

Update: 10/13/03 I have removed the plugin and upgraded to gforum 1.2.0 which now supports Sticky topics. I recommend others do the same because the code is more efficient.

Mike Challis - www.membershipwizards.com



----------
Michael J. Challis - CRUZN8R - PT Cruiser Club - http://www.ptcruiserclub.org

http://www.ptcruiserclub.org/forum

Last edited by:

CRUZN8R: Oct 13, 2003, 9:12 PM
Quote Reply
Re: [CRUZN8R] Pinned Topics for GForum In reply to
Hello Mike

Something is wrong:

StickyTopics-with-SearchHighlighter.tar

Plugin: StickyTopics-with-SearchHighlighter
Version: Unknown Tag: 'version'
Autor: Unknown
Lizenz: Unknown Tag: 'license'
Perl Said:
Name "Plugins::GForum::StickyTopics::error" used only once: possible typo at Install.pm line 101.
Install.pm syntax OK

StickyTopics.tar
Perl Said:
Name "Plugins::GForum::StickyTopics::error" used only once: possible typo at Install.pm line 98.
Install.pm syntax OK

mfg hoefti
linktobuy Web Directory
Ratgeber Recht
Quote Reply
Re: [hoefti] Pinned Topics for GForum In reply to
 

If you have the plugin "SearchHighlighter" installed and want to use
"StickyTopics", you need to have the "SearchHighlighter" plugin version 1.3

Also you can ignore the "Plugins::GForum::StickyTopics::error" used only once: possible typo at Install.pm line 101.
and it still installs fine. (unless somebody can fix that, I dont have time right now)

Thanks



Mike

----------
Michael J. Challis - CRUZN8R - PT Cruiser Club - http://www.ptcruiserclub.org

http://www.ptcruiserclub.org/forum

Last edited by:

CRUZN8R: Mar 28, 2003, 12:40 AM
Post deleted by bretzke In reply to
Quote Reply
Re: [CRUZN8R] Pinned Topics for GForum In reply to
Hello Mike and thanks for making this available to all of us!

I'm getting an error message when I De-Top a post. It's below. When I refresh, things look ok and it performed the action (putting it back in order). I just wanted to make sure there not an invisible problem: Proxy Error

The proxy server received an invalid response from an upstream server.

The proxy server could not handle the request GET /perl/gforum/gforum.cgi.

Reason: Document contains no data



Thanks again!

Dave
Quote Reply
Re: [bretzke] Pinned Topics for GForum In reply to
Sorry you are having trouble bretzke

I do not know the details of your server configuration and type, I am not able to help.

I am usung Red Hat Linux 7.1 with apache and MySql and am not having ant problems.

Mike

----------
Michael J. Challis - CRUZN8R - PT Cruiser Club - http://www.ptcruiserclub.org

http://www.ptcruiserclub.org/forum
Post deleted by CRUZN8R In reply to
Quote Reply
Re: [CRUZN8R] Pinned Topics for GForum In reply to
Hi!

I just installed the plug in, and edited the templetes. I looked at a page, and had this error:

GT::Plugins (28873): Error running plugin POST hook: Plugins::GForum::StickyTopics::sticky. Reason: Can't declare array dereference in my at /forum/admin/Plugins/GForum/StickyTopics.pm line 41, near "$sticky_posts ="
Compilation failed in require at GT::Plugins::_load_hook line 261.
at /forum/public_html/forum/admin/GForum/Post.pm line 329.



Any ideas?
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [CRUZN8R] Pinned Topics for GForum In reply to
I've fixed the SearchHighlighter plugin, and uploaded a new one (1.3) that plays nicely with other plugins.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [carfac] Pinned Topics for GForum In reply to
Try this:

uninstall the plugin and edit StickyTopics.pm

Find this:
my @$sticky_posts =();
my @$no_sticky_posts =();


Replace with this:

use vars qw($sticky_posts $no_sticky_posts);
@$sticky_posts =();
@$no_sticky_posts =();


Syntax check and install.

Let me know ASAP if that fixed it, so I can update the version.



Thanks



Mike

----------
Michael J. Challis - CRUZN8R - PT Cruiser Club - http://www.ptcruiserclub.org

http://www.ptcruiserclub.org/forum

Last edited by:

CRUZN8R: Mar 27, 2003, 11:34 PM
Quote Reply
Re: [CRUZN8R] Pinned Topics for GForum In reply to
In Reply To:
Let me know ASAP if that fixed it, so I can update the version.

That'll fix it. Or you could change it to the equivelant:

my $sticky_posts = [];
my $no_sticky_posts = [];

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] Pinned Topics for GForum In reply to
OK, thanks, I replaced my attachment with version 1.2

I deleted my other attachment because you release the compatible SearchHighlighter ver. 1.3

Thanks

Mike

----------
Michael J. Challis - CRUZN8R - PT Cruiser Club - http://www.ptcruiserclub.org

http://www.ptcruiserclub.org/forum
Quote Reply
Re: [CRUZN8R] Pinned Topics for GForum In reply to
CRUZN8R :

Thanks for the fix! I popped that in, syntax was correct for perl, and it loaded up and ran fine!

Thanks for the quick (and correct!) response!
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [CRUZN8R] Pinned Topics for GForum In reply to
Hi, there is one drawback with my stickytopics plugin.

If the post you want to "Top" is like on page 3, it will be top on page
3, not page 1. A topped topic will migrate to page 2 after 25 new posts. If you reply to your topped topic it will be on page 1 again.


I had some time to work on this and I found a way to fix it that
works for me. I no longer need the "sticky" subroutine in my StickyTopics plugin because I
put that part of the mod in GForum::Forum.pm in the sub view_collapsed

There were some functions that had to be in the Forum.pm that I was unable to program as a plugin.

I can't distrubute this new feature as a plugin because part of it is not a plugin
anymore, but it works fine hard coded on my custom version.

----------
Michael J. Challis - CRUZN8R - PT Cruiser Club - http://www.ptcruiserclub.org

http://www.ptcruiserclub.org/forum
> >