vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Major Additions - 8WayRun.Com - Media Library (https://vborg.vbsupport.ru/showthread.php?t=240677)

Jaxel 05-16-2010 03:16 PM

Quote:

Originally Posted by Big-Pete (Post 2037911)
Love this mod, Just what I needed, Will be sending donation as this is superb!..

The only issue I have is with the CMS, If i use the BB code and place the media tag into an article in the cms i get a border appear around title in both the preview and the full page, how would i either adjust this border or remove it?? Any help will be greatly appreciated :)

bbcode is handled by the template: 8WR_media_bbcode

Feel free to edit it as you wish.

DragonByte Tech 05-16-2010 03:20 PM

Quote:

Originally Posted by Jaxel (Post 2037958)
I'm already using that...

Code:

if ($ajax)
{
        $message = convert_urlencoded_unicode($message);
}


You misunderstand, I meant in the JS file.

If you wrap PHP.urlencode() around
Code:

fetch_object('vB_Editor_QR_textarea').value
it will work, as the screenshots demonstrate.

I don't know what charset you use on your development board since you say it works for you without PHP.urlencode(), but French and Norwegian characters are included in the ISO-8859-1 encoding so they don't require UTF-8 to work.

Hope that helps :)


Fillip

DragonByte Tech 05-16-2010 03:29 PM

Quote:

Originally Posted by Jaxel (Post 2037958)
I also personally feel that using checks like "function_exists()" is a big mistake. I think a program should either DEGRADE gracefully and silently without the user knowing, or FAIL as loud as possible. If you start using "function_exists()", the program doesn't degrade as it should, it instead FAILS, but it doesn't tell anybody it fails; no one knows it failed until things just don't work as it should. Error messages are there for a reason, to inform you that there was an error.

No offence, but I must disagree quite strongly with this.

Wrapping function_exists() around your function declaration (which I have already empirically proven will cause errors in specific scenarios through no fault in anybody's code) simply means that if the function exists, the code will continue to work 100% as intended with no degradation or ill effects whatsoever.

The only specific scenario where having a re-declare message would be beneficial is if two mods attempted to use the same function name, which should never happen because all mods should name their functions in such a way that it's uniquely tied to their mod.

So yeah, I don't find a single reason why a function declaration that's happening in a place that may very well be executed multiple times should not be wrapped in function_exists().
Alternatively, it would be possible to put the function declaration in a file of its own, and then use require_once().
It'd have the same effect, more or less :)


Fillip

Jaxel 05-16-2010 04:03 PM

Quote:

Originally Posted by DragonByte Tech (Post 2037963)
You misunderstand, I meant in the JS file.

If you wrap PHP.urlencode() around
Code:

fetch_object('vB_Editor_QR_textarea').value
it will work, as the screenshots demonstrate.

I don't know what charset you use on your development board since you say it works for you without PHP.urlencode(), but French and Norwegian characters are included in the ISO-8859-1 encoding so they don't require UTF-8 to work.

Hope that helps :)


Fillip

I've found hundreds of websites all discussing the issue of urlencoding in JavaScript and how there is no real match to the PHP function. They all go into these long winded functions in order to fix the problem, talking about issues of escaping etc... and not ONE of them mentions this PHP.urlencode function. In fact, I can't even find any documentation on the internet that this function exists... which is bizarre, since it clearly works. PHP and JavaScript can't even be used at the same time because PHP is server side and JavaScript is client side. So in order for this function to work, it has to exist in JavaScript. So I guess my next question is, WHY? Why do none of these other articles mention this function? What is the downside? Is there a performance issue? Backwards compatibility? It seems like such a simple fix, while escape() just creates more problems...

BTW, I use UTF-8... and many of the people who've I've convinced to switch to UTF-8 have all reported to me that their forums are faster than ever... I just recently had shoryuken.com switch over and even their users are happy about it.

DragonByte Tech 05-16-2010 04:24 PM

Quote:

Originally Posted by Jaxel (Post 2037980)
I've found hundreds of websites all discussing the issue of urlencoding in JavaScript and how there is no real match to the PHP function. They all go into these long winded functions in order to fix the problem, talking about issues of escaping etc... and not ONE of them mentions this PHP.urlencode function. In fact, I can't even find any documentation on the internet that this function exists... which is bizarre, since it clearly works. PHP and JavaScript can't even be used at the same time because PHP is server side and JavaScript is client side. So in order for this function to work, it has to exist in JavaScript. So I guess my next question is, WHY? Why do none of these other articles mention this function? What is the downside? Is there a performance issue? Backwards compatibility? It seems like such a simple fix, while escape() just creates more problems...

It's a function vBulletin creates in their JS files, to solve just the problems you mention :)

There's no downsides that I'm aware of.

Quote:

Originally Posted by Jaxel (Post 2037980)
BTW, I use UTF-8... and many of the people who've I've convinced to switch to UTF-8 have all reported to me that their forums are faster than ever... I just recently had shoryuken.com switch over and even their users are happy about it.

vBulletin itself isn't 100% UTF-8 compatible, though.
I can't comment on speed increases, never tried it tbh.

At any rate, it shouldn't be necessary to make them switch when it can work via that simple function, no? :)


Fillip

Jaxel 05-16-2010 05:04 PM

Quote:

Originally Posted by DragonByte Tech (Post 2037996)
It's a function vBulletin creates in their JS files, to solve just the problems you mention :)

There's no downsides that I'm aware of.

vBulletin itself isn't 100% UTF-8 compatible, though.
I can't comment on speed increases, never tried it tbh.

At any rate, it shouldn't be necessary to make them switch when it can work via that simple function, no? :)


Fillip

Ah... well that explains it, thanks. As for UTF-8, there actually is a reason to use it with this mod. This mod pulls in XML data from external sources, and UTF-8 is the first and foremost supported character set for the XML standard. I guess I'll just set this mod to force UTF-8 on the XML queries, instead of pulling in vbulletin's charset.

DragonByte Tech 05-16-2010 05:21 PM

Quote:

Originally Posted by Jaxel (Post 2038021)
Ah... well that explains it, thanks.

No prob, glad to be of help :)

Quote:

Originally Posted by Jaxel (Post 2038021)
As for UTF-8, there actually is a reason to use it with this mod. This mod pulls in XML data from external sources, and UTF-8 is the first and foremost supported character set for the XML standard. I guess I'll just set this mod to force UTF-8 on the XML queries, instead of pulling in vbulletin's charset.

That makes sense I guess, though I believe (but I may very well be mistaken) that vBulletin's XML parser handles differences in encoding.

If only the entire interwebs ran off of utf-8...


Fillip

Big-Pete 05-16-2010 05:29 PM

Quote:

Originally Posted by Jaxel (Post 2037959)
bbcode is handled by the template: 8WR_media_bbcode

Feel free to edit it as you wish.

Ok Thanks, Being that i'm by no means a coder, how should I edit it though? All I see in the template are padding settings, Is that border supposed to be like that as Im getting the border in all styles, especially vb4's default..


PHP Code:

<div class="bbcode_container">
    <
div class="bbcode_quote">
        <
div class="quote_container" style="padding: 10px; text-align: center;">
            <
vb:if condition="$error">
                {
vb:var error}
            <
vb:else />
                <
div style="padding-bottom: 10px;"><b><a href="{vb:var media.href}">{vb:raw media.title}</a></b></div>
                {
vb:raw media.embed}
                <
div style="padding-top: 10px;"><a href="{vb:var media.href}">{vb:var media.href}</a></div>
            </
vb:if>
        </
div>
    </
div>
</
div 

>

Footman 05-16-2010 06:27 PM

Unfortunately I'm experiencing this error again, and I thought it was fixed a couple of days ago. When I click on the thumb to view the video all I get is the title and not the player. I do have the latest version uploaded, had this issue before and clicked the "Click here to restore all services in the "/media/xml" directory to their default settings." and it fixed it before. Now - nothing :(

I don't know where to start to figure it out. Any thoughts?

patrick91 05-16-2010 06:38 PM

have problems with it??

Quote:

Database error in vBulletin 4.0.3:

Invalid SQL:
INSERT INTO media_service
(svcName, svcRegex, svcURL, svcFeed, svcValue2, svcThumb, svcTitle, svcDesc, svcLength, svcTags, svcMovie, svcWidth, svcHeight)
VALUES
('YouTube', 'http:\\/\\/[a-z]*?[\\.]?youtube\\.[a-z]*?\\/watch\\?v=([\\w_-]*)', 'http://www.youtube.com/watch?v={serviceVAL}', 'http://gdata.youtube.com/feeds/api/videos/{serviceVAL}', 'null', '$arr[\'media:group\'][\'media:thumbnail\'][3][\'url\']', '$arr[\'media:group\'][\'media:title\'][\'value\']', '$arr[\'media:group\'][\'media:description\'][\'value\']', '$arr[\'media:group\'][\'yt:duration\'][\'seconds\']', '$arr[\'media:group\'][\'media:keywords\']', 'http://www.youtube.com/v/{serviceVAL}?autoplay={ap10}&hd=1&fs=1', 640, 385);

