[ Video Sharing CMS v4 ] A few issues with PHPVibe

Started by Hersh,

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

HershTopic starter

I've got a number of questions I would really like to have addressed:

1. Why do many of the video players restart video playback when the video finishes playing? Why won't it just stop? The included JWPlayer 6.8 doesn't do this but when I upgraded it to a newer version, it started doing it also. I would like to know what I need to change in the code to make it compatible.

2. Why are the descriptions of videos imported from YouTube truncated? Why does it not get the whole thing? And why does it not maintain the original formatting? What can I do to fix this?

3. What do I need to do to remove the SEF rewriting in the URL? (easier to ask) I would rather just have the number and nothing else there. This helps prevent duplicate URLs, among other things. But it would be even better to use hex/base64 type characters like YouTube. Example: http://kvz.io/blog/2009/06/10/create-short-ids-with-php-like-youtube-or-tinyurl/


That said, I have made a number of improvements and bug fixes to the script which I will be sharing with the community soon.
  •  

HershTopic starter

Also, is there any reason why the "og:image" property calls for mqdefault.jpg instead of hqdefault.jpg?

I would like to change this as well, unless there is a good reason for it.
  •  

PHPClient

Hersh,

To answer your #1

Find in lib/class.providers.php line

repeat: "always",


Delete this.  It'll be found around line 259
  •  

HershTopic starter

That worked. Thanks!


I guess for #3, I'll have to edit every instance of this:
.video_url($video->id , $video->title)


Would have been nicer if there were a single global variable I could modify instead.
  •  

Marius P.

Hi,

1. Because I've been asked for this since day one. class.providers.php keeps for every player embed function a repeat tag, can be set to false/removed. I'll code it into options on 4.0's admin panel.
2. I'll look at it, the antixss class must have something to do with this. I've actually modified a few in this area on 4.0 already. Avoiding using toDb() and using $db->escape() may work better, also wrapping it in nl2br() function.
3. In lib/functions.php



// SEO Func support
function video_url($id, $title, $list=null){
...
}



to


// SEO Func support
function video_url($id, $title = null, $list=null){
if(is_null($list)){
return site_url().video.url_split.$id.'/';
}

//else keep the list
return site_url().video.url_split.$id.'/&list='.$list;
}



One place, one edit :)
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

HershTopic starter

Ah, great! I don't know why I didn't think to look at the function instead.

Thanks @Mario.

A few more things though:

1. The description truncation only occurs when using the mass importer, which relies on class.youtube.php. When I do it from the front by pasting the URL, the complete description appears. It comes with standard text spacing so for the most part, the formatting is imported correctly into the db, but the only way you can see the formatting correctly now is if you display it within a
 container. 
E.g.:
>

2. Is there any reason why the "og:image" property calls for mqdefault.jpg instead of hqdefault.jpg? I'd like to change this, please let me know.


3. The autosuggest/autocomplete search from YouTube does not go away if you decide to cancel your search and click on an empty area. You have to click on a search term for it to go away. Please fix this.
  •  

Marius P.

1. I'll look into it, we're build an new mass-upgrade http://www.phpvibe.com/forum/phpvibe-announcements/phpvibe-4-0-ultra-is-'in-the-lab'/
2. See this http://www.phpvibe.com/forum/troubleshooting-issues/facebook-thumbs!/msg20561/#msg20561
3. It has an small closing icon on the top right.

You could drop this in a js:

$(document).click(function(event) { 
    if(!$(event.target).closest('#suggest-results').length) {
        if($('#suggest-results').is(":visible")) {
            $('#suggest-results').hide()
        }
    }        
})



Doc http://stackoverflow.com/questions/152975/how-to-detect-a-click-outside-an-element
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

HershTopic starter

Great. That worked. Thanks.

I see the close icon you are talking about but it is not obvious. It looked more like a button to remove that specific keyword from the results.

Here is everything I did to fix this in case anyone else wants to know:

In vibe.styles.css (line ~1324) adjust top and right values:
#suggest-results .rsg {
display:block;
position:absolute;
top:-30px;
right:-10px;
}


In phpvibe_app.js (line ~120):
$("#suggest-results").html(html).append("<a class='rsg' href='javascript:void(0)'><i class='icon-minus-sign'></a>").show();


Replace with:
$("#suggest-results").html(html).append("<a class='rsg' href='javascript:void(0)'><i class='icon-remove-sign'></a>").show();


In phpvibe_app.js (line ~110) add:
// Close search auto suggest when clicking outside the element
$(document).click(function(event) { 
    if(!$(event.target).closest('#suggest-results').length) {
        if($('#suggest-results').is(":visible")) {
            $('#suggest-results').hide()
        }
    }        
});
  •  

Similar topics (7)

Replies: 1
Views: 1572

Replies: 0
Views: 3322

Replies: 3
Views: 2201

Replies: 2
Views: 1841