Page 1 of 1
Custom file links
Posted: Tue Sep 26, 2006 7:33 pm
by ecuapac
Hi there!
When I link to files within my site, I'd like to have special file links like
Name of the file (6.3 KB)
Is it possible to realize with CMSMS to e.g. print the size of a file and do this automatically lateron when selecting a file?
TIA Ralph
Re: Custom file links
Posted: Tue Sep 26, 2006 7:46 pm
by tsw
yes it is
Re: Custom file links
Posted: Tue Sep 26, 2006 7:50 pm
by tsw
ok, Im a bit tired
Youll want to create new user defined tag, maybe call it "file_link" and give one parameter for it, maybe "file"
now that tag knows almost everything it needs (path would be needed also, but lets assume all your linkable files are in uploads/files)
then you need to get the file size with php and echo the html and filesize as you want from the tag.
OR you could get uploads module which does most these things out of the box...
hope this helps
Re: Custom file links
Posted: Tue Sep 26, 2006 9:19 pm
by ecuapac
Thanks a lot!
I really could not imagine CMS Made Simple is really that simple

I've already written a user defined tag. You can find it at the CMSMS-Wiki:
http://wiki.cmsmadesimple.org/index.php ... #File_link
thx Ralph
Re: Custom file links
Posted: Wed Sep 27, 2006 9:05 am
by tsw
Great, thanks for sharing your tag it might become handy