RolePlay onLine RPoL Logo

, welcome to Technical Discussions

23:22, 8th May 2024 (GMT+0)

Linking to a specific posting.

Posted by rjpla3
rjpla3
member, 59 posts
Wed 31 Aug 2005
at 00:06
  • msg #1

Linking to a specific posting

Is there a way to link to a particular posting in a thread?  I've figured out how to post to the top and bottom of the thread, but not to a particular post within the thread.
jase
member, 1566 posts
Your caring dictator
Talk to me, I'm human!
Wed 31 Aug 2005
at 02:44
  • msg #2

Re: Linking to a specific posting

Not at the moment, the best you can do is link to a particular page in the thread.

1.5 does have message id's displayed in with each message (next to the edit/quote button), however directly linking can be a problem as due to the page numbers there's no guarantee it'll always be on the same page.
Nerwen
member, 751 posts
seek to understand before
you seek to be understood
Wed 31 Aug 2005
at 04:10
  • msg #3

Re: Linking to a specific posting

If the point is to link to a specific post within the thread, why does it matter what exact page it's on?
jase
member, 1567 posts
Your caring dictator
Talk to me, I'm human!
Wed 31 Aug 2005
at 05:09
  • msg #4

Re: Linking to a specific posting

Because the threads are paginated.

There's no point me trying to link to post #7 in a particular page if next time it's in page another, the link won't work.

To link to a specific section (message) in a page (thread) then we'd have to use a hyperlink anchor, eg http://rpol.com/display.cgi?stuff&more#2 to link to anchor point #2 in the page.

(To see the anchors in action, try the [top] and [bottom] links, they jump to the specific anchors in the page, #top and #bottom.

Seeming it's the technical forum, I'll get like that...

Pages are counted backward from the most recent post, in lots of 25.  They're not counted forward as a thread with 26 posts would then have 1 post on the newest page (the one that's displayed when you open the thread).

Thread with 26 posts - Counting backward - Newest page has 25 posts, oldest has 1.
Thread with 26 posts - Counting forward - Newest page has 1 post, oldest has 25.


So; with the current system, counting backward, say I link posts number 2 on a 26 post thread.

Remember, the newest page (the page I'm visiting) has posts 25 posts; posts #2 through to #26.  The older page has 1 post; post #1.

That's fine.  People open up the page I indicate and then hop directly to the message in question.

Then someone posts a reply.

Suddenly the newest page has 25 posts; posts #3 through to #27.

That page is opened up, the server tries to jump to that section and ah crap, it's not there.
Nerwen
member, 752 posts
seek to understand before
you seek to be understood
Wed 31 Aug 2005
at 05:36
  • msg #5

Re: Linking to a specific posting

So... there's no way to link to a specific post without also hardcoding the reference to the page it's on?

How does the "all" button work? (The thought crosses my mind to get it to first do an "all" ... but that would be impractical if the thread has more than 5-ish pages.)
rjpla3
member, 60 posts
Wed 31 Aug 2005
at 07:37
  • msg #6

Re: Linking to a specific posting

So each post does not have a unique identifier.  Instead, it's identifier changes with each new posting to a thread.  Did I get that right?

I was thinking it was more like a database where each 'entry' had a unique and unchanging ID that identified it from all other 'entries'.
bigbadron
member, 4614 posts
He's Big, he's Bad,
but mostly he's Ron.
Wed 31 Aug 2005
at 07:52
  • msg #7

Re: Linking to a specific posting

As I understand it, the posts themselves do have a unique identification number, but their position changes every time you add a new post.  An attempt to link to a specific post requires you to know the page number within the thread, and that keeps changing.

The url for a particular post would be along the lines of http://rpol.net/game ID/thread number/page number/post position.


I think...  ;)
jase
admin, 1568 posts
Your caring dictator
Talk to me, I'm human!
Wed 31 Aug 2005
at 10:39

Re: Linking to a specific posting

Maybe I'm crap at explaining things.  (c;

Page numbers count from the newest post to the oldest post.
Post numbers count up from the oldest post to the newest post.

Imagine there were 5 posts per page (it reduces the scrolling)...

+========+
Post 6
Post 5
Post 4
Post 3
Post 2<--- The post you want to link to.
+--------+
| Post 1 |
+========+

Sure, you can create a link.  Open thread x, display page y and jump to post 2.

Then someone replies...

+========+
Post 7
Post 6
Post 5
Post 4
Post 3
+--------+
Post 2<--- The post you want to link to.
Post 1 
+========+

It's not on the same page any more...

Nerwen
member, 753 posts
seek to understand before
you seek to be understood
Wed 31 Aug 2005
at 14:56
  • msg #9

Re: Linking to a specific posting

Right, I understood that part of it. ;) I understand how pages scroll and how the messages change pages and all that.

I just don't understand why this has to do with linking to a specific message, each of which has a number in the thread (e.g. post #2 of thread #4). Is there not a way to refer to the specific message without referring to the page it's (supposed to be) on?

Like, this specific post, if one were to hover over the "quote/edit/delete" buttons, tells me that I'm looking at

"...gi=9590&gn=Technical+Discussions&threadnum=68&messagenum=9&pos=10"

so that's thread #68, message #9, position #10 ... where is the page number in all of that?
This message was last edited by the user at 15:00, Wed 31 Aug 2005.
jase
admin, 1570 posts
Your caring dictator
Talk to me, I'm human!
Wed 31 Aug 2005
at 16:20

Re: Linking to a specific posting

That link doesn't need a page number because it's not displaying anything of the sort; it's editing, deleting or quoting a single message.

Sure, I can display a single message in a thread, but it's pretty pointless without the other messages around it.  I'd expect that a user would want page x displayed and for the page to automatically zoom down to the post in question.

That requires something like threadnum=68&msgpage=1#msg9.

As I mentioned before, the anchor works like the [top] link that is on the screen for you right now, it references this page with the addition of #top.  If you view the source you'll find that anchor point is actually on the RPoL logo.

The bottom line is if you want a group of 25 messages to be displayed and it to zoom to a certain message in that group of 25 then I need to know what group of 25 to display as well as what message number I'm zooming to.  They are not linked together.

If you want to do it another way, such as displaying the entire thread and zooming to the message, or not using anchor points, then that's a different kettle of fish, but I bet it's not what people would be expecting.
rjpla3
member, 61 posts
Wed 31 Aug 2005
at 16:51
  • msg #11

Re: Linking to a specific posting

Actually, displaying the entire thread and then zooming to a particular message wouldn't be bad at all!  Is it possible?

1) I occasionally need to refer to certain messages that are 'rules' in my game.  In that case I wouldn't necessarily need all the other messages before and after it.

2) Also, we have a 'favorite posting' idea being tossed around by the players. They would like to nominate one or more messages that made them laugh the most. (it's a comedy game).
Nerwen
member, 754 posts
seek to understand before
you seek to be understood
Wed 31 Aug 2005
at 16:59
  • msg #12

Re: Linking to a specific posting

Displaying an entire thread would be insane if said thread has hundreds of posts and you're on a slow connection. While I personally would find that extremely useful (I'm not on a slow connection, and I display entire threads all the time when I need to look stuff up, backread things, or write archive summaries), if it got implemented it would probably have to come with lots of warnings.

1) Make a Rules thread and put all the required rules in there. Then require your players to have read the whole thing.

2) In 1.5, each message will have a number. You can just refer to the post number and then people can find it for themselves.
jase
admin, 1572 posts
Your caring dictator
Talk to me, I'm human!
Thu 1 Sep 2005
at 12:51

Re: Linking to a specific posting

When I say "different kettle of fish" I didn't mean feasible or user friendly, and unfortunately I don't think displaying an entire thread of lord-knows how messages just to zoom to one particular message seems neither user or server friendly.
Robin
member, 510 posts
The old grey wyrm
Thu 1 Sep 2005
at 13:27
  • msg #14

Re: Linking to a specific posting

Long, long ago (a couple of years at least ;o) whole threads on RPoL used to display all the time. That was before jase improved it by limiting it to the most recent 25 posts. Back then one of my players rquested that I start a new thread in my game whenever it reached 100 posts because it was taking so long to load for him. So, I don't think that automatically opening the whole thread from a link like this would be appreciated by a lot of users.
bigbadron
member, 4618 posts
He's Big, he's Bad,
but mostly he's Ron.
Thu 1 Sep 2005
at 15:13
  • msg #15

Re: Linking to a specific posting

rjpla3:
2) Also, we have a 'favorite posting' idea being tossed around by the players. They would like to nominate one or more messages that made them laugh the most. (it's a comedy game).


I already use this idea in one of my games.  The players just quote the message they think is worth pointing out, to get all the tags and formatting, then copy and paste it into a thread that I set up for that specific purpose.  No linking necessary.
rjpla3
member, 62 posts
Fri 2 Sep 2005
at 00:19
  • msg #16

Re: Linking to a specific posting

Thanks for all the reponse.  I'll have to see what I can work out for the two 'projects' I mentioned earlier.  Just wanted to make sure that I wasn't missing out on an advanced function available on RPoL.  If it's not, it's not.
bigbadron
member, 4628 posts
He's Big, he's Bad,
but mostly he's Ron.
Fri 2 Sep 2005
at 00:24
  • msg #17

Re: Linking to a specific posting

The "rules thread" idea of Nerwen's would be better than linking anyway.  Make it a notice so that it sits in one place, and keep it strictly for rules, that way they all sit in a single place, making it easier for people to flit back and forth if they need to check back on something that clarifies what they're reading now.
douglasm
member, 1 post
Mon 15 Oct 2007
at 20:05
  • msg #18

Re: Linking to a specific posting

I have to join the group wondering why the page number needs to be specified at all.  Looking at the urls for games, forums, threads, and even this message composition screen, I don't know cgi but I'm pretty sure the question mark means it's a script.  Given that the url gets passed to a script, why isn't it possible for the script to fetch the number of posts in the requested thread and calculate on the spot which page the specified post is on?  With 25 posts per page, the page number of post X in a thread with N posts total is (N-X)/25 + 1, rounded down.  With a 26 post thread, that puts post #1 on page (26-1)/25 + 1 = 2, and post #2 on page (26-2)/25 + 1 = 24/25 + 1 = 1, exactly correct.  One single-number lookup that it might have to do anyway (not sure), one subtraction, one division, and one addition seems a reasonable cost for this capability to me.
bigbadron
member, 8855 posts
He's Big, he's Bad,
but mostly he's Ron.
Mon 15 Oct 2007
at 20:24
  • msg #19

Re: Linking to a specific posting

Assuming nothing else has changed in the two years since this thread was last posted to.  :)
douglasm
member, 2 posts
Mon 15 Oct 2007
at 20:29
  • msg #20

Re: Linking to a specific posting

Whoops, didn't notice the year on those post dates.  Just followed your link from the Beginners forum and thought it was only about a month old.
Genghis the Hutt
member, 1270 posts
AKA Banaticus
Tue 16 Oct 2007
at 02:17
  • msg #21

Re: Linking to a specific posting

I think the problem is that there's no way to snap to a specific post on a page -- because of how the pages are rendered, they always load at the top.  Making the page "snap" to a given post on a page would require putting in an anchor tag on every post.

Although, the system already knows what number each post is on a page -- it inserts both the HTML comment before every post and the visible number in the top right corner of the post.  Perhaps the visible number could be made an anchor?  Like <a id="##">msg ##</a>

As far as seeing what page to load, douglasm had a pretty nifty formula there.  To round a number down, we can simply cast it as an integer in whatever programming language jase uses to process the cgi scripts, as casting to an integer truncates floats/doubles in every language.  Also, Version 5 of perl (I don't know if that's what jase uses, but he uses cgi and I understand using perl with that is pretty popular) includes a POSIX module which defines the standard C math library functions, including floor(). For example:

#!/usr/local/bin/perl
use POSIX qw(floor);
$num = 42.4;
print "Floor returns: ", floor($num), "\n";

Which prints:
Floor returns: 42

By the way, should things like this or suggestions on how to decrease page load time be posted in this Technical Discussions forum or should they be posted over in the "bugs, features & suggestions, oh my!" forum on the beta version of RPoL or somewhere else?
jase
admin, 1968 posts
Cogito, ergo procuro.
Carpe stultus!
Tue 16 Oct 2007
at 07:10
  • msg #22

Re: Linking to a specific posting

The problem is that RPoL displays threads in lots of 25 starting from the most recent post and working its way backward.

Couple with this the fact that messages can be deleted, it makes it rather difficult to calculate what page we should be displaying without investigating the entire thread.

It'll be must easier once the threads are converted to a mySQL database, but until then I hope you can cope.  (c;
Genghis the Hutt
member, 1272 posts
AKA Banaticus
Tue 16 Oct 2007
at 12:31
  • msg #23

Re: Linking to a specific posting

Sorry, I thought that was part of 1.5, converting to a mySQL database.  Are posts still kept in a Berkely database?  Sorry, but would it be better to post suggestions on reducing page size for faster page loading (reduced server load) in this forum or over on the beta forum?
bigbadron
member, 8857 posts
He's Big, he's Bad,
but mostly he's Ron.
Tue 16 Oct 2007
at 12:45
  • msg #24

Re: Linking to a specific posting

link to a message in "General RPoL"

The original plan was to convert it all to mySQL... but in the interests of actually getting some of the work done and implemented, that plan was changed.  Some stuff has been converted, other stuff hasn't.
douglasm
member, 3 posts
Wed 17 Oct 2007
at 02:40
  • msg #25

Re: Linking to a specific posting

jase:
The problem is that RPoL displays threads in lots of 25 starting from the most recent post and working its way backward.

That part is no problem, the formula I gave solves it pretty easily.

jase:
Couple with this the fact that messages can be deleted, it makes it rather difficult to calculate what page we should be displaying without investigating the entire thread.

Now this I can see making things difficult because deleted messages introduce a second standard for the numbers involved - post numbers take deleted posts into account while the count of posts in the thread does not and deleted posts don't count towards the 25 on each page.  Making deleted posts count towards the 25 (their presence is still shown in the thread, just not the deleted text) and working off the post number of the most recent post would fix that problem, but whether to do that is a separate design issue.  It would also simplify the logic for displaying a particular page, I think, and I doubt it would have a significant negative effect unless someone (or several someones) engages in mass deletion within a single thread.
Sign In