Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Forum add file

Asked Modified Viewed 1,465 times
M
MattMadsen
M
Facebook site
https://www.facebook.com/Detherersjovt
The funniest facebook page in the world
  • Member, joined since
  • Contributed 63 posts on the community forums.
  • Started 15 threads in the forums
  • Started this discussions
asked
Member

Hey

Is it possible that when you add a file in the forum that you can do it with a link.

When I add a file in the forum, I would like if I could just write a link.
That's because if I just write the link in the forum, so anyone can download it, but if I add it, so can only users download it.
0 replies

7 posts

C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

[ url ] [/url] BB Code.

[Moved to modifications & Requests]
0 replies
M
MattMadsen
M
Facebook site
https://www.facebook.com/Detherersjovt
The funniest facebook page in the world
  • Member, joined since
  • Contributed 63 posts on the community forums.
  • Started 15 threads in the forums
  • Started this discussions
answered
Member

No no.
I know that but now all can download it. I want that only users can download it.
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

OK wait.

Try this upload and over write your url bb code include with this one.....

NOT TESTED BACKUP OLD ONE!


<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright (C) 2002 - 2009 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: url_bbcode_include.php
| Author: Wooya
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }

if (iMEMBER) {
//Url BBCode with auto triming long links
$text = preg_replace('#\[url\]([\r\n]*)(http://|ftp://|https://|ftps://)([^\s\'\"]*?)([\r\n]*)\[/url\]#sie', "'<a href=\'\\2\\3\' target=\'_blank\' title=\'\\2\\3\'>'.trimlink('\\2\\3', 20).(strlen('\\2\\3')>30?substr('\\2\\3', strlen('\\2\\3')-10, strlen('\\2\\3')):'').'</a>'", $text);
$text = preg_replace('#\[url\]([\r\n]*)([^\s\'\"]*?)([\r\n]*)\[/url\]#sie', "'<a href=\'http://\\2\' target=\'_blank\' title=\'\\2\'>'.trimlink('\\2', 20).(strlen('\\2')>30?substr('\\2', strlen('\\2')-10, strlen('\\2')):'').'</a>'", $text);
$text = preg_replace('#\[url=([\r\n]*)(http://|ftp://|https://|ftps://)([^\s\'\"]*?)\](.*?)([\r\n]*)\[/url\]#si', '<a href=\'\2\3\' target=\'_blank\' title=\'\2\3\'>\4</a>', $text);
$text = preg_replace('#\[url=([\r\n]*)([^\s\'\"]*?)\](.*?)([\r\n]*)\[/url\]#si', '<a href=\'http://\2\' target=\'_blank\' title=\'\2\'>\3</a>', $text);
}else{
echo"<div class='admin-message'>Members Only!</div>";
}

?>
0 replies
M
MattMadsen
M
Facebook site
https://www.facebook.com/Detherersjovt
The funniest facebook page in the world
  • Member, joined since
  • Contributed 63 posts on the community forums.
  • Started 15 threads in the forums
  • Started this discussions
answered
Member

Where do i find it?
0 replies
S
smokeman
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
answered
Veteran Member

/includes/bbcodes/
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

Exactly. Does ity work? It might need ' instead of " not sure. :P
0 replies
M
MattMadsen
M
Facebook site
https://www.facebook.com/Detherersjovt
The funniest facebook page in the world
  • Member, joined since
  • Contributed 63 posts on the community forums.
  • Started 15 threads in the forums
  • Started this discussions
answered
Member

Okay it works. does not work.
Now, users is the only 1, how can download it..
But it shows the link and it must not.
Would rather have it wrote something like:
You must sign up for user to download this program

Translated with google translate
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 7 posts
  • Votes 0 votes
  • Topic users 3 members

3 participants

C
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
S
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
M
M
Facebook site
https://www.facebook.com/Detherersjovt
The funniest facebook page in the world
  • Member, joined since
  • Contributed 63 posts on the community forums.
  • Started 15 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet