News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Media Center

Started by JayBachatero, December 02, 2006, 12:43:49 AM

Previous topic - Next topic

Chopper

What is the point of this mod?

Leemy

My users and I are encountering a problem:
- while a download is in progress, they are unable to browse the rest of the forum. we can't load any other page.  as it is downloading, you're sorta stuck. as soon as the download finishes, it jumps back in action and the next page loads.

SMF 1.1.4, http://bhangrateamsforum.com

You can create a test user to check it out.  Thanks for the help.

Leemy

Please help!

I also get constant mediacenter-related errors

http://bhangrateamsforum.com/discuss/index.php?action=mediacenter
8: Undefined variable: last
File: /home/content/s/m/a/smalkana/html/discuss/Themes/default/MediaCenter.template.php (eval?)
Line: 690

http://bhangrateamsforum.com/discuss/index.php?action=mediacenter
8: Undefined variable: first
File: /home/content/s/m/a/smalkana/html/discuss/Themes/default/MediaCenter.template.php (eval?)
Line: 685

erosolmi

#363
First,

thanks a lot to Jay Bachatero for this great mod. I installed under SMF 1.1.5 and all went fine. Up and running in 1 min.

But ... (there is always a but) I need to have it working on extions with more than 3/4 char len. So far this mod is working only with files with 3 or 4 char in the file extension. I need it to be dynamic, that is adapt on the extension listed in the array. I have extensions like ".tbasic" or ".tbasicc".

I think I'm able to change source code in order to generate dynamic SLQ string but before doing it I would like to know if this feature is in your future plan or not.

Thanks a lot
Eros
www.thinbasic.com | community.thinbasic.compsch.thinbasic.com
WinXP Pro SP2 - Centrino Core 2 2GHz - 2Gb Ram - Ati Radeon Mobility X1600 512Mb

Leemy

Quote from: erosolmi on May 29, 2008, 09:07:11 AM
First,

thanks a lot to Jay Bachatero for this great mod. I installed under SMF 1.1.5 and all went fine. Up and running in 1 min.

But ... (there is always a but) I need to have it working on extions with more than 3/4 char len. So far this mod is working only with files with 3 or 4 char in the file extension. I need it to be dynamic, that is adapt on the extension listed in the array. I have extensions like ".tbasic" or ".tbasicc".

I think I'm able to change source code in order to generate dynamic SLQ string but before doing it I would like to know if this feature is in your future plan or not.

Thanks a lot
Eros


That's an interesting addition. It would turn it from a Media Center to an Attachment Center that would centralize uploaded docs, pdfs, etc.

erosolmi

To change in order to accept any extension I've changed MediaCenter.php in this way:

// Check to see if the extension is 4 chars long
//$fileTypesLong = array();
//foreach ($fileTypes as $type)
// if (strlen($type) == 4)
// // if (strlen($type) >= 4)
// {
// $fileTypesLong[] = $type;
// unset($fileTypes[$type]);
// }
// Build dynamic SQL instruction using extension len.
$_sSQL = "( ";
foreach ($fileTypes as $type)
{
$_sSQL = $_sSQL . "RIGHT(att.filename, " . strlen($type) . ") = '" . $type . "' OR ";
}
// Added dummy test in order to handle latest OR sentence
$_sSQL = $_sSQL . " 1 = 2 ) ";

// Make the clause for the query
// $fileTypes = "(RIGHT(att.filename, 3) = '" . implode("' OR RIGHT(att.filename, 3) = '", $fileTypes) . "'" . (empty($fileTypesLong) ? '' : " OR RIGHT(att.filename, 4) = '" . implode("' OR RIGHT(att.filename, 4) = '", $fileTypesLong) . "'") . ")";
$fileTypes = $_sSQL;

Sorry about the final dummy OR but I'm not a PHP programmer so ... I'm sure there is some clever function able to avoid it.

Regards
Eros
www.thinbasic.com | community.thinbasic.compsch.thinbasic.com
WinXP Pro SP2 - Centrino Core 2 2GHz - 2Gb Ram - Ati Radeon Mobility X1600 512Mb

