Page 9 of 9

Version 3 almost complete.

Posted: 2006-12-30 20:01:18
by mjs7231
Thought everyone using this might like a sneak peak at Version 3.0 which should be done in about a week or two. I am just finalizing it / working out a few kinks. I wasn't originally going to show everyone, but thought why not. :)

http://pkwebstudio.com/apps/moviedb3/

A few things I fixed / updated:
- Completely re-written to be easier to manage / update.
- Fresh look with rounded corners.. I'm cheesy.
- The layout & views are all template based. It was a pain in the ass, but I think it will really help to customize this app.
- Search now takes phrases using "quote marks" and accepts the "-" before a phrase or word to say 'don't search that'.
- Comma separated variables are supported. This fixes the issue with multiple categories for a single movie.
- The numbers next to the side panels are accurate now. It works as you would expect. I never though the old method worked quite right.
- New view's dropdown allows you to select the list view.
- Added a breadcrumbs thinger at the top. Helps show what your filters are.
- Thumbnails are resized using PHP's ImageGD. Sharper thumbnails at the cost of minimal disk space.

Keep in mind the way this currently looks / works is all just part of the template I created to mimic version 2. With a little elbow grease you can easily make this look any way you want. :)

Let me know if you see any major or minor issues. smile
- Mike

Posted: 2006-12-30 20:59:46
by kazgor
Hi mate..

You're a mind reader, i was just thinking the other day it would be nice to have a preview.

First thing is this looks absolute gorgeous i can see you really have gone back to the drawing board on this one.

Have to say the Covers only layout view is brill, i think that would actually be my default view :)

I can see you have spent a lot of time getting the numbers next to the side bars perfect, weldone on this bit i know when i looked at this it wasnt the easier of thing to get right.

Multiple catagories i think that will make quite a few people in here very very happy indeeed.. quick question what script did you us to populate you database with, im sure the IMDB script only ever pulls back one category not all of them.

Heres just a few little comments from having a quick play, some of my layout comments im sure can be addressed by the new Template features but i'll just mention them anyway.

1. IMDB Rating, i think it would look better to have it flushed in the upper right corner so that the little detail box doesnt look so pushed out of placed.

2. due to 1. the film index number could be better off in the bottem left corner it will be less distracting to those that wouldnt know what that number represents.

3. Love all the extra side panels, but i would say the Categories panel should be first. also how easy will it be to turn off those other ones. Im sure it will be asked.

4. Category numbers: now this is subjective on really how far these number are reculated. eg in this exampe:

http://pkwebstudio.com/apps/moviedb3/?n ... &year=2002

there are only 3 firms visible but the category panel is still showing the calculation for Biography selection and not reflecting the addition 2002 filter.

I know we can go very mad on this and i certainly dont see this as a show stopper.

5. Little page rounding error. (num/page = 10)

http://pkwebstudio.com/apps/moviedb3/?year=1997

All shows on a single page, but the NEXT option is still active.

6. List view for no films found.

http://pkwebstudio.com/apps/moviedb3/?v ... try=_OTHER

In LIST VIEW you get to see the internal variable fields displayed but flip it back to DETAIL view you correctly get it saying `No films found....`

Think it should display `No film found....` for all 3 views ;)

7. Clicking the IMDB rating should open in a new window.

8. ALT text, so hovering over IMDB or Covers give addition details.

9. Date added reversed and to sort out the problem with how the UK&US format the months... may the Month a named field.. eg 30-Dec-2006

10. Page navigation:

i think this is one area that does need some addition options added.. with 450 films in your library it takes a few click to get to the very end.. so perhaps a more Forum like page navigation could be looked at.. with FIRST & LAST added.

11. for the sort by, perhaps and option in there to show results Descending/Ascending.

I personally like to see most recent first as it currenly is, but some may perfer it the other way.


Weldone mate. you have a very good looking script there and i can't wait to get to play with it :)


Bru.

Posted: 2006-12-30 21:57:29
by MisconductQC
WOW!
I WANT!

Posted: 2006-12-30 22:47:08
by mjs7231
Multiple catagories i think that will make quite a few people in here very very happy indeeed.. quick question what script did you us to populate you database with, im sure the IMDB script only ever pulls back one category not all of them.
I used the IMDB script. not quite sure if its the new version that supports it, or if it was one of the settings the script provides.

1. IMDB Rating, i think it would look better to have it flushed in the upper right corner so that the little detail box doesnt look so pushed out of placed.
You will be able to do this with the template file very easy. My personal preference is where it currently sits.

3. Love all the extra side panels, but i would say the Categories panel should be first. also how easy will it be to turn off those other ones. Im sure it will be asked.
The side panels are all customizble. You can shoose what you want and don't want. It supports more side panels as well, but by default I ignore any side panels that are basically useless (because they are not filled in my DB)

4. Category numbers: now this is subjective on really how far these number are reculated. eg in this exampe:
I don't follow at all? :-/

5. Little page rounding error. (num/page = 10)
6. List view for no films found.

Thanks, I added these to my buglist.

7. Clicking the IMDB rating should open in a new window.
According to W3, no links should ever open a new window. This is why its done that way (but what do they know?) :) Again, you can fix it with the template very easy.

8. ALT text, so hovering over IMDB or Covers give addition details.
I tried adding alt text over the images but they wern't working. I think its because they are also links.. :-/

9. Date added reversed and to sort out the problem with how the UK&US format the months... may the Month a named field.. eg 30-Dec-2006
This is an option in the language file.

10. Better Page navigation:
11. for the sort by, perhaps and option in there to show results Descending/Ascending.

Good ideas, I currently let you specify the default for each option in the config. But maybe this should be something brought to the template as well. (Probably version 3.1)

Posted: 2006-12-31 00:04:10
by kazgor
Oh im so looking forward to this one mate..

I did think most of my layout suggestions would be sorted by the new Templates structure but thought best put it out there so others can see.

W3 are weird sometimes, you would think links to external sites should open in a new window, but seeing as its easily fixed its not a problem.

in this link

http://pkwebstudio.com/apps/moviedb3/?n ... &year=2002

you can see only 3 firms, but the category numbers dont reflect this.

but if you do a filter just by year then the Category number do calculate correctly

http://pkwebstudio.com/apps/moviedb3/?npp=20&year=1992

hope that make sense now.

Posted: 2006-12-31 20:45:46
by mjs7231
I still think its working correctly. The category numbers show more than 3 in some cases because it shows how many results you will get if you click on that link.

When you set the category to "ALL" thats the maximum number of results you could get for a category. So naturally all the categories listed will be 59 or less (in this case). But if you look at the year now, you will notice some of the numbers still show higher than 59. That's how many results you would get when clicking that link.

Posted: 2006-12-31 22:03:36
by kazgor
actually now that you've explained it and i've had another look i agree with you it does makes sense :)

ps..

Happp New Year!

Posted: 2007-01-01 02:49:28
by lestatou
Great job my friends!!!!! Gorgeous !!!!

Thank you very very very much.... :)

Happy New Year...

PD: when will be released de v.3 version? aproximately? :)

Posted: 2007-01-04 07:14:01
by mjs7231
A few more days.. Here is my current checkoff list. Its down to only a few very small items which is good. Now I just need motivation to finish these non-fun/challenging items. :)

* Complete Before Release 3.0:
* [ ] TODO: Clear Page when clicking a panel option
* [ ] TODO: Finish main template (Description / Comments / Director / Producer)
* [ ] TODO: Create Template that does not require ImageGD
* [ ] TODO: Create simple example page
* [ ] TODO: Update Side Panel for downloading.
* [ ] TODO: Package & Release it.
*
* Complete After Release 3.0
* [ ] TODO: Create Template Descriptor function
* [ ] TODO: Finish README.txt for Templates.
* [ ] TODO: Check code is Strict HTML compliant.

Keep on Truckin'

Posted: 2007-01-04 10:46:26
by Lul2x
Hey mjs.

I have been following this post for a little while now and am using your V2.2 release. I signed up for the forums just to give you some more encouragement to finish up V3.0. I know myself, and many others, are very excited for the release! I can't wait to get my hands on it and will be checking back here everyday for updates :hihi: . Thank you for your time and effort, it's appreciated!

Posted: 2007-02-19 17:36:14
by Dano The Prophet
Bonjour !

Voilà j'aimerai savoir comment traiter les retours à la ligne à la ligne lors de l'affichage de la description et des commentaires

Merci d'avance



In english (with Google) :

Hello!

I will like to know how to treat the returns to the line with the line during posting of description and the comments

Thank you in advance

Posted: 2007-02-19 19:37:10
by kazgor
Dano The Prophet wrote:Bonjour !

Voilà j'aimerai savoir comment traiter les retours à la ligne à la ligne lors de l'affichage de la description et des commentaires

Merci d'avance



In english (with Google) :

Hello!

I will like to know how to treat the returns to the line with the line during posting of description and the comments

Thank you in advance
After exporting from AMC if linebreaks change into |.

Inserting this code at the end of function 'get_full_detail_html' breaks lines in comments and descriptions just like in original.

Code: Select all

 $html_br=str_replace('|','<br />',$html); 
$html  = $html_br; 

Posted: 2007-02-19 19:45:50
by Dano The Prophet
thank you but in wich file? :/

Posted: 2007-02-19 19:53:05
by Dano The Prophet
ok in mdb_movie.inc there is

Code: Select all

    /** -------------------------------------------------------------------------------------------
     * Returns the movie decription.  Allows for a $maxchar limit.  Parses out the AWARDS section.
     * @access private
     * ------------------------------------------------------------------------------------------*/
    function _callback_description($args=NULL) {
        # Set Default Arguments & Description
        $maxchars = (($args == NULL) ? 400 : $args[0]);
        $desc = $this->data['DESCRIPTION'];
        $desc = substr($desc, 0, $maxchars);
        # Check we want to include the "..." signifying (more)
        if (strlen($desc) < strlen($this->data['DESCRIPTION'])) {
            $desc = substr($desc, 0, strrpos($desc, " "));
            $desc .= "...";
        }
        # Add the return lines
        $desc = trim(str_replace("|", "<br/>\n", $desc));
        return $desc;
    }
I need to do the same thing for include comments ????

Posted: 2007-02-19 22:25:39
by kazgor
Dano.. looks like you're talking about Version 3 rather than Version2 which this Topic is about hence my initial reply.

Had a look at the code you quoted and it should be adding Returns already.

How are your Line breaks showing up when you look at the SQL file you export. in the code it assumes they are | characters.

