vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   vBulletin CMS Widgets - Youtube Videos Search Box (Widget) (https://vborg.vbsupport.ru/showthread.php?t=232875)

Ken Sanders 06-15-2010 12:20 AM

Nice mod, thanks!

Theater 06-15-2010 03:24 AM

1 Attachment(s)
I got this to work on the Forum Blocks thanks to simonhind who posted up a block template on another thread, and of course to the developer of this one for his code.

First create a block template:

1. Go to Admin CP > Styles & Templates > Style Manager > Add New Template

2. Name your template whatever you want. I named mine "youtube_search" -- just remember what you called it.

3. Paste in the following code into the template:

Code:

<li>
<div class="block smaller">
<div class="blocksubhead">
<a class="collapse" id="collapse_block_title" href="#top"><img alt="" src="{vb:stylevar imgdir_button}/collapse_40b.png" id="collapseimg_title"/></a>
<span class="blocktitle"><img src="{vb:stylevar imgdir_cms}/widget-forum.png" title="{vb:raw blockinfo.title}" alt="" />&nbsp;{vb:raw blockinfo.title}</span>
</div>
<div id="block_title" class="blockbody floatcontainer">
<div class="blockrow">{vb:raw content}</div>
</div>
</div>
<div class="underblock"></div>
</li>

Now create your Forum Block:

1. Go to Admin CP > Forums & Moderators > Forum Blocks Manager > Add Block > Select Block Type > Custom HTML/PHP

2. Give your Forum Block a name like "YouTube Search" for example, a short description if you wish, and for Content Type select HTML.

3. Paste in the follow code in the big Content box underneath:

Code:

<center>
<img src="[Replace This Image Path]/youtube.gif" height="66" width="150"><br />
<br />
<form id="vb_yt_search-form" action="http://www.youtube.com/results" method="get" target="_blank">
<input id="vb_yt_search-term" name="search_query" type="text" maxlength="128" />
<select id="vb_yt_searcg-type" name="search_type">
<option value="">Videos</option>
<option value="search_users">Channels</option>
</select>
<input type="submit" value="Search" />
</form></center>

4. Important - Make sure for "Template to Use" that you put in the name of that template you created above. For example: youtube_search

That should do the trick. I'm not a coder, but I figure I'd share my results in case it helps someone else. I have attached the YouTube logo I'm using which is a transparent GIF which should work on most light themed forums.

https://vborg.vbsupport.ru/

goran424 07-28-2010 03:50 PM

Quote:

Originally Posted by Theater (Post 2053831)
I got this to work on the Forum Blocks thanks to simonhind who posted up a block template on another thread, and of course to the developer of this one for his code.

First create a block template:

1. Go to Admin CP > Styles & Templates > Style Manager > Add New Template

2. Name your template whatever you want. I named mine "youtube_search" -- just remember what you called it.

3. Paste in the following code into the template:

Code:

<li>
<div class="block smaller">
<div class="blocksubhead">
<a class="collapse" id="collapse_block_title" href="#top"><img alt="" src="{vb:stylevar imgdir_button}/collapse_40b.png" id="collapseimg_title"/></a>
<span class="blocktitle"><img src="{vb:stylevar imgdir_cms}/widget-forum.png" title="{vb:raw blockinfo.title}" alt="" />&nbsp;{vb:raw blockinfo.title}</span>
</div>
<div id="block_title" class="blockbody floatcontainer">
<div class="blockrow">{vb:raw content}</div>
</div>
</div>
<div class="underblock"></div>
</li>

Now create your Forum Block:

1. Go to Admin CP > Forums & Moderators > Forum Blocks Manager > Add Block > Select Block Type > Custom HTML/PHP

2. Give your Forum Block a name like "YouTube Search" for example, a short description if you wish, and for Content Type select HTML.

3. Paste in the follow code in the big Content box underneath:

Code:

<center>
<img src="[Replace This Image Path]/youtube.gif" height="66" width="150"><br />
<br />
<form id="vb_yt_search-form" action="http://www.youtube.com/results" method="get" target="_blank">
<input id="vb_yt_search-term" name="search_query" type="text" maxlength="128" />
<select id="vb_yt_searcg-type" name="search_type">
<option value="">Videos</option>
<option value="search_users">Channels</option>
</select>
<input type="submit" value="Search" />
</form></center>

4. Important - Make sure for "Template to Use" that you put in the name of that template you created above. For example: youtube_search

That should do the trick. I'm not a coder, but I figure I'd share my results in case it helps someone else. I have attached the YouTube logo I'm using which is a transparent GIF which should work on most light themed forums.

http://img443.imageshack.us/img443/3860/youtubel.gif

Thanks for your help, works great.

ShadowStalker 01-14-2011 02:25 PM

Thanks a lot

oldfan 04-08-2023 12:16 AM

dont work on 4.2.5.php 7.2


All times are GMT. The time now is 06:15 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01161 seconds
  • Memory Usage 1,741KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete