Link to Mod (http://mods.simplemachines.org/index.php?mod=425)
Rate this Mod (http://mods.simplemachines.org/index.php?action=review;sa=add;mod=425)
This mod will trim url a la vB style.
http://www.google.com/search?q=jaybachatero&start=0&ie=utf-8&oe=utf-8&client=firefox&rls=org.mozilla:en-US:unofficial (http://www.google.com/search?q=jaybachatero&start=0&ie=utf-8&oe=utf-8&client=firefox&rls=org.mozilla:en-US:unofficial)
will become
http://www.google.com/sea....mozilla:en-US:unofficial (http://www.google.com/search?q=jaybachatero&start=0&ie=utf-8&oe=utf-8&client=firefox&rls=org.mozilla:en-US:unofficial)
Ver 1.0.1
! Fixed bug with img tags.
! Make sure that $urlNew is returned even if $url is not long enough.
! Fixed bug with uninstall
Nice and useful mod :) That was asked a lot in the boards here I moderate :)
Nice Mod....
After installing this mod, the links in my signature disappeared but when i go to my profile and check my sign its still there..
Umm will have to look into that one Ark.
oh... i like this one ;)
Nice mod
question: what's the basis for this mod?
I mean like when does it choose to limit the link?
Is it after the first / or after certain amount of characters?
A nice mod and it does come in handy. But I've noticed that when you post a URL (such as one from YouTube) (eg: http://youtube.com/watch?v=niYFEl8mzrU) the link doesnt appear at all.
can we have a TrimQuote as well? ;)
TrimQuote? BTW upgrade your mod to the latest one. Big bug was fixed.
Jay,
i just installed the 1.0.1 version, but have a look the photo below...
we have two ./Sources/Subs.php
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi13.photobucket.com%2Falbums%2Fa286%2Ffallenangel4%2Ftrimurl.jpg&hash=705f38216649f95b8e0b287498fa4c7d3db67269)
-------
TrimQuote =
When a member insert a very long quote from previous post..
will become
hello blahblahlabl...........blablablah
dont know why some of my members like to quote the entire message from previous post when they reply...
if the mod can be done, probably can set something like "if the quote more than 500 words, it will then automatically become to hello blahblahlablabalabalabal....blablablah" ....
not sure if this possible..... anyway just a suggestion...
Quote from: AwwLilMaggie on August 18, 2006, 08:39:07 PM
A nice mod and it does come in handy. But I've noticed that when you post a URL (such as one from YouTube) (eg: http://youtube.com/watch?v=niYFEl8mzrU) the link doesnt appear at all.
i got the same... how to fix it?
cos all the URL is dissapearred
Quote from: K_4_kelly on August 19, 2006, 03:50:25 AM
TrimQuote =
When a member insert a very long quote from previous post..
will become
hello blahblahlabl...........blablablah
dont know why some of my members like to quote the entire message from previous post when they reply...
if the mod can be done, probably can set something like "if the quote more than 500 words, it will then automatically become to hello blahblahlablabalabalabal....blablablah" ....
not sure if this possible..... anyway just a suggestion...
That would be a good idea... and to have it so that you can have a link saying click here for more... and it shows the whole quote on same page... just expanded.
Quote from: K_4_kelly on August 19, 2006, 04:57:09 AM
Quote from: AwwLilMaggie on August 18, 2006, 08:39:07 PM
A nice mod and it does come in handy. But I've noticed that when you post a URL (such as one from YouTube) (eg: http://youtube.com/watch?v=niYFEl8mzrU) the link doesnt appear at all.
i got the same... how to fix it?
cos all the URL is dissapearred
though i uninstalled the problem still there..... :'(
oh ...
another bug is here:
when i insert photos
for example : [img]http://i13.photobucket.com/albums/a286/fallenangel4/insertlink.jpg[/img]
it become like this after i posted [img=http://i13.photobucket.com/albums/a286/fallenangel4/insertlink.jpg]http://i13.photobucket.com/albums/a286/fallenangel4/insertlink.jpg[/img]
it couldnt display the photo...... :'( :(
K_4_Kelly the problem was with the uninstall of 1.0. For some reason a var gets dropped by SMF. Here is the subs.php you sent me. It should install fine now.
thanks jay,
but...
problem still there..
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi13.photobucket.com%2Falbums%2Fa286%2Ffallenangel4%2F1-1.jpg&hash=d988ee120dd2b9742da9545d9aa8aeb2ad21212a)]
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi13.photobucket.com%2Falbums%2Fa286%2Ffallenangel4%2F2-1.jpg&hash=68ee8fb2c4e1c39bddb3b892e43730ded54bb430)
Ok let me look into all of the files that you sent me. Did you uninstall the mod? Or it's installed?
Ok here are the files and everything should be working. The mod is installed now.
Ive installed and uninstalled this mod and I still get the IMG tag problem, why?
What version did you install? 1.0? There is a serious bug on that version and it has been fixed in 1.0.1. To fix the url tag issue find
array(
'tag' => 'url',
'type' => 'unparsed_content',
'content' => '<a href="" target="_blank"></a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
replace with
array(
'tag' => 'url',
'type' => 'unparsed_content',
'content' => '<a href="$1" target="_blank"></a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
in Subs.php
Quote from: Jay The Code Monkey on August 19, 2006, 02:10:50 PM
Ok here are the files and everything should be working. The mod is installed now.
Jay,
only admin.template.php is available in the zip file...
so what should I do to the attached file?
replace it or?? ???
The mod works here :D
Umm all 5 files are in the archive K_4_Kelly. Redownload it.
When uploading through package manager, i get an error message saying corrupt or invalid file.
smf version 1.1 rc2.
I uninstalled 1.0 and installed 1.0.1 and now URLs dont appear at all.
Meh you were not supposed to uninstall. Damn mod is getting me mad. Send me your Subs.php and Subs-Post.php
[Captain McCallister]
Yaaar! I dont know what I'm doin'
[/Captain McCallister]
Attached.
Argggg. IM me on MSN and send it though there. Everytime I download gedit adds an extra line for each line and file is losing formating >_<.
Quote from: Jay The Code Monkey on August 21, 2006, 12:45:06 PM
Argggg. IM me on MSN and send it though there. Everytime I download gedit adds an extra line for each line and file is losing formating >_<.
In these cases, I replace double lines with single lines without ignoring whitespace differences. I do this in dreamweaver.
Quote from: Jay The Code Monkey on August 20, 2006, 09:43:10 AM
Umm all 5 files are in the archive K_4_Kelly. Redownload it.
Jay,
thanks, i just have time to look at it now since i donwloaded the file...
have a look, something wrong with the files
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi13.photobucket.com%2Falbums%2Fa286%2Ffallenangel4%2Fnothing.jpg&hash=0a66e5146aa9ce577baf25a68421235fabcb5da3)
Umm seems like a problem with the archive tool. Try another program.
Quote from: Jay The Code Monkey on August 22, 2006, 01:33:00 PM
Umm seems like a problem with the archive tool. Try another program.
Hello Jay, the URL is working fine now, I can see the URL in the posts.
But the problem of the IMG still there...
when I click the insert Image button and insert the img link, it become like this after posted:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi13.photobucket.com%2Falbums%2Fa286%2Ffallenangel4%2Fimgprobl.jpg&hash=b24d834c3695411dd0cec04b439a0c97218b31d3)
Umm send me your Subs-Post.php. I know what's causing it.
have u got my PM jay?
Yea I got it. Sorry for the delay. been busy. Here is the file.
Quote from: Jay The Code Monkey on August 25, 2006, 02:25:50 PM
Yea I got it. Sorry for the delay. been busy. Here is the file.
thanks a lot jay!
everything is back to normal!!
cheers!!!!!! :)
Dose this mod affect only the url in post or all urls on the forum? Any known conflict with the Links mod?
Umm all Urls that use the [url] bbc tag.
Not sure about the second one.
Quote from: Jay The Code Monkey on August 31, 2006, 09:49:45 PM
Umm all Urls that use the [url] bbc tag.
Not sure about the second one.
Right on thanks ;D
Does this work with RC3?
Quote from: S1L1C0N on September 01, 2006, 03:12:21 PM
Does this work with RC3?
Yes and very well I just had a chance to test it out. great Mod! ;D ;)
I like this mod very much, a long desired for feature!
Call me blindfolded, but I can't find the setting "Trim url longer than (x) characters" in the admin backend.
Where's that one located?
I'm running 1.1 RC3, english language and default theme.
Admin > Posts and Topics.
It is not showing up there!
However, I can see the mod has been applied correctly in the admin template ... strange. :-\
check the admin / post and topics / bbc settings or something like it
Thank you, it was hiding in the BB-Code section 8)
Quote from: K_4_kelly on August 23, 2006, 03:58:27 PM
Quote from: Jay The Code Monkey on August 22, 2006, 01:33:00 PM
Umm seems like a problem with the archive tool. Try another program.
Hello Jay, the URL is working fine now, I can see the URL in the posts.
But the problem of the IMG still there...
when I click the insert Image button and insert the img link, it become like this after posted:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi13.photobucket.com%2Falbums%2Fa286%2Ffallenangel4%2Fimgprobl.jpg&hash=b24d834c3695411dd0cec04b439a0c97218b31d3)
I have a problem like that. Can u help me?
This's my Subs-Post.php ;
http://www.hemenpaylas.com/download/1885595/Subs-Post.php.html (http://www.hemenpaylas.com/download/1885595/Subs-Post.php.html)
Install the latest version of the mod.
Quote from: JayBachatero on October 15, 2006, 12:47:14 PM
Install the latest version of the mod.
I installed the latest version but the problem continues... :( What can i do?
Post your Subs.php and Subs-Post.php. Email them to me. Don't post it on one of those file download sites.
Quote from: JayBachatero on October 16, 2006, 10:36:35 AM
Post your Subs.php and Subs-Post.php. Email them to me. Don't post it on one of those file download sites.
Ok I sent u an e-mail ;)
Can you PM me a test account? Seems like everything is correct on the files.
Ok here you go.
I have a problem where I cannot change the number of characters to limit the URL's. I reset the default of 50 to 75, and when I hit save, it stays at 50. I've since uninstalled the mod, and now my url's are still limited to 50 characters.
What version of the mod did you install?
Nice mod...
Quote from: JayBachatero on November 08, 2006, 11:38:50 PM
What version of the mod did you install?
Whatever the latest that was available for RC3.
Is there a way to set a maximum number of characters allowed to display in a URL?
Admin / Post and Topics.
That's what I tried but when I try to change 50 to 30 it won't save the change. :(
In ManagePosts.php
'urlLength' => empty($_POST['urlLengh']) ? 50 : (int)$_POST['urlLength'],
'urlLength' => empty($_POST['urlLength']) ? 50 : (int)$_POST['urlLength'],
That worked! :D
i need this in ZIP format, please.
You can just install through the package manager.
I know this mod isn't released yet for 1.1 final.
I tried installing and it gave this error on some action links:
Parse error: syntax error, unexpected T_ELSEIF in /home/.abigaildryer/xarcell/xboxnarc.com/Sources/Subs-Post.php on line 4
Ill look into updating this mod this weekend.
Is it true that if someone posts a really small URL, it then won't work properly?
When I tested it it worked. I'll be looking into this and let you know.
Quote from: JayBachatero on December 07, 2006, 12:53:07 AM
Ill look into updating this mod this weekend.
Do you think you'll get this done soon? I see you did not get to it over the weekend. ;)
Ok updated for 1.1.
I cant see in Admin/Posts and topics settings for Trim url longer than (x) characters.
smf 1.1, trimurl 1.0.2
http://www.mojportal.com.hr/forum/index.php?action=postsettings;sa=bbc
Thanks ;D
Is this mod compatible with RC2?
Is there anyway you can make it so when someone posts a link, it just automatically is called Link instead of the URL address?
This can be done but defeats the whole purpose of the mod. It's supposed to trim it not rename it.
Fantastic mod as usual Jay!
(ps. There doesnt seem to be a way to rate it or leave a normal mod comment on the mod page.)
Quote from: dcmouser on January 03, 2007, 07:21:42 PM
Fantastic mod as usual Jay!
(ps. There doesnt seem to be a way to rate it or leave a normal mod comment on the mod page.)
Due to people asking for support rather than leaving actual reviews the section was removed.
please 1.1.1
I am kinda worried now..I am using the Moonraker theme and I installed trimurl mod and something went wrong and got scared and replaced the original Subs.php file and then my forum worked again but had a funny comma thing in my URL's where I think it is suppose to have an = sign.
I then decided to uninstall the whole trimurl thing, and it uninstalled but still didn't clear up the comma thing.
See the comma?>>>> http://infotipper.com/forum/index.php/topic,4.0.html
I guess it was because it was for SMF 1.1 not 1.1.1 ??
How do I fix this comma problem?
This is called "Search engine friendly URLs". You enable ths in Admin > Features and Options. Has nothing to do with this mod.
LMAO....phew!...I had no idea it made the URL look like that and have a comma.
Thanks for the simple yet soothingly, refeshing reply...I feel so much more at ease.
I was freaking out bad!!!
Just a heads up:
Tried it with 1.1.2 - installed and seemed to work fine.
However, the old problem of links disappearing is back, but only for one individual user!
She's not part of any group or anything. Very strange.
Will post more info for you if you need it.
Great mod - look forward to a 1.1.2 version!
~A
Installed with 1.1.2, newest version of mod. Short urls don't display at all. Help?
Ignore previous post. I'm retarded.
Confirmation please - is this modification KNOWN compatible with SMF 1.1.2 ?
Quote from: DHC on March 29, 2007, 02:07:46 PM
Confirmation please - is this modification KNOWN compatible with SMF 1.1.2 ?
Yes!
Yes this mod works with the current version of SMF. Yes I am going to take this over for Jay. Yes it will work with the next version. ;)
I just want you to all know that it will work and it does work and that, yes, it is still being given attention but - as of now - I will be giving that attention.
Thank you very much for this! Long URLs messing up the width of the columns on my home page were driving me bloody insane. Works great and I'm back from the brink of total insanity. :D
Works perfectly with SMF 1.1.3. :)
if yer server supports it seo4smf is far superior, no disrespect to the author.
just what i needed thanks
Can anybody confirm if this works with SMF 1.4?
Yes it does...please note though that it would make for less work for others were you to have a test forum and simply try mods such as this for yourself.
Great mod, 5/5 starts for it!
I hope this trim-option will be selectable by default in SMF 2.0
Regards, Christian
i think it doent work with neust version of smf 1.1.4
i cant install that
should i install that Manuel if yes how to do that?
It works on 1.1.4. Just give it a shot.
Hi,
I'm not sure this has been reported in the past, or whether this affects only my setup...
But trimUrl doesn't seem to work when the URL is inserted in a quote.
For instance, take this long URL:
http://www.academie-francaise....angue/questions.html#evenement
Outside a quote, it is completely highlighted, and redirects to the actual URL (http://www.academie-francaise.fr/langue/questions.html#evenement). When *inside* a quote, only the text before "..." is highlighted, and it redirects to this broken URL: http://www.academie-francaise/
Any ideas what I should fix? I suppose it's related to quote tags "protecting" their contents or the opposite.
Thanks!
I'm looking into it. I can't spot anything wrong off the bat but I'll be looking more into it.
i am seeing version 1.0.2???
but no changelog?
Thanks :)
Maybe it's (again!) a problem with my custom code in Noisen... Can anyone try this on their board if they have TrimUrl on it?
Any news? Did you manage to reproduce the issue?
Maybe it's (again!) an error on my side...
Haven't been able to test this stuff. Was/still busy trying to recover some backups that I accidentally deleted >_<.
Okay, found it... The bug is due to another bug in karl's AutoEmbed video mod. I'll have to find a solution myself, I guess.
Thanks for saving me some time. If there is anything that I can do to prevent this, let me know and I'll see if I can do a work around for it.
Sure.
The problem still happens in the latest AEVAC. Can be worked out by adding a line of code but it removes quote protection so I'm not sure this is the right solution. I'll be talking with karl about the issue now.
can someone make this for the SMF 1.1.7?
i have installed it but i cant see the Setting PAge
Please See the SS below, where it is installed but no Setting Link in the Links Menu
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fnaveeddil.webcommand.org%2Fbbac%2Fposts%2Ftrim.JPG&hash=930d1e88e9a6466f00b31c27540933cab5acaa9e)
dear all,
I am using SMF 1.1.8 version
still waiting for reply
2.0 rc1?
2.0 Rc1.2 ???
Please
The mod is working fine on my 2.0 RC 2 install. I'm not sure I remember doing any changes to it, though. Can probably be installed at least manually on any SMF with few changes. The incompatibility with Aeva(c) is no more, of course.
Hi would it be possible to make a package of this mod for rc1.2. As i really don't like, making manual edits. As every time i do something goes wrong with the forum cheers.
Quote from: adbrad on November 21, 2009, 12:46:15 PM
hi would it be possible to make a package of this mod for rc1.2 as i really don't like making manual edits
You really don't like punctuation either, do you? ::)
Hello everyone!
I have this mod installed since SMF 1.1.4 . Today I upgraded to 1.1.11, and I had to uninstall it in order to skip a subs.php error during the SMF upgrade. Trying to reinstall the mod, it keeps giving me a subs.php error. Any solution?
The mod will need to be rewritten for 1.1.11 due to the changes in 1.1.11's handling of links.
Thank you. This mod is very useful, I really hope that the developer will sacrifice some time to rewrite it.
I don't see any issues on my SMF2 install? Seems to work just fine...
Quote from: Nao/Gilles on December 02, 2009, 06:45:33 AM
I don't see any issues on my SMF2 install? Seems to work just fine...
I don´t find this two lines:
<file name="$sourcedir/ManagePosts.php">
<operation>
<search position="before"><![CDATA[ 'disabledBBC' => implode(',', array_diff($bbcTags, $_POST['enabledTags'])),
]]></search>
<add><![CDATA[ 'urlLength' => empty($_POST['urlLength']) ? 50 : (int)$_POST['urlLength'],
]]></add>
</operation>
</file>
<file name="$themedir/Admin.template.php">
<operation>
<search position="replace"><![CDATA[ </tr><tr class="windowbg2">
<th width="50%" align="right"><label for="autoLinkUrls_check">', $txt['autoLinkUrls'], '</label>:</th>
<td>
<input type="checkbox" name="autoLinkUrls" id="autoLinkUrls_check"', empty($modSettings['autoLinkUrls']) ? '' : ' checked="checked"', ' class="check" />
</td>
</tr><tr class="windowbg2">
]]></search>
<add><![CDATA[ </tr><tr class="windowbg2">
<th width="50%" align="right"><label for="autoLinkUrls_check">', $txt['autoLinkUrls'], '</label>:</th>
<td>
<input type="checkbox" name="autoLinkUrls" id="autoLinkUrls_check"', empty($modSettings['autoLinkUrls']) ? '' : ' checked="checked"', ' class="check" />
</td>
</tr><tr class="windowbg2">
<th width="50%" align="right"><label for="urlLength">', $txt['urlLength'], '</label>:</th>
<td>
<input type="text" name="urlLength" id="urlLength" value="', empty($modSettings['urlLength']) ? '50' : $modSettings['urlLength'], '" size="6" />
</td>
</tr><tr class="windowbg2">
]]></add>
</operation>
</file>
What is the right line and the line how i musst include?
Any news about the compatibility issues with 1.1.11 ?
Does it work with RC2?
Quote from: Nao on September 23, 2008, 07:54:38 PM
Okay, found it... The bug is due to another bug in karl's AutoEmbed video mod. I'll have to find a solution myself, I guess.
I just realized that my trim url feature is no longer working - and I have no idea why.... what is the conflict exactly with the Aeva embed mod?
That post is nearly two years old... I *most likely* fixed the bug eh, especially since I use TrimURLs myself ;)
Seems that yet another mod falls victim to AEVA :P
?
Twas a joke ;)
Ah... You mean it's a killer mod ;D
Yes indeed, sir!
Any update to making compatible with 1.1.11? :)
Gives "fail" when testing with SMF2 Final. Anybody kind enough to update?
Of course it'd fail on 2.0. It's for 1.1. :P
Quote from: spiros on June 26, 2011, 07:15:47 PM
Anybody kind enough to update?
Anyone ever try to update this? I tried to install it but got an error on pretty much every call lol..
Wow, can't believe I overlooked this! :) Thanks
I'm finding that the urls sent through email are also being truncated, thereby preventing the user from following the link.
Attached a version for SMF 2.
Work done by Dragoon, following a paid request of mine.
Or use this css (by Antechinus)
.inner a {
display: inline-block;
white-space: pre;
overflow: hidden;
text-overflow: ellipsis;
max-width: 24em;
vertical-align: bottom;
}
Quote from: spiros on December 17, 2012, 10:44:25 AM
.inner a {
display: inline-block;
white-space: pre;
overflow: hidden;
text-overflow: ellipsis;
max-width: 24em;
vertical-align: bottom;
}
Can you elaborate on this?
This is CSS you stick in the main CSS to trim it just in the theme rather than brute forcing it in the code, so it won't affect emails or similar but will in the browser.
The code will likely need to be changed for SMF 1's style and there are some issues with older browsers with it. There are also some odd wrapping issues under some circumstances.
Hi Arantor. I use this mod for SMF 1.x, but sometimes long URLs get trimmed in the emails sent to the user. So, when they open the email and click the link found in the email, the URL is http://whatever.com/index...something. In other words, it's not showing the actual URL of the link. Is there a way of disabling this mod so that links found in emails are not trimmed or are left the way they are? :-\
There's no way to do it without major changes to the guts of SMF; this mod operates on the BBC parser, the BBC parser doesn't know what kind of context that content has, whether it's for display for for emails.
Which is why the CSS solution came about.
Quote from: spiros on December 17, 2012, 10:44:25 AM
Attached a version for SMF 2.
Work done by Dragoon, following a paid request of mine.
Or use this css (by Antechinus)
.inner a {
display: inline-block;
white-space: pre;
overflow: hidden;
text-overflow: ellipsis;
max-width: 24em;
vertical-align: bottom;
}
Officially removed this mod and implemented these changes on 1.1.18, thank you.