Integrating Gellery Menalto into my website

Discussion in 'HTML & Website Design' started by Nima, Dec 8, 2006.

  1. #1
    Hey,

    I've been trying to do this for a while now. I ended up writing the code of my header, left menu, and footer into the .tpl files of Gallery theme and integrate the gallery into my website.

    However, this time I am determined to this right using <php include> so that i only have to change one header,menu, or footer the whole and make it a true integration.

    I've been trying to ask the Gallery support but not much response there.


    I was pointed to this page:
    http://smarty.php.net/manual/en/language.function.include.php

    I want to use PHP Includes in the .tpl files to include header, right menu, left menu, and the footer.

    My website is:
    http://www.blacksburgpoker.com/

    and my gallery is:
    http://www.blacksburgpoker.com/gallery/main.php

    If anyone can help me out here, I would greatly appreciate it...

    Cheers,
    Nima,

    Ps. Here are some other links I've found regarding this matter:
    http://gallery.menalto.com/node/58026
    http://codex.gallery2.org/index.php/Gallery2:Embedding
    http://codex.gallery2.org/index.php...n_your_own_website_by_editing_theme_templates
     
    Nima, Dec 8, 2006 IP
  2. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #2
    first of all
    i would take hours or days to study the extremely well maintained gallery2 howtos and FAQs
    then also look at
    http://g2-sites.com/categories

    there you see a variety of gallery2 standalone and embedded in various CMS - look how they solved the problems

    to give any detailed help you may need to specify your exact CMS used

    personally i find the current link to your gallery fine
    I also have gallery2 standalone on my site - and the only integration I made is to have some random images included into some pages with a link to the gallery2

    there would be FAR more important things to do first
    like
    securing your upgrade folder and your install folder
    most likely also your maintenance folder

    your site is wide open right now!!

    if you have no other options and knowledge these very minutes to instantly secure your partial installation - then at least
    chmod 000 all a.m. gallery2 folders
    also give correct chmod using the gallery tool - to all gallery folders and files before closing above folders.

    you find MOST detailed security and config howtos on menalto site including some howto for your apache config to increase your gallery2 security

    then you also may want FIRST to change the gallery config to have main.php replaced by index.php BEFORE your main.php is all over the SEs.
     
    hans, Dec 9, 2006 IP
  3. Nima

    Nima Well-Known Member

    Messages:
    3,489
    Likes Received:
    243
    Best Answers:
    0
    Trophy Points:
    175
    #3
    My site does not use any CMS. It's php based and I wrote everything myself.

    Thanks for the info. I'll work on securing my gallery.

    Cheers,
    Nima
     
    Nima, Dec 9, 2006 IP
  4. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #4
    good luck
    re security
    gallery2 certainly has all needed security features to lock your gallery safely if you follow ALL howtos available

    i have and had hacker attempts on gallery2 SW these past days/weeks - hackers will know that your install is new and semi-finished and will have a "crush" on you :)
    hence i hope you closed all your open doors by now
    just to make sure your files system is clean - check for files that might have been uploaded while doors open
     
    hans, Dec 9, 2006 IP
  5. Nima

    Nima Well-Known Member

    Messages:
    3,489
    Likes Received:
    243
    Best Answers:
    0
    Trophy Points:
    175
    #5
    How would a hacker upload the files from and where would he upload it to?

    What is the main security issue?
     
    Nima, Dec 9, 2006 IP
  6. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #6
    with your gallery being fully open to all world
    a hacker could upload files ANY place he finds fit for his purpose

    the security issue is that you forgot to fully study the complete and very detailed gallery security guides available - see among others
    http://codex.gallery2.org/index.php/Gallery2:Security
    i stated 2 precise sections of your gallery that are FULLY open
    look in SSH at the 2 folder-names I mentioned
    and close them ASAP chmod 000
    look at the third one - i have NO exact path to that - the built in maintenance section - and make sure you close that as well.
    when a hacker can reinstall your entire gallery as he could NOW or chmod anything - then a hacker may do almost anything he wants depending on your other SW you have.
    the gallery2 forum is the bhest to READ, study, search for answers - MOST is already published in the many doc pages - all else is best posted at http://gallery.menalto.com/support following the support guidelines.
     
    hans, Dec 10, 2006 IP
  7. Nima

    Nima Well-Known Member

    Messages:
    3,489
    Likes Received:
    243
    Best Answers:
    0
    Trophy Points:
    175
    #7
    I've secured my gallery (followed the instructions on the website)

    However, there was one thing I didnt know how to do. It is recommended to move my Pictures folder (gallery2data) to a folder above the root folder of my hosting account.

    How can I do that (i know i can simply move it in FTP)? More precisely how can i let Gallery know about the new path?

    Thanks
     
    Nima, Dec 10, 2006 IP
  8. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #8
    yes - i see you have done your security work

    in your gallery main folder - file
    config.php
    you see the line
    $gallery->setConfig('data.gallery.base', ....
    that's where you tell gallery where your folder
    g2_data

    there is one more folder you may want to chmod 000
    that is the folder
    lib/support

    whie there is a password asked for login - some hackers just run a script to test thousands of pws - I had similar case in my gallery in the early days on my new server - hence i closed that door as well.

    just remember that you have to re-chmod 755 or 777 when you upgrade or reinstall . until then there is no need at all for all those admin sections.

    as said earlier - you may also want to exchange the main.php file with the index.php
    as described here
    http://gallery.menalto.com/node/32349

    God bless - Merry Christmas
     
    hans, Dec 10, 2006 IP