Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: JayBachatero on August 18, 2006, 02:17:04 PM

Title: TrimUrl
Post by: JayBachatero on August 18, 2006, 02:17:04 PM
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
Title: Re: TrimUrl
Post by: Harzem on August 18, 2006, 02:43:04 PM
Nice and useful mod :) That was asked a lot in the boards here I moderate :)
Title: Re: TrimUrl
Post by: N3lson on August 18, 2006, 02:47:28 PM
Nice Mod....
Title: Re: TrimUrl
Post by: ArkServer on August 18, 2006, 03:02:22 PM
After installing this mod, the links in my signature disappeared but when i go to my profile and check my sign its still there..
Title: Re: TrimUrl
Post by: JayBachatero on August 18, 2006, 03:10:45 PM
Umm will have to look into that one Ark.
Title: Re: TrimUrl
Post by: K_4_kelly on August 18, 2006, 06:44:30 PM
oh... i like this one ;)
Title: Re: TrimUrl
Post by: L.G.S on August 18, 2006, 07:40:12 PM
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?
Title: Re: TrimUrl
Post by: Gary 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.
Title: Re: TrimUrl
Post by: K_4_kelly on August 19, 2006, 03:30:53 AM
can we have a TrimQuote as well? ;)
Title: Re: TrimUrl
Post by: JayBachatero on August 19, 2006, 03:32:39 AM
TrimQuote?  BTW upgrade your mod to the latest one.  Big bug was fixed.
Title: Re: TrimUrl
Post by: K_4_kelly on August 19, 2006, 03:50:25 AM
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...

Title: Re: TrimUrl
Post by: 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
Title: Re: TrimUrl
Post by: rockinaway on August 19, 2006, 05:01:40 AM
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.
Title: Re: TrimUrl
Post by: K_4_kelly on August 19, 2006, 06:37:59 AM
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..... :'(
Title: Re: TrimUrl
Post by: K_4_kelly on August 19, 2006, 07:03:28 AM
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...... :'(  :(
Title: Re: TrimUrl
Post by: JayBachatero on August 19, 2006, 12:31:56 PM
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.
Title: Re: TrimUrl
Post by: K_4_kelly on August 19, 2006, 01:56:15 PM
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)
Title: Re: TrimUrl
Post by: JayBachatero on August 19, 2006, 02:00:44 PM
Ok let me look into all of the files that you sent me.  Did you uninstall the mod? Or it's installed?
Title: Re: TrimUrl
Post by: JayBachatero on August 19, 2006, 02:10:50 PM
Ok here are the files and everything should be working.  The mod is installed now.
Title: Re: TrimUrl
Post by: GC on August 19, 2006, 04:35:28 PM
Ive installed and uninstalled this mod and I still get the IMG tag problem, why?
Title: Re: TrimUrl
Post by: JayBachatero on August 19, 2006, 10:59:17 PM
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
Title: Re: TrimUrl
Post by: K_4_kelly on August 20, 2006, 04:23:53 AM
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?? ???
Title: Re: TrimUrl
Post by: ArkServer on August 20, 2006, 07:21:18 AM
The mod works here :D
Title: Re: TrimUrl
Post by: JayBachatero on August 20, 2006, 09:43:10 AM
Umm all 5 files are in the archive K_4_Kelly.  Redownload it.
Title: Re: TrimUrl
Post by: Prasad007 on August 21, 2006, 05:54:59 AM
When uploading through package manager, i get an error message saying corrupt or invalid file.

smf version 1.1 rc2.
Title: Re: TrimUrl
Post by: Gary on August 21, 2006, 07:43:10 AM
I uninstalled 1.0 and installed 1.0.1 and now URLs dont appear at all.
Title: Re: TrimUrl
Post by: JayBachatero on August 21, 2006, 11:44:56 AM
Meh you were not supposed to uninstall.  Damn mod is getting me mad.  Send me your Subs.php and Subs-Post.php
Title: Re: TrimUrl
Post by: Gary on August 21, 2006, 11:53:34 AM
[Captain McCallister]
Yaaar! I dont know what I'm doin'
[/Captain McCallister]