MySQL Error : Unknown column 'svcMovie' in 'field list'
Error Number : 1054
I installed it first time good but then had problem with the permissions i uninstalled it and now want try it again and get that #$@^$%#& error...:P i'm such a noob but sucks if you not know what to do?

Gr,

patrick

bart6767 05-16-2010 07:18 PM

Every time i turn this on my VCMS has a blank page ?

Is there a fix for this ?

Martyn1983 05-16-2010 08:50 PM

Quote:

Originally Posted by Footman (Post 2038059)
Unfortunately I'm experiencing this error again, and I thought it was fixed a couple of days ago. When I click on the thumb to view the video all I get is the title and not the player. I do have the latest version uploaded, had this issue before and clicked the "Click here to restore all services in the "/media/xml" directory to their default settings." and it fixed it before. Now - nothing :(

I don't know where to start to figure it out. Any thoughts?

I'm back to this as well. As per my earlier posts, I put up with the insulting and abrupt 'user error' post when I made a genuine mistake. But it seems there's something fundamentally wrong with this mod, as that's twice now without any intervention on my part that it's simply stopped working.

I did the upgrade the other day as requested, but now when I try and view a vid I'm getting the following all over again:

Not Found

The requested URL /fiat/upload/media/m1-starsailor-four-to-the-floor was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

It's interesting to note also that all the permissions in the ACP were reset.

Jaxel 05-16-2010 09:10 PM

Quote:

Originally Posted by Footman (Post 2038059)
Unfortunately I'm experiencing this error again, and I thought it was fixed a couple of days ago. When I click on the thumb to view the video all I get is the title and not the player. I do have the latest version uploaded, had this issue before and clicked the "Click here to restore all services in the "/media/xml" directory to their default settings." and it fixed it before. Now - nothing :(

I don't know where to start to figure it out. Any thoughts?

I can't duplicate this error... make sure you revert your templates.

Quote:

Originally Posted by patrick91 (Post 2038063)
have problems with it??



I installed it first time good but then had problem with the permissions i uninstalled it and now want try it again and get that #$@^$%#& error...:P i'm such a noob but sucks if you not know what to do?

Gr,

patrick

It looks like you are using a database backup? Install the mod, then load up your database backup, but DO NOT drop the tables first. 0.9 adds some new columns to the service table, and if you are dropping your tables before you import your backup, you will revert these new columns.

Quote:

Originally Posted by bart6767 (Post 2038080)
Every time i turn this on my VCMS has a blank page ?

Is there a fix for this ?

Turn off the media bbcode. Its conflicting with another mod.

Quote:

Originally Posted by Martyn1983 (Post 2038132)
I'm back to this as well. As per my earlier posts, I put up with the insulting and abrupt 'user error' post when I made a genuine mistake. But it seems there's something fundamentally wrong with this mod, as that's twice now without any intervention on my part that it's simply stopped working.

I did the upgrade the other day as requested, but now when I try and view a vid I'm getting the following all over again:

Not Found

The requested URL /fiat/upload/media/m1-starsailor-four-to-the-floor was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

It's interesting to note also that all the permissions in the ACP were reset.

Yes, permissions on the ACP get reset when you uninstall... I have no idea how to fix this. I've posted about it on the programming forum, but I haven't received a single response. As for the 404 error, you are trying to use htaccess redirect, but you dont have it. Turn off SEO slugging.

Martyn1983 05-16-2010 09:23 PM

All that's good and well, but the crux of the problem is that, once again, the mod has effectively turned itself off!

When I reinstalled I set up all the various usergroup permissions again. Everything was fine and dandy, and now it's not. And I've no idea why.

Footman 05-16-2010 09:42 PM

Quote:

Originally Posted by Jaxel (Post 2038141)
I can't duplicate this error... make sure you revert your templates

Hmmmm... curious as to why it would happen now though when it was working before. Haven't needed to do a revert after upgrading versions of this mod yet. I just don't understand the need is all.

But I'll give the revert a shot. First can you clarify something for me. I'm working off of a child style that I've made some changes to. Do I revert the parent? I'm thinking if I revert the child, I'll lose all the custom changes I made... or am I wrong?

Jaxel 05-17-2010 02:38 AM

Quote:

Originally Posted by Footman (Post 2038167)
Hmmmm... curious as to why it would happen now though when it was working before. Haven't needed to do a revert after upgrading versions of this mod yet. I just don't understand the need is all.

But I'll give the revert a shot. First can you clarify something for me. I'm working off of a child style that I've made some changes to. Do I revert the parent? I'm thinking if I revert the child, I'll lose all the custom changes I made... or am I wrong?

Well 4.0.9 changed the way embed codes are handled. So unless you revert your 8WR_media_details template, you won't be able to handle the new embed codes. So yes, you're going to lose your custom changes.

Footman 05-17-2010 02:54 AM

Quote:

Originally Posted by Jaxel (Post 2038294)
Well 4.0.9 changed the way embed codes are handled. So unless you revert your 8WR_media_details template, you won't be able to handle the new embed codes. So yes, you're going to lose your custom changes.

Oh... do I just revert that template? If so how? I thought I had to revert all templates of a style.

Inferno Dragon 05-17-2010 12:19 PM

awesome mod, however I have a small issue, my generated thumbnails are of big ass size (pixel wise) 480px ? 360px example: http://www.pakgamers.com/forums/customVID/thumbs/4.jpg

However I notice that this website have small thumbs: http://aogamers.com/forums/customVID/thumbs/60.jpg how i can tweak this thumb size setting? I am not seeing any option in the admincp related to media thumb size :S

Thanks,

Xencored 05-17-2010 12:35 PM

Quote:

Originally Posted by Inferno Dragon (Post 2038468)
awesome mod, however I have a small issue, my generated thumbnails are of big ass size (pixel wise) 480px ? 360px example: http://www.pakgamers.com/forums/customVID/thumbs/4.jpg

However I notice that this website have small thumbs: http://aogamers.com/forums/customVID/thumbs/60.jpg how i can tweak this thumb size setting? I am not seeing any option in the admincp related to media thumb size :S

Thanks,

Admin CP
Settings >> Options >> 8WayRun.Com - Media Library

BITS: Media Bit Type
Which media bit template should be used throughout the media library?
Large Media Bit
Small Media Bit
Tiny Media Bit
Table Media Bit

Inferno Dragon 05-17-2010 01:09 PM

^ Nope that's not the correct option, these options are for changing the layout of the media library like with "tiny bit" no addition infomation like category, uploader etc will be diplayed below thumbnail and vice versa.

I am talking about actually physically decreaseing the generated thumbnail size like that site has done which I posted in the example

Edit: I found the problem, when I changed the image settings in the vbulletin settings from imagemagick (I was using it) to GD it fixed the problem and now thumbs are working fine, I also notice that in the code author has disabled the imagemagick library..IMO isn't imagemagick generate more sharper thumbs?

Jaxel 05-17-2010 02:04 PM

Quote:

Originally Posted by Inferno Dragon (Post 2038505)
^ Nope that's not the correct option, these options are for changing the layout of the media library like with "tiny bit" no addition infomation like category, uploader etc will be diplayed below thumbnail and vice versa.

I am talking about actually physically decreaseing the generated thumbnail size like that site has done which I posted in the example

Edit: I found the problem, when I changed the image settings in the vbulletin settings from imagemagick (I was using it) to GD it fixed the problem and now thumbs are working fine, I also notice that in the code author has disabled the imagemagick library..IMO isn't imagemagick generate more sharper thumbs?

ID, you are correct, the problem is I dont know how to resize images with ImageMagick. The code I have there SHOULD work, but it doesn't. It breaks SRK, so I disabled it until I can fix it.

patrick91 05-17-2010 03:24 PM

Quote:

Originally Posted by Jaxel (Post 2038141)
It looks like you are using a database backup? Install the mod, then load up your database backup, but DO NOT drop the tables first. 0.9 adds some new columns to the service table, and if you are dropping your tables before you import your backup, you will revert these new columns.

? i have no backup of my forum:S i don't even know how to do that in vB4... So don't exactly know what i must do now and where..

Gr,

patrick

Footman 05-17-2010 08:26 PM

Quote:

Originally Posted by Jaxel (Post 2038294)
Well 4.0.9 changed the way embed codes are handled. So unless you revert your 8WR_media_details template, you won't be able to handle the new embed codes. So yes, you're going to lose your custom changes.

Jaxel, I'm curious... can I just revert the 8WR_media_details template as you said above? I've tried to select it in the list and click revert but the button isn't active. Am I missing something or do I have to revert the entire child style, thus losing any modifications to the style I've made? Which is something I just don't want to go through. Having to go back and redo all the little tweeks I've made over time is a PITA.

Jaxel 05-17-2010 08:47 PM

Quote:

Originally Posted by Footman (Post 2038743)
Jaxel, I'm curious... can I just revert the 8WR_media_details template as you said above? I've tried to select it in the list and click revert but the button isn't active. Am I missing something or do I have to revert the entire child style, thus losing any modifications to the style I've made? Which is something I just don't want to go through. Having to go back and redo all the little tweeks I've made over time is a PITA.

