Shoutbox

Suggestion: Thread titles in links - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: General (/forumdisplay.php?fid=11)
+---- Forum: Forum & Website (/forumdisplay.php?fid=13)
+----- Thread: Suggestion: Thread titles in links (/showthread.php?tid=22560)

Suggestion: Thread titles in links by KeyStorm on 03-13-2004 at 11:39 AM

I was just looking Mnjul's post in the last "trojan in MP!"-alert. He put two links to two threads. i imagined they where Patchou's well-known "how to get rid from ad-ware" and some other trojan alert. However I didn't know, and I didn't want to waste more time looking what the Thread were.
So here's my suggestion: When a member posts urls of threads or posts, it could automatically ask the database for the thread-id and convert it into a link to that thread/post with the name of the thread.

E.g.:

I type this in my new post:

code:
http://shoutbox.menthix.net/showthread.php?tid=21598

Now it wuold show as this:
http://shoutbox.menthix.net/showthread.php?tid=21598

What I suggest is that it's automatically modified when sending the post (not everytime the post is shown...) to this:
code:
How to uninstall ad-ware/sponsor
And therefore appear as: How to uninstall ad-ware/sponsor


Of course there can be further possiblities like: Patchou's thread: How to uninstall ad-ware/sponsor
Or when linking to a post: Chris Boulton's reply in Patchou's thread: Note about Trojan detection

And even better if the name of the poster/thread poster was a link to their Profile.

Call me dreamer (H)
RE: Suggestion: Thread titles in links by Choli on 03-13-2004 at 11:54 AM

Good idea but a tag like this would be more useful:
[thread=21598] and that becomes How to uninstall ad-ware/sponsor
[post=144278] and that is changed by Chris Boulton's reply in Patchou's thread: Note about Trojan detection


RE: Suggestion: Thread titles in links by musicalmidget on 03-13-2004 at 12:12 PM

quote:
Originally posted by Choli
Good idea but a tag like this would be more useful:
[thread=21598] and that becomes How to uninstall ad-ware/sponsor
[post=144278] and that is changed by Chris Boulton's reply in Patchou's thread: Note about Trojan detection

[thread] and [post] tags would be a great idea. :)
RE: Suggestion: Thread titles in links by KeyStorm on 03-13-2004 at 12:38 PM

Well, not bad, but my lazyness couldn't make me hink of adding any improvement to the myBB code.
And usually it's easier to copy the whole link.
If thread/post tags can accept full links, too, then... (Y):banana:
so