Attached.
Title: Re: TrimUrl
Post by: JayBachatero 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 >_<.
Title: Re: TrimUrl
Post by: Harzem on August 21, 2006, 01:33:36 PM
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.
Title: Re: TrimUrl
Post by: K_4_kelly on August 22, 2006, 01:30:38 PM
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)

Title: Re: TrimUrl
Post by: JayBachatero on August 22, 2006, 01:33:00 PM
Umm seems like a problem with the archive tool.  Try another program.
Title: Re: TrimUrl
Post by: 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)
Title: Re: TrimUrl
Post by: JayBachatero on August 23, 2006, 10:29:34 PM
Umm send me your Subs-Post.php.  I know what's causing it.
Title: Re: TrimUrl
Post by: K_4_kelly on August 25, 2006, 03:18:59 AM
have u got my PM jay?
Title: Re: TrimUrl
Post by: JayBachatero on August 25, 2006, 02:25:50 PM
Yea I got it.  Sorry for the delay. been busy.  Here is the file.
Title: Re: TrimUrl
Post by: K_4_kelly on August 26, 2006, 12:19:06 PM
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!!!!!! :)
Title: Re: TrimUrl
Post by: Skipdawg on August 31, 2006, 09:19:23 PM
Dose this mod affect only the url in post or all urls on the forum? Any known conflict with the Links mod?
Title: Re: TrimUrl
Post by: JayBachatero on August 31, 2006, 09:49:45 PM
Umm all Urls that use the [url] bbc tag. 

Not sure about the second one.
Title: Re: TrimUrl
Post by: Skipdawg on August 31, 2006, 10:09:57 PM
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
Title: Re: TrimUrl
Post by: S1L1C0N on September 01, 2006, 03:12:21 PM
Does this work with RC3?
Title: Re: TrimUrl
Post by: Skipdawg on September 01, 2006, 03:15:19 PM
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 ;)
Title: Re: TrimUrl
Post by: fishbone on September 14, 2006, 12:30:25 AM
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.
Title: Re: TrimUrl
Post by: JayBachatero on September 14, 2006, 08:07:52 AM
Admin > Posts and Topics.
Title: Re: TrimUrl
Post by: fishbone on September 14, 2006, 11:34:22 PM
It is not showing up there!
However, I can see the mod has been applied correctly in the admin template ... strange.  :-\
Title: Re: TrimUrl
Post by: JayBachatero on September 15, 2006, 12:17:44 AM
check the admin / post and topics / bbc settings or something like it
Title: Re: TrimUrl
Post by: fishbone on September 15, 2006, 11:36:37 AM
Thank you, it was hiding in the BB-Code section  8)
Title: Re: TrimUrl
Post by: STRONGHOLD on October 15, 2006, 07:46:28 AM
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)
Title: Re: TrimUrl
Post by: JayBachatero on October 15, 2006, 12:47:14 PM
Install the latest version of the mod.
Title: Re: TrimUrl
Post by: STRONGHOLD on October 16, 2006, 10:28:05 AM
 
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?
Title: Re: TrimUrl
Post by: 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.
Title: Re: TrimUrl
Post by: STRONGHOLD on October 16, 2006, 10:42:34 AM
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 ;)
Title: Re: TrimUrl
Post by: JayBachatero on October 16, 2006, 10:51:10 AM
Can you PM me a test account?  Seems like everything is correct on the files.
Title: Re: TrimUrl
Post by: JayBachatero on October 16, 2006, 11:17:41 AM
Ok here you go.
Title: Re: TrimUrl
Post by: STRONGHOLD on October 16, 2006, 11:23:00 AM
Quote from: JayBachatero on October 16, 2006, 11:17:41 AM
Ok here you go.

  :) Thank u a lot buddy ;)