erosolmi

Sorry for asking again a new option but a good one could be to have the date of the post where attached file is in as separate column in order to be able to sort also by date.  Very useful when searching for something.

Oh, yes, searching of source  ;D
www.thinbasic.com | community.thinbasic.compsch.thinbasic.com
WinXP Pro SP2 - Centrino Core 2 2GHz - 2Gb Ram - Ati Radeon Mobility X1600 512Mb

Leemy

Quote from: Saleem on May 21, 2008, 02:38:01 PM
Please help!

I also get constant mediacenter-related errors

http://bhangrateamsforum.com/discuss/index.php?action=mediacenter
8: Undefined variable: last
File: /home/content/s/m/a/smalkana/html/discuss/Themes/default/MediaCenter.template.php (eval?)
Line: 690

http://bhangrateamsforum.com/discuss/index.php?action=mediacenter
8: Undefined variable: first
File: /home/content/s/m/a/smalkana/html/discuss/Themes/default/MediaCenter.template.php (eval?)
Line: 685

any help with these MC errors?

Danyo1

hi i am getting an error with the text coming at the top of the page


Lysyj

How can I creare new categories: Archives, Word, PDF ?

unformatted_

and for PPT/PPS, ZIP, RAR, etc?

kennyv

i am wondering if there is a way to show only the last attached file from the topic.

I.E.  attch1 attach2 attach3 attach4  media center will only show attach4

Thanks.
Ken

erlend_sh

This mod could mean a lot to me.  Any chance it'll be made compatible with SMF 2.0 once it's stable?

tridirk

The mod installed and was working great.  Today, instead of a popup window with either a video player or a music player, I get sent to a new page with the player at the top of the page and centered?

Did I check something I should have.  I like the popup player.  Also, is there a way to admin the media center itself? I don't understand the http://www.yoursite.com/index.php...comments about filtering and boards?  What do those mean, when I try opening those pages with my url I get can't open error.
Learning SMF..... Thanks for your help!

Gargoyle

I have mine installed as media center 1.0 : Is this the most recent version?

Really love it BTW..

Nibogo

#375
Quote from: Lysyj on June 10, 2008, 07:13:37 AM
How can I creare new categories: Archives, Word, PDF ?

Search for:

$subActions = array(       
        'videos' => array(
            'title' => $txt['media_tabs_videos'],
            'sub_template' => 'media',
            'fileTypes' => array('wmv', 'mov', 'mpg', 'mpeg', 'avi'),
            'href' => $scripturl . '?action=mediacenter;sa=videos',
            'is_allowed' => $context['can_see_videos'],
        ),


Add After:

'archives' => array(
            'title' => $txt['media_tabs_archives'],
            'sub_template' => 'media',
            'fileTypes' => array('zip', 'tar', 'tar.gz'),
            'href' => $scripturl . '?action=mediacenter;sa=archives',
            'is_allowed' => $context['can_see_custom'],        
        ),
'pdf' => array(
            'title' => $txt['media_tabs_pdf'],
            'sub_template' => 'media',
            'fileTypes' => array('pdf'),
            'href' => $scripturl . '?action=mediacenter;sa=pdf',
            'is_allowed' => $context['can_see_pdf'],          
        ),


You have to add the permission for the pdf and the strings of the Mediacenter.english

bfeo

I'm specifically interested in the movies, for my member's montages.

So my question is, will this have an option to play the video in the browser? 

And can I remove music from the center?  I do not want to have my members posting music files onto my site, and this supports that.

limsteven25

hi i am having a problem, when i login as member to view the files an error occured, but as admin it is fine, what should i do?

headkaze

#378
I have a software business and am looking for a file download manager and someone pointed me to this mod. Is there any chance you could update this to have another category called "Files". I'd like to be able to put the files into categories as well as show a screenshot and description. Do you think this mod could suit my needs?

Also it would be nice to be able to have off site links for downloads as well.

flickernever

And what about a filter by user ID? As anybody written one?

Advertisement: