Khoros Atlas Logo

%3CLINGO-SUB%20id%3D%22lingo-sub-519329%22%20slang%3D%22en-US%22%3Emove%20old%20discussion%20in%20archive%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-519329%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3EHi%20there%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Emy%20community%20has%20almost%204%20years%20and%20lots%20of%20content.%3CBR%20%2F%3EOver%20time%20some%20solutions%20that%20were%20valid%20in%20the%20past%2C%20today%20are%20no%20longer%20valid%2C%20for%20example%20because%20we%20have%20changed%20procedures%2C%20product%20features%2C%20etc..%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EIs%20there%20a%20way%20to%20automatically%20move%20a%20discussion%20to%20an%20%22archive%22%20area%20after%20a%20certain%20time%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Ethanks!%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3ESM%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-519435%22%20slang%3D%22en-US%22%3ERe%3A%20move%20old%20discussion%20in%20archive%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-519435%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20problem%20with%20using%20batch%20processing%20to%20move%20messages%20is%20that%20you%20can%20only%20do%20it%20efficiently%20if%20you%20temporarily%20set%20your%20community%20to%20display%20200%20messages%20at%20a%20time.%26nbsp%3B%20%26nbsp%3BAn%20alternative%20is%20to%20use%20Ruby%20and%20CURL%20to%20run%20a%20script.%26nbsp%3B%20The%20upside%20of%20this%20is%20that%20it's%20reversable.%26nbsp%3B%20%26nbsp%3BIf%20you%20make%20a%20mistake%20or%20change%20your%20mind%2C%20you%20just%20reverse%20the%20process.%26nbsp%3B%20%26nbsp%3BMy%20notes%20on%20it%20are%20kind%20of%20just%20for%20me%2C%20but%20her%20you%20go%20in%20case%20you're%20interested%3A%3C%2FP%3E%3CP%3E--------------------------------------%3C%2FP%3E%3CP%3EThis%20is%20how%20to%20use%20a%20script%20to%20move%20messages%20in%20Lithium%20(forums%2C%20blogs%2C%20etc).%20If%20you%20don't%20use%20the%20script%2C%20you%20need%20to%20configure%20your%20page%2Fcommunity%20to%20display%20200%20messages%20at%20a%20time.%20Turn%20on%20batch%20processing%2C%20and%20select%20to%20NOT%20notify%20users.%20There%20is%20no%20issue%20with%20notifications%20when%20doing%20this%20move%20message%20script%20(but%20that's%20not%20true%20with%20labels)To%20use%20the%20script%2C%20you%20need%20to%20configure%20your%20machine%20to%20run%20RUBY%20and%20CURL.%3CBR%20%2F%3E1.%20%5B%5DTurn%20off%20posting%20to%20a%20forum%20(Users%2Fdefault%20permissions%2Fsubmit%20posts%20and%20start%20topics)%3CBR%20%2F%3E2.%20Create%20the%20input%20file%20of%20the%20message%20IDs%20that%20need%20to%20be%20moved%20and%20the%20target%20location%3C%2FP%3E%3CP%3E1.%20The%20message%20ID%20comes%20from%20the%20URL.%20It's%20right%20before%20the%20%23%3CBR%20%2F%3E2.%20The%20input%20comma%20delimited%20file%20has%203%20elements%3A%20Message%20ID%2C%20move%2C%20Destination%20board%20ID%3CBR%20%2F%3E3.%20Download%20a%20list%20of%20messages.%3C%2FP%3E%3CP%3E1.%20%5B%5DGo%20to%20MODERATION%20(admin%20tool)%2C%20navigate%20to%20the%20forum%2C%20click%20%22Export%20Search%20Results%20to%20CSV%22%20You'll%20get%20a%20PM%20when%20it's%20ready%20for%20download%3CBR%20%2F%3E2.%20%5B%5DPut%20the%20CSV%20into%20a%20new%20folder%20under%20MOVE%20Message%20Script%20(Google%20docs).%3CBR%20%2F%3E4.%20Process%20the%20downloaded%20data%3C%2FP%3E%3CP%3E1.%20%5B%5DDelete%20excess%20columns.%20Start%20with%20column%20T%20and%20everything%20to%20the%20right.%20AND%20other%20columns%2C%20not%20the%20below%3CBR%20%2F%3E2.%20Key%20Columns%3C%2FP%3E%3CP%3E1.%20A%20-%20Subject%3CBR%20%2F%3E2.%20B%20-%20Message%20body%20(w%2FHTML)%3CBR%20%2F%3E3.%20C%20-%20Message%20boy%20(no%20HTML)%3CBR%20%2F%3E4.%20D%20-%20URL%20(with%20ID)%3CBR%20%2F%3E5.%20J%20-%20Tags%3CBR%20%2F%3E6.%20K%20-%20Labels%3CBR%20%2F%3E7.%20R%20-%20URL%20of%20the%20parent%20(if%20there%20is%20one)%3CBR%20%2F%3E3.%20%5B%5DDeal%20with%20really%20long%20posts.%3C%2FP%3E%3CP%3E1.%20Column%20B%20will%20overrun%20the%20boundaries%3CBR%20%2F%3E2.%20The%20next%20column%20will%20be%20offset%20one%20to%20the%20left.%20Scroll%20through%20the%20data%20and%20look%20for%20anything%20that%20doesn't%20look%20right.%20(column%20H%3F)%3CBR%20%2F%3E3.%20You%20can%20clean%20it%20up%20or%20just%20delete%20it.%3CBR%20%2F%3E4.%20%5B%5DSort%20and%20remove%20child%20posts%3C%2FP%3E%3CP%3E1.%20Insert%20blank%20row%204%20to%20separate%20header%20data%3CBR%20%2F%3E2.%20Highlight%20row%205%20and%20FILTER%20.%20Sort%20on%20parent%20or%20root%20messages.%20A%20to%20Z%20(or%20Z%20to%20A)%3CBR%20%2F%3E3.%20Delete%20all%20the%20CHILD%20messages.%20Moving%20the%20parent%20moves%20the%20child%20messages%3CBR%20%2F%3E4.%20Save%20this%20as%20an%20EXCEL%20spreadsheet%3CBR%20%2F%3E5.%20%5B%5DAdd%20a%20new%20column%20to%20the%20left.%20Label%20it%20MSGID.%20Put%20the%20forumula%20in%20there%20and%20copy%20it%20down%3C%2FP%3E%3CP%3E1.%20Message%20ID%20extract%20spreadsheet%20exists%20in%20the%20folders%2C%20Cell%20A6.%20Copy%20the%20Message%20ID%20extract%20formula.%3CBR%20%2F%3E2.%20%3DIFERROR(MID(E6%2CFIND(%22m-p%2F%22%2CE6)%2B4%2CFIND(%22%23M%22%2CE6)-FIND(%22m-p%2F%22%2CE6)-4)%2CRIGHT(E6%2CLEN(E6)-FIND(%22M-P%2F%22%2CE6)-3))%3CBR%20%2F%3E6.%20%5B%5DCreate%20a%20new%20file%20in%20the%20same%20folder.%20finished.csv%3C%2FP%3E%3CP%3E1.%20Copy%20the%20MSD%20IDs%20to%20the%20new%20file%20(paste%20by%20value)%20to%20column%20A%3CBR%20%2F%3E2.%20Add%20a%20column%20%22move%22%20into%20column%20B%20(double%20click%20on%20right%20corner%20and%20it%20fills%20all%20the%20way%20down)%3CBR%20%2F%3E3.%20Add%20the%20column%20C%20with%20the%20destination%20board%3C%2FP%3E%3CP%3E1.%20The%20board%20ID%20follows%20the%20%22bd-p%2F%22%20in%20the%20url%20and%20before%20the%20%23%20if%20it%20exists.%20IMPORTANT%3A%20IF%20THE%20BOARD%20NAME%20ENDS%20WITH%20A%20NUMBER%2C%20SELECT%202%20ROWS%20BEFORE%20DOUBLE%20CLICKING%20OR%20IT%20WILL%20INCREMENT%20THE%20NUMBER%3CBR%20%2F%3E7.%20%5B%5Dsave%20as%20finished.csv%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E1.%20Set%20up%20the%20command%20line%20to%20run%20the%20script%3C%2FP%3E%3CP%3E1.%20%5B%5DOpen%20the%20file%20MOVE%20messages%20input.txt%20and%20edit%20it%20to%20add%20the%20info%20for%20this%20move%20(or%20part%202%20in%20evernote).%3C%2FP%3E%3CP%3E1.%20You%20have%20to%20tell%20the%20program%204%20things%3A%20The%20community%20URL%20%7C%20The%20Lithium%20session%20cookie%20ID%20%7C%20The%20input%20file%20%7C%20The%20output%20file%3CBR%20%2F%3E2.%20You%20must%20be%20logged%20in.%20Get%20your%20Lithium%20session%20ID%20-%20F12%20(CHROME%20developer%20tools)%2C%20under%20the%20APPLICATION%20tab%2C%20look%20for%20LiSESSION%20ID%20and%20copy%20the%20value%20-%20put%20it%20into%20your%20new%20command%20in%20the%20text%20file.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E1.%20Execute%20the%20script%20and%20monitor%20it.%3C%2FP%3E%3CP%3E1.%20%5B%5DGo%20to%20the%20command%20line%20and%20change%20into%20your%20move%20directory%20(copy%2Fpaste%20from%20the%20text%20file)%3CBR%20%2F%3E2.%20%5B%5DPaste%20the%20ruby%20command%20line%20you%20just%20built%20and%20run%20it.%3C%2FP%3E%3CP%3E1.%20Look%20for%20%22Authentication%20success%22%20near%20the%20top.%20It%20takes%20about%203%20seconds%20per%20topic.%20Could%20take%20a%20couple%20of%20hours%20or%20more%20to%20run%3CBR%20%2F%3E3.%20If%20the%20script%20errors%20out%2C%20create%20a%20new%20input%20file%20(new%20name)%20and%20remove%20everything%20that%20has%20already%20run%2C%20change%20the%20log%20file%20name%2C%20then%20start%20it%20again.%20Let%20it%20pick%20up%20where%20it%20left%20off.%3CBR%20%2F%3E2.%20%5B%5DSORT%20the%20forum%20(moved%20messages%20are%20at%20the%20top%2C%20no%20matter%20how%20old%20they%20are)%3C%2FP%3E%3CP%3E1.%20Go%20into%20the%20forum%2C%20manually%20move%20one%20message%20out%2C%20then%20back%20in%20telling%20it%20to%20sort%20chronologically.%3CBR%20%2F%3E----------------------------------------%3CBR%20%2F%3EMore%20information%20on%20how%20to%20move%20messages%20in%20Lithium.%20Get%20the%20session%20ID%20by%20being%20logged%20in%2C%20hitting%20F12%20(chrome)%20%26gt%3B%20Application%20%26gt%3B%20LiSESSIONID%3C%2FP%3E%3CP%3E***Sample%20Command%20line%3A%3C%2FP%3E%3CP%3E-------always%20the%20same---%7C%20URL%20OF%20THE%20COMMUNITY----------%7C----%7C%20Lithium%20Session%20ID%3CBR%20%2F%3Ecookie%3A%20LiSESSIONID%20%7C%20Input%20File(and%20dir)%20%7C%20Output%20File%20and%20Directory%3CBR%20%2F%3Eruby%20move-messages.rb%20-h%20%3CA%20href%3D%22https%3A%2F%2Fyourcommunity.com%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fyourcommunity.com%3C%2FA%3E%20-s%3CBR%20%2F%3E%5Byour%20session%20ID%5D%20update-labels-test.csv%20%26gt%3B%20test-run.log%3C%2FP%3E%3CP%3E***Formula%20to%20find%20user%20ID%3A%3C%2FP%3E%3CP%3E%3DMID(E6%2CFIND(%22m-p%2F%22%2CE6)%2B4%2CFIND(%22%23M%22%2CE6)-FIND(%22m-p%2F%22%2CE6)-4)%3C%2FP%3E%3CP%3Eor%20(preferred)%3C%2FP%3E%3CP%3E%3DIFERROR(MID(E6%2CFIND(%22m-p%2F%22%2CE6)%2B4%2CFIND(%22%23M%22%2CE6)-FIND(%22m-p%2F%22%2CE6)-4)%2CRIGHT(E6%2CLEN(E6)-FIND(%22m-p%2F%22%2CE6)-3))%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E***Command%20Line%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Eruby%20move-messages.rb%20-h%20%3CA%20href%3D%22https%3A%2F%2Fyourcommunity.com%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fyourcommunity.com%3C%2FA%3E%20-s%20%5BsessionID%5D%20CM-RM-Consolidation%5Cfinished.csv%20%26gt%3B%20CM-RM-Consolidation%5CODMA.log%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-519358%22%20slang%3D%22en-US%22%3ERe%3A%20move%20old%20discussion%20in%20archive%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-519358%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20is%20certainly%20one%20of%20the%20most%20longstanding%20requests%20to%20improve%20the%20Khoros%20Community%20platform.%26nbsp%3B%20I%20have%20worked%20with%20a%20number%20of%20Community%20Managers%20over%20the%20years%20on%20archiving%20strategies%20and%20have%20found%20that%20an%20automated%20tool%20could%20be%20very%20helpful%20in%20the%20process.%3C%2FP%3E%0A%3CP%3EPlease%20vote%20and%2For%20comment%20on%20this%20Idea%20over%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.khoros.com%2Ft5%2FLi-Product-Ideas%2FSystem-for-handling-old-threads%2Fidi-p%2F65706%22%20target%3D%22_self%22%3Ehere%3C%2FA%3E.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-519340%22%20slang%3D%22en-US%22%3ERe%3A%20move%20old%20discussion%20in%20archive%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-519340%22%20slang%3D%22en-US%22%3E%3CP%3ECiao%20Simone.%3C%2FP%3E%0A%3CP%3EGood%20question.%20And%20you'll%20find%20many%20fellow%20community%20managers%20who've%20asked%20the%20same.%20Actually%2C%20it%20would%20be%20so%20good%20if%20we%20could%20define%20parameters%20that%20define%20what%20happens%20to%20a%20piece%20of%20content%20in%20certain%20situations.%20For%20example%2C%20if%20a%20post%20is%20recent%20but%20viewed%20less%20than%20xx%20amount%20of%20time%20in%20the%20past%20xx%20months%2C%20move%20it%20to%20an%20archive.%20If%20the%20content%20is%20older%20but%20still%20relevant%2C%20then%20do%20not%20archive.%20If%20the%20content%20is%20old%20and%20not%20viewed%20move%20it%20to%20an%20archive%20after%20xx%20amount%20of%20time%2Fviews.%20My%20wish%20is%20for%20a%20full%20content%20management%20system%2C%20fully%20automated%20of%20course.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBut%2C%20not%20possible%20out%20of%20the%20box.%20You%20can%20use%20batch%20processing%20to%20move%20many%20topics%20somewhere%20at%20the%20same%20time%20but%20I%20am%20sure%20you%20know%20that.%3C%2FP%3E%0A%3CP%3EOur%20developer%20helped%20us%20with%20a%20tool%20that%20can%20automate%20some%20of%20what%20you%20are%20looking%20for.%20Have%20a%20look%20here.%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.khoros.com%2Ft5%2FStrategy%2FArchiving-Posts%2Ftd-p%2F208604%3F_ga%3D2.197645928.611824151.1554379532-1496605425.1552900193%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3Ehttps%3A%2F%2Fcommunity.khoros.com%2Ft5%2FStrategy%2FArchiving-Posts%2Ftd-p%2F208604%3F_ga%3D2.197645928.611824151.1554379532-1496605425.1552900193%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Advisor
Advisor

move old discussion in archive

Hi there,

my community has almost 4 years and lots of content.
Over time some solutions that were valid in the past, today are no longer valid, for example because we have changed procedures, product features, etc..

Is there a way to automatically move a discussion to an "archive" area after a certain time?

thanks!

SM

0 Kudos
3 Replies 3
Highlighted
Honored Contributor Honored Contributor
Honored Contributor

Re: move old discussion in archive

Ciao Simone.

Good question. And you'll find many fellow community managers who've asked the same. Actually, it would be so good if we could define parameters that define what happens to a piece of content in certain situations. For example, if a post is recent but viewed less than xx amount of time in the past xx months, move it to an archive. If the content is older but still relevant, then do not archive. If the content is old and not viewed move it to an archive after xx amount of time/views. My wish is for a full content management system, fully automated of course. 

 

But, not possible out of the box. You can use batch processing to move many topics somewhere at the same time but I am sure you know that.

Our developer helped us with a tool that can automate some of what you are looking for. Have a look here.

https://community.khoros.com/t5/Strategy/Archiving-Posts/td-p/208604?_ga=2.197645928.611824151.15543...

 

 

Learning from others and helping where I can!
Community Passionista!
Reply
Loading...
Khoros Oracle
Khoros Oracle

Re: move old discussion in archive

