форум vBSupport.ru > vBulletin > vBulletin 4.0.x-4.1.х > Хаки, моды и скрипты 4.0.x-4.1.х
Register Меню vBsupport Изображения Files Manager О рекламе Today's Posts Search
  • Родная гавань
  • Блок РКН снят
  • Premoderation
  • For English speaking users
  • Каталог Фрилансеров
  • If you want to buy some product or script
  • Администраторам
VBsupport перешел с домена .ORG на родной .RU Ура! Пожалуйста, обновите свои закладки - VBsupport.ru
Блок РКН снят, форум доступен на всей территории России, включая новые терртории, без VPN
На форуме введена премодерация ВСЕХ новых пользователей

Почта с временных сервисов, типа mailinator.com, gawab.com и/или прочих, которые предоставляют временный почтовый ящик без регистрации и/или почтовый ящик для рассылки спама, отслеживается и блокируется, а так же заносится в спам-блок форума, аккаунты удаляются
for English speaking users:
You may be surprised with restriction of access to the attachments of the forum. The reason is the recent change in vbsupport.org strategy:

- users with reputation < 10 belong to "simple_users" users' group
- if your reputation > 10 then administrator (kerk, Luvilla) can decide to move you into an "improved" group, but only manually

Main idea is to increase motivation of community members to share their ideas and willingness to support to each other. You may write an article for the subject where you are good enough, you may answer questions, you may share vbulletin.com/org content with vbsupport.org users, receiving "thanks" equal your reputation points. We should not only consume, we should produce something.

- you may:
* increase your reputation (doing something useful for another members of community) and being improved
* purchase temporary access to the improved category:
10 $ for 3 months. - this group can download attachments, reputation/posts do not matter.
20 $ for 3 months. - this group can download attachments, reputation/posts do not matter + adds eliminated + Inbox capacity increased + files manager increased permissions.

Please contact kerk or Luvilla regarding payments.

Important!:
- if your reputation will become less then 0, you will be moved into "simple_users" users' group automatically.*
*for temporary groups (pre-paid for 3 months) reputation/posts do not matter.
Уважаемые пользователи!

На форуме открыт новый раздел "Каталог фрилансеров"

и отдельный раздел для платных заказов "Куплю/Закажу"

Если вы хотите приобрести какой то скрипт/продукт/хак из каталогов перечисленных ниже:
Каталог модулей/хаков
Ещё раз обращаем Ваше внимание: всё, что Вы скачиваете и устанавливаете на свой форум, Вы устанавливаете исключительно на свой страх и риск.
Сообщество vBSupport'а физически не в состоянии проверять все стили, хаки и нули, выкладываемые пользователями.
Помните: безопасность Вашего проекта - Ваша забота.
Убедительная просьба: при обнаружении уязвимостей или сомнительных кодов обязательно отписывайтесь в теме хака/стиля
Спасибо за понимание
 
 
 
 
BlackCatReal
Продвинутый
Lightbulb Auto Youtube Link-Converter
2

http://www.vbulletin.org/forum/showthread.php?t=261296

So basically this is a total easy-to-implement plugin, which converts standard youtube links to video-embeds on the fly without urging users to use the video-button because I think it is unnecessary.

On post display, the plugin checks if the post contains at least 1 youtube link in the form of
and converts them using the default vB video bbcode parser.

Code:
<a href="http://www.youtube.com/watch?v=somecode&some=params">http://www.youtube.com/watch?v=somecode&some=params</a>
Code can be modified to fit your needs, altough there shouldn't be much to add.
If you're the special performance-freak, I'm curious if you can enhance data/query-performance. So let me know if you do.

INSTALL:

- Download attached XML File and import it as an addon.

Code:
Changes since 1.3:
- Now works properly on iPad

Changes since 1.2:
- Supports mobile devices with fallback-display if browser doesn't support flash/embed codes
- Allows the user to specify the above mentioned replacement code for mobile browsers
- Minor improvements & Fixes

Changes since 1.1:
- Moved regular expression and index position into admincp settings to allow easier changing in the future
- supports new youtube link format: "http://youtu.be/*somevideocode*"

Changes since 1.0: (or: why should I download that mod again?)
- Added Link parsing in post-preview mode and in post reviewbits (the latest posts you see under the new reply form)
Now every post containing youtube-links should display the embedded video instead.
Works with any number of youtube-links and any kind of text surrounding them.

