1 (edited by YonasH 2009-02-22 18:28)

Topic: [release] Favorite topic

Hello

This extension add "favorite topic" option. User can set some topics as favorite. Favorites topics are displayed after sticky ones, before any others.
Favorite button is placed next to "Subscribe".
Complex extension including clearing unnecessary data in case of delete user/topic.

In my opinion good alternative for subsriptions wink

Version 1.0
favorite_topic_1.0.zip


Version 1.1
-fixed style issue
favorite_topic_1.1.zip


Version 1.2
-added "View all your favorite topics" to user profile
favorite_topic_1.2.zip


Version 1.3
-added favorite topics listing in topic footer (for moderators only)
favorite_topic_1.3.zip


Version 1.4
-added new option in users profile to stick/unstick favorites topics
favorite_topic_1.4.zip




List of users who set topic as favorite is displayed in topic footer. I created new div for this, and I'm sharing this solution between 4 extensions:
-Favorite topic
-Hide topic
-Lock topic
-Show subscriptions
It mean that there is only one div (frame) created for all of them. Of course is working separately as well.

YonasH's repository + Extensions Directory = PunBB Extensions Online Library (in progress....)

Away. I will be back soon.

Re: [release] Favorite topic

Nice.

3 (edited by Meteolab 2009-01-06 22:17)

Re: [release] Favorite topic

Yonash, thank you for this extensions.

But there seems to be a little problem with css-style?

http://i42.tinypic.com/dy8uih.jpg

The color behind "Favorit" is not the same as in the rest of row.

Is it possible to give the whole row a specified color (like the stiky row)?

Greets,
Meteolab

Re: [release] Favorite topic

You're right. The diference is so little, that I haven't seen it on my laptop screen smile
I will fix it soon smile

YonasH's repository + Extensions Directory = PunBB Extensions Online Library (in progress....)

Away. I will be back soon.

Re: [release] Favorite topic

This is a very nice extension. I've installed it straight away at www.eRoyton.co.uk/forum
Can you take it a step further and use this extension to create a "most popular" topics forum. So that only the topics which have been "favourited" the most times are listed in a special separate forum?

Or perhaps another similar idea that achieves the same result?
Thanks for the extension release smile

Re: [release] Favorite topic

esupergood wrote:

This is a very nice extension. I've installed it straight away at www.eRoyton.co.uk/forum
Can you take it a step further and use this extension to create a "most popular" topics forum. So that only the topics which have been "favourited" the most times are listed in a special separate forum?

Or perhaps another similar idea that achieves the same result?
Thanks for the extension release

Yeah most popular topics + most new topics at index is good extension

7 (edited by YonasH 2009-01-07 12:20)

Re: [release] Favorite topic

Style issue fixed - see first post.

Most popular topics - not too bad idea wink I can modify some existing extension which is showing newest topics in index.php Is there any good?

Edit: I read it again. You mean new forum with most frequently favorite topics. It can be done, but I'll need to think about it.

YonasH's repository + Extensions Directory = PunBB Extensions Online Library (in progress....)

Away. I will be back soon.

Re: [release] Favorite topic

I also think forum with most popular topics is good idea. Really allows a kind of heat map of the site to be created.... create buzz and whatnot big_smile

9 (edited by esupergood 2009-01-07 13:53)

Re: [release] Favorite topic

yonash wrote:

Edit: I read it again. You mean new forum with most frequently favorite topics. It can be done, but I'll need to think about it.

Yes that's the one. Sounds good to me.
It does need some thinking about though

10

Re: [release] Favorite topic

Not sure about this.
What need to be done:
-option in admin panel to assign some forum as "top favorites" (it can use "redirect_url" field with some special value)
-index.php - easy changes to mark this special forum
-viewforum.php - make a exception in "redirect_url" checking step, select topics list using favorites table. display as "moved", show no. of favorite selections in some column. Lots of work.

But what for? Most popular topics will became more and more popular, and list order will be constant.
Maybe just some short list in admin panel?

What do you think?

YonasH's repository + Extensions Directory = PunBB Extensions Online Library (in progress....)

Away. I will be back soon.

Re: [release] Favorite topic

Did some posts get deleted from this topic?
Someone replied with a good idea and I followed up.

Hmmm. The suggestion was that it would be good if the favourite topics did NOT appear like stickies at the top of the forum list but were instead accessed by a link in the profile just like the current subscription topics are viewed. That would be much better for me.

And then, based on forum activity, it would be good if the following links/lists were available:
- most favourited today
- most favourited this week
- most favourited this month
- most favourited this year
- most favourited all time

Something along those lines ???

12

Re: [release] Favorite topic

Rest of discussion is here: http://punbb.informer.com/forums/topic/ … ide-topic/ wink

I'll just add "View all your favorites" to user profile in few minutes.
I still have about 30 extensions to do on my list, so I will not work on this "most favorites" project right now. Fell free to modify my extension.

YonasH's repository + Extensions Directory = PunBB Extensions Online Library (in progress....)

Away. I will be back soon.

13

Re: [release] Favorite topic

"View all your favorite topics" added
Check first post

