Post Numbers

Editing the URL to remove the SID - Post Numbers

Editing the URL to remove the SID

by asavage » Wed Mar 06, 2019 3:59 am

Hello, kasimi:

I'm upgrading a 3.0 board to 3.2.5

The old board has been using ChriZathens' "Post number in viewtopic" v1.0.8, but like so many things, it is not supported for 3.2 , and Chris seems to have disappeared.

It has a popup when the post number is selected, the SID parameter is removed, and the URL is presented and selected, ready to be copied. I found it a nice MOD.
phpbb_Post-number-in-viewtopic_01b.png
Have you considered truncating the copied URL before the Session ID parameter (removing the portion highlighted below)?

http: //testing-nissandiesel.dyndns.org:81/viewtopic.php?p=9442&sid=5a2e1b694838853b452482ccfa42c5e9#p9442
Regards,
Al S.
asavage
Registered User
Posts: 39
Joined: Sun Dec 04, 2005 8:50 pm
Location: Duvall, Wash.
Name: Al Savage

Re: Editing the URL to remove the SID

by kasimi » Wed Mar 27, 2019 10:20 pm

Just for the record, instead of copying the link automatically, this is how to display the alert as shown in the screenshot:
  • Open: ext/kasimi/postnumbers/styles/all/template/postnumbers.js
  • Find:

    Code: Select all

    e.preventDefault();
  • On a new line below, add these 3 lines:

    Code: Select all

    var a = $(this).find('a').get(0);
    prompt(a.title, a.href);
    return; 
User avatar
kasimi
Former Team Member
Posts: 4900
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany