Author |
Topic |
AnonJr
Moderator
United States
5768 Posts |
Posted - 11 January 2009 : 13:21:17
|
As I was waiting for the Windows 7 Beta ISO to finish downloading, my mind was wandering over to the URL issues we've discussed - from long URLs stretching the posts, to weird issues with multiple www's in them, and other URL oddities.
I was thinking that maybe it would be better to add an interface to two or three of the more popular link shrinking type sites like TinyURL, etc. and just running all links through which ever service the Admin chose to.
And, as an alternative to relying on a service that might disappear, building an internal service to do something similar. If Marcel was willing to share his code it could be the basis for said service.
Oh, and when I say service, I don't necessarily intend it to be accessible outside the forum software.
And my last random thought was to convert all urls to [link] if no link text was specified. (may need some more explanation once I've made another pot of coffee and thought this out more thoroughly).
This was just a random idea I had and I wanted to write it down somewhere to make it harder to forget. I haven't hit 30 yet and I'm balding, seeing gray in my beard, and forgetting stuff all the time... I think.. < |
|
JJenson
Advanced Member
USA
2121 Posts |
Posted - 11 January 2009 : 14:54:04
|
By the way Annon where did you get windows 7 beta iso? I really want to test this out as well?
But I like the ideas you had sorry if this was off topic.< |
|
|
SiSL
Average Member
Turkey
671 Posts |
|
JJenson
Advanced Member
USA
2121 Posts |
Posted - 11 January 2009 : 15:52:09
|
Nevermind found it. I can't wait to install on my laptop. < |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 12 January 2009 : 00:27:59
|
quote: Originally posted by SiSL
In my humble opinion, URL convertion should be made in process of posting, rather than later...
Who said it had to be after?< |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 12 January 2009 : 01:17:31
|
That's an intriguing idea anon. I am more leaning toward having our own code doing url conversion. But how does it actually work? Store the actual url in the database and assign it an ID?< |
Support Snitz Forums
|
|
|
JJenson
Advanced Member
USA
2121 Posts |
Posted - 12 January 2009 : 01:20:28
|
If you track down how to do this I would love to get the code from you guys I have a site I want to do it on right now. But I don't want the tiny mci url I want my own.
By the way Anon how are oyu liking windows 7? I love it so far< |
|
|
SiSL
Average Member
Turkey
671 Posts |
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 12 January 2009 : 01:59:49
|
the reason it currently happens the way it does is so that NO html is stored in the database, it has nothing to do with efficiency. so any attempt to do otherwise should be stopped, HTML should not be being stored in the database.< |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 12 January 2009 : 03:01:53
|
quote: Originally posted by Davio
But how does it actually work? Store the actual url in the database and assign it an ID?
Yep, that's it. Only 'fancy' thing I added is that the ID is encoded using a base62 encoding ([az+AZ+09].
One thing though : as soon as the post is made and the user wants to edit his or her post...how does one edit the entered url? < |
portfolio - linkshrinker - oxle - twitter |
|
|
SiSL
Average Member
Turkey
671 Posts |
Posted - 12 January 2009 : 06:00:46
|
quote: Originally posted by HuwR
the reason it currently happens the way it does is so that NO html is stored in the database, it has nothing to do with efficiency. so any attempt to do otherwise should be stopped, HTML should not be being stored in the database.
Not HTML at all, just URL tags to front and end of URL's that is not tagged. In other words, what I meant was, when an URL is posted without any tags like simple type of www.chip.com.tr , post_info should convert it to [url]www.chip.com.tr[/url] (entire wording till it matches a line break or space) format while entering it into DB, not HTML format at all, basically removing need for a second pass on non-tagged URL's during topic views and also basic errors of handling non-standart URL's at edit_href function.
Ofcourse, I understand this would bring up backward compability issues. But oh well, can type an upgrade script for that...
Actually, why I said that was, during post_info, you can add a few more lines (since it effect only poster) and validate URL format, not allowing multi-www's as first post mentioned. When poster wants to edit his/her own post, it will just see [url]..[/url] instead of simple URL line...
As I said, entire script I do for that is ready with multi-regex passes including shortening URL's, multi-www's, checking for securities etc. just waiting for 3.4.0.7 to place and test it, really, have no courage left to do same job twice before it :)
< |
CHIP Online Forum
My Mods Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager Admin Level Revisited | Merge Forums | No More Nested Quotes Mod
|
Edited by - SiSL on 12 January 2009 06:15:19 |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 12 January 2009 : 06:35:39
|
quote: Not HTML at all, just URL tags to front and end of URL's that is not tagged. In other words, what I meant was, when an URL is posted without any tags like simple type of www.chip.com.tr , post_info should convert it to www.chip.com.tr" target="_blank">www.chip.com.tr (entire wording till it matches a line break or space) format while entering it into DB, not HTML format at all, basically removing need for a second pass on non-tagged URL's during topic views and also basic errors of handling non-standart URL's at edit_href function.
whichjust reiterates and confirms exactly what I have been saying for years, NO urls should be parsed unless they are in url tags, that is after all why we have url tags. < |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 12 January 2009 : 08:48:34
|
Maybe it wasn't as bad a random idea as I'd initially thought.
While I do like the convenience of not requiring the url tags, and not having to continually explain why links aren't clickable, more and more I'm comming around to Huw's point of view that URLs shouldn't be parsed if they aren't in url tags. It would certainly save a lot heartache all around.
And, after a lot of thought, Davio is right. While it would be easier to just use an outside service, it would be better to have it "in house" so to speak. I started thinking about how the forum at work would break because not all users have access to the Internet from their work accounts, and the horrors of a service disappearing and breaking all the links...
Also, I don't see where editing the URL would be too hard if on edit its returned to the original link... we have to have some way of looking it up for this to work. < |
|
|
Podge
Support Moderator
Ireland
3775 Posts |
|
SiSL
Average Member
Turkey
671 Posts |
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 12 January 2009 : 11:17:32
|
quote: Originally posted by SiSL
well, I'm not talking about any of things you mentioned Podge...
www.chip.com.tr/test/forum/test/forum.asp etc. when someone post it without bb/forum code, it should enter into database as it is already tagged... like [url]http://www.chip.com.tr/test/forum/test/forum.asp[/url] by post_info.asp ... No need to change anything or it would confuse things a lot more...
you still have the problem of deciding whether or not it is a valid url (that is the crux of the issue) before wrapping it in url tags< |
|
|
Topic |
|