Title: Re: TrimUrl
Post by: BakerLee on November 08, 2006, 01:49:58 PM
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.
Title: Re: TrimUrl
Post by: JayBachatero on November 08, 2006, 11:38:50 PM
What version of the mod did you install?
Title: Re: TrimUrl
Post by: Xarcell on November 11, 2006, 09:00:01 PM
Nice mod...
Title: Re: TrimUrl
Post by: BakerLee on November 15, 2006, 02:31:20 PM
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.
Title: Re: TrimUrl
Post by: junglecat on November 23, 2006, 11:40:21 PM
Is there a way to set a maximum number of characters allowed to display in a URL?
Title: Re: TrimUrl
Post by: JayBachatero on November 24, 2006, 01:42:03 AM
Admin / Post and Topics.
Title: Re: TrimUrl
Post by: junglecat on November 24, 2006, 01:50:11 AM
That's what I tried but when I try to change 50 to 30 it won't save the change.  :(
Title: Re: TrimUrl
Post by: JayBachatero on November 24, 2006, 04:58:07 PM
In ManagePosts.php
Code (find) Select

'urlLength' => empty($_POST['urlLengh']) ? 50 : (int)$_POST['urlLength'],

Code (replace) Select

'urlLength' => empty($_POST['urlLength']) ? 50 : (int)$_POST['urlLength'],
Title: Re: TrimUrl
Post by: junglecat on November 24, 2006, 05:43:19 PM
That worked! :D
Title: Re: TrimUrl
Post by: affbld on November 25, 2006, 07:00:54 PM
i need this in ZIP format, please.
Title: Re: TrimUrl
Post by: JayBachatero on November 25, 2006, 11:23:17 PM
You can just install through the package manager.
Title: Re: TrimUrl
Post by: Xarcell on December 07, 2006, 12:33:49 AM
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
Title: Re: TrimUrl
Post by: JayBachatero on December 07, 2006, 12:53:07 AM
Ill look into updating this mod this weekend.
Title: Re: TrimUrl
Post by: mark7144 on December 07, 2006, 11:42:17 PM
Is it true that if someone posts a really small URL, it then won't work properly?
Title: Re: TrimUrl
Post by: JayBachatero on December 07, 2006, 11:48:40 PM
When I tested it it worked.  I'll be looking into this and let you know.
Title: Re: TrimUrl
Post by: Skipdawg on December 12, 2006, 03:10:21 AM
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.  ;)
Title: Re: TrimUrl
Post by: JayBachatero on December 12, 2006, 12:14:31 PM
Ok updated for 1.1.
Title: Re: TrimUrl
Post by: Robi052 on December 12, 2006, 03:03:45 PM
I cant see in Admin/Posts and topics settings for Trim url longer than (x) characters.

smf 1.1,  trimurl 1.0.2
Title: Re: TrimUrl
Post by: JayBachatero on December 12, 2006, 03:15:38 PM
http://www.mojportal.com.hr/forum/index.php?action=postsettings;sa=bbc
Title: Re: TrimUrl
Post by: Robi052 on December 12, 2006, 03:27:02 PM
Thanks  ;D
Title: Re: TrimUrl
Post by: sanax on December 16, 2006, 08:33:37 AM
Is this mod compatible with RC2?
Title: Re: TrimUrl
Post by: mark7144 on December 17, 2006, 01:49:26 PM
Is there anyway you can make it so when someone posts a link, it just automatically is called Link instead of the URL address?
Title: Re: TrimUrl
Post by: JayBachatero on December 20, 2006, 08:45:30 AM
This can be done but defeats the whole purpose of the mod.  It's supposed to trim it not rename it.
Title: Re: TrimUrl
Post by: 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.)
Title: Re: TrimUrl
Post by: JayBachatero on January 03, 2007, 10:06:40 PM
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.
Title: Re: TrimUrl
Post by: Arveles on February 01, 2007, 08:00:24 PM
please 1.1.1
Title: http://infotipper.com/forum/index.php/topic,4.0.html <TRIMURL messed up my URL's
Post by: goitalone on February 04, 2007, 07:13:42 PM
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?
Title: Re: TrimUrl
Post by: JayBachatero on February 04, 2007, 11:36:58 PM
This is called "Search engine friendly URLs".  You enable ths in Admin > Features and Options.  Has nothing to do with this mod.
Title: Re: TrimUrl
Post by: goitalone on February 05, 2007, 12:33:09 AM
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!!!
Title: Re: TrimUrl
Post by: Warden100 on February 26, 2007, 03:55:21 PM
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
Title: Re: TrimUrl
Post by: lyric911 on March 07, 2007, 01:56:26 PM
Installed with 1.1.2, newest version of mod.  Short urls don't display at all. Help?
Title: Re: TrimUrl
Post by: lyric911 on March 07, 2007, 02:00:37 PM
Ignore previous post.  I'm retarded.
Title: Re: TrimUrl
Post by: DHC on March 29, 2007, 02:07:46 PM
Confirmation please - is this modification KNOWN compatible with SMF 1.1.2 ?
Title: Re: TrimUrl
Post by: TrueSatan on March 29, 2007, 02:39:08 PM
Quote from: DHC on March 29, 2007, 02:07:46 PM
Confirmation please - is this modification KNOWN compatible with SMF 1.1.2 ?

