RolePlay onLine RPoL Logo

, welcome to RPoL Development

02:26, 6th May 2024 (GMT+0)

Linking to specific messages in a thread.

Posted by LoreGuard
LoreGuard
member, 35 posts
Thu 2 Jul 2009
at 19:59
  • msg #18

Re: Linking to specific messages in a thread

Based on the fact that in the thread display the msg #17 is displayed next to navigation links, I was tempted to believe that that is being generated from a database field and not simply embedded in the post entry.  This is further backed up by evidence provided as I am typing this post.  The post screen displays your message number msg #17 without any navigation links below my composition screen.

Now, it may be possible that being able to start viewing a thread at a very specific post number may become a database column access issue that you simply can't narrow your selection of rows down, or can't do it without performance considerations such as having to maintain another index.  I'll leave that to Jase who knows how he has it set up.  However, it seems to me, that it would not be that difficult to have the msg #17 message be turned into an anchor so it could be addressed in a link.  This would allow you to send players to specific posts that are sure to be found on the first page.  [yes, assuming the browser honors the anchor tag properly]  I am surprised that given a number that Jase can't quickly calculate what page that post should be on.  [since from my experience, I've seen posts that are deleted still exist, they just don't show].

So if you have a character generation rules thread, you could create a link that takes them directly to the skill section by typing http://rpol.net/display.cgi?gi=36224&ti=84#msg17 or something similar.   [if the msg #17 is written as is in the field, string replace " #" characters with null and use the result as an anchor name, if it is stored as a number that is even easier]

Question: is there a thread that talks about what algorithm is used to split posts up into pages out of curiosity?

Also, I suppose that this might partially be taken care of if posts were allowed to have < a name="name" id="name"> Name < /a > anchors placed in them for use in allowing you to jump to specific sections.
This message was last edited by the user at 20:06, Thu 02 July 2009.
bigbadron
moderator, 10506 posts
He's big, he's bad,
but mostly he's Ron.
Thu 2 Jul 2009
at 20:26

Re: Linking to specific messages in a thread

LoreGuard:
Question: is there a thread that talks about what algorithm is used to split posts up into pages out of curiosity?
Yes, the thread I linked to earlier: link to a message in another game
Yoss
member, 1174 posts
A Serious Waste of Time
The largest game on RPOL
Thu 2 Jul 2009
at 20:34
  • msg #20

Re: Linking to specific messages in a thread

So what's wrong with the suggestion from douglasm in the linked thread, where you just use a formula to find the post?
elecgraystone
member, 485 posts
Thu 2 Jul 2009
at 20:46
  • msg #21

Re: Linking to specific messages in a thread

I honestly see no point in a link to a message when you can instead copy/paste or quote the info and place it where you want. Or barring THAT much effort, you can say check out msg#?? in this thread link. The msg link would save a click maybe?

Big -1 for me.
bigbadron
moderator, 10507 posts
He's big, he's bad,
but mostly he's Ron.
Thu 2 Jul 2009
at 20:51

Re: Linking to specific messages in a thread

Yoss:
So what's wrong with the suggestion from douglasm in the linked thread, where you just use a formula to find the post?

As explained in that thread, deleted posts would mess it up entirely.
JohnB
member, 1839 posts
Demigod of the Stunties
Thu 2 Jul 2009
at 21:25
  • msg #23

Re: Linking to specific messages in a thread

You might want to read up on the concept of Linked Lists to understand some of the issues involved.

Wikipedia has a reasonable article at http://en.wikipedia.org/wiki/Linked_list
LoreGuard
member, 37 posts
Thu 2 Jul 2009
at 22:26
  • msg #24

Re: Linking to specific messages in a thread

bigbadron:
As explained in that thread, deleted posts would mess it up entirely.


I think perhaps the confusion lies in that the thread displays deleted posts and information about those posts even though they are deleted.  If it is being stored in a linked list+binary tree with the deleted posts themselves having been removed from it, I can see why it would seem difficult.  I would think that a binary tree search would reveal the location of the desired post, and from, there iterate through the following 24 posts to display them, but would see how providing a next button would be harder.  [assuming I understand how it is set up, you'd probably have them have to explicitly search for post number x+25 or x-25, and have to do a special lookup again.]

Perhaps more importantly, if the posts are going to be moved to a different form of database which will require different logic for implementation, I can see tabling the feature until then.  But I would think that if the posts do eventually get migrated to MYSQL it would be relatively easy to implement then.

Of course having a thread that always would start at the beginning would be useful, [for Rules and Character Generation, etc.]  Of course then pages would stay static, save potentially for deleted posts.  If it would be as simple as swapping Next pointers vs. Pervious pointers and vice versa, it might be worth looking at, and potentially implementing anchor tags.  But I'll guess I'll be told it is too hard.

But I figure it is worth saying, and who knows, there's a remote chance something said might spark an idea for Jase if he reads it.  I've occasionally ran into things that seemed obvious to others, that I completely missed from my perspective, so I'll play dumb and say it might prove useful to someone.  ;)

And I would hope that when converting to MYSQL, the implementation have in mind that it sounds like a recurring request to be able to eventually support.
Yoss
member, 1175 posts
A Serious Waste of Time
The largest game on RPOL
Thu 2 Jul 2009
at 23:42
  • msg #25

Re: Linking to specific messages in a thread

In reply to bigbadron (msg #22):

Well, we could change the way we display deleted posts: a deleted post could still be given a spot in the 25 available per page.  Then the formula works just fine.
MagickalMelody
member, 3872 posts
THE GUMMIE BEAR OVERLORDS
WILL RULE US ALL!
Fri 3 Jul 2009
at 03:00
  • msg #26

Re: Linking to specific messages in a thread

YoYo-Pete:
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.



I'm still boggling... can someone explain exactly HOW this would *EVER* be useful? (no way to get to the thread it was a message in... none of the rest of the thread is showing so there's no context...)
bigbadron
moderator, 10509 posts
He's big, he's bad,
but mostly he's Ron.
Fri 3 Jul 2009
at 06:09

Re: Linking to specific messages in a thread

In reply to Yoss (msg #25):

Why would anybody want to display deleted posts?  It would just make the threads look untidy. -1 for doing iy that way.

In reply to MagickalMelody (msg #26):

Yes, the whole "no context" thing is why jase won't do it that way.


However, once more of the database is migrated to MYSQL, jumping to a specific post in a thread might become feasible.  Until then, not so much.
JohnB
member, 1840 posts
Demigod of the Stunties
Fri 3 Jul 2009
at 06:21
  • msg #28

Re: Linking to specific messages in a thread

LoreGuard:
I think perhaps the confusion lies in that the thread displays deleted posts and information about those posts even though they are deleted.



No.

In some fora posts can be deleted completely.  What that means is that item number 17 in the list  (don't worry about null pointers for the time being) now becomes item 16 in the list.  Exactly the same as taking a link from the middle of a chain and then 'fixing' the chain.  If you had linked to item no 17 in a previous post using the Msg number, that link would now point to the new item 17 -  which was originally no 18 in the list.   And your link would point to the wrong post.

Using the DB key is feasible -  but complicated.

First of all you need a 'link'  button in the original post to use in the same way as you use 'quote' to extract quoted information for the text.  However, instead of grabbing the  information from the HTML page in front of you, the 'link' function would have to send a request to the server to do a search.

The server  has to iterate past all the previous posts in the thread (remember linked lists are sequential) until it finds the right spot  in the DB (In our example that is only 16 pervious posts -  but it could be 98 pervious posts)

We then need to check that with the user - because in the time that it has taken one user to decide to link and go through the process, another user  (the GM)  might have deleted that post.  If it doesn't match up, we start the process again.

Somehow you then need to save that information in the new post that does the linking.  It might be in data included within the post itself or it might be in an extra DB field.  (Think Column if you only have a basic understanding of DBs). Adding an extra field to a large DB (and RPoL is huge) is a major operation for a 'small' feature like this, so we can probably discount it.  That means recording the data in the post itself somewhere.  The only problem with that is the code required to get the information back out again afterwards.  Seeing as the 'code'  is buried within plain text, the server would have to parse that text, every time the post is displayed, to extract that information and turn it into a button/link that the user sees.  So a lot of server activity every time that post with the link is viewed.

There are a couple of different ways you could go now - both relatively straightforward.  You could design a new webpage to display a single post -  extracting the content directly from the DB, using the ID key you extracted earlier.  Or you can write a short section of code that works within display.cgi to display the whole thread but then manipulate the page so that the post you selected is on screen.  Interestingly, you could now use the 'Msg No' generated for the post, as that is the current 'Msg No' not one that was generated right back when the page was originally linked.


Phew ...

Now I am not a professional developer, and I know jase has a few more tricks up his sleeve than I do -  but the basic principles are going to be pretty much the same :)  I also suspect that jase, as a professional developer working on his own 'special' site, may want to add more verification and checking to the process I have outlined :)  After all, this is his baby and he wants it to be both a shining example of his professional skills and as watertight as possible.

Whichever way you go -  linking to a specific post is incredibly server intensive.  The question  is 'Is it worth all that coding and server time to implement a really small facility that a few people will use occasionally?' - From jase's previous comments, the answer appears to be No :)

Especially when you have an alternate feature - Quote - that does pretty much the same job.    The point of a link is to direct a reader to some  specific text -  a quote just brings that text directly to the reader by embedding it in the post you are making.  the end result of both operations is that your reader has direct access to the text you wanted them to read.

*shrug*  why bother with a new feature that will take time to code and then be server heavy in use -  when you have an existing server light function that does practically the same thing?


As an extra advantage -  you get an element of QFT with quoting  -  with linking, the original poster would still be able to change the content of the post that you had so carefully linked to :)
elecgraystone
member, 488 posts
Fri 3 Jul 2009
at 15:17
  • msg #29

Re: Linking to specific messages in a thread

MagickalMelody:
I'm still boggling... can someone explain exactly HOW this would *EVER* be useful? (no way to get to the thread it was a message in... none of the rest of the thread is showing so there's no context...)
I could see re-posting a message somewhere else. I just don't understand why you would want to do it that way instead of just copy/paste to the new thread. THAT'S that boggles my brain.
MagickalMelody
member, 3874 posts
THE GUMMIE BEAR OVERLORDS
WILL RULE US ALL!
Fri 3 Jul 2009
at 18:31
  • msg #30

Re: Linking to specific messages in a thread

That's what I mean.


I mean, that's WHY we have a quote function.
elecgraystone
member, 490 posts
Fri 3 Jul 2009
at 19:48
  • msg #31

Re: Linking to specific messages in a thread

LOL then we are on the same page MagickalMelody. :)
LoreGuard
member, 39 posts
Sun 5 Jul 2009
at 05:19
  • msg #32

Re: Linking to specific messages in a thread

Several reasons to link instead of quote.

#1  Size and effective resource usage:  Why make a copy of a large post [say possible skills/specialization for them to choose] or such.  When you could instead direct them to that large text with a small link.  Why do people not quote whole threads?  Same general concept.

#2 It was actually mentioned, but as a failing of the link, when it is actually a plus [or can be].  By linking to the Message having to do with the particular step, someone following it will get the up to date, current information, not some limited copy that might have had an error in it some time in the past.

Thanks for the information on Deleted Posts, it was just different than my experience so far.  [I had always seen posts listed, but instead of showing a post, showing a message that it was deleted by a moderator.]

I still would suspect that dealing with links potentially changing if someone deleted a preceding post.  [especially if only GMs can do that type of delete] since I see some of the best use of this for the GMs to direct people to specific setting or game mechanics information.

I am aware of linked lists, and used them all too much, but also part of my training discussed how DBs generally also maintained a Binary Tree structure as well as the pervious next links.  [Or what I'm thinking what was called a B-Node structure, which was an odd not really binary tree structure that was a compromise in methodology, been a long while since covering that class though, so kind a rusty on those names/basics that I never actually put to use]

If I were looking at it, and managing, I image I would simply keep the Message Number as a field, and not renumber them after a deleted, and that would allow for using it as a unique identifier.  But if he's changing the type of DB slowly in the system, I'd understand not wanting to change the old way much, but when transitioning it to the new one, I'd suggest he contemplate how he could make direct access such as this available out of the new DB.
elecgraystone
member, 494 posts
Sun 5 Jul 2009
at 05:56
  • msg #33

Re: Linking to specific messages in a thread

LoreGuard:
#1 Size and effective resource usage:  Why make a copy of a large post [say possible skills/specialization for them to choose] or such.
If this is the case then say "look in the skills/specialization notice thread, msg#xx.". A link saves you one whole click from hitting the game menu then the thread you need.

LoreGuard:
#2 By linking to the Message having to do with the particular step, someone following it will get the up to date, current information, not some limited copy that might have had an error in it some time in the past.
And somehow this would be different than a notice thread? Not seeing it.

Still seeing no reason to have this feature, when you can copy/paste or simply make a notice thread and give a msg#.
YoYo-Pete
member, 20 posts
4 8 15 16 23 42
Mon 6 Jul 2009
at 12:26
  • msg #34

Re: Linking to specific messages in a thread

So you can click and see the post...  Direct link to it.. no scrolling and whatnots.

I'm still sticking with there's a unique ID for each post already in the database and it's just not being served up to the pages.

The position (MSG #22) is irrelevant.
This message was last edited by the user at 12:46, Mon 06 July 2009.
elecgraystone
member, 495 posts
Mon 6 Jul 2009
at 14:14
  • msg #35

Re: Linking to specific messages in a thread

YoYo-Pete:
So you can click and see the post...  Direct link to it.. no scrolling and whatnots.
Oh, I understand what you are asking for. I just don't understand why you'd want a direct link when it take SO little effort to do it the way it is now. You make it sound like it is really too much work to click on a thread and scroll to the msg# you want or just copy/paste it to a new place. Honestly, it didn't take me enough time to find the '(MSG #22)' you referenced in your last post that I thought "I wish I could have just clicked on MSG #22 instead of going through all that".

What you are asking for would only save a trivial amount of time and Jase has already said that this feature can't be added because of the site's setup. It seems a pretty clear two thumbs down for message linking.
Monkios
member, 244 posts
Mon 6 Jul 2009
at 14:17
  • msg #36

Re: Linking to specific messages in a thread

By assuming those things :

1- Each message has a unique ID.
2- All un-deleted messages can be listed in reverse order (by date or message number [if availlable]).
3- The database uses SQL.
4- CGI scripts can reload a page themselves (I know PHP ones can).

With this URL : http://www.rpol.net/display.cgi?gi=36224&ti=86&mi=34, we could ask the server to give us the message who's ID is 34 (YoYo-Pete's) from the thread who's ID 86 (This thread) from the game who's ID is 36224 (RPoL Dev).

Using this, you can use SQL to ask where this message is. You can get it's number in the thread. With that number, you can guess on wich page the message is placed and the server can reload the page with an anchor to the message you want to get to.

A direct anchor to messages on the same page as the one posted could be useful too. Especially when using portable devices.
bigbadron
moderator, 10512 posts
He's big, he's bad,
but mostly he's Ron.
Mon 6 Jul 2009
at 16:18

Re: Linking to specific messages in a thread

Monkios:
3- The database uses SQL.

And there's part of the problem.  It doesn't use SQL.

It will be converted at some indeterminate point in the future, and until that happens, the requested feature is simply not possible.
pdubs83
member, 153 posts
Mon 6 Jul 2009
at 16:24
  • msg #38

Re: Linking to specific messages in a thread

To sate my curiosity... what's the DB format?  What's the engine?
YoYo-Pete
member, 21 posts
4 8 15 16 23 42
Mon 6 Jul 2009
at 16:44
  • msg #39

Re: Linking to specific messages in a thread

Format doesnt matter...   It's some type of relational/psudo-relational DB... You couldnt create a site like this without some type of relationships.

As a dev, I'm curious too.
pdubs83
member, 154 posts
Mon 6 Jul 2009
at 16:49
  • msg #40

Re: Linking to specific messages in a thread

Well of course it's relational ;)

I'm just wondering if it won't handle SQL script, then what format is it in?  AS/400?
Monkios
member, 246 posts
Mon 6 Jul 2009
at 18:37
  • msg #41

Re: Linking to specific messages in a thread

From what I've understood from my time here on RPoL, the "database" must be some kind of text file system.

All of our propositions seem to be to Web 2.0.
YoYo-Pete
member, 24 posts
4 8 15 16 23 42
Mon 6 Jul 2009
at 18:56
  • msg #42

Re: Linking to specific messages in a thread

Yeah...

Web 2.0 this site and it would solve a lot of the issues.  Just by adding jQuery into the mix, it would save a ton of development time and really add a lot of functionality.

Likewise, throw it on a framework like django and it gives you even more power.

If I was the dev, I'd really start with jQuery (which is just a javascript framework that makes it all really easy and takes cross browser issues out of the loop).
Sign In