Hi,

I found this module called LibDB and it seemed to be the answer to all my prayers. It doesn´t seem to work with 2.4.7 though... It installs OK but when I hit the LibDB link in the admin-area, all I get is a blank page.

So my question is - what is the most hassle-free way to set up a movie library (or music/book library) with a bit of detail, covers and so on?
Would I have to make it from scratch with one of these Swiss-army-knife modules that I keep bumping in to reading the forums ( like flexinode, views etc)? And if yes, where should I start?

Or is there another module which makes it easier for a poor newbie like me?

thanks in advance!
Morten

Comments

mwu’s picture

If you look at issues, there are from a long time ago. I'd suggest you use something people are using currently.

unschooler’s picture

yeah, I know, but the CVS version is relatively new, though.
I´ve been fooling around a little with flexinode, and it seems quite powerful - anyone made a library with that module?

da312’s picture

I thought LibDB was promising when I first heard about it 2 years ago, but the project seemed to die out. I've tried flexinode and CCK, but nothing can really create a library-like database which can cross reference on many levels.

So to answer your question, sorry there isn't really a module or even a collection of modules which can complete the task fully. If you're satisfied which no cross-referencing links then I guess Flexinode or CCK could work for you.

unschooler’s picture

...really; one would think that there would be a huge demand for a module like this? Too bad I´m not much of a programmer yet. I´ll try Flexinode, though. Thanks!

danoon’s picture

VideoDB is an open source project on sourceforge.net. It has many features including integration with IMDB.

http://www.splitbrain.org/projects/videodb

I created a simple module for 4.7 that contains it in a IFrame.

Instructions to try it out:

Just copy the first code part and put it in a file called videodb.module in the modules directory.

<?php
function videodb_settings() {
  return array(
    'videodb_dir' => array(
      '#type' => 'textfield',
      '#title' => t('VideoDB Directory'),      
      '#default_value' => variable_get('videodb_dir', ''),
      '#maxlength' => '100',
      '#size' => '70',
      '#description' => t('absolute or relative path to your VideoDB directory. No trailing slash!')
    )
  );
}

function videodb_menu($may_cache) {
        $items = array();

        if ($may_cache) {
                $items[] = array(
                        'path' => 'videodb',
                        'title' => t('Movies'),
                        'callback' => 'videodb_page',
                        'access' => user_access('access videodb content'),
                        'type' => MENU_SUGGESTED_ITEM);
                $items[] = array(
                        'path' => 'admin/videodb/config',
                        'title' => t('config'),
                        'callback' => 'videodb_settings',
                        'access' => user_access('administer videodb'),
                        'type' => MENU_DEFAULT_LOCAL_TASK);

       }
       return $items;
}

function videodb_perm() {                  
        return array('access videodb content', 'administer videodb');
}

function videodb_page() {
        drupal_set_title('');                  
        drupal_add_js("js/iframe.js");
        $videodb_dir = variable_get('videodb_dir', '');
        $output='
                <iframe id="myframe" src="'.$videodb_dir.'/index.php" frameborder=0 width="100%" height="800" />
                ';
        return $output;       
}
?>

Copy the secode code part and put it in js/iframe.js under the root drupal directory. You will probably have to create the js directory.

/***********************************************
* IFrame SSI script II- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* Visit DynamicDrive.com for hundreds of original DHTML scripts
* This notice must stay intact for legal use
***********************************************/

//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
var iframeids=["myframe"]

//Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):
var iframehide="yes"

var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers

function resizeCaller() {
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++){
if (document.getElementById)
resizeIframe(iframeids[i])
//reveal iframe for lower end browsers? (see var above):
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
tempobj.style.display="block"
}
}
}

function resizeIframe(frameid){
var currentfr=document.getElementById(frameid)
if (currentfr && !window.opera){
currentfr.style.display="block"
if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight; 
else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
currentfr.height = currentfr.Document.body.scrollHeight;
if (currentfr.addEventListener)
currentfr.addEventListener("load", readjustIframe, false)
else if (currentfr.attachEvent){
currentfr.detachEvent("onload", readjustIframe) // Bug fix line
currentfr.attachEvent("onload", readjustIframe)
}
}
}

function readjustIframe(loadevt) {
var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
if (iframeroot)
resizeIframe(iframeroot.id);
}

function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(iframeid).src=url
}

if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller

Then
1) activate the module under the admin/modules menu
2) enable the menu under admin/menus
3) adjust the settings in admin/settings/videodb menu to point to the dir where you installed videodb

unschooler’s picture

when I click the menu item pointing to videodb, my browser tries to download the index.php file in the videodb directory instead of displyaing it? Any idea what's causing it?

unschooler’s picture

I moved the directory to another location and now it seems to work.

Thanks a LOT - I'm really looking forward to try this out. It looks great!

cheers
Morten

taherk’s picture

Hi

Is this working for anyone? I would like to try this. I am also trying to build a DVD Rental shop using drupal

______________________________________
Cheap domains @ http://whiz.in

jorre’s picture

so, any shops online yet we can browse through?

many ideas are there, but without months of customization I haven't seen a lot at work yet, besides some plain old drupal blogs...

Pakfriet.be

GlitchFreak’s picture

Thanks for the awesome scripts above.

Quick one, if I wanted to pass a specific URL into the Iframe to show a particular movie, how would I go about it?

I want to use it for New releases on my homepage.

Thanks!

GF