Posted: 2007-02-20 14:44:31
by Dano The Prophet
i'm sorry but i didn't understand... english is very very difficult for me :(

Posted: 2007-02-20 15:38:57
by kazgor
Dano The Prophet wrote:i'm sorry but i didn't understand... english is very very difficult for me :(
Dano.. can i see your website.?

Posted: 2007-02-20 17:19:16
by Dano The Prophet
of course : http://david062.free.fr/moviedb/

So for a movie's description i would like to see comments after actors, I tried with $MOVIE[COMMENTS] but there is | instead of space

Perhaps with this fonction :

Code: Select all

    /** -------------------------------------------------------------------------------------------
     * Returns the movie comments.  Allows for a $maxchar limit.  Parses out the AWARDS section.
     * @access private
     * ------------------------------------------------------------------------------------------*/
    function _callback_comments($args=NULL) {
        # Set Default Arguments & Description
        $maxchars = (($args == NULL) ? 400 : $args[0]);
        $comm = $this->data['COMMENTS'];
        $comm = substr($comm, 0, $maxchars);
        # Check we want to include the "..." signifying (more)
        if (strlen($comm) < strlen($this->data['COMMENTS'])) {
            $comm = substr($comm, 0, strrpos($comm, " "));
            $comm .= "...";
        }
        # Add the return lines
        $comm = trim(str_replace("|", "<br/>\n", $comm));
        return $comm;
    }
but I don't know where I can call this fonction

Posted: 2007-02-21 13:12:56
by kazgor
Dano you were nearly right.

So in MDB_MOVIE.INC add the following comment code after the function _callback_description($args=NULL) function.

Code: Select all

    /** -------------------------------------------------------------------------------------------
     * Returns the comment description.  Allows for a $maxchar limit.  
     * @access private
     * ------------------------------------------------------------------------------------------*/
    function _callback_comments($args=NULL) {
        # Set Default Arguments & Description
        $maxchars = (($args == NULL) ? 400 : $args[0]);
        $comm = $this->data['COMMENTS'];
        $comm = substr($comm, 0, $maxchars);
        # Check we want to include the "..." signifying (more)
        if (strlen($comm) < strlen($this->data['COMMENTS'])) {
            $comm = substr($comm, 0, strrpos($comm, " "));
            $comm .= "...";
        }
        # Add the return lines
        $comm = trim(str_replace("|", "<br/>\n", $comm));
        return $comm;
    }    
next in the function template() change

Code: Select all

$easyvars = array('NUM', 'CHECKED', 'MEDIA', 'MEDIATYPE', 'SOURCE', 'BORROWER', 'RATING',
            'ORIGINALTITLE', 'FORMATTEDTITLE', 'COUNTRY', 'CATEGORY', 'YEAR', 'LENGTH', 'URL', 'COMMENTS',
            'VIDEOFORMAT', 'VIDEOBITRATE', 'AUDIOFORMAT', 'AUDIOBITRATE', 'RESOLUTION', 'FRAMERATE', 'LANGUAGES',
            'SUBTITLES', 'FILESIZE', 'DISKS', 'PICTURENAME');
to

Code: Select all

$easyvars = array('NUM', 'CHECKED', 'MEDIA', 'MEDIATYPE', 'SOURCE', 'BORROWER', 'RATING',
            'ORIGINALTITLE', 'FORMATTEDTITLE', 'COUNTRY', 'CATEGORY', 'YEAR', 'LENGTH', 'URL', 
            'VIDEOFORMAT', 'VIDEOBITRATE', 'AUDIOFORMAT', 'AUDIOBITRATE', 'RESOLUTION', 'FRAMERATE', 'LANGUAGES',
            'SUBTITLES', 'FILESIZE', 'DISKS', 'PICTURENAME');
we have remove 'COMMENTS' from the array.

Finally a few lines further down you have

Code: Select all

        $tpl->add_callback("\$MOVIE[DESCRIPTION]",          "_callback_description", 1);
        $tpl->add_subtpl("TRANSLATEDTITLES",                $this->_templates_translatedtitles());
        $tpl->add_subtpl("ACTORS",                          $this->_templates_names("ACTORS", "ACTOR", $this->actors));
Now we can do the callback to the comments.. so it will be

Code: Select all

        $tpl->add_callback("\$MOVIE[DESCRIPTION]",          "_callback_description", 1);
        $tpl->add_callback("\$MOVIE[COMMENTS]",	            "_callback_comments", 1);       
        $tpl->add_subtpl("TRANSLATEDTITLES",                $this->_templates_translatedtitles());
        $tpl->add_subtpl("ACTORS",                          $this->_templates_names("ACTORS", "ACTOR", $this->actors));
Job done.

now edit details.tpl template and add the comments.

eg

Code: Select all

              <div class='description'>$MOVIE[DESCRIPTION](100000)</div>
              <div class='description'>$MOVIE[COMMENTS](100000)</div>

Posted: 2007-02-21 18:47:16
by Dano The Prophet
perfect !!!!!

Thank u very much :grinking: