Author Topic: phpdvdprofiler  (Read 64760 times)

Offline DSig

  • Heavy Poster
  • *****
  • Posts: 1110
    • View Profile
Re: phpdvdprofiler
« Reply #300 on: October 16, 2012, 05:48:36 AM »
Okay .. i knew it would be something simple .. it was some kind of cache.  I am not sure what combination as i have restarted the services and the browser .. even rebooted once ..

but it appears to be working .. as it should.

So i just have the 1 question mentioned above for now ..

It is fun sw to play with
Thank you
David

Offline Achim

  • Mega Heavy Poster
  • *******
  • Posts: 7179
  • Country: 00
    • View Profile
Re: phpdvdprofiler
« Reply #301 on: October 16, 2012, 06:31:45 AM »
I seem to remember having trouble with that jpgraph thing when I was getting the program set up too.
Everybody does :laugh:

Offline Jimmy

  • Mega Heavy Poster
  • *******
  • Posts: 6756
  • Country: ca
  • Yes this is me...
    • View Profile
Re: phpdvdprofiler
« Reply #302 on: October 16, 2012, 07:04:50 AM »
I didn't :P

But it's because Eric did it all for me :laugh:

Offline DJ Doena

  • Administrator
  • Mega Heavy Poster
  • *****
  • Posts: 6706
  • Country: de
  • Battle Troll
    • View Profile
    • My Blog
Re: phpdvdprofiler
« Reply #303 on: October 16, 2012, 07:13:39 AM »
1) Is there the ability to 'page' the collection listing.  Would be much faster especially when dealing remotely or even by cell phone.

You mean having only a limited number of movies on the laft hand side? Like mine http://doena-soft.de/phpdvdprofiler_en/ ?

If so, check the localsiteconfig.php for the $TitlesPerPage parameter.
Karsten

Abraham Lincoln once said The trouble with quotes from the internet is that you never know if they're genuine.

my Blog | my DVD Profiler Tools


Offline FredLooks

  • phpDVDProfiler Moderator
  • Intermediate Poster
  • *
  • Posts: 107
  • Country: ca
    • View Profile
    • Fred's Home Site
Re: phpdvdprofiler
« Reply #304 on: October 16, 2012, 02:19:15 PM »
1) Is there the ability to 'page' the collection listing.  Would be much faster especially when dealing remotely or even by cell phone.

You mean having only a limited number of movies on the laft hand side? Like mine http://doena-soft.de/phpdvdprofiler_en/ ?

If so, check the localsiteconfig.php for the $TitlesPerPage parameter.

This can also be changed dynamically by clicking on the word "for" in the upper-left frame, between the two combo-boxes...

Offline DSig

  • Heavy Poster
  • *****
  • Posts: 1110
    • View Profile
Re: phpdvdprofiler
« Reply #305 on: October 16, 2012, 04:12:54 PM »
1) Is there the ability to 'page' the collection listing.  Would be much faster especially when dealing remotely or even by cell phone.

You mean having only a limited number of movies on the laft hand side? Like mine http://doena-soft.de/phpdvdprofiler_en/ ?

If so, check the localsiteconfig.php for the $TitlesPerPage parameter.
Thanks for that .. i would have bet it was in there somewhere
Thank you
David

Offline DSig

  • Heavy Poster
  • *****
  • Posts: 1110
    • View Profile
Re: phpdvdprofiler
« Reply #306 on: October 16, 2012, 08:35:40 PM »
MOD: How-to define number of Titles displayed determined on device type
Edited 16oct12 15:48 PT using suggestions from FredLooks

First .. disclaimer .. I really like phpDVDProfiler.  It is a great hack and so far it appears to be very well supported by community and by FredLooks.  This is just an extension that I wanted and thought I would share.  But please .. this requires a change to your phpDVDProfiler's localsiteconfig.php file.  Be sure to back it up before proceeding.  If you have problems I will be happy to try and help.  Also if you have any suggestions please let me know.  Although I have done a lot of php programming .. it has been several years/releases ago .. but my ego isn't fragile  ;D

The Opportunity
I didn't like just setting the $TitlesPerPage to a specific number because I might access the site from my phone or tablet or computer (desktop and laptop).

So to speed up the retrieval times for phone and tablet I wanted this value to be set according to device type.

I found a class called "Mobil-Detect" and it's home page is located here.  Installation is pretty simple and there is a demo program available also.  I would suggest that you install the demo program so you can be sure that it all working before making any change to phpDVDProfiler.

My Installation Steps for Mobile-Detect:
  • Create Directory - i created a directory called MobileDetect in the 'htdocs' folder (on my system it is www).
  • Go to the Mobil_Detect.php source page found hereNote: if that link doesn't work then bring up the 'home' page noted above as 'here' and look for the source.  Else let me know.
  • This will bring up another page with all the source.  Then click the button RAW at the top right of the page.  This will bring the source up in another window .. better for our purposes
  • Once the window is open press Ctrl-A (on windows) to select all the source.
  • Once the source is all highlighted then press Ctrl-C (on windows) to copy the source to the clipboard
  • Open a text editor (notepad will do).  Don't use word or any program that formats.
  • On a blank page (new text file) press Ctrl-V (on windows) to paste the clipboard to the document.
  • Save the file as Mobile-Detect.php in the newly created folder (step 1)
  • Exit your editor

Installation Steps for Mobile-Detect's Demo program
  • Go to the Demo.php source page found here.  Note: if that link doesn't work then bring up the 'home' page noted above as 'here' and look for the source.  Else let me know.
  • This will bring up another page with all the source.  Then click the button RAW at the top right of the page.  This will bring the source up in another window .. better for our purposes
  • Once the window is open press Ctrl-A (on windows) to select all the source.
  • Once the source is all highlighted then press Ctrl-C (on windows) to copy the source to the clipboard
  • Open a text editor (notepad will do).  Don't use word or any program that formats.
  • On a blank page (new text file) press Ctrl-V (on windows) to paste the clipboard to the document.
  • Save the file as test-Mobile-Detect.php in your 'htdocs' folder (in my environment it is www)
  • NOW before exiting your editor we need to make a small change to the demo file.  In your editor do a FIND (in notepad it is Ctrl-F) and search for "require_once" (without the double quotes).  The line found should be "require_once 'Mobile_Detect.php';"
  • Change the "'Mobile_Detect.php'" part to "'/MobileDetect/Mobile_Detect.php'" (without the double quotes).  It should now read
Code: [Select]
require_once '/MobileDetect/Mobile_Detect.php';
  • Now after reviewing you change .. save the text file.
  • Exit your text editor

If you are playing with the demo (and you should!) you should be able to simply enter "localhost/test-mobile-detect.php" into your browsers address bar.  If you are not working on the webserver then replace "localhost" with the address of your server.

Okay .. Changes required to phpDVDProfiler to make this all work

If you have an existing localsiteconfig.php in the phpDVDProfiler directory.  If you don't have this file .. the easiest thing to do is so simply copy the siteconfig.php file to the localsiteconfig.php file in the phpdvdprofiler folder.

FredLooks has suggested that any setup/configuration information should be made to the localsiteconfig.php and not to the siteconfig.php file, as the siteconfig.php file maybe/will be overwritten by updates to phpDVDProfiler.  For this reason all 'local site specific' information should reside in the localsiteconfig.php.  This is also where we will be putting our code for the Mobile-Detect mod.

Once you have the localsiteconfig.php file you will need to add the following code at the end of the file, before the line with  "?>".
Code: [Select]
<?php
// 16Oct12 - dsig  - added Mobile Detect function so can tell size to display
require_once("../MobileDetect/Mobile_Detect.php");
$detect = new Mobile_Detect;
$deviceType = ($detect->isMobile() ? ($detect->isTablet() ? 'tablet' 'phone') : 'computer');

// set according to 'type'
switch ($deviceType) {
case "tablet":
// this is the number of titles to load/display if a tablet device
$TitlesPerPage 60;
break;
case "phone":
// this is the number of titles to load/display if a phone device
$TitlesPerPage 40;
break;
case "computer":
// this is the number of titles to load/display if a computer device
$TitlesPerPage 0;
break;
}

?>


NOTE: Be sure to get all the code.  Sometimes the 'code window' will have a slider ..

Does it work?
If the demo worked .. and if you pasted this code in correctly .. you should now be able to access phpDVDProfiler from any of the devices and have only that number of titles appear.

IMPORTANT: These instructions expect that the folder structure is as defined.  So for any system, the 'htdocs' folder (folder where all the web pages go (including subfolders) is the 'root' folder.  In this folder you should see phpdvdprofiler.  This is the directory where you create the new folder MobileDetect.

If you have any problems or suggestions please let me know.

« Last Edit: October 17, 2012, 02:09:07 AM by DSig »
Thank you
David

Offline FredLooks

  • phpDVDProfiler Moderator
  • Intermediate Poster
  • *
  • Posts: 107
  • Country: ca
    • View Profile
    • Fred's Home Site
Re: phpdvdprofiler
« Reply #307 on: October 16, 2012, 10:50:31 PM »
well, rather than changing siteconfig.php (which is over-written on every release), you could simply put that code you suggested (require_once and all) into localsiteconfig.php, which is the file that is guaranteed not to be over-written. [global.php includes siteconfig.php and then includes localsiteconfig.php to override the defaults]

[not directed at you, Dsig, but to others wanting to "play"):
If localsiteconfig.php doesn't exist, it should, so create one (with <?php at the first line and ?> as the last line) and stick this code in there. In particular, the values for your database name and username and password, as well as any configuration values that differ from siteconfig.php should be in there. That will make installation of a new release easy-peasy, assuming you haven't hacked on the rest of the code.

If you have, then you likely don't need me telling you how to go about your business :laugh:

Offline DSig

  • Heavy Poster
  • *****
  • Posts: 1110
    • View Profile
Re: phpdvdprofiler
« Reply #308 on: October 17, 2012, 12:08:04 AM »
Cool .. I will make the change and update my post to use the suggested file.

Could you update the dvdprofiler_on_windoze.txt file to make this recommendation.  dvdprofiler_on_windoze.txt is the file i used to set it up .. since i am on .. windoze.  It has a lot of detail setup information and not a mention of creating a copy of siteconfig.php.

Thanks for the info ..
« Last Edit: October 17, 2012, 12:17:22 AM by DSig »
Thank you
David

Offline DSig

  • Heavy Poster
  • *****
  • Posts: 1110
    • View Profile
Re: phpdvdprofiler
« Reply #309 on: October 17, 2012, 04:54:42 PM »
To see how this works you can access my collection here

Try it with your phone or tablet

Dsig
Thank you
David

Offline DSig

  • Heavy Poster
  • *****
  • Posts: 1110
    • View Profile
Re: phpdvdprofiler
« Reply #310 on: October 17, 2012, 08:08:25 PM »
FredLooks, or anyone else who knows.

There is a Misc. section on the right that includes IMDb.

Is it possible to add a Wikipeida link.  I very much enjoy the large amount of information that wikipedia has and the numerous segways to other information.

For example, if i was looking at the move "I Am Legend" by "Will Smith" the link would be
Code: [Select]
http://en.wikipedia.org/wiki/I_Am_Legend

If you don't want to deal with this could you point me in the right direction ..

Thanks
Thank you
David

Offline FredLooks

  • phpDVDProfiler Moderator
  • Intermediate Poster
  • *
  • Posts: 107
  • Country: ca
    • View Profile
    • Fred's Home Site
Re: phpdvdprofiler
« Reply #311 on: October 17, 2012, 10:11:16 PM »
FredLooks, or anyone else who knows.

There is a Misc. section on the right that includes IMDb.

Is it possible to add a Wikipeida link.  I very much enjoy the large amount of information that wikipedia has and the numerous segways to other information.

For example, if i was looking at the move "I Am Legend" by "Will Smith" the link would be
Code: [Select]
http://en.wikipedia.org/wiki/I_Am_Legend

If you don't want to deal with this could you point me in the right direction ..

Thanks

Actually, the windows program allows you to specify links in a number of subject areas relating to each Movie. These links are exported to the XML, and I put them into that area of the profile. You can see this on, for example, this Return of the Jedi profile. That's a rather extreme case, other profiles have far fewer links ... so you could put wikipedia entries into the windows program and they would be reflected in the phpdvdprofiler display.

Offline Dragonfire

  • Mega Heavy Poster
  • *******
  • Posts: 6911
    • View Profile
    • Dragonfire88 Pbwiki
Re: phpdvdprofiler
« Reply #312 on: October 21, 2012, 07:05:56 AM »
Well my signature seems to be messed up..all I did was upload a few new profiles.  There was an error message on that - I'll paste it  - and then I looked and the signature seems to be gone. 

Help.

Warning: imagettfbbox() [function.imagettfbbox]: Could not find/open font in /home/dvdalist/public_html/dragonfire.dvdalistic.com/phpdvdprofiler/ws.php on line 1631

Warning: imagettfbbox() [function.imagettfbbox]: Could not find/open font in /home/dvdalist/public_html/dragonfire.dvdalistic.com/phpdvdprofiler/ws.php on line 1648

Warning: imagettftext() [function.imagettftext]: Could not find/open font in /home/dvdalist/public_html/dragonfire.dvdalistic.com/phpdvdprofiler/ws.php on line 1699

Warning: imagettftext() [function.imagettftext]: Could not find/open font in /home/dvdalist/public_html/dragonfire.dvdalistic.com/phpdvdprofiler/ws.php on line 1712

Offline DJ Doena

  • Administrator
  • Mega Heavy Poster
  • *****
  • Posts: 6706
  • Country: de
  • Battle Troll
    • View Profile
    • My Blog
Re: phpdvdprofiler
« Reply #313 on: October 21, 2012, 07:11:20 AM »
Well my signature seems to be messed up..all I did was upload a few new profiles.  There was an error message on that - I'll paste it  - and then I looked and the signature seems to be gone. 

Help.

Warning: imagettfbbox() [function.imagettfbbox]: Could not find/open font in /home/dvdalist/public_html/dragonfire.dvdalistic.com/phpdvdprofiler/ws.php on line 1631

Warning: imagettfbbox() [function.imagettfbbox]: Could not find/open font in /home/dvdalist/public_html/dragonfire.dvdalistic.com/phpdvdprofiler/ws.php on line 1648

Warning: imagettftext() [function.imagettftext]: Could not find/open font in /home/dvdalist/public_html/dragonfire.dvdalistic.com/phpdvdprofiler/ws.php on line 1699

Warning: imagettftext() [function.imagettftext]: Could not find/open font in /home/dvdalist/public_html/dragonfire.dvdalistic.com/phpdvdprofiler/ws.php on line 1712


For some reason one of the font files seems to be missing (e.g. Tahoma, Arial).

First check your localsiteconfig.ph at the very end where you have defined your banners what kind of font your have assigned (it's one of the parameters of your banner).

Then you have to check the location of your jpgraph folder, which is defined in the same file as
Code: [Select]
$usejpgraph = true;
$jpgraphlocation = ...

And then you have to go to that jpgraph folder in your FTP if your font is actually in the folder jpgraph/fonts/truetype
Karsten

Abraham Lincoln once said The trouble with quotes from the internet is that you never know if they're genuine.

my Blog | my DVD Profiler Tools


Offline Dragonfire

  • Mega Heavy Poster
  • *******
  • Posts: 6911
    • View Profile
    • Dragonfire88 Pbwiki
Re: phpdvdprofiler
« Reply #314 on: October 21, 2012, 10:36:48 AM »
Here's what I have for font.

"font" => "comic.ttf"


Here's what I found for that jpgraph thing.... is this what you mean?

//$usejpgraph      = true;
$usejpgraph      = true;
$jpgraphlocation   = 'jpgraph/';
$GDFontPathOverride = 'jpgraph/fonts/truetype';
$localemin      ='0.05';


Where is the jpgraph folder supposed to be?  In the phpdvdprofiler? 
The FTP...is that the program I use to upload profiles? 
I can't find the jpgraph in the directory thing there.  Or anything for fonts.  Unless I'm looking in the wrong place.

Is this something that has to be done at the host?  Do I need to send Sebastien a message for him to check something since he's hosting this stuff for me?

Sorry for all the questions.  This stuff just gets me confused..  I have no idea how I managed to screw it up this time.  :(