Log in | Register | Lost password

Bottom
Templates not THAT easy :)
  • Posted: 22.08.2003, 17:54
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    Great, a category all for me... :D

    First of all, I think that building your own template from scracth is not THAT easy. The first think that has come to me, is that if you make a copy of /templates/thumbnails and name it like /templates/mine or something else, the photoshare administration menu stops working.

    Ok, there might be duplicate names and it messes up, so I go into /templates/mine/lang/spa/ , edit global.php, and rename the _PTMP_THUMBNAILS_* to _PTMP_MINE_* , and then I edit /templates/mine/template.php, and also search all the instances of _PTMP_THUMBNAILS_* and change them for _PTMP_MINE_*. Back in the admin panel and nope, photoshare still not loading.

    Will look into it, but at least it'd be nice if the admin panel instead of just not loading would give you some kind of error :)
  • Posted: 22.08.2003, 19:16
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    Yeah, that's a classic php/postnuke problem. It's the same when you code a module and make a mistake somewhere. It really stinks. I'll see if I can do anything.
  • Posted: 22.08.2003, 19:45
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    Any clue on what else could should I change for the template to work? I just wanted to keep the old template just in case, else I'll just kill it or move it somewhere else if they both conflict in some way.

    I love to be able to assign an ammount of storage to each individual user now, thx! ;)
  • Posted: 24.08.2003, 14:07
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    1) You need to invent a new class name for the template. Assume your template name is "Mine". Then you should call the template calls for "MineTemplate".

    2) The function at the bottom of the file - the one that instantiates your class and which is called by Photoshare - must also be changed to reflect your template name. The function must be named "photoshare_template_YOURNAME" which is "photoshare_template_Mine" (whatch out for the casing - the spelling must be exactly the same as template directory name).

    3) Rename the template directory to "Mine".

    4) Rename all the language definitions (this is not required but removes some warnings depending on your setup).

Template courtesy of Designs By Darren.