From Dreamwidth Notes
Revision as of 10:05, 22 February 2016 by Kaberett
So you want a version of the Dreamwidth suggestions page working on your Dreamhack. This document should hopefully get you there. It was written by <user name="me_and"> in February 2016.
You will need
- A Dreamhack.
- An account on your Dreamhack with admin privs; your default "system" account probably suffices.
- Create a new community called "dw_suggestions"
- You can't create this normally, because "dw_" is a reserved name. You need to use a user account with "siteadmin:usernames". Assuming you're logged in as "system", go to /admin/priv/?user=system on your Dreamhack, select "siteadmin" from the drop-down at the bottom, and type "usernames" in the text box, then click "Make changes".
- You should now be able to create the community at /communities/new
- Create a new user called "suggestions_bot"
- I did this by creating an invite code, and signing up a new user in a private/incognito browser window (so it wouldn't sign out my system user), but other methods for creating a user exist.
- Validate the bot account's email address. Three methods:
- Edit the database directly to record that the email address has been validated. (If you know what that involves, please update this article with more explicit instructions!)
- I believe there's an admin command somewhere that will let you mark an account's email as validated; or
- Just configure the bot with a valid email address, run the workers to get the email sent, and click the validation link you receive. (Check spam if the email doesn't arrive; this is what I ended up doing).
- Make the bot an admin of the community at /communities/dw_suggestions/members/edit
- Make sure the community has a a paid account so anyone can post polls.
- Give your "system" account the "payments" privilege at /admin/priv/?user=system
- At /admin/pay/, enter dw_suggestions, and set it to have a paid account.
- The name of the suggestions bot and the community ought to be picked up from ext/dw-nonfree/etc/config-local.pl, but that didn't seem to work for me. I ended up just editing ext/dw-nonfree/htdocs/site/suggest.bml, which is a horrid hack but did the job for what I needed. Please update this if you can find a better solution!
my $destination = LJ::load_user( $LJ::SUGGESTIONS_COMM );with
my $destination = LJ::load_user('dw_suggestions');
my $suggestions_bot = LJ::load_user( $LJ::SUGGESTIONS_USER );with
my $suggestions_bot = LJ::load_user('suggestions_bot');