Forums

Giving out the source of your templates (8 posts)

  1. Anonymous
    Unregistered
    Posted 8 years ago #

    You probably noticed that you can't just view the source of PHP like you can straight HTML and this provides the struggle of figuring out how to share and managing to keep up to date on all your files that you share. I've figure out a way to ease the management of sharing on Linux servers and hopefully this will breed more sharing.
    My template is very much based on the default template with some differences. With the command (in my blog directory) ln -s index.php index.phps I am able to create a link with the name index.phps to my main directory. This source file (phps) will update each time I update the index template file automatically (because they are really one file). This also should not take up much more space then before cause it's just a link.
    Visit http://josiah.ritchietribe.net/blog/index.phps to see the code or http://josiah.ritchietribe.net/blog/index.php to see the page. I've also done the same thing for my testing page tinder.phps and menu.phps. I use an include call for my menu so I can eventually take it to other locations (when I get around to making them.)

  2. Cena
    Member
    Posted 8 years ago #

    Cool! What about wp-layout.css? :)

  3. NuclearMoose
    Member
    Posted 8 years ago #

    flickerfly,
    What a GREAT idea. Thanks for sharing it as well. Now, just one question--what in the world are you talking about? ROFLOL! (sigh...newbies...can't live with 'em, can't shoot 'em!)
    Some day I will be an expert like you and all the rest of the uberBloggers here at WP. Bear with us rookies and your patience will be rewarded! :)
    Craig.

  4. Anonymous
    Unregistered
    Posted 8 years ago #

    It's a linux trick really the ln command creates a link -s makes is soft (not a big deal, but generally desired) the s on the end of the extension tells the server not to compile it into HTML that the browser can handle, but to instead pass it as a text file.
    Cena, CSS is called directly in the browser will automatically be displayed as plain text. You do have to go into the source of the page to figure out where the CSS is located. Mine, like more WP folk, is at http://josiah.ritchietribe.net/blog/wp-layout.css. There shouldn't be any special need to create a link for it.

  5. OperaManiac
    Member
    Posted 8 years ago #

    how do i do that from the browser? i dont know telnet and stuff.

  6. Anonymous
    Unregistered
    Posted 8 years ago #

    I'm note sure if it's possible. links are an OS feature, and not one for the server or WP. telnet isn't real hard, though I'd suggest ssh (or PuTTY for windows users). The commands you need to know to start are cd somedir means "change directory". ls means "list" the contents of the directory. Anyone else think of absolutely essential ones?

  7. Laughinglizard
    Member
    Posted 8 years ago #

    Just something of note here (from a linux/UN*X system admin point of view). When creating links to provide source code, remember to not do that for the php files that might contain any kind of config information for your blog. That is a huge security risk. I try to stay away from providing source (by using random symbolic file links) without copying it to another directory, checking it through and renaming the file. Symbolic links can also be very evil when performing backups of your directories and/or comparing time stamps.

  8. Anonymous
    Unregistered
    Posted 8 years ago #

    Good point. I haven't done that to any of my config files for that sort of reason. Thanks for making it clear. I'm pretty sure that unless you store config information in the basic templates, you should be fine. Most of that info is available freely by downloading WordPress. Do double check and remember not to ever add that sort of info. Thanks for the reminder LaughingLizard!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.