code:
[thread=21598] would be the same as [thread=http://shoutbox.menthix.net/showthread.php?tid=21598]
[post=144278] would be the same as [post=http://shoutbox.menthix.net/showthread.php?tid=16516&pid=144278#pid144278]

Nice :)
RE: Suggestion: Thread titles in links by Anubis on 03-13-2004 at 01:04 PM

I like the auto-link feature (when you use the [url] command like we always have) it displays the page's title this way people (or maybe an option to display the pages title or not in a dialogue box) this way it's not too different than we use now.


RE: Suggestion: Thread titles in links by KeyStorm on 03-13-2004 at 01:09 PM

But when you use the [url] tag, it already gives you the choice of setting your own link and it wouldn't be a good idea to somehow add a new parametes to it.
It's much easier to make the thread/post tags. I mean, technically.

Btw, it's not very safe to read titles from other sites that might contain any weird character messing it up and opening security holes. :undecided:


RE: Suggestion: Thread titles in links by Chrono on 03-13-2004 at 05:31 PM

woah nice idea Keystorm..

quote:
Originally posted by KeyStorm
[thread=21598] would be the same as [thread=http://shoutbox.menthix.net/showthread.php?tid=21598]
[post=144278] would be the same as [post=http://shoutbox.menthix.net/showthread.php?tid=16516&pid=144278#pid144278]
(Y)

RE: Suggestion: Thread titles in links by WDZ on 03-13-2004 at 09:23 PM

It's a very cool idea, and very possible, but I'll have to think about it. I suppose you'd want me to add it in newthread, newreply, and editpost just like [attachment]... |-)

I like the [thread=num] and [post=num] because there's less crap in there to parse, but they would be less convenient for the user with a full URL in their clipboard. :-/

quote:
Originally posted by KeyStorm
Btw, it's not very safe to read titles from other sites that might contain any weird character messing it up and opening security holes.
Other sites? What other sites? :dodgy:
RE: Suggestion: Thread titles in links by KeyStorm on 03-13-2004 at 11:48 PM


quote:
Originally posted by WDZ
Other sites? What other sites? :dodgy:
-->
quote:
Originally posted by anubis_kree_
I like the auto-link feature (when you use the [url] command like we always have) it displays the page's title this way people (or maybe an option to display the pages title or not in a dialogue box) this way it's not too different than we use now.


RE: Suggestion: Thread titles in links by WDZ on 03-13-2004 at 11:52 PM

Oh... I wasn't sure what he meant by that. I'm definitely not opening connections to other sites, downloading pages, and parsing <title>s out. :dodgy:


RE: Suggestion: Thread titles in links by KeyStorm on 03-14-2004 at 12:11 AM

Indeed I also had it difficult to decrypt that one :refuck:


RE: Suggestion: Thread titles in links by dotNorma on 03-14-2004 at 02:56 AM

Well you can give a person a link to a thread but not to a specific post in a thread (well you can but you cant get that link from the forums) I always thought we needed a button next to the "edit" and "find" buttons in that little bar after every post that said "url" and it would copy the link to the post? I think that would be useful :)


RE: Suggestion: Thread titles in links by Chrono on 03-14-2004 at 03:04 AM

blah, u just have to click on the date in the post (below ur avatar) and u will get the url to the post :P
is not that hard :undecided:


RE: Suggestion: Thread titles in links by kao on 03-14-2004 at 09:38 AM

ohhhhhhhhhh so THATS how u get it :banana: ty chrono :P (i like Mippo's idea though, about copying the posts link to clipbaord auto)

And i like KeyStorm's idea btw but it has to be easy to do *-)


RE: Suggestion: Thread titles in links by KeyStorm on 03-14-2004 at 10:21 AM

quote:
Originally posted by Kao
And i like KeyStorm's idea btw but it has to be easy to do
Believe me, it is ;)

RE: Suggestion: Thread titles in links by martin on 03-14-2004 at 10:47 AM

inserting sumthin like

code:
    $patterns[] = "#\[thread=(.*?)\](.*?)\[/thread\]#si";
    $replacements[] = '<a href="http://shoutbox.menthix.net/showthread.php?tid=\1\2" target="_blank">\1</a>';
    $patterns[] = "#\[post=(.*?)\]";
    $replacements[] = '&pid=\1#\1';

into functions.php should work for like [thread=num][post=num][/thread] returning http://shoutbox.menthix.net/showthread.php?tid=(n...pid=(num)#pid(num)
RE: Suggestion: Thread titles in links by KeyStorm on 03-14-2004 at 11:22 AM

quote:
Originally posted by martin
should work for like [thread=num][post=num][/thread]
Hum... too much writing :undecided: And post numbers are unique, so referencing to a post automatically references to a thread.
RE: Suggestion: Thread titles in links by Choli on 03-14-2004 at 01:12 PM

quote:
Originally posted by WDZ
I like the [thread=num] and [post=num] because there's less crap in there to parse, but they would be less convenient for the user with a full URL in their clipboard.
blah, the user can paste it and delete all the http://msgplus.mybboard.... etc and leave only the number.
quote:
Originally posted by Kao
like Mippo's idea though, about copying the posts link to clipbaord auto
with javascript you can't copy texts to clipboard, i think
RE: Suggestion: Thread titles in links by WDZ on 03-14-2004 at 07:04 PM

quote:
Originally posted by martin
should work for like [thread=num][post=num][/thread] returning http://shoutbox.menthix.net/showthread.php?tid=(n...pid=(num)#pid(num)
But that doesn't get the thread subject... ;)

I already started coding the feature anyway. I figure the best way to find out whether it will work or not is to try it. :p
RE: Suggestion: Thread titles in links by KeyStorm on 03-14-2004 at 08:57 PM

:banana:, Wow, I had a good idea (after the e-mail notifications idea I felt like my electronic brain was a little cold :P)
I'm happy it's going to be added.


RE: Suggestion: Thread titles in links by WDZ on 03-14-2004 at 09:07 PM

Well, I never said it would be added... I'm just going to make a separate test script to find out if there are any problems. If the testing goes well, then I will add the feature to the board. :)

BTW, I'm probably not going to do the [thread=1] thing... you'll have to include the whole URL, which is the easiest way.


RE: Suggestion: Thread titles in links by Choli on 03-14-2004 at 09:17 PM

quote:
Originally posted by WDZ
BTW, I'm probably not going to do the [thread=1] thing... you'll have to include the whole URL, which is the easiest way.
why not? where's the difference between [thread] and [post]? both are 1 sql query and i don't see security holed there... am i wrong?
RE: Suggestion: Thread titles in links by WDZ on 03-14-2004 at 09:29 PM

quote:
Originally posted by Choli
why not?
Because I'd probably have to parse [thread=http://...showthread.php?tid=1] and [thread=1] separately, making the code more complex. I'll see about that when I start testing the script though. Why do you want to make more work for yourself deleting most of the URL? :P

It doesn't matter how cool it looks, because the [thread] and [post] tags will be gone after you submit your post.

quote:
where's the difference between [thread] and [post]?
[thread] returns a thread subject linked to a thread. [post] returns something like "WDZ's reply to Suggestion: Thread titles in links" linked directly to that specific post.
RE: Suggestion: Thread titles in links by Choli on 03-14-2004 at 10:26 PM

quote:
Originally posted by WDZ
[thread] returns a thread subject linked to a thread. [post] returns something like "WDZ's reply to Suggestion: Thread titles in links" linked directly to that specific post.
i know that, (because i suggested it) and that's why i see no diference between [thread] and [post]. i mean:
quote:
Originally posted by WDZ
Because I'd probably have to parse [thread=http://...showthread.php?tid=1] and [thread=1] separately
won't you have to do the same for [post=1] and [post=http://...showthread.php?tid=22560&pid=214183#pid214183] ?

don't let that be parsed. Just parse [thread=1] and [post=1]
quote:
Originally posted by WDZ
Why do you want to make more work for yourself deleting most of the URL?
I don't get you, sorry *-)
RE: Suggestion: Thread titles in links by KeyStorm on 03-14-2004 at 10:52 PM

He means that you'll have more work because you have to cutoff the tid/pid from the URL, instead of copying the whole URL.


RE: Suggestion: Thread titles in links by Choli on 03-14-2004 at 11:00 PM

quote:
Originally posted by KeyStorm
He means that you'll have more work because you have to cutoff the tid/pid from the URL, instead of copying the whole URL.
just what you said: tid/pid, ie: the same extra work for threads as for posts and I thought (well, still think) he means only for threads... if he adds them he should add both or not add any.


just re-reading again this page... I think i understand... but it's still the same with tids than with pids
RE: Suggestion: Thread titles in links by KeyStorm on 03-14-2004 at 11:04 PM

of course, this is why he refers only to [thread] and ie [post], because it's actually the same.
you can do [thread=http://shoutbox.menthix.net/showthread.php?tid=16516&pid=144278#pid144278] and it will return the thread, not the post, because it actually looks for (tid=([0-9].)) and the same for posts.


RE: Suggestion: Thread titles in links by WDZ on 03-15-2004 at 03:52 AM

quote:
Originally posted by Choli
won't you have to do the same for [post=1] and [post=http://...showthread.php?tid=22560&pid=214183#pid214183] ?
Yes, but I only mentioned [thread] because I didn't feel like typing examples for [post]. There would be a total of 4 things to parse with the [thread/post=tid/pid] tags. Because it's easier for a user to get a whole link, I choose to implement [thread=http://] and [post=http://].

quote:
Originally posted by Choli
don't let that be parsed. Just parse [thread=1] and [post=1]
But then users would have to do this...

1. Start tag: [thread=
2. Paste in URL: [thread=http://shoutbox.menthix.net/showthread.php?tid=22560
3. Delete most of what they pasted in ("http://shoutbox.menthix.net/showthread.php?tid=").
4. End tag.

Why not eliminate step 3?
RE: Suggestion: Thread titles in links by frog on 03-15-2004 at 06:12 AM

what if you put the thread number under hte "reputaion" part? that way it makes it a bit easier :P


RE: Suggestion: Thread titles in links by WDZ on 03-15-2004 at 06:17 AM

quote:
Originally posted by bob
what if you put the thread number under hte "reputaion" part? that way it makes it a bit easier :P
Uhh... the thread ID has nothing to do with the user's profile stuff. It doesn't belong there. :p
RE: Suggestion: Thread titles in links by frog on 03-15-2004 at 06:24 AM

hhhhhows about when you click the date bit, it copys the post number to clipboard? :P


RE: Suggestion: Thread titles in links by Choli on 03-15-2004 at 11:51 AM

quote:
Originally posted by WDZ
But then users would have to do this...

1. Start tag: [thread=
2. Paste in URL: [thread=http://shoutbox.menthix.net/showthread.php?tid=22560
3. Delete most of what they pasted in ("http://shoutbox.menthix.net/showthread.php?tid=").
4. End tag.

Why not eliminate step 3?


ok (Y)
quote:
Originally posted by bob
hhhhhows about when you click the date bit, it copys the post number to clipboard? :P
I think that can't be done. With javascript you can't copy texts to clipboard
RE: Suggestion: Thread titles in links by WestCoastKillaz on 03-15-2004 at 01:36 PM

i dont think this will be a very good idea, it could be confusing.. people prefer a website thats simple and easy to navigate, as opposed to a confusing bunched up mess


RE: Suggestion: Thread titles in links by WDZ on 03-15-2004 at 03:20 PM

quote:
Originally posted by WestCoastKillaz
i dont think this will be a very good idea, it could be confusing.. people prefer a website thats simple and easy to navigate, as opposed to a confusing bunched up mess
They don't have to use [thread]/[post] or even know it exists if they don't want to. :spam:
RE: Suggestion: Thread titles in links by KeyStorm on 03-15-2004 at 03:47 PM

quote:
Originally posted by Choli
I think that can't be done. With javascript you can't copy texts to clipboard
I think you can... 8-|
RE: Suggestion: Thread titles in links by WDZ on 03-15-2004 at 03:54 PM

quote:
Originally posted by KeyStorm
I think you can... 8-|
* WDZ waits for example code :refuck:

Maybe I could change the link on the date to the "copy to clipboard" script, because a link to what you're already viewing isn't useful. :tongue:
RE: Suggestion: Thread titles in links by KeyStorm on 03-15-2004 at 04:03 PM

quote:
Originally posted by WDZ
* WDZ waits for example code :refuck:

code:
function ClipBoard()
{
holdtext.innerText = copytext.innerText;
Copied = holdtext.createTextRange();
Copied.execCommand("Copy");
}

I just copied it from a site, don't know if it works. but I remember mess.be had a nick-name generator that copied the text with specioal chars to the clipboard to paste them in Messenger.

quote:
Maybe I could change the link on the date to the "copy to clipboard" script, because a link to what you're already viewing isn't useful.
And what if you want to link a specific post from another website? :rolleyes:
RE: Suggestion: Thread titles in links by WDZ on 03-15-2004 at 04:14 PM

quote:
Originally posted by KeyStorm
And what if you want to link a specific post from another website? :rolleyes:
You use the javascript to copy the link to the clipboard, of course. :p

* WDZ goes to try the script :dodgy:
RE: Suggestion: Thread titles in links by KeyStorm on 03-15-2004 at 04:20 PM

quote:
Originally posted by WDZ
You use the javascript to copy the link to the clipboard, of course. :p
[/color]
Ahm, all right, I thought you just wanted to copy the pid. Ok (Y).

RE: Suggestion: Thread titles in links by WDZ on 03-15-2004 at 04:28 PM

quote:
That site where the script came from
The script uses a lot of commands proprietary to Internet Explorer 4.0 and above.
:^)

Can't say I like that very much... :p

quote:
Originally posted by KeyStorm
Ahm, all right, I thought you just wanted to copy the pid. Ok (Y).
No... I already said I was going to use full URLs in the tags... :p
RE: Suggestion: Thread titles in links by CookieRevised on 03-15-2004 at 09:28 PM

copy something to the clipboard with javascript:
http://www.drweb.de/muster/clipboard.html
http://www.krikkit.net/howto_javascript_copy_clipboard.html

btw, although the scripts work, I don't like it to have again some more data loaded for each page you open on these forums, while you can easly right-click the date and select "copy link to clipboard" (or something like that) in your browser...

EDIT
PS: very dodgy protection: I write javascript and it becomes java script. Can't you make it so that only <script*language=["]javascript*["]*> is 'fixed'?

EDIT
Hmmm... above didn't change ... dodgy... dodgy...


RE: Suggestion: Thread titles in links by WDZ on 03-15-2004 at 09:36 PM

Looks like none of these "copy-to-clipboard" scripts are going to work in Opera... :p

Now I forgot why we're even talking about javascript... :lol:

I should finish my test page for the [thread] and [post] tags...


RE: Suggestion: Thread titles in links by WDZ on 03-15-2004 at 09:40 PM

quote:
Originally posted by CookieRevised
PS: very dodgy protection: I write javascript and it becomes java script.
:lol: That's what MyBB does... I know it's crap (almost useless too), but I never felt like changing it... I'll make a note in my to-do list.
RE: Suggestion: Thread titles in links by KeyStorm on 03-23-2004 at 06:43 PM

Let's see...
[post=http://shoutbox.menthix.net/showthread.php?tid=22560&pid=214619#pid214619]

EDIT: I was just wondering if some admin was going to add it soon (A)


RE: Suggestion: Thread titles in links by WDZ on 03-23-2004 at 09:21 PM

I'm the only admin who could add it... :p

I haven't forgotten about it, but it's also not a priority.


RE: Suggestion: Thread titles in links by KeyStorm on 03-23-2004 at 09:25 PM

tell us when it's ready :grin: (I know (supposed) you're the only admin chmodded to 0777 :P)


RE: Suggestion: Thread titles in links by WDZ on 03-23-2004 at 09:43 PM

quote:
Originally posted by KeyStorm
tell us when it's ready :grin:
You'll see me testing it in T&T, and I'll probably reply to this thread too. :p

quote:
(I know (supposed) you're the only admin chmodded to 0777 :P)
A chmodded admin? :-/ :tongue:

wj has root on the server, but he doesn't mess with the board much, and I'm glad. :p
RE: Suggestion: Thread titles in links by KeyStorm on 03-23-2004 at 09:52 PM

quote:
Originally posted by WDZ
A chmodded admin? :-/ :tongue:
:lol: j/k.
I was trying to say in a funny way that you had rwx permission, but it turned into a big... :blah!:
RE: Suggestion: Thread titles in links by WDZ on 06-25-2004 at 04:52 AM

I'm finally adding it... sorry for my laziness. :p

Just doing some final testing... :dodgy:

BTW, I still don't really see the usefulness... it would be more useful/convenient/cool if the tags were converted when the post is shown, but of course that's not efficient. :p


RE: Suggestion: Thread titles in links by Dane on 06-25-2004 at 06:13 AM

Excellent.  Is it working on this board now?

its been 3 months and 1 day between Keystorm and WDZs last post :O


RE: Suggestion: Thread titles in links by Choli on 06-25-2004 at 08:58 AM

First of all, good work, WDZ ;)

quote:
Originally posted by WDZ
* WDZ realized a few minutes ago that he forgot to add security to the feature for private threads...
is that implemented? what kind of security did you add? That a non elite/smod/admin member isn't allowed to use those tags with tids and pids of private forums, right? i'm saying this because I can use them and everyone would see the thread title :-/

Another thing: The [noparse] doesn't work with the tags. See example in Choli's reply to test thread #3 (:spam:).

More bugs: read Choli's reply to test thread #3 (:spam:) . You see that the " 's " is appended to Anubis. Shouldn't it be " Anubis' " ?

Last thing: What about the [thread] tag supporting this?
[thread=http://shoutbox.menthix.net/announcements.php?fid=26]

quote:
Originally posted by eXoenDo
its been 3 months and 1 day between Keystorm and WDZs last post
:lol:



edit:

isn't [thread=http://shoutbox.menthix.net/showthread.php?
tid=27677] supposed to work?

Ah!, and check Choli's reply to test thread #3 (:spam:) (10+ images per post)



edit2:

btw, the preview of the posts doesn't recognize the tags
RE: Suggestion: Thread titles in links by WDZ on 06-25-2004 at 07:14 PM

quote:
Originally posted by Choli
i'm saying this because I can use them and everyone would see the thread title
You could also manually post a link to the thread and copy/paste the subject, but you shouldn't. :p

quote:
Originally posted by Choli
Another thing: The [noparse] doesn't work with the tags.
Blah... I replied in the other thread... :dodgy:

It's because [thread] and [post] don't use the normal post parser... that would be too inefficient. Limitation.

quote:
Originally posted by Choli
btw, the preview of the posts doesn't recognize the tags
Same limitation as above.

quote:
Originally posted by Choli
You see that the " 's " is appended to Anubis. Shouldn't it be " Anubis' " ?
I'm not that picky. I'm not gonna add code to check what the last char of the name is... :rolleyes: It just basically returns a string: "$username's reply to blah"... :p

quote:
Originally posted by Choli
isn't [thread=http://shoutbox.menthix.net/showthread.php?
tid=27677] supposed to work?
No, that's not a URL. :p It's a partial URL, a line break, and another partial url. :refuck:
RE: Suggestion: Thread titles in links by Dane on 06-25-2004 at 08:28 PM

quote:
Originally posted by Choli
First of all, good work, WDZ ;)
quote:
Originally posted by WDZ
* WDZ realized a few minutes ago that he forgot to add security to the feature for private threads...
is that implemented? what kind of security did you add? That a non elite/smod/admin member isn't allowed to use those tags with tids and pids of private forums, right?

Thats me :P.
Anywayz, Again, Nice feature, im going to go test it


RE: Suggestion: Thread titles in links by Choli on 06-25-2004 at 11:26 PM

quote:
Originally posted by WDZ
Blah... I replied in the other thread...
sorry, the other thread was for testing :P
quote:
Originally posted by WDZ
It's because [thread] and [post] don't use the normal post parser... that would be too inefficient. Limitation.
quote:
Originally posted by WDZ
Same limitation as above.
limitations, limitations... :blah!:

hehe,  it's ok ;)
quote:
Originally posted by WDZ
Not exactly the easiest way to post many smilies...
but it's like a bug, isn't it? :chrongue:
quote:
Originally posted by WDZ
I'm not that picky. I'm not gonna add code to check what the last char of the name is...  It just basically returns a string: "$username's reply to blah"...
haha, I know I was too picky there....
quote:
Originally posted by WDZ
No, that's not a URL.  It's a partial URL, a line break, and another partial url.
:O

dodgy copy-pastes in the small quick reply box :P
quote:
Originally posted by eXoenDo
Thats me
:XP: :P
RE: Suggestion: Thread titles in links by WDZ on 06-26-2004 at 01:13 AM

quote:
Originally posted by Choli
but it's like a bug, isn't it?
Maybe...

I dunno if it's worth fixing. :p
RE: Suggestion: Thread titles in links by Choli on 06-26-2004 at 11:27 AM

quote:
Originally posted by WDZ
quote:
Originally posted by Choli
but it's like a bug, isn't it?
Maybe...

I dunno if it's worth fixing. :p
nah, leave it as it's now... don't fix it unless you see people abusing it ;)