Yes!
Title: Re: TrimUrl
Post by: KGIII on April 05, 2007, 09:09:10 AM
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.
Title: Re: TrimUrl
Post by: Maharet on July 25, 2007, 01:48:17 PM
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
Title: Re: TrimUrl
Post by: Yonkey on July 28, 2007, 03:35:30 PM
Works perfectly with SMF 1.1.3. :)
Title: Re: TrimUrl
Post by: hypnoticstate on July 29, 2007, 01:13:08 AM
if yer server supports it seo4smf is far superior, no disrespect to the author.
Title: Re: TrimUrl
Post by: bathgate on July 30, 2007, 02:52:59 PM
just what i needed thanks
Title: Re: TrimUrl
Post by: Oddsodz on November 06, 2007, 10:45:34 AM
Can anybody confirm if this works with SMF 1.4?
Title: Re: TrimUrl
Post by: TrueSatan on November 06, 2007, 11:14:11 AM
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.
Title: Re: TrimUrl
Post by: Chriss Cohn on February 18, 2008, 07:42:02 AM
Great mod, 5/5 starts for it!
I hope this trim-option will be selectable by default in SMF 2.0

Regards, Christian
Title: Re: TrimUrl
Post by: fgenc on February 20, 2008, 03:26:13 PM
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?
Title: Re: TrimUrl
Post by: JayBachatero on February 27, 2008, 11:50:33 AM
It works on 1.1.4.  Just give it a shot.
Title: Re: TrimUrl
Post by: Nao 尚 on September 16, 2008, 10:42:05 AM
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!
Title: Re: TrimUrl
Post by: JayBachatero on September 18, 2008, 12:25:28 PM
I'm looking into it.  I can't spot anything wrong off the bat but I'll be looking more into it.
Title: Re: TrimUrl
Post by: matasanos on September 18, 2008, 12:42:09 PM
i am seeing version 1.0.2???
but no changelog?
Title: Re: TrimUrl
Post by: Nao 尚 on September 18, 2008, 01:23:56 PM
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?
Title: Re: TrimUrl
Post by: Nao 尚 on September 22, 2008, 03:13:24 PM
Any news? Did you manage to reproduce the issue?
Maybe it's (again!) an error on my side...
Title: Re: TrimUrl
Post by: JayBachatero on September 22, 2008, 07:22:49 PM
Haven't been able to test this stuff.  Was/still busy trying to recover some backups that I accidentally deleted >_<.
Title: Re: TrimUrl
Post by: 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.
Title: Re: TrimUrl
Post by: JayBachatero on September 23, 2008, 09:50:27 PM
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.
Title: Re: TrimUrl
Post by: Nao 尚 on September 24, 2008, 08:58:33 AM
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.
Title: Re: TrimUrl
Post by: Phat^Trance on December 19, 2008, 06:44:25 PM
can someone make this for the SMF 1.1.7?
Title: Re: TrimUrl
Post by: Naveeddil on February 11, 2009, 03:26:01 AM
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)
Title: Re: TrimUrl
Post by: Naveeddil on February 12, 2009, 03:58:38 AM
dear all,
I am using SMF 1.1.8 version
still waiting for reply
Title: Re: TrimUrl
Post by: Arveles on March 30, 2009, 02:41:11 PM
2.0 rc1?
Title: Re: TrimUrl
Post by: Eclipse16V on September 24, 2009, 08:34:27 AM
2.0 Rc1.2 ???

Please
Title: Re: TrimUrl
Post by: Nao 尚 on September 24, 2009, 10:55:42 AM
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.
Title: Re: TrimUrl
Post by: 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. As every time i do something goes wrong with the forum cheers.
Title: Re: TrimUrl
Post by: Nao 尚 on November 21, 2009, 04:36:30 PM
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? ::)
Title: Re: TrimUrl
Post by: papdoc on December 02, 2009, 03:58:59 AM
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?
Title: Re: TrimUrl
Post by: Arantor on December 02, 2009, 04:49:51 AM
The mod will need to be rewritten for 1.1.11 due to the changes in 1.1.11's handling of links.
Title: Re: TrimUrl
Post by: papdoc on December 02, 2009, 05:26:32 AM
Thank you. This mod is very useful, I really hope that the developer will sacrifice some time to rewrite it.
Title: Re: TrimUrl
Post by: Nao 尚 on December 02, 2009, 06:45:33 AM
I don't see any issues on my SMF2 install? Seems to work just fine...
Title: Re: TrimUrl
Post by: Eclipse16V on December 02, 2009, 07:20:39 AM
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?
Title: Re: TrimUrl
Post by: papdoc on December 23, 2009, 07:59:12 PM
Any news about the compatibility issues with 1.1.11 ?
Title: Re: TrimUrl
Post by: spiros on December 27, 2009, 11:15:18 AM
Does it work with RC2?
Title: Re: TrimUrl
Post by: digit on June 26, 2010, 06:52:57 PM
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?

Title: Re: TrimUrl
Post by: Nao 尚 on June 26, 2010, 07:04:00 PM
That post is nearly two years old... I *most likely* fixed the bug eh, especially since I use TrimURLs myself ;)
Title: Re: TrimUrl
Post by: JBlaze on June 26, 2010, 07:05:10 PM
Seems that yet another mod falls victim to AEVA :P
Title: Re: TrimUrl
Post by: Nao 尚 on June 27, 2010, 04:20:25 AM
?
Title: Re: TrimUrl
Post by: JBlaze on June 27, 2010, 09:48:21 AM
Twas a joke ;)
Title: Re: TrimUrl
Post by: Nao 尚 on June 27, 2010, 10:14:31 AM
Ah... You mean it's a killer mod ;D
Yes indeed, sir!
Title: Re: TrimUrl
Post by: gimmiefreebies on July 22, 2010, 11:55:03 AM
Any update to making compatible with 1.1.11?  :)
Title: Re: TrimUrl
Post by: spiros on June 26, 2011, 07:15:47 PM
Gives "fail" when testing with SMF2 Final. Anybody kind enough to update?
Title: Re: TrimUrl
Post by: Gary on June 26, 2011, 07:31:53 PM
Of course it'd fail on 2.0. It's for 1.1. :P
Title: Re: TrimUrl
Post by: spiros on June 26, 2011, 07:35:10 PM
Quote from: spiros on June 26, 2011, 07:15:47 PM
Anybody kind enough to update?
Title: Re: TrimUrl
Post by: Iomega0318 on May 14, 2012, 02:47:44 AM
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..
Title: Re: TrimUrl
Post by: Biology Forums on May 14, 2012, 08:24:15 PM
Wow, can't believe I overlooked this! :) Thanks
Title: Re: TrimUrl
Post by: Biology Forums on July 10, 2012, 10:04:31 PM
I'm finding that the urls sent through email are also being truncated, thereby preventing the user from following the link.
Title: Re: TrimUrl
Post by: 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;
}
Title: Re: TrimUrl
Post by: stylusss on May 06, 2013, 12:08:05 AM
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?
Title: Re: TrimUrl
Post by: Arantor on May 06, 2013, 12:12:00 AM
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.
Title: Re: TrimUrl
Post by: Biology Forums on May 06, 2013, 08:53:44 AM
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? :-\
Title: Re: TrimUrl
Post by: Arantor on May 06, 2013, 09:15:15 AM
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.
Title: Re: TrimUrl
Post by: Biology Forums on September 13, 2013, 10:11:39 PM
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.