N Gauge Forum

Notices, Help With Problems and Your Forum Ideas... => Forum Ideas and Problems. => Topic started by: roganty on January 26, 2024, 11:11:18 AM

Title: A simple CSS fix to stop long url's breaking pages
Post by: roganty on January 26, 2024, 11:11:18 AM
Edit: I had originally intended for this post to be mainly for the eyes @Tank. I think I may have started something, I do apologise.

Has anyone noticed that long URL's stretch the page and cause sideways scrolling?

I have a simple CSS fix that will solve the problem word-break: break-word

#forumposts .windowbg, #forumposts .approvebg, #forumposts .approvebg2, #pmFolder .windowbg {
    overflow: visible;
    word-break: break-word;
}

 8)
Title: Re: A simple fix to stop long url's breaking pages
Post by: Railwaygun on January 26, 2024, 12:38:15 PM
where do i post this? in a message?


https://www.hattons.co.uk/stocklist/siteresults?search%2Fscales%2FN%2Fstockstatus%2FInStock=&_kx=b-clECEYoYOD019iLv8mMKPt3frX7-n13giy_gaFzao%3D.JGQeXh

#forumposts .windowbg, #forumposts .approvebg, #forumposts .approvebg2, #pmFolder .windowbg {
    overflow: visible;
    word-break: break-word;}

https://www.hattons.co.uk/stocklist/siteresults?search%2Fscales%2FN%2Fstockstatus%2FInStock=&_kx=b-clECEYoYOD019iLv8mMKPt3frX7-n13giy_gaFzao%3D.JGQeXh

Title: Re: A simple fix to stop long url's breaking pages
Post by: Steven B on January 26, 2024, 12:43:26 PM
It's code that would need to go in the underlying forum style settings.

tinyurl.com (or similar) works well.

So to does using the "Insert a link" button on the message tool bar.

Steven B
Title: Re: A simple fix to stop long url's breaking pages
Post by: PLD on January 26, 2024, 01:33:06 PM
MUCH simpler is to use the facility the forum bb-code already provides...  :-\

I don't get why people regularly come up with 'clever' way (read over complicated technical solutions) when it's there in front of you...

There's even a button on the toolbar that does it for you!
(https://www.ngaugeforum.co.uk/SMFN/gallery/139/647-260124131822.png)
Just put the url in the URL box and a short description in the Description box. It really is that simple...

For those interested in what it does under the hood; this (minus the red *)
[*url="https://www.hattons.co.uk/stocklist/siteresults?search%2Fscales%2FN%2Fstockstatus%2FInStock=&_kx=b-clECEYoYOD019iLv8mMKPt3frX7-n13giy_gaFzao%3D.JGQeXh"]Railwaygun's Link[/url]

displays:
Railwaygun's Link (https://www.hattons.co.uk/stocklist/siteresults?search%2Fscales%2FN%2Fstockstatus%2FInStock=&_kx=b-clECEYoYOD019iLv8mMKPt3frX7-n13giy_gaFzao%3D.JGQeXh)

And of course however many solutions are offered and however many times they are prompted, there will always be the selfish/lazy/ignorant who continue to ignore it...  ::)
Title: Re: A simple fix to stop long url's breaking pages
Post by: ntpntpntp on January 26, 2024, 03:20:35 PM
I agree, the button to add a link deals with it quite well, but some folk still seem to grab hugely long links with unnecessary clutter. 

If you know what you're doing  it's still worth only copying in the relevant part of the link (ignoring session parameters etc.) for example ebay listings you only need up to the end of the item number and not all the other stuff.

Totally random example (which just happens to be the first Kato Unitrack set I ever bought :) )

Stupidly long link generated by ebay:
(https://www.ngaugeforum.co.uk/SMFN/gallery/139/medium_5885-260124151812.jpeg) (https://www.ngaugeforum.co.uk/SMFN/index.php?action=gallery;sa=view;id=139034)

... but you only need this:
(https://www.ngaugeforum.co.uk/SMFN/gallery/139/medium_5885-260124152006.jpeg) (https://www.ngaugeforum.co.uk/SMFN/index.php?action=gallery;sa=view;id=139035)
Title: Re: A simple fix to stop long url's breaking pages
Post by: Papyrus on January 26, 2024, 06:36:14 PM

[/quote] And of course however many solutions are offered and however many times they are prompted, there will always be the selfish/lazy/ignorant who continue to ignore it...  ::)
[/quote]

Sorry, that's a bit unfair. I was castigated about this recently. It was the first time I had come across the problem so I am prepared to be classed as ignorant but don't lump me in with selfish or lazy. I assumed it was a forum problem. I know what to do now, but there had been no information before. Not all of us are computer experts.

Chris
Title: Re: A simple fix to stop long url's breaking pages
Post by: njee20 on January 26, 2024, 07:04:37 PM
Quote from: PLD on January 26, 2024, 01:33:06 PMMUCH simpler is to use the facility the forum bb-code already provides...  :-\

I don't get why people regularly come up with 'clever' way (read over complicated technical solutions) when it's there in front of you...

There's even a button on the toolbar that does it for you!
(https://www.ngaugeforum.co.uk/SMFN/gallery/139/647-260124131822.png)
Just put the url in the URL box and a short description in the Description box. It really is that simple...

For those interested in what it does under the hood; this (minus the red *)
[*url="https://www.hattons.co.uk/stocklist/siteresults?search%2Fscales%2FN%2Fstockstatus%2FInStock=&_kx=b-clECEYoYOD019iLv8mMKPt3frX7-n13giy_gaFzao%3D.JGQeXh"]Railwaygun's Link[/url]

displays:
Railwaygun's Link (https://www.hattons.co.uk/stocklist/siteresults?search%2Fscales%2FN%2Fstockstatus%2FInStock=&_kx=b-clECEYoYOD019iLv8mMKPt3frX7-n13giy_gaFzao%3D.JGQeXh)

And of course however many solutions are offered and however many times they are prompted, there will always be the selfish/lazy/ignorant who continue to ignore it...  ::)

Of course the irony is that this post has broken the page  ;D
Title: Re: A simple fix to stop long url's breaking pages
Post by: PLD on January 26, 2024, 07:31:45 PM
Quote from: njee20 on January 26, 2024, 07:04:37 PMOf course the irony is that this post has broken the page  ;D
Are you assuming it wasn't deliberate  ;)   >:D
Title: Re: A simple fix to stop long url's breaking pages
Post by: Newportnobby on January 26, 2024, 10:33:35 PM
Quote from: PLD on January 26, 2024, 07:31:45 PM
Quote from: njee20 on January 26, 2024, 07:04:37 PMOf course the irony is that this post has broken the page  ;D
Are you assuming it wasn't deliberate  ;)   >:D

Are you a Faithful or a Traitor? :angel:
Title: Re: A simple fix to stop long url's breaking pages
Post by: roganty on January 26, 2024, 11:47:53 PM
Whoopsie! I think my post may have been ill worded and confused the inhabitants of this forum :doh:

My original post was mainly meant for @Tank (but only then if he can edit the CSS files)

I'll see myself out...
Title: Re: A simple CSS fix to stop long url's breaking pages
Post by: PLD on January 27, 2024, 08:01:25 AM
Quote from: Papyrus on January 26, 2024, 06:36:14 PM
QuoteAnd of course however many solutions are offered and however many times they are prompted, there will always be the selfish/lazy/ignorant who continue to ignore it...  ::)

Sorry, that's a bit unfair. I was castigated about this recently. It was the first time I had come across the problem so I am prepared to be classed as ignorant but don't lump me in with selfish or lazy. I assumed it was a forum problem. I know what to do now, but there had been no information before. Not all of us are computer experts.

Chris
Not aimed at you personally and first time offenders are forgiven, but there are a few repeat offenders, (mostly serial posters in eBay threads) who evidently don't listen & learn...
Title: Re: A simple CSS fix to stop long url's breaking pages
Post by: Bealman on January 27, 2024, 08:31:16 AM
I don't even know what CCS means! :worried:
Title: Re: A simple CSS fix to stop long url's breaking pages
Post by: Newportnobby on January 27, 2024, 11:11:38 AM
'Collective Consciousness Society'
They had a hit with Led Zep's 'Whole Lotta Love' inc blues guitarist Alexis Korner :D
Title: Re: A simple CSS fix to stop long url's breaking pages
Post by: PaulCheffus on January 27, 2024, 11:28:42 AM
Quote from: Bealman on January 27, 2024, 08:31:16 AMI don't even know what CCS means! :worried:

Hi

Cascading Style Sheet.

It's for managing the website look for example the font size, colour and type. It allows you to make one change in the style sheet and it affects all elements on the webpage that have that style attached.

Cheers

Paul
Title: Re: A simple CSS fix to stop long url's breaking pages
Post by: roganty on January 27, 2024, 11:46:53 AM
Quote from: PLD on January 27, 2024, 08:01:25 AMNot aimed at you personally and first time offenders are forgiven, but there are a few repeat offenders, (mostly serial posters in eBay threads) who evidently don't listen & learn...

It was an eBay link that got me thinking about this. But when posting links to eBay all you need is everything up to the ? everything else is irrelevant

Example:

https://www.ebay.co.uk/itm/266502580272?hash=item3e0ccaa830:g:i2cAAOS
we1RlT5NY&amdata=enc%3AAQAIAAAA0PJPDYJbSMdoSUU8%2BVRkqhbwFMLaRsR%2B7k
wnfdIklDNK3TZu8iLcVHUEM7Tdo1xl5LjHrcW95opYMI%2B2AFxzqRZnRNFrTEYcxv3k3
7ZsIruGwJNlKJ3AnAQx05VCrgIcMbvkYNwPyMCCors21WeMxvlqvsiJ8Ksw6BUMBVWEece
gYMuzAlilRE8scRc2ye5GAas6vOR7MoctHgozsrkcG7jCGRxrAQieFTIQKX4qgBAZ1U%2
FIn2eKNPuw2zKdQLMbvVet3XSKwuzhVknmzOq5O9Y%3D%7Ctkp%3ABFBMsIy4q6lj (https://www.ebay.co.uk/itm/266502580272?hash=item3e0ccaa830:g:i2cAAOSwe1RlT5NY&amdata=enc%3AAQAIAAAA0PJPDYJbSMdoSUU8%2BVRkqhbwFMLaRsR%2B7kwnfdIklDNK3TZu8iLcVHUEM7Tdo1xl5LjHrcW95opYMI%2B2AFxzqRZnRNFrTEYcxv3k37ZsIruGwJNlKJ3AnAQx05VCrgIcMbvkYNwPyMCCors21WeMxvlqvsiJ8Ksw6BUMBVWEecegYMuzAlilRE8scRc2ye5GAas6vOR7MoctHgozsrkcG7jCGRxrAQieFTIQKX4qgBAZ1U%2FIn2eKNPuw2zKdQLMbvVet3XSKwuzhVknmzOq5O9Y%3D%7Ctkp%3ABFBMsIy4q6lj)

This goes to the same item:
https://www.ebay.co.uk/itm/266502580272

This was just the first item I found that created that long url (I also added line breaks to stop it from breaking the page)

Title: Re: A simple CSS fix to stop long url's breaking pages
Post by: ntpntpntp on January 27, 2024, 01:56:45 PM
@roganty which is what I wrote earlier (and in a similar post on another thread).

There used to be a simple link provided on ebay items for you to copy but nowadays they seem to insist on all the other search and session parameters etc. I suppose they want to track usage.
Title: Re: A simple CSS fix to stop long url's breaking pages
Post by: roganty on January 27, 2024, 11:09:04 PM
Quote from: ntpntpntp on January 27, 2024, 01:56:45 PM@roganty which is what I wrote earlier (and in a similar post on another thread).

There used to be a simple link provided on ebay items for you to copy but nowadays they seem to insist on all the other search and session parameters etc. I suppose they want to track usage.

I think I must have missed that post.

Oddly enough the items I have saved in my eBay watchlist don't have all the added gumpf at the end of the url

Edit :doh: It was in post #4 as mentioned by @njee20 below. Maybe I should start reading this thread lol
Title: Re: A simple CSS fix to stop long url's breaking pages
Post by: njee20 on January 28, 2024, 12:06:44 AM
It's reply #4 above...

I agree it would be good if people trimmed the links,  it the forum ought to be able to handle them.
Title: Re: A simple CSS fix to stop long url's breaking pages
Post by: Tank on January 28, 2024, 05:56:54 PM
I think that perhaps the CSS was edited when we had some modifications done to the forum.  I'll get the files checked.  Thanks!