YonasH's repository + Extensions Directory = PunBB Extensions Online Library (in progress....)

Away. I will be back soon.

Re: [release] Favorite topic

Does version 1.2 still create stickies when you add a favourite topic?
I'm very excited to hear that you are working on more extensions

15

Re: [release] Favorite topic

esupergood wrote:

Does version 1.2 still create stickies when you add a favourite topic?
I'm very excited to hear that you are working on more extensions

yes. my idea for this extension was to stick those topics.
if you want to remove that sticky part, just delete line 97 from manifest.xml:

$query['ORDER BY'] = 't.sticky DESC, favorite DESC, '.(($cur_forum['sort_by'] == '1') ? 't.posted' : 't.last_post').' DESC';
YonasH's repository + Extensions Directory = PunBB Extensions Online Library (in progress....)

Away. I will be back soon.

Re: [release] Favorite topic

Hello Yonash, thank you for Version 1.2 of Favorite topic .

In the lang file I found two links:

'View your favorite'    => 'View all your favorite topics',
    'View user favorite'    => 'View all %s\'s favorite topics'

But where in the profile or administration I can check the "user favorite"?

yours sincerely,
Meteolab

17

Re: [release] Favorite topic

on default user page (viewed as admin)

YonasH's repository + Extensions Directory = PunBB Extensions Online Library (in progress....)

Away. I will be back soon.

18

Re: [release] Favorite topic

YonasH wrote:
esupergood wrote:

Does version 1.2 still create stickies when you add a favourite topic?
I'm very excited to hear that you are working on more extensions

yes. my idea for this extension was to stick those topics.
if you want to remove that sticky part, just delete line 97 from manifest.xml:

$query['ORDER BY'] = 't.sticky DESC, favorite DESC, '.(($cur_forum['sort_by'] == '1') ? 't.posted' : 't.last_post').' DESC';

Now this is a option in users profile.
Check for new version in first post, or use my repository to get automatic updates prompts smile

YonasH's repository + Extensions Directory = PunBB Extensions Online Library (in progress....)

Away. I will be back soon.

Re: [release] Favorite topic

Great extension.

I noticed that the search results page for favorites didn't "match" the subscriptions page, so I tweaked the extension as follows, and thought I'd share back. smile

Added to manifest.xml:

<hook id="sf_fn_generate_search_crumbs_start"><![CDATA[
    if ($action == 'show_favorite')
    {
        if (file_exists($ext_info['path'].'/lang/'.$forum_user['language'].'/'.$ext_info['id'].'.php'))
        {
            include_once $ext_info['path'].'/lang/'.$forum_user['language'].'/'.$ext_info['id'].'.php';
        }

        else
        {
            include_once $ext_info['path'].'/lang/English/'.$ext_info['id'].'.php';
        }

        $forum_page['crumbs'][] = $lang_favorite_topic['Favorites'];
        $forum_page['items_info'] = generate_items_info($lang_search['Topics found'], ($forum_page['start_from'] + 1), $num_hits);
        $forum_page['main_head_options']['defined_search'] = '<span'.(empty($forum_page['main_head_options']) ? ' class="first-item"' : '').'><a href="'.forum_link($forum_url['search']).'">'.$lang_search['User defined search'].'</a></span>';

        return true;
    }
]]></hook>

<hook id="sf_fn_no_search_results_start"><![CDATA[
    if ($action == 'show_favorite')
    {
        if (file_exists($ext_info['path'].'/lang/'.$forum_user['language'].'/'.$ext_info['id'].'.php'))
        {
            include_once $ext_info['path'].'/lang/'.$forum_user['language'].'/'.$ext_info['id'].'.php';
        }

        else
        {
            include_once $ext_info['path'].'/lang/English/'.$ext_info['id'].'.php';
        }

        message($lang_favorite_topic['No favorites'], $forum_page['search_again'], $lang_favorite_topic['Favorites']);

        return true;
    }
]]></hook>

Added to $lang_favorite_topic in English favorite_topic.php:

    'Favorites'       => 'Favorites',
    'No favorites'    => 'You have no favorite topics.',

Re: [release] Favorite topic

Very useful extension.  Installed fine without a problem.  Thank you.

21

Re: [release] Favorite topic

hi,
pagination does not work with this nice extension. if i want to visit the other than first pages of the favorite topic list, i get the following error:

Page Not found (Error 404): The requested page search-favorite2350-p2.html could not be found.

any solution?

Re: [release] Favorite topic

Try with Default url scheme.

23

Re: [release] Favorite topic

dimkalinux wrote:

Try with Default url scheme.

hi,
but i am using File Based urls for my forum! it works with default one. i can't change site's URL structure

Re: [release] Favorite topic

rajuru, try this version http://dl.dropbox.com/u/1630654/punbb/1 … 1.5.tar.gz

I fix bug with url.

25

Re: [release] Favorite topic

dimkalinux wrote:

rajuru, try this version http://dl.dropbox.com/u/1630654/punbb/1 … 1.5.tar.gz

I fix bug with url.

great thanks. i am going to test it very soon.