Let me know if you have trouble/questions.
Attached Files
File Type: xml product-autoytparser_1_1.xml (2.7 KB, 1 views)
File Type: xml product-autoytparser_1_2.xml (4.3 KB, 0 views)
File Type: xml product-autoytparser_1_3.xml (7.8 KB, 0 views)
File Type: xml product-autoytparser_1_4.xml (7.8 KB, 15 views)
Bot
Yandex Bot Yandex Bot is online now
 
Join Date: 05.05.2005
Реклама на форуме А что у нас тут интересного? =)
 
 
Luvilla
Гость
Default

Забавная ситуация... разработчики добавили штатный ББкод для вставки видео - нет, всё равно не то
лениво юзерам тыкать в кнопачки, надо, чтобы сразу, рррраз - ссылку кинул и всё
и ведь даже не сформулируешь "лениво нашим юзерам" - хаки-то не нашенские

Ещё один вариант Auto youtube player - проще, чем первый, без настроек, без определения мобильных
оба хака не парсят ссылки вида _http://www.youtube.com/watch?feature=player_embedded&v=5xw3QZ1r_NE
этот не обрабатывает и короткие ссылки вида _http://youtu.be/5xw3QZ1r_NE

тема на орге: http://www.vbulletin.org/forum/showthread.php?t=283432

Quote:
this is a very small mod converting any youtube url inside the post to live show embed player

its support all youtube servers and the new sharing link

how to install :

just upload the XML product from admin panel that's it

enjoy
Attached Files
File Type: zip product-youtubeplayer.zip (1.1 KB, 10 views)
 
 
fragov
Специалист
 
fragov's Avatar
Default
0

Проблема этих хаков в том, что они обрабатывают пост при отображении, а не при сохранении. Тоесть каждый раз, когда пост обрабатывается, обрабатывается и ссылка.
Я давно ищу хак, которые бы изменял ссылку на BB-code при отправке поста. Это бы решило проблему.
 
 
mikesmith
Простоузер
Default
0

Можно просто переписать парсер:

PHP Code:

function replaceLinkToIframe($text$width 480$height 390)
{
    
$text preg_replace('~
        # Match non-linked youtube URL in the wild. (Rev:20111012)
        https?://         # Required scheme. Either http or https.
        (?:[0-9A-Z-]+\.)? # Optional subdomain.
        (?:               # Group host alternatives.
        youtu\.be/      # Either youtu.be,
        | youtube\.com    # or youtube.com followed by
        \S*             # Allow anything up to VIDEO_ID,
        [^\w\-\s]       # but char before ID is non-ID char.
        )                 # End host alternatives.
        ([\w\-]{11})      # $1: VIDEO_ID is exactly 11 chars.
        (?=[^\w\-]|$)     # Assert next char is non-ID or EOS.
        (?!               # Assert URL is not pre-linked.
        [?=&+%\w]*      # Allow URL (query) remainder.
        (?:             # Group pre-linked alternatives.
        [\'"][^<>]*>  # Either inside a start tag,
        | </a>          # or inside <a> element text contents.
            )               # End recognized pre-linked alts.
            )                 # End negative lookahead assertion.
            [?=&+%\w-]*        # Consume any URL (query) remainder.
            ~ix'
,
        
'<a href="$0">watch video</a><div class="video-youtube" style="display:none"><iframe width="' $width .'" height="' $height .'" src="http://www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe></div>',
        
$text);
    return 
$text;

 
 
Catlord Meow
Специалист
 
Catlord Meow's Avatar
Default
0

Quote:
Originally Posted by fragov View Post
Проблема этих хаков в том, что они обрабатывают пост при отображении, а не при сохранении. Тоесть каждый раз, когда пост обрабатывается, обрабатывается и ссылка.
Я давно ищу хак, которые бы изменял ссылку на BB-code при отправке поста. Это бы решило проблему.
Если кому-то это ещё актуально, то есть такой хак:
http://vbsupport.ru/forum/showthread.php?t=52501

Last edited by Catlord Meow : 08-10-2016 at 07:22 PM. Reason: подпись
 


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




All times are GMT +4. The time now is 03:44 PM.


Powered by vBulletin® Version 3.0.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.