English > Development

PK's MovieDB dynamic website template

<< < (5/17) > >>

rick.ca:

--- Quote ---The replace function is indeed case sensitive now, but I can change this behavior easily.
--- End quote ---

I'm sure if I were using this regularly, I would find occasion to want it both ways. Can you add an option, or provide two separate functions?

nostra:

--- Quote ---I'm sure if I were using this regularly, I would find occasion to want it both ways. Can you add an option, or provide two separate functions?
--- End quote ---

OK, no problem. There will be two replace functions.

blue334:
Sounds good, thanks.

blue334:
Here are some updated files. Changes are:

- cleaned the code,
- improved instructions
- optional components: "Period" panel (see my site) and awardspace filter replacement commands.


PKs_MovieDB_modified_public.zip


Contents of current README:


--- Quote ---PK's MovieBD dynamic website template.
Modified and adapted for Personal Video Database (PVD).


Date 2008-10-20


1.  Unpack PKs_MovieDB_modified_public.zip

2.  Register a website at www.awardspace.com or other free host (awardspace assumed below).

3.  Create a database "yourdomain_movies" using the management tools for the site.
    Log into phpmyadmin. Run the SQL query "fields.sql" to create a table "movies"
    with the necessary fields. Check that the structure looks ok afterwards.
    Take note of servername, your credentials, the database name and the table name.


4.  Edit mdb_config.inc with the database values.

5.  Log on to yourdomain.awardspace.com with an ftp manager
    with yourdomain:pass as credentials (PASV mode).

6.  Where the dummy index.html file resides, upload contents
    of folder PKs_MovieDB_modified_public (including the modified mdb_config.inc)

7.  Check that you can access your domain http://yourdomain.awardspace.com/index.php

8.  On your local computer, create a directory for export.
    Create a subdirectory "images" for pictures export.

9.  PVD uses system settings to format dates. The website template assumes sortable
    date format YYYY-MM-DD for date entries. If your regional settings are
    different, change them in Control Panel>Regional Settings temporarily.

10. Start PVD

11. Export database using the sql export template (put sql.ptm in
    \Personal Video Database\Plugins\Templates first).
    Export to the directory you just created.

12. Open the file in notepad++ or similar editor that will save UTF-8 NO BOM format (not notepad).

13. Search-Replace all instances of [''''] with ['']

14. Search-Remove all instances of [images/]

15. If you have poster images of multiple formats, search-replace all
    non-jpg extensions in the textfile to .jpg (e.g. .png, .gif, .jpeg).

16. Format file as UTF-8 NO BOM and save. If your sql export file is less than about 1,700KB, your
    script is ready to go. Otherwise split file into parts no bigger than 1,700KB.
    Make sure the split files are also saved as UTF-8 NO BOM (Byte Order Mark).
    The filesize limit suggested by phpadmin (2,048KB) is too high and will fail to run.

17. Resize/convert images to jpg W=96px using a batch tool (e.g. Xnview, Faststone)

18. Log on to awardspace>phpmyadmin again.

19. Import the sql script(s) into the
    database.

20. Upload the resized images to the antexport folder using your ftp file manager.

21. Reload website and you're done. Ask me if there are problems.





*MORE STUFF*



UPDATING THE SITE
When updating drop the entire table in phpmyadmin and run the fields.sql query again.



ENABLING THE "PERIOD" SIDE PANEL.
The Period panel groups years into periods, which is much better than individual years if you
have many older movies. This requires a separate php script to be run AFTER you're
done uploading your database.

Run http://yourdomain.awardspace.com/processperiod.php in your browser

In the side panel section of mdb_config.inc, enable the PERIOD panel (change FALSE to TRUE).
Also uncomment the three lines (remove peceding slashes).
Disable the YEAR panel since you don't need both.

Upload mdb_config.inc again and reload your site.

If you perform an update on your site you must run processperiod.php again.
Thanks to ty3001 at the AMC forums for the processperiod.php script.



AUTOMATICALLY REPLACE WORDs BLOCKED BY AWARDSPACE
Changes words/phrases that will cause problems on an awardspace site
(due to their list of blocked words and phrases).
Paste contents of "Awardspace filtered words.txt" into the OPTIONS section of sql.ptm
(e.g below the last replace)
The word list is not complete but it will remove the most common filtered words.



PERSONALIZATION
You probably want to change the logo. It is located in templates\default\images
To change the color scheme, just edit the stylesheet. Some gif files
in the logo folder will have to be modified as well.




--- End quote ---

JedMeister:
WOW  :o

That is impressive! (both the web template using the db from PVD and also your db!)

I'm not 100% sure how, but I'm going to have to have a go at setting this up on my web page too!

I only came across PVD today and I am sooo impressed with it! Lots of info and friendly folks here on the forums too!

Keep up the good work blue334!

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version