imath / wp-idea-stream

Share ideas, great ones will rise to the top!
GNU General Public License v2.0
27 stars 5 forks source link

Automatically select Idea Category when "New Idea" is clicked from BP Group #43

Closed BoweFrankema closed 7 years ago

BoweFrankema commented 8 years ago

Hi Matthieu,

I'm implementing Idea Stream on the WeFoster community for Product suggestions, and so far everything is coming along great. I have one request..

It would be nice when viewing the Ideas Archive on a BuddyPress Group it would automatically select the right post category when "Add New" is clicked. Maybe this could be achieved by adding a query string to the URL and some Javascript on the New Idea post form?

See the attached screenshots!

skitch

screen shot 2015-12-15 at 14 41 38
imath commented 8 years ago

mm I'm using a query string 'cat' containing the category displayed ?

I'm a bit surprised but maybe i was lazy here :)

The thing with categories is these are global ones, there are not restricted to a group.

I'll need to look at it more carefully, thanks for your suggestion.

imath commented 8 years ago

Ah sorry i didn't understand, as i'm using pretty urls.

So you want to include a new parameter inside the query string to automatically select the category.

I understand this category is linked to the group. But is there 1 category = 1 group, with no others ? Does this mean you are using a category to eventually filter it from the main ideastream loop ?

Because, i think i wouldn't give the choice to the user in this case, i'd directly add the category just after the idea is saved using one of the loops available and checking the current group name.