- Posts: 126
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- Is it possible to mass add a tag in all items of one category?!
Is it possible to mass add a tag in all items of one category?!
- B_Dark
- Topic Author
- Offline
- Premium Member
Less
More
13 years 3 months ago #97132
by B_Dark
Is it possible to mass add a tag in all items of one category?! was created by B_Dark
i believe only with sql command is the solution. i search in my sql database but i don't know how to do. any help plz?!
Please Log in or Create an account to join the conversation.
- Andrea Vigato
- Offline
- Senior Member
Less
More
- Posts: 50
13 years 3 months ago #97133
by Andrea Vigato
Replied by Andrea Vigato on topic Is it possible to mass add a tag in all items of one category?!
In jos_k2_tags_xref you have the reference between a tag and a item.
just a query with your id of the mass tag (tagID column) related to the itemID (the post)...
just a query with your id of the mass tag (tagID column) related to the itemID (the post)...
Please Log in or Create an account to join the conversation.
- B_Dark
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 126
13 years 3 months ago #97134
by B_Dark
Replied by B_Dark on topic Is it possible to mass add a tag in all items of one category?!
and if you want all the items of one category with a specific tag?
Andrea Vigato said:
In jos_k2_tags_xref you have the reference between a tag and a item.
just a query with your id of the mass tag (tagID column) related to the itemID (the post)...
Andrea Vigato said:
In jos_k2_tags_xref you have the reference between a tag and a item.
just a query with your id of the mass tag (tagID column) related to the itemID (the post)...
Please Log in or Create an account to join the conversation.
- Andrea Vigato
- Offline
- Senior Member
Less
More
- Posts: 50
13 years 3 months ago #97135
by Andrea Vigato
Replied by Andrea Vigato on topic Is it possible to mass add a tag in all items of one category?!
so do the query when the user add an item in a certain category....
first check the category id, if it's the category you want do the query to set a specific tagID to the item the user it's creating...i think you must use form.php in com_k2/views/tmpl, don't remember now...
B_Dark said:
and if you want all the items of one category with a specific tag?
Andrea Vigato said:
In jos_k2_tags_xref you have the reference between a tag and a item.
just a query with your id of the mass tag (tagID column) related to the itemID (the post)...
first check the category id, if it's the category you want do the query to set a specific tagID to the item the user it's creating...i think you must use form.php in com_k2/views/tmpl, don't remember now...
B_Dark said:
and if you want all the items of one category with a specific tag?
Andrea Vigato said:
In jos_k2_tags_xref you have the reference between a tag and a item.
just a query with your id of the mass tag (tagID column) related to the itemID (the post)...
Please Log in or Create an account to join the conversation.
- B_Dark
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 126
13 years 3 months ago #97136
by B_Dark
Replied by B_Dark on topic Is it possible to mass add a tag in all items of one category?!
a specific tag in all items of a specific category. like tag "Trailer" in all items of category "Cinema"
B_Dark said:
and if you want all the items of one category with a specific tag?
Andrea Vigato said:
In jos_k2_tags_xref you have the reference between a tag and a item.
just a query with your id of the mass tag (tagID column) related to the itemID (the post)...
B_Dark said:
and if you want all the items of one category with a specific tag?
Andrea Vigato said:
In jos_k2_tags_xref you have the reference between a tag and a item.
just a query with your id of the mass tag (tagID column) related to the itemID (the post)...
Please Log in or Create an account to join the conversation.
- Andrea Vigato
- Offline
- Senior Member
Less
More
- Posts: 50
13 years 3 months ago #97137
by Andrea Vigato
Replied by Andrea Vigato on topic Is it possible to mass add a tag in all items of one category?!
yes, as i said...right before user is adding a new item you have to check the cat id he choosed, if it's "Cinema" category add the query to set the tagID to the item...
Please Log in or Create an account to join the conversation.
- B_Dark
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 126
13 years 3 months ago #97138
by B_Dark
Replied by B_Dark on topic Is it possible to mass add a tag in all items of one category?!
wait in table jos_k2_tags_xref have 2 columns: tagID(tagID column)itemID(the post)so how i put in 600 items of category "Cinema" the tag "Trailer" with 1-2 steps and not one by one?
Andrea Vigato said:
yes, as i said...right before user is adding a new item you have to check the cat id he choosed, if it's "Cinema" category add the query to set the tagID to the item...
Andrea Vigato said:
yes, as i said...right before user is adding a new item you have to check the cat id he choosed, if it's "Cinema" category add the query to set the tagID to the item...
Please Log in or Create an account to join the conversation.
- Andrea Vigato
- Offline
- Senior Member
Less
More
- Posts: 50
13 years 3 months ago #97139
by Andrea Vigato
Replied by Andrea Vigato on topic Is it possible to mass add a tag in all items of one category?!
you have to do it for future items or for 600 items present right now in the category cinema?
If it's for the future do the query when the user add item, if it's for now you will have to do a query and activate it from the site (just for this and then delete everything)...you will have to check where the itemID is related (to a catID) and if it's ok change the tagID. Not so difficult don't worry...
If it's for the future do the query when the user add item, if it's for now you will have to do a query and activate it from the site (just for this and then delete everything)...you will have to check where the itemID is related (to a catID) and if it's ok change the tagID. Not so difficult don't worry...
Please Log in or Create an account to join the conversation.
- B_Dark
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 126
13 years 3 months ago #97140
by B_Dark
Replied by B_Dark on topic Is it possible to mass add a tag in all items of one category?!
for 600 items present right now in the category cinema
Andrea Vigato said:
you have to do it for future items or for 600 items present right now in the category cinema?
If it's for the future do the query when the user add item, if it's for now you will have to do a query and activate it from the site (just for this and then delete everything)...you will have to check where the itemID is related (to a catID) and if it's ok change the tagID. Not so difficult don't worry...
Andrea Vigato said:
you have to do it for future items or for 600 items present right now in the category cinema?
If it's for the future do the query when the user add item, if it's for now you will have to do a query and activate it from the site (just for this and then delete everything)...you will have to check where the itemID is related (to a catID) and if it's ok change the tagID. Not so difficult don't worry...
Please Log in or Create an account to join the conversation.
- Andrea Vigato
- Offline
- Senior Member
Less
More
- Posts: 50
13 years 3 months ago #97141
by Andrea Vigato
Replied by Andrea Vigato on topic Is it possible to mass add a tag in all items of one category?!
because what i know of K2 tag system is that the tag is related to the item, not the category.
tagID -> itemID -> catID
So you cannot just add a tag ID to the category, you have to check the category you want if it's related to the item then add a reference of the tag you want...maybe after work i'll write you some code ok?
B_Dark said:
ok the one column tagID is the one of column part order to find the solution, the other one column itemID is for one specific item id, right? so, i don't understood how with itemID i have a solution for mass add tag "trailer" in 600 item that i have save in my category "cinema'?! sorry if i make rowng but really i don't understood how this column (itemID) is my solution
Andrea Vigato said:
no,
id (id related to the entry of the jos_k2_tags_xref)
tagID (id of the related Tag)
itemID (id of the related Item)
you have to use tagID and itemID, id it's not important for your question....
tagID -> itemID -> catID
So you cannot just add a tag ID to the category, you have to check the category you want if it's related to the item then add a reference of the tag you want...maybe after work i'll write you some code ok?
B_Dark said:
ok the one column tagID is the one of column part order to find the solution, the other one column itemID is for one specific item id, right? so, i don't understood how with itemID i have a solution for mass add tag "trailer" in 600 item that i have save in my category "cinema'?! sorry if i make rowng but really i don't understood how this column (itemID) is my solution
Andrea Vigato said:
no,
id (id related to the entry of the jos_k2_tags_xref)
tagID (id of the related Tag)
itemID (id of the related Item)
you have to use tagID and itemID, id it's not important for your question....
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- Is it possible to mass add a tag in all items of one category?!