Bravo List
Register
Go Back   > Bravo List > P2P > Forum > Community Cafe
Reply
  #11  
Old 11th July 2014, 18:37
mpx mpx is offline
Senior Member
 
Join Date: Jun 2009
P2P
Posts: 39
Default
Quote:
Originally Posted by xrol View Post
Can anyone help me add [youtube=link] tag?
And why the imdb mode dosent work on any version?
i try this youtube codes:

PHP Code:
 $s preg_replace("/\[video=[^\s'\"<>]*youtube.com.*v=([^\s'\"<>]+)\]/ims""<object         width=\"500\"         height=\"410\"><param name=\"movie\" value=\"http://www.youtube.com/v/\\1\"></param><embed         src=\"http://www.youtube.com/v/\\1\" type=\"application/x-shockwave-flash\" width=\"425\"         height=\"355\"></embed></object>"$s);
 
$s preg_replace("/\[youtube\]http:\/\/www\.youtube\.com\/watch\?v=((\s|.)+?)\[\/youtube\]/i""<object width=\"480\" height=\"300\"><param name=\"movie\" value=\"http://www.youtube.com/v/\\1&hl=en&fs=1\"></param> <param name=\"allowFullScreen\" value=\"true\"></param><param name= \"allowscriptaccess\" value=\"always\"></param><embed src=\"http://www.youtube.com/v/\\1&hl=en&fs=1\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"480\" height=\"300\"></embed></object>"$s);

 
$s preg_replace("/\[youtube\]http:\/\/www\.youtube\.com\/watch\?v=((\s|.)+?)\[\/youtube\]/i""<iframe width=\"640\" height=\"360\" src=\"//www.youtube.com/embed/\\1?rel=0\" frameborder=\"0\" allowfullscreen></iframe>"$s); 
but none of them doesnt work
Reply With Quote
  #12  
Old 11th July 2014, 20:16
firefly007's Avatar
firefly007 firefly007 is offline
SUPPORT GURU
 
Join Date: Jun 2010
P2P
Posts: 721
Default
Code:
$s = preg_replace("/\[video=\bhttps?:\/\/www\.youtube\.com\/watch\?v=([\w\d]+?)\]/i","<iframe width=" . "\"420\" " . "height=\"315\"" . "src=\"http://www.youtube.com/embed/" . "\\1\"" . "frameborder=\"0\"" . "allowfullscreen>" . "</iframe>", $s);
Usage

[video=https://www.youtube.com/watch?v=IfR_DOb1TLI]
__________________




Please Support Majority Report


You can contact me on Skype live:phesadent.elect but please let me know first.


If you are ever need me desperately then please email me at dan.oak44@gmail.com and I will contact u within a week.


Due to free time I'm able to help interested member's with their tracker.

Please Note!
Depending on your requests I will charge you for my assistance for Tracker installs and mods.
All my mods are custom and prices will very depending on the request.
I'm able to install any tracker and mods including themes.

Please PM me

Reply With Quote
  #13  
Old 12th July 2014, 17:58
mpx mpx is offline
Senior Member
 
Join Date: Jun 2009
P2P
Posts: 39
Default
Quote:
Originally Posted by firefly007 View Post
Code:
$s = preg_replace("/\[video=\bhttps?:\/\/www\.youtube\.com\/watch\?v=([\w\d]+?)\]/i","<iframe width=" . "\"420\" " . "height=\"315\"" . "src=\"http://www.youtube.com/embed/" . "\\1\"" . "frameborder=\"0\"" . "allowfullscreen>" . "</iframe>", $s);
Usage

[video=https://www.youtube.com/watch?v=IfR_DOb1TLI]
Hi,

doesnt work

Click the image to open in full size.
Reply With Quote
  #14  
Old 12th July 2014, 18:16
DND DND is offline
VIP
 
Join Date: Dec 2008
Posts: 1,241
Default
did u tried to use http instead of https for youtube?

or use this

Code:
            $s = preg_replace("/\[video=[^\s'\"<>]*youtube.com.*v=([^\s'\"<>]+)\]/ims", "<object width=\"500\" height=\"410\"><param name=\"movie\" value=\"http://www.youtube.com/v/\\1\"></param><embed src=\"http://www.youtube.com/v/\\1\" type=\"application/x-shockwave-flash\" width=\"500\" height=\"410\"></embed></object>", $s);
__________________
Need HELP!? I can install:

  1. Server/VPS (Debian,CentOS,Ubuntu,Fedora, FreeBSD) Optimization and ... + Modules
  2. Webserver Windows/Linux (Apache/Lighttpd/Nginx/Mysql/PhpMyAdmin/SSL) Optimization and ... + Modules
  3. Seedbox Windows/Linux (uTorrent,rTorrent,libTorrent,ruTorrent) + Modules
  4. Multiple source code engines
  5. Linux Server Administration (security, cryptography/encryption, proxy, load balancer, custom ddos firewall)
Reply With Quote
  #15  
Old 12th July 2014, 19:08
mpx mpx is offline
Senior Member
 
Join Date: Jun 2009
P2P
Posts: 39
Default
i try http and https

Click the image to open in full size.

@DND slso your code doesnt work (look screen)

Bump: I finally managed to solve the problem

Solution
Functions.php - find this:
Code:
function format_urls($text, $newWindow = false) {
	return preg_replace("/((https?|ftp|gopher|news|telnet|mms|rtsp):\/\/[^()\[\]<>\s]+)/ei",
	"formatUrl('\\1', ".($newWindow==true ? 1 : 0).", '', 'faqlink')", $text);
I changed this code in
Code:
function format_urls($s)
{
        return preg_replace(
            "/(\A|[^=\]'\"a-zA-Z0-9])((http|ftp|https|ftps|irc):\/\/[^()<>\s]+)/i",
            "\\1<a target=_blank href=\"http://anonym.to?\\2\">\\2</a>", $s);
}
And then I add this youtube BB code:
Example: [video=https://www.youtube.com/watch?v=njU1O1jCTHY]
Code:
	$s = preg_replace("/\[video=[^\s'\"<>]*youtube.com.*v=([^\s'\"<>]+)\]/ims", "<object width=\"640\" height=\"480\"><param name=\"movie\" value=\"http://www.youtube.com/v/\\1\"></param><embed src=\"http://www.youtube.com/v/\\1\" type=\"application/x-shockwave-flash\" width=\"640\" height=\"480\"></embed></object>", $s);
I hope that someone will help if they have similar problems
Reply With Quote
The Following 2 Users Say Thank You to mpx For This Useful Post:
Johnny Utah (28th January 2016), nicukent (27th January 2016)
  #16  
Old 29th March 2019, 12:16
batuo76 batuo76 is offline
Senior Member
 
Join Date: Aug 2012
Austria
Posts: 30
Default
Please help!
I want to ask why when I try to log in nexusphp, give me that error: Error Errno 0 SQL.
This is on my localhost.
Reply With Quote
The Following User Says Thank You to batuo76 For This Useful Post:
dariusrz (9th October 2020)
Reply

Tags
15 , beta , code , nexusphp

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 14:53. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.