VB has a built in COMPARE function. Use that to determine what has changed in the embed code, and update your customized style to suit the new embed system.

Jaxel 05-17-2010 08:49 PM

Quote:

Originally Posted by patrick91 (Post 2038577)
? i have no backup of my forum:S i don't even know how to do that in vB4... So don't exactly know what i must do now and where..

Gr,

patrick

Then delete your existing media tables and re-install.

bart6767 05-17-2010 09:15 PM

cant seem to find where i can make new Categories ?

Footman 05-17-2010 09:24 PM

1 Attachment(s)
Quote:

Originally Posted by bart6767 (Post 2038776)
cant seem to find where i can make new Categories ?

If you're logged into your forum with a profile that has full admin privileges then you should see, on the right hand side, the categories link as in the attached pic.

bart6767 05-17-2010 09:36 PM

Quote:

Originally Posted by Footman (Post 2038783)
If you're logged into your forum with a profile that has full admin privileges then you should see, on the right hand side, the categories link as in the attached pic.

I have nothing on the right hand side and all i see on the left hand side is Categories and
Random Media

bart6767 05-17-2010 09:39 PM

Got it sorted as i had to add this code and it works .

Code:

$perms['rate'] = true;
$perms['comment'] = true;
$perms['submit'] = true;

if (is_member_of($vbulletin->userinfo, explode(',','5,6')))
{
        $perms['modtags'] = true;
        $perms['modcategory'] = true;
        $perms['modservice'] = true;
}


Footman 05-17-2010 09:42 PM

Quote:

Originally Posted by Jaxel (Post 2038756)
VB has a built in COMPARE function. Use that to determine what has changed in the embed code, and update your customized style to suit the new embed system.

I don't see where to compare old and new for the template you suggested.

milaszewski 05-18-2010 09:15 AM

I would love to use it, but I use ISO-8859-2 encoding and I get this error when I try to add a youtube video:
Code:

Warning: xml_parser_create() [function.xml-parser-create]: unsupported source encoding "ISO-8859-2" in [path]/includes/class_xml.php  on line 215

kho91 05-18-2010 11:17 AM

can't add sub categories?

Footman 05-18-2010 11:54 AM

Quote:

Originally Posted by kho91 (Post 2039123)
can't add sub categories?

Have you tried utilizing the "order" and "depth" in the adminstrate: Categories?

Yurified 05-18-2010 05:47 PM

I am having another problem now >.> I've uninstalled and installed it again thinking everything will be ok, but it still there.
This is what some members get when they try to watch some of my videos.
https://vborg.vbsupport.ru/
Funny thing is that I can watch that video.
The only problem I had after re-uploading new files was that some of videos were blank. But other members would get this error.
Can this be fixed somehow? :confused:

pcoskat 05-18-2010 11:43 PM

how does this integrate into the sidebar of the forums? Is there a widget that can display random thumbnails + titles of videos in the gallery?

Jaxel 05-19-2010 04:18 AM

Quote:

Originally Posted by Yurified (Post 2039376)
I am having another problem now >.> I've uninstalled and installed it again thinking everything will be ok, but it still there.
This is what some members get when they try to watch some of my videos.
http://img210.imageshack.us/img210/2761/invalidlink.jpg
Funny thing is that I can watch that video.
The only problem I had after re-uploading new files was that some of videos were blank. But other members would get this error.
Can this be fixed somehow? :confused:

Please run the "Click here to restore all services in the "/media/xml" directory to their default settings" process in the administrate services menu.

ProFifaLeagues 05-19-2010 05:06 AM

upgraded and working a1!

puppetmaster222 05-19-2010 06:07 AM

Feel free to poke around and check it out @ my site Rotten Forums if you want to see another installed copy of it.

Great mod so far and no issues here. Installed it and had 36 of my videos up in a matter of minutes. :up:

milaszewski 05-19-2010 06:58 AM

Quote:

Originally Posted by milaszewski (Post 2039064)
I would love to use it, but I use ISO-8859-2 encoding and I get this error when I try to add a youtube video:
Code:

Warning: xml_parser_create() [function.xml-parser-create]: unsupported source encoding "ISO-8859-2" in [path]/includes/class_xml.php  on line 215

what about the encoding error?
this mod looks excellent, but I can't switch to UTF-8...

ProFifaLeagues 05-19-2010 10:56 AM

I did have a good read over the comments but couldnt find if its possable to change the thumbnail on the local hosted videos??


All times are GMT. The time now is 05:20 AM.

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.04418 seconds
  • Memory Usage 1,910KB
  • 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
  • (6)bbcode_code_printable
  • (1)bbcode_php_printable
  • (31)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
  • (40)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