RolePlay onLine RPoL Logo

, welcome to RPoL Development

23:33, 18th May 2024 (GMT+0)

Linking to specific messages in a thread.

Posted by LoreGuard
LoreGuard
member, 33 posts
Thu 2 Jul 2009
at 01:08
  • msg #1

Linking to specific messages in a thread

First Point:
I found at one point that I wanted to be able to create a link that would take someone to a specific message number within a thread.  I think that it could be very useful in directing players to specific information in a game, potentially avoiding the need to quote larger pieces of information.

Taking it a little further:
In another thread, in response to that suggestion another idea was suggested that it would be nice to be able to make a thread by default open the first page (or first post as an example)  I agree that it could be very useful setting for threads.  Simply starting by default on Page 1 could work, although it might be useful to be able to specify a specific post to default people to specific default message number which the GM would specify in the edit thread page.
JohnB
member, 1827 posts
Demigod of the Stunties
Thu 2 Jul 2009
at 01:38
  • msg #2

Re: Linking to specific messages in a thread

From what I recall from last time this came up -

A post's position in  a thread is managed dynamically and linking directly to it would need a rewrite of the database.  :):)

I am sure BBR will be along in  while to either confirm my recollections or put me right  :)
MagickalMelody
member, 3865 posts
THE GUMMIE BEAR OVERLORDS
WILL RULE US ALL!
Thu 2 Jul 2009
at 02:06
  • msg #3

Re: Linking to specific messages in a thread

I remember the same thing, JohnB.

To the second suggestion... NO. If I wanted to start at the beginning of the thread, I would go to the beginning of the thread! Definite -1 for having a GM being able to set how it displays; it'd be nothing but headaches and annoyances for me.

When I click on a thread I want it to show the most recent set of 25 posts; it does that currently. Why the hell would I need to go all the way back to the first page in a 100 page thread to post a reply to it? Extra work on both my and the server's end with the end benefit of making me want to spit. No thanks.
bigbadron
moderator, 10500 posts
He's big, he's bad,
but mostly he's Ron.
Thu 2 Jul 2009
at 06:23

Re: Linking to specific messages in a thread

It can't be done, for the reason JohnB mentioned.  For a more technical explanation, from jase, see this thread: link to a message in another game

The best that can be done, short of reorganising the database, for now, is to link to the thread, and tell players to "see msg #3".

Because of this, setting a thread to open at a specific default message is also not workable.
burlingk
member, 354 posts
Thu 2 Jul 2009
at 06:28
  • msg #5

Re: Linking to specific messages in a thread

If you have information that you need everyone to be able to see easily and quickyl, then the easiest way is to make it a Notice.
pdubs83
member, 146 posts
Thu 2 Jul 2009
at 14:45
  • msg #6

Re: Linking to specific messages in a thread

If jase is feeling particularly the glutton for punishment....... this would be an immensely useful feature.  But, I think we all understand that it is not possible with the way things currently are set up.
YoYo-Pete
member, 15 posts
4 8 15 16 23 42
Thu 2 Jul 2009
at 17:23
  • msg #7

Re: Linking to specific messages in a thread

I think we're thinking about it all wrong.

Instead of trying to link to a specific post in the paginated thread...  Why not simply display it in a window... Like when you click on game cast.  1 single message is all you get.

Each message has a unique ID in the database, or a combination of IDs to make it unique.

You could create a new page "rpol.net/ViewPost.cgi?ID=123AB342F"  (Where the GET variable ID is the ID for that post in the DB.

If you wanted, you could mask it somehow so that a player just cant increment the number to get the next post in the DB.

That way you could link to a specific post and they could see it without all the issues that go with pagination and the thread.
JohnB
member, 1836 posts
Demigod of the Stunties
Thu 2 Jul 2009
at 17:26
  • msg #8

Re: Linking to specific messages in a thread

That is an awful lot of work for something you could copy/paste or quote if you really need the precise text.
YoYo-Pete
member, 16 posts
4 8 15 16 23 42
Thu 2 Jul 2009
at 17:46
  • msg #9

Re: Linking to specific messages in a thread

Yeah... but it would be a really nice feature for the site.

I mean a lot of the features you could say the same thing about.

Heck.. you could even embed it in the current post with a show/hide button...

Not really too much work... I mean I would estimate that it shouldnt be more than 2-4 hours of coding tops.
bigbadron
moderator, 10504 posts
He's big, he's bad,
but mostly he's Ron.
Thu 2 Jul 2009
at 18:04

Re: Linking to specific messages in a thread

Is that 2-4 hours including the changes to the database that would be needed to allow it to work, or not?
YoYo-Pete
member, 17 posts
4 8 15 16 23 42
Thu 2 Jul 2009
at 18:07
  • msg #11

Re: Linking to specific messages in a thread

Naw.. DB already has identifiers in it... it's the only way it could related messages to the game and in sequence.

Users cant see that stuff, but I ensure you it has to be there.
pdubs83
member, 152 posts
Thu 2 Jul 2009
at 18:18
  • msg #12

Re: Linking to specific messages in a thread

He's right... unless the db is just that big of a mess.  There has to be a unique (or set of unique) identifiers per post that can be referenced.
bigbadron
moderator, 10505 posts
He's big, he's bad,
but mostly he's Ron.
Thu 2 Jul 2009
at 18:19

Re: Linking to specific messages in a thread

Oh, I'm sure they are there.  Even if users can't see them.

However, as noted previously in the thread linked to above, when posting a link to a specific message, the link includes the page number... so when the reader clicks on the link, there is no guarantee that the system will find the message when it goes to the specified page.
YoYo-Pete
member, 18 posts
4 8 15 16 23 42
Thu 2 Jul 2009
at 18:27
  • msg #14

Re: Linking to specific messages in a thread

Yeah... but that isnt the ID of the record in the database... that's the IDs created by pagination which is all relative to the number of posts in the thread.

We're not going to worry about the thread, simply open a window to display 1 post.  So where it lays on page is moot.
JohnB
member, 1837 posts
Demigod of the Stunties
Thu 2 Jul 2009
at 18:41
  • msg #15

Re: Linking to specific messages in a thread

You assume that the DB key fields are embedded somewhere in the final HTML that is generated to create the page and then sent to the user.

None of the other functions that address individual posts actually need to know where in the DB that particular record is stored -  so I bet that data isn't actually embedded in the page.  Sure, the DB key would have been available to the PHP that created the page - but the 'web page' of static HTML that gets sent to the users PC won't have that data.

It is not quite as simple as you imply :)
YoYo-Pete
member, 19 posts
4 8 15 16 23 42
Thu 2 Jul 2009
at 19:00
  • msg #16

Re: Linking to specific messages in a thread

I dont think you quite get what I mean....

1.  Edit the normal game thread page, where is says MSG #15, change that into a link.  It would be like MSG #14

User can click that link to get the URL to open so they can copy it.  A couple lines of code could make the link go directly to the user's clipboard.

2.  Create the ViewPost.cgi page.  That page pulls the ID from the POST variables and just writes the post out just like you were viewing it in a thread, without the rest of the thread.

So yeah.. the DB field isnt in there, but other values from the DB are, so you have access to them.  You can just edit the code to write that.

print "MSG #".counter;  <- current; outputs MSG #14

change to something like

print "<a target=\"_blank\" href=\"rpol.net/ViewPost.cgi?ID=".$row["UID"]."\">MSG #".counter."</a>";

That would output MSG #14, but make a new window open that is viewing just that post.

Or, if you didnt want to open a new window, you could display it in a javascript dialog to allow user to copy the URL (which would be less database intensive as it doesnt cause the page to load like the anchor example above.

Or, you can use jQuery and do some fancy show/hide web 2.0 kind of thing.

(and with that, I'm off and probably wont be back for a couple days... good debate ;) )
JohnB
member, 1838 posts
Demigod of the Stunties
Thu 2 Jul 2009
at 19:25
  • msg #17

Re: Linking to specific messages in a thread

YoYo-Pete:
So yeah.. the DB field isn't in there, but other values from the DB are, so you have access to them.  You can just edit the code to write that.


 LOL - the DB key field is the whole plank of your argument :)  Without it none of your proposals will work at all.  You blithely assume that you can  pull it back from other data embedded in the page -  I would be really surprised if you can without re-creating the whole page over again.   Then you can run into problems if someone has deleted a post from the thread ... It is not as straight forward as you suggest.


I suspect jase would have to re-write display.cgi to specifically include the DB key information you wanted to pull out.  It is not worth the effort :)
Sign In