Categories Topic Replies


(Shankar Prakash G) #1

I’m new to Ruby on Rails and Ember js(but have programming knowledge and working on PHP with laravel and also have experience with JavaScript). My requirement is while posting reply to a topic the user will select category and sub-category(e.g: if topic is about a particular smart phone, then the replies are categorized like Connectivity >> Wi-Fi, Battery >> Capacity and soon).

The reply window will be like below image

and it will be displayed like below

I have started developing plugin for this and stuck after starting. Currently I’m studying both ember and ruby on rails. Can someone explain if it can be implemented with plugin and methods and technique for implementing.


(Mittineague) #2

Hi ShankarG welcome to the forum

I’m a bit confused as to what your intent is.

I think of Category - Topic -> Post as being kind of “top down”, “parent - child”, or “has many - has one” type of relationship.

Your first mock-up has separate inputs for Category and Sub-Category. Currently, Sub-Categories are just Categories that have a parent Category.
And there is only one input that is only available for New Topic, not for replies to an existing topic.

Your second mock-up shows the category breadcrumb in a posts topic meta data. Currently this information shows in headers not per post.

Can you please explain more as to what you are wanting to do and why.

I imagine it would be possible to do with a plugin, but there may be different ways to approach whatever it is you are wanting to do.


#3

If the aim is categorisation in terms subjects as per you explained earlier it might be wise looking at using tags


(Rafael dos Santos Silva) #4

Looks like you want category and subcategory per post.

So you don’t want categories at all, better call it custom field 1 and custom field 2, per post.

This is doable with a plugin, but will take some work.


(Shankar Prakash G) #5

Thank’s for you reply, You got my concept clearly and also I have planned to implement it with custom fields for post and PluginStore.

As I’m newbie to ember and rails, I didn’t know how to store, update, read, display the custom fields from plugin and to work with PluginStore. Can’t find documentation in Beginner’s Guide to Creating Plugin for there function.
so it would be helpful if you can provide related guide and sample code if any.

Also there is no plugin outlet inside post and also client side plugin api have only before and after post methods, so how to inject those custom fields into post.


(Shankar Prakash G) #6

My concept is as @Falco describe, [quote=“ShankarG, post:5, topic:49782”]
As I’m newbie to ember and rails, I didn’t know how to store, update, read, display the custom fields from plugin and to work with PluginStore. Can’t find documentation in Beginner’s Guide to Creating Plugin for there function.
so it would be helpful if you can provide related guide to do it.
[/quote]


(Pad Pors) #7

it may help:


(Shankar Prakash G) #8

I have gone through this guides (all 5 parts), but none of this explains working with store, update display using custom fields for post and PluginStore(used by plugins to store data in DB).