This is certainly one of the most longstanding requests to improve the Khoros Community platform.  I have worked with a number of Community Managers over the years on archiving strategies and have found that an automated tool could be very helpful in the process.

Please vote and/or comment on this Idea over here.

Reply
Loading...
Highlighted
Honored Contributor
Honored Contributor

Re: move old discussion in archive

The problem with using batch processing to move messages is that you can only do it efficiently if you temporarily set your community to display 200 messages at a time.   An alternative is to use Ruby and CURL to run a script.  The upside of this is that it's reversable.   If you make a mistake or change your mind, you just reverse the process.   My notes on it are kind of just for me, but her you go in case you're interested:

--------------------------------------

This is how to use a script to move messages in Lithium (forums, blogs, etc). If you don't use the script, you need to configure your page/community to display 200 messages at a time. Turn on batch processing, and select to NOT notify users. There is no issue with notifications when doing this move message script (but that's not true with labels)To use the script, you need to configure your machine to run RUBY and CURL.
1. []Turn off posting to a forum (Users/default permissions/submit posts and start topics)
2. Create the input file of the message IDs that need to be moved and the target location

1. The message ID comes from the URL. It's right before the #
2. The input comma delimited file has 3 elements: Message ID, move, Destination board ID
3. Download a list of messages.

1. []Go to MODERATION (admin tool), navigate to the forum, click "Export Search Results to CSV" You'll get a PM when it's ready for download
2. []Put the CSV into a new folder under MOVE Message Script (Google docs).
4. Process the downloaded data

1. []Delete excess columns. Start with column T and everything to the right. AND other columns, not the below
2. Key Columns

1. A - Subject
2. B - Message body (w/HTML)
3. C - Message boy (no HTML)
4. D - URL (with ID)
5. J - Tags
6. K - Labels
7. R - URL of the parent (if there is one)
3. []Deal with really long posts.

1. Column B will overrun the boundaries
2. The next column will be offset one to the left. Scroll through the data and look for anything that doesn't look right. (column H?)
3. You can clean it up or just delete it.
4. []Sort and remove child posts

1. Insert blank row 4 to separate header data
2. Highlight row 5 and FILTER . Sort on parent or root messages. A to Z (or Z to A)
3. Delete all the CHILD messages. Moving the parent moves the child messages
4. Save this as an EXCEL spreadsheet
5. []Add a new column to the left. Label it MSGID. Put the forumula in there and copy it down

1. Message ID extract spreadsheet exists in the folders, Cell A6. Copy the Message ID extract formula.
2. =IFERROR(MID(E6,FIND("m-p/",E6)+4,FIND("#M",E6)-FIND("m-p/",E6)-4),RIGHT(E6,LEN(E6)-FIND("M-P/",E6)-3))
6. []Create a new file in the same folder. finished.csv

1. Copy the MSD IDs to the new file (paste by value) to column A
2. Add a column "move" into column B (double click on right corner and it fills all the way down)
3. Add the column C with the destination board

1. The board ID follows the "bd-p/" in the url and before the # if it exists. IMPORTANT: IF THE BOARD NAME ENDS WITH A NUMBER, SELECT 2 ROWS BEFORE DOUBLE CLICKING OR IT WILL INCREMENT THE NUMBER
7. []save as finished.csv


1. Set up the command line to run the script

1. []Open the file MOVE messages input.txt and edit it to add the info for this move (or part 2 in evernote).

1. You have to tell the program 4 things: The community URL | The Lithium session cookie ID | The input file | The output file
2. You must be logged in. Get your Lithium session ID - F12 (CHROME developer tools), under the APPLICATION tab, look for LiSESSION ID and copy the value - put it into your new command in the text file.


1. Execute the script and monitor it.

1. []Go to the command line and change into your move directory (copy/paste from the text file)
2. []Paste the ruby command line you just built and run it.

1. Look for "Authentication success" near the top. It takes about 3 seconds per topic. Could take a couple of hours or more to run
3. If the script errors out, create a new input file (new name) and remove everything that has already run, change the log file name, then start it again. Let it pick up where it left off.
2. []SORT the forum (moved messages are at the top, no matter how old they are)

1. Go into the forum, manually move one message out, then back in telling it to sort chronologically.
----------------------------------------
More information on how to move messages in Lithium. Get the session ID by being logged in, hitting F12 (chrome) > Application > LiSESSIONID

***Sample Command line:

-------always the same---| URL OF THE COMMUNITY----------|----| Lithium Session ID
cookie: LiSESSIONID | Input File(and dir) | Output File and Directory
ruby move-messages.rb -h https://yourcommunity.com -s
[your session ID] update-labels-test.csv > test-run.log

***Formula to find user ID:

=MID(E6,FIND("m-p/",E6)+4,FIND("#M",E6)-FIND("m-p/",E6)-4)

or (preferred)

=IFERROR(MID(E6,FIND("m-p/",E6)+4,FIND("#M",E6)-FIND("m-p/",E6)-4),RIGHT(E6,LEN(E6)-FIND("m-p/",E6)-3))


***Command Line:

ruby move-messages.rb -h <a href="https://yourcommunity.com" target="_blank">https://yourcommunity.com</a> -s [sessionID] CM-RM-Consolidation\finished.csv > CM-RM-Consolidation\ODMA.log

 

--
Community manager in the Micro Focus Community. My computer always used to beat me at chess, but it is no match for me now I changed the competition to kick boxing.
Reply
Loading...