1 post tagged “hack”
When I looked at George's personal QOTD, and then his link to Anil's, there wasn't any clear explanation of how it could be done. So I dissected the URL for their respective questions. The URL for George's looked like this:
http://www.vox.com/compose/?xid=6a00b8ea069777dece00c225228b71604a&rule=qotd&ArcheType=Answer
The link is a compose link so it takes you straight to a "new post" screen. There's three parameters: xid, rule, and ArcheType. Rule and Archetype are "qotd" and "Answer" so these seem like obvious ones to keep. The problem was, there wasn't anything obvious that set the actual text.
Looking at the actual prepopulated text when I clicked on George's qotd, I realized that it was simply copying the exact title he wrote and the "quote" was his blog text. Therefore, it was simply copying the post's details in a certain way based on the rule and archetype. It figures out what post it is from the xid.
So how do you get the xid? You can do it by saving your post and then going to edit it. In the URL, you will see an xid which you can copy. So step by step, creating your own QOTD goes like this:
- Create your QOTD but leave the answer link out. The title is the answer's title, the entry is the quoted question.
- Save it as a draft.
- In the url, you'll see something like http://www.vox.com/compose/posted?asset_id=6a00c2251cf071604a00c22523ba6a8e1d copy the part after "asset_id".
- Go back to your post and now add an answer link. The link should say something like http://www.vox.com/compose/?xid=XXX&rule=qotd&ArcheType=Answer where XXX should be the ID that you just copied in step 3.
- Save and Publish.