kalleth / mpukviewr

Daemon and Rails application for viewr.
Other
5 stars 0 forks source link

Deal gracefully with forum permalinks being less than perma #16

Open unspec opened 12 years ago

kalleth commented 12 years ago

Probably by using post ID as the 'guid' in the db rather than post permalink.

Symptoms: Editing a post causes the permalink to change and hence the post to be detected as 'new'.

unspec commented 12 years ago

The permalink changes whenever the OP edits the thread title.

E.G: https://dl.dropbox.com/u/333952/viewr1.jpg

kalleth commented 12 years ago

Well fuck.

<item>
<title>Looking To Share Clanbox (5 People Required)</title>
<link>
http://forums.multiplay.co.uk/insomnia46/90582-looking-share-clanbox-5-people-required
</link>
<pubDate>Mon, 16 Jul 2012 20:36:38 GMT</pubDate>
<description>
Hi All, We have managed to get 10 people together and we are looking for 5 more to help fill our clan box. If you are interested please PM/reply....
</description>
<content:encoded>
<![CDATA[
<div>Hi All,<br />
 <br />
 We have managed to get 10 people together and we are looking for 5 more to help fill our clan box. If you are interested please PM/reply. We are a mature clan that plays, bfbc2, bf3, minecraft, dayz, warcraft 3, cod and many more games that aren't counterstrike source :)<br />
 <br />
 DomUk<br />
 <a href="http://steamcommunity.com/id/domuk" target="_blank">Steam Community :: ID :: [CeltS]DomUk</a></div>
]]>
</content:encoded>
<category domain="http://forums.multiplay.co.uk/insomnia46/">insomnia46</category>
<dc:creator>
<![CDATA[ [C'] DomUK ]]>
</dc:creator>
<guid isPermaLink="true">
http://forums.multiplay.co.uk/insomnia46/90582-looking-share-clanbox-5-people-required
</guid>
</item>

NICE ONE.

Postid will have to be pulled from 'part' of the permalink -- i.e. in http://forums.multiplay.co.uk/insomnia46/90582-looking-share-clanbox-5-people-required the guid is '90582' which won't change.

However, when the 'permalink' changes but not the post ID, I DO need to change the 'url' to the post in the db, and notify the UI to update the link text. As the pervious 'perma' link will no longer point to the post.

Wat.

kalleth commented 12 years ago

Apparently the previous URL does still work, so the latter isn't important.