Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9083457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T20:46:52+00:00 2026-06-16T20:46:52+00:00

I have this big code: function _buildPlaylist() { //console.log(‘_buildPlaylist’); _lastThumbOrientation=null;//important, make thumb holder every

  • 0

I have this big code:

function _buildPlaylist() {
        //console.log('_buildPlaylist');

        _lastThumbOrientation=null;//important, make thumb holder every time on new playlist
        _playlistOpened=false;//reset for bottom this._autoOpenPlaylist selection

        var len = _videoProcessData.length, i = 0, thumb, div, _item, active_icon;
        //console.log('len = ', len);

        if(getDeeplinkData){
            dlink = baseURL + strict + firstLevel + '/';
            var str_to_filter, tempArr = categoryArr[activeCategory].mediaName;
        }

        for (i; i < len; i++) {
            //console.log(_item.description);

            _item = _videoProcessData[i];

            //deeplinks
            if(useDeeplink && getDeeplinkData){
                str_to_filter = filterAllowedChars(_item.deeplink);
                //console.log(str_to_filter);
                tempArr.push(str_to_filter);
            }

            playlistLength+=1;

            if(outputDeeplinkData){
                if(_item.type == 'local'){//aspect ratio always present
                    if(mp4Support){
                        loc_path = _item.mp4Path;
                    }else if(vorbisSupport){
                        loc_path = _item.ogvPath;
                    }else if(webmSupport){
                        if(_item.webmPath)loc_path = _item.webmPath;
                    }
                    if(loc_path.lastIndexOf('/')){
                        loc_name = loc_path.substr(loc_path.lastIndexOf('/')+1);
                    }else{
                        loc_name = loc_path;
                    }
                    deeplinkData.push({'id': playlistLength, 'name': loc_name, 'type':_item.type ,'video-id': loc_path, 'deeplink': dlink+_item.deeplink});
                }else{
                    deeplinkData.push({'id': playlistLength, 'name': _item.title?_item.title:'', 'type':_item.type ,'video-id': _item.id, 'deeplink': dlink+_item.deeplink});
                }
            }

            div = $('<div/>').addClass('thumbs').attr({'data-id': playlistLength-1, 'data-type': _item.type});
            if(thumbHolder)div.appendTo(thumbInnerContainer).bind('click', clickPlaylistItem);

            if(_item.type == 'local'){//aspect ratio always present
                div.attr({'mp4Path': _item.mp4Path, 'ogvPath': _item.ogvPath, 'webmPath': _item.webmPath?_item.webmPath:'', 'imagePath': _item.imagePath, 'data-aspectRatio': _item.aspectRatio});
            }else{
                div.attr('path', _item.id);
                if(currentObj.ytSizeSet){//if we have width and height, aspect ratio always present
                    div.attr({'data-width': currentObj.mediaWidth, 'data-height': currentObj.mediaHeight, 'data-aspectRatio': currentObj.aspectRatio});
                }
            }

            if(thumbHolder){
                //create thumb
                if(_item.thumbnail){
                    thumb=$(new Image()).addClass('thumb_img').appendTo(div).attr('alt', _item.title?_item.title:'').css({
                       cursor:'pointer',
                       opacity:0
                    }).load(function() {
                        //console.log($(this))
                        $(this).stop().animate({ 'opacity':1}, {duration: 500, easing: 'easeOutSine'});//fade in thumb
                    }).error(function(e) {
                        //console.log("thumb error " + e);
                    }).attr('src', _item.thumbnail);
                }

                //active icon
                active_icon = $(new Image()).appendTo(div).css({
                    position: 'absolute',
                    display: 'none'
                }).load(function() {
                    //console.log(width,height);
                    $(this).css({
                        width: this.width,
                        height: this.height,
                        left: 50+'%',
                        top: 50+'%',
                        marginLeft: -this.width/2+'px',
                        marginTop: -this.height/2+'px'
                    })
                }).error(function(e) {
                    //console.log("error " + e);
                }).attr('src', ic_active_thumb);

                div.data('active_icon',active_icon);
            }

            _thumbHolderArr.push(div);//we need to have data to manipulate
        }

        checkPlaylistProcess();
    }

(It’s a youtube api javascript code.
what it does is generate thumbnails with alt attribute title of the video .

What I want is to be generated only the title of the videos. without thumbnails.

The code produces the following html (with thumbnails)

<div class="thumbInnerContainer" style="top: 0px; left: 0px; width: 3500px;">

<div class="thumbs playlistSelected" data-id="0" data-type="youtube" path="tRe8JfAQmpI" data-width="640" data-height="360" data-aspectratio="2"><img class="thumb_img" alt="Accelerator after effects project file" style="cursor: pointer; opacity: 1;" src="http://i.ytimg.com/vi/tRe8JfAQmpI/hqdefault.jpg"><img style="position: absolute; display: block; width: 37px; height: 37px; left: 50%; top: 50%; margin-left: -18.5px; margin-top: -18.5px;" src="data/icons/active_item.png">
</div>
<div class="thumbs" data-id="1" data-type="youtube" path="QeusWQ4LFmY" data-width="640" data-height="360" data-aspectratio="2"><img class="thumb_img" alt="After Effects Template Platform" style="cursor: pointer; opacity: 1;" src="http://i.ytimg.com/vi/QeusWQ4LFmY/hqdefault.jpg"><img style="position: absolute; display: none; width: 37px; height: 37px; left: 50%; top: 50%; margin-left: -18.5px; margin-top: -18.5px;" src="data/icons/active_item.png">
</div> 
<div class="thumbs" data-id="2" data-type="youtube" path="srGUFQwONXc" data-width="640" data-height="360" data-aspectratio="2"><img class="thumb_img" alt="Photo Album - After Effects Template" style="cursor: pointer; opacity: 1;" src="http://i.ytimg.com/vi/srGUFQwONXc/hqdefault.jpg"><img style="position: absolute; display: none; width: 37px; height: 37px; left: 50%; top: 50%; margin-left: -18.5px; margin-top: -18.5px;" src="data/icons/active_item.png">
</div>
</div>

Now, this is what I want to generate. (image alt Title attr Only, without thumbnails.)

<div class="thumbInnerContainer" style="top: 0px; left: 0px; width: 3500px;">

<div class="thumbs playlistSelected" data-id="0" data-type="youtube" path="tRe8JfAQmpI" data-width="640" data-height="360" data-aspectratio="2">
  Accelerator after effects project file
</div>
<div class="thumbs" data-id="1" data-type="youtube" path="QeusWQ4LFmY" data-width="640" data-height="360" data-aspectratio="2">
   After Effects Template Platform 
</div>
<div class="thumbs" data-id="2" data-type="youtube" path="srGUFQwONXc" data-width="640" data-height="360" data-aspectratio="2">
    Photo Album - After Effects Template
</div>
</div>

Note: Find these lines to see how it is generating the html

//create thumb
                if(_item.thumbnail){
                    thumb=$(new Image()).addClass('thumb_img').appendTo(div).attr('alt', _item.title?_item.title:'').css({
                       cursor:'pointer',
                       opacity:0
                    }).load(function() {
                        //console.log($(this))
                        $(this).stop().animate({ 'opacity':1}, {duration: 500, easing: 'easeOutSine'});//fade in thumb
                    }).error(function(e) {
                        //console.log("thumb error " + e);
                    }).attr('src', _item.thumbnail);
                }

How can I change to generate titles only, without thumbnails.?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T20:46:53+00:00Added an answer on June 16, 2026 at 8:46 pm

    You need to modify this line.

    div = $('<div/>').text(_item.title ? _item.title : '')....  
    

    And drop all of the if clause below which is generating two <img/> elements and appending them to the newly created <div/> element in div. Since you don’t want it then you can just drop all of it.

    if (thumbHolder) {
      ...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this big function (1300+ lines of code) that takes data from the
So i have this big code ( so wont be able to put the
I have this code on alot of functions for my web app function ui_editlocation(id){
I have this javascript code: function newsOverview() { $(.list-news li:gt(3)).hide(); $(.box-news .btn-1).on('click', function(e){ e.preventDefault;
I have this code here that should send off an alert... jQuery(.wpcart_gallery .thickbox).click(function($){ alert('hi');
I have this big code where I want 3 things in my search: 1-
Say i have this code to separate routes in expressjs: module.exports = function(express,app,client) {
So far i have this code: function changeGeoLoc($a,$b,$c){ echo <ul style='list-style-type: none; display:inline;'>; while(list(,$geoloc)
I am using this article of architecture http://blog.extjs.eu/know-how/writing-a-big-application-in-ext/ in my code: I have this
I am using this article of architecture http://blog.extjs.eu/know-how/writing-a-big-application-in-ext/ I have this one function where

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.