vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Major Additions - Video-Directory (https://vborg.vbsupport.ru/showthread.php?t=192241)

Morrus 01-01-2009 06:50 PM

Quote:

Originally Posted by Jaxel (Post 1698673)
I said in a previous post that this customization will be coming in my next version in a few days.

Yes, but that was a few days ago! :D

Jaxel 01-01-2009 08:17 PM

Quote:

Originally Posted by Morrus (Post 1698704)
Yes, but that was a few days ago! :D

I said a WEEK a few days ago... a few days from now...

I'm waiting to figure out this ajax stuff before I release my new version. Does anyone know how this crap works?

ArnyVee 01-02-2009 12:28 AM

Take your time Jaxel, I think that the new layout and the TAG CLOUD (Woo hoo! :) ) will be worth the wait. :D

You are taking Survivor's awesome mod to the next level my friend! :up:

indie2industry 01-02-2009 03:46 AM

Quote:

Originally Posted by Jaxel (Post 1698754)
I said a WEEK a few days ago... a few days from now...

I'm waiting to figure out this ajax stuff before I release my new version. Does anyone know how this crap works?

http://www.sematopia.com/?p=34
http://www.w3schools.com/Ajax/Default.Asp

I don't know if this will be helpful or not but here you go :o

logoz2008 01-02-2009 08:59 AM

Can anyone add sub-categories feature to this???

indie2industry 01-02-2009 10:10 AM

Quote:

Originally Posted by logoz2008 (Post 1699120)
Can anyone add sub-categories feature to this???

Jaxel Hooked it up already here in this thread. Here's the post.

https://vborg.vbsupport.ru/showpost....&postcount=560


when you go to manage categories in the AdminCP, you'll see a new column named Display Order. You would use that to create sub-categories.
:up:

Jaxel 01-02-2009 12:30 PM

Okay... I'm having trouble getting some new data from the YouTube API... maybe someone can help me...

For adding new videos, I have two new fields
  • name/id = taglist (this is for adding tags)
  • name/id = timelength (this is for video duration)
And this is my YouTube.XML prepare_data function as it stands right now:
Code:

        function prepare_data()
        {
                if (!$this->verify_videoid())
                {
                        return false;
                }

                //Request Video Data
                $vurl = new vB_vURL($this->registry);
                $vurl->set_option(VURL_URL, 'http://gdata.youtube.com/feeds/api/videos/' . $this->video_id);
                $vurl->set_option(VURL_USERAGENT, 'vBulletin/' . FILE_VERSION . ' | Video Directory');
                $vurl->set_option(VURL_RETURNTRANSFER, 1);
                $vurl->set_option(VURL_TIMEOUT, 30);
                $result = $vurl->exec();

                if ($vurl->fetch_error())
                {
                        $this->set_error(VSS_ERROR_CONNECTION);
                        return false;
                }

                require_once(DIR . '/includes/class_xml.php');

                $xmlobj = new vB_XML_Parser($result);

                if(!$arr = $xmlobj->parse())
                {
                        $this->set_error(VSS_ERROR_RESPONSE);
                        return false;
                }

                if (isset($arr['yt:noembed']))
                {
                        $this->set_error(VSS_ERROR_NOEMBEDING);
                        return false;
                }

                $this->thumbnailpath = $arr['media:group']['media:thumbnail'][0]['url'];
                $this->videodescription = $arr['media:group']['media:description']['value'];
                $this->videotitle = $arr['media:group']['media:title']['value'];
                $this->taglist = $arr['media:group']['media:keywords']['value'];
                $this->timelength = $arr['media:group']['yt:duration']['seconds'];

                return true;
        }

And this is my vbulletin_ajax_videodirectory.js AJAX code as it stands right now:
Code:

function request_videoinfo()
{
        if (!fetch_object('videourl').value)
        {
                return false;
        }

        YAHOO.util.Connect.asyncRequest("POST", "video.php?do=videoinfo", {
                success: handel_videoinfo,
                failure: vBulletin_AJAX_Error_Handler,
                timeout: 15000
        }, SESSIONURL + 'securitytoken=' + SECURITYTOKEN + "&url=" + PHP.urlencode(fetch_object('videourl').value) + "&wysiwyg=" + vB_Editor[editor_id].wysiwyg_mode);

        fetch_object('videoajaxbutton').value = vbphrase['requesting_information_please_wait'];
        fetch_object('videoajaxbutton').disabled = true;

        return false;
}

function handel_videoinfo(ajax)
{
        if (ajax.responseXML)
        {
                // check for error first
                var error = ajax.responseXML.getElementsByTagName('error');
                if (error.length)
                {
                        fetch_object('thumbnail').setAttribute('src', '');
                        fetch_object('thumbnail_border').style.display = 'none';
                        alert(error[0].firstChild.nodeValue);
                }
                else
                {
                        try
                        {
                                var description = ajax.responseXML.getElementsByTagName('description')[0].firstChild.nodeValue;
                                vB_Editor[editor_id].insert_text(description);
                        }
                        catch (e)
                        {
                        }

                        try
                        {
                                var title = ajax.responseXML.getElementsByTagName('title')[0].firstChild.nodeValue;
                                fetch_object('videotitle').value = title;
                        }
                        catch (e)
                        {
                        }

                        try
                        {
                                var keywords = ajax.responseXML.getElementsByTagName('keywords')[0].firstChild.nodeValue;
                                fetch_object('taglist').value = keywords;
                        }
                        catch (e)
                        {
                        }

                        try
                        {
                                var duration = ajax.responseXML.getElementsByTagName('duration')[0].firstChild.nodeValue;
                                fetch_object('timelength').value = duration;
                        }
                        catch (e)
                        {
                        }

                        try
                        {
                                var videothumbnailpath = ajax.responseXML.getElementsByTagName('thumbnailpath')[0].firstChild.nodeValue;
                                fetch_object('thumbnail').setAttribute('src', videothumbnailpath);
                                fetch_object('thumbnail_border').style.display = '';
                        }
                        catch (e)
                        {
                        }
                }
        }
        fetch_object('videoajaxbutton').value = vbphrase['request_videoinfo_from_service'];
        fetch_object('videoajaxbutton').disabled = false;
}

Does anyone know why this isnt working? What am i missing?

jlew24asu 01-02-2009 01:31 PM

ok here is a dumb question. how do I add categories?

jlew24asu 01-02-2009 01:32 PM

does anyone have this on CMPS?

EWGF 01-02-2009 03:01 PM

Works perfectly with CMPS.

Categories can be added via the admin.


All times are GMT. The time now is 06:33 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.01732 seconds
  • Memory Usage 1,766KB
  • 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
  • (2)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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