rtsp link

Started by Jeet Chowdhury, February 10, 2011, 07:21:44 AM

Previous topic - Next topic

Jeet Chowdhury


Illori

are you using url tags or just posting the link without?

Jeet Chowdhury

i'm using url tag want to show them as clickable link like this,

[url=rtsp://x.x.x.x:554/video.sdp]HIGH QUALITY[/url]

Illori

the url tag as far as i know will always add http to the link as it expects a working html website.

Jeet Chowdhury

what can i do for rtsp links...

Illori

you will need some type of mod or to edit the code manually to add a new tag to support that url.

Jeet Chowdhury

i have edited subs.php to,

// Only do this if the preg survives.
                        if (is_string($result = preg_replace(array(
                            '~(?<=[\s>\.(;\'"]|^)((?:http|https:rtsp)://[\w\-_%@:|]+(?:\.[\w\-_%]+)*(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i',
                            '~(?<=[\s>\.(;\'"]|^)((?:ftp|ftps)://[\w\-_%@:|]+(?:\.[\w\-_%]+)*(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i',
                            '~(?<=[\s>(\'<]|^)(www(?:\.[\w\-_]+)+(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i'


and subs-post.php to

// [url]http://...[/url]
        array(
            'tag' => 'url',
            'protocols' => array('http', 'https', 'rtsp'),
            'embeddedUrl' => true,
            'hasEqualSign' => false,
        ),
        // [url=http://...]name[/url]
        array(
            'tag' => 'url',
            'protocols' => array('http', 'https', 'rtsp'),
            'embeddedUrl' => true,
            'hasEqualSign' => true,
        ),



but not working.

Jeet Chowdhury

#7
ok can anyone help me to create a redirector.php file. support if i give a link though this file like this,

redirect.php?rtsp://blabla.com/abc.sdp

then in the page there will be a link where if someone click he will goto that rtsp link.


i made one

<?php
$url 
$_REQUEST['url'];
header("Location: {$url}");
exit();
?>



but i want to put this code in a link when people click the link this will open.

Joker™

Try these edits (make backup of files before editing them)

Go to

Sources\Subs-Post.php

Find:
// [url]http://...[/url]
array(
'tag' => 'url',
'protocols' => array('http', 'https'),
'embeddedUrl' => true,
'hasEqualSign' => false,
),
// [url=http://...]name[/url]
array(
'tag' => 'url',
'protocols' => array('http', 'https'),
'embeddedUrl' => true,
'hasEqualSign' => true,
),
// [iurl]http://...[/iurl]
array(
'tag' => 'iurl',
'protocols' => array('http', 'https'),
'embeddedUrl' => true,
'hasEqualSign' => false,
),
// [iurl=http://...]name[/iurl]
array(
'tag' => 'iurl',
'protocols' => array('http', 'https'),
'embeddedUrl' => true,
'hasEqualSign' => true,
),


Replace it with:
// [url]http://...[/url]
array(
'tag' => 'url',
'protocols' => array('http', 'https', 'rtsp'),
'embeddedUrl' => true,
'hasEqualSign' => false,
),
// [url=http://...]name[/url]
array(
'tag' => 'url',
'protocols' => array('http', 'https', 'rtsp'),
'embeddedUrl' => true,
'hasEqualSign' => true,
),
// [iurl]http://...[/iurl]
array(
'tag' => 'iurl',
'protocols' => array('http', 'https', 'rtsp'),
'embeddedUrl' => true,
'hasEqualSign' => false,
),
// [iurl=http://...]name[/iurl]
array(
'tag' => 'iurl',
'protocols' => array('http', 'https', 'rtsp'),
'embeddedUrl' => true,
'hasEqualSign' => true,
),



Sources\Post.php

Find:
if (is_string($result = preg_replace(array(
'~(?<=[\s>\.(;\'"]|^)((?:http|https)://[\w\-_%@:|]+(?:\.[\w\-_%]+)*(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i',
'~(?<=[\s>\.(;\'"]|^)((?:ftp|ftps)://[\w\-_%@:|]+(?:\.[\w\-_%]+)*(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i',
'~(?<=[\s>(\'<]|^)(www(?:\.[\w\-_]+)+(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i'
),


Replace it with:
// Only do this if the preg survives.
if (is_string($result = preg_replace(array(
'~(?<=[\s>\.(;\'"]|^)((?:http|https|rtsp)://[\w\-_%@:|]+(?:\.[\w\-_%]+)*(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i',
'~(?<=[\s>\.(;\'"]|^)((?:ftp|ftps)://[\w\-_%@:|]+(?:\.[\w\-_%]+)*(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i',
'~(?<=[\s>(\'<]|^)(www(?:\.[\w\-_]+)+(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i'
),
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Advertisement: