MaximilianKohler
Well-known member
On my forum, Xenforo is automatically converting the display of links from
to
So if you're copying the whole text of a post, along with its links, then none of the links will work.
test https://www.bostonglobe.com/ideas/2...prove-fatal/u3x4xfPC9VR2zSCnKArgYM/story.html
Yeah, looks like this forum does it too.
EDIT: Ah! Not sure if this is the "correct" fix, but I figured out that if you put
Good thing I caught this early, because you have to go back and manually change every link that got automatically shortened...
EDIT 2: Wow, this is super buggy. In new posts it seems to work, but even after editing the older posts it reverts back to the dots...
Hmm, maybe it doesn't work, or there's some x number of links that if a post contains it will automatically trigger it.
Neither
Note: When you click "edit" on your post it shows the link as normal. So that's a clue that it's only displaying as shortened; nothing permanent is being changed. That makes me wonder if there's something in the CSS that could be changed.
Ah I found it with this:
That did it!!!! What a relief. Just change
If you don't want to disable it completely, but just want to modify the behavior you can mess with
https://www.bostonglobe.com/ideas/2019/03/15/america-becoming-doctor-can-prove-fatal/u3x4xfPC9VR2zSCnKArgYM/story.html
to
https://www.bostonglobe.com/ideas/2...prove-fatal/u3x4xfPC9VR2zSCnKArgYM/story.html
So if you're copying the whole text of a post, along with its links, then none of the links will work.
test https://www.bostonglobe.com/ideas/2...prove-fatal/u3x4xfPC9VR2zSCnKArgYM/story.html
Yeah, looks like this forum does it too.
EDIT: Ah! Not sure if this is the "correct" fix, but I figured out that if you put
{url}
in /admin.php?options/groups/seo/
-> Convert URLs to page titles
that fixes it.Good thing I caught this early, because you have to go back and manually change every link that got automatically shortened...
EDIT 2: Wow, this is super buggy. In new posts it seems to work, but even after editing the older posts it reverts back to the dots...
Hmm, maybe it doesn't work, or there's some x number of links that if a post contains it will automatically trigger it.
Neither
{url}
nor {title} | {url}
are "fixes". But they may change the behavior slightly.Note: When you click "edit" on your post it shows the link as normal. So that's a clue that it's only displaying as shortened; nothing permanent is being changed. That makes me wonder if there's something in the CSS that could be changed.
- I searched through all the templates for "text contains"
...
and didn't see anything that stood out. - I found this https://xenforo.com/community/threads/automatic-shortening-of-url-bbcode-wheres-the-limit.65930/ but it's for XF 1.1 and
Formatter/Base.php
doesn't exist. Neither doesBase.php
. - Based on this https://xenforo.com/community/threads/is-your-add-on-going-to-shorten-urls.6826/ perhaps
Shorten_URL
orshortURL
could be keywords to search the templates for, but I got 0 results for each.
grep -r "Shorten_URL" /home/nginx/domains/forum.mysite.com/public/src/XF
to find that phrase in all files in that directory but nothing happens.Ah I found it with this:
grep -rinw "shortenUrl" /home/nginx/domains/forum.mysite.com/public/src/XF
Find all files containing a specific text (string) on Linux?
How do I find all files containing a specific string of text within their file contents? The following doesn't work. It seems to display every single file in the system. find / -type f -exec grep -H '
stackoverflow.com
Code:
/home/nginx/domains/myforum.com/public/src/XF/BbCode/Renderer/EditorHtml.php:253: $options['shortenUrl'] = false;
/home/nginx/domains/myforum.com/public/src/XF/BbCode/Renderer/SimpleHtml.php:101: $options['shortenUrl'] = false;
/home/nginx/domains/myforum.com/public/src/XF/BbCode/Renderer/Html.php:228: 'shortenUrl' => true,
/home/nginx/domains/myforum.com/public/src/XF/BbCode/Renderer/Html.php:1472: if (!empty($options['shortenUrl']))
public/src/XF/BbCode/Renderer/Html.php
seems to be the culprit.That did it!!!! What a relief. Just change
'shortenUrl' => true,
to false
and it changes the display of all links to their normal state (removes all ...
). No need to go back and manually edit any links.If you don't want to disable it completely, but just want to modify the behavior you can mess with
Html.php:1472: if (!empty($options['shortenUrl']))
.
Last edited: