Welcome, Guest. Please Login or Register
Home
  Forum News:
  HomeHelpSearchLoginRegister  
 
Pages: 1 2 3 
Send Topic Print
Question about Template Files (Read 3102 times)
coter
Newbie
*
Offline



Posts: 27
Question about Template Files
Apr 21st, 2007 at 3:33pm
 
Hi guys,

I have a question about the template files...am I supposed to keep their names as is?  i.e. salesletter.html, download.html, oto.html.

I see the payment and download links use php, so am I supposed to convert these files to php? Am I supposed to convert the salesletter.html to my index file and then delete it?

Also, when a script update occurs, do I have to go thru the whole script installation process over again?

I know these are a lot of questions, sorry.


Thanks!
Ryan
Back to top
 
GarySmith
Junior Member
**
Offline



Posts: 75
USA
Re: Question about Template Files
Reply #1 - Apr 21st, 2007 at 3:59pm
 
You don't want to modify the file type or name of the templates. They are loaded into the index.php file.

You can freely edit the design and style of the templates to your liking to fit your product, but you wouldn't change their name or file type.
Back to top
 
Don Morris
Forum Administrator
The $7 Secrets Guy
*****
Offline


Twitter: @DonMorris

Posts: 1527
Southern California, USA
Re: Question about Template Files
Reply #2 - Apr 21st, 2007 at 5:07pm
 
coter wrote on Apr 21st, 2007 at 3:33pm:
I see the payment and download links use php, so am I supposed to convert these files to php? Am I supposed to convert the salesletter.html to my index file and then delete it?


To follow on to Gary's explanation, index.php is the main script that loads the template (*.html) files. You will leave the names just as they are; you will only edit the .html files to reflect your website design and the products you are offering.

Your .htaccess file may need to have a new entry to tell the server to load index.php as the index page:

Code:
DirectoryIndex   index.php 



Quote:
Also, when a script update occurs, do I have to go thru the whole script installation process over again?


You make it sound like the installation itself was difficult.  Smiley  You will replace, at the very least, index.php (the main script) and ipn.php (the PayPal notification handler), and perhaps settings.php (the settings file you edited) if Jon adds more variables. So, you'll upload three files and copy/paste some settings if you choose to update -- not a big deal. The .html files stay as they are.
Back to top
 

$7 Secrets: Add-ons and Installation, PayPal: Protection
PotPie Queen
Senior Member
****
Offline


Expect Something PRETTY
Big from the Fab Forum
5

Posts: 295
Georgia
Re: Question about Template Files
Reply #3 - Apr 21st, 2007 at 5:18pm
 
Hey Ryan...

First off, trust me, it gets MUCH easier each time!


if the file type ends in .html, edit it in your webpage editor thingy to make it look like you want it to, and put all those .html files in the templates file (along with the blank ipn.text file)

Change the settings.php file to reflect YOUR specifics...and those changes will make your script work for YOUR product specifically.

As for updates (tho I haven't actually done one yet), it will just be a matter of changing out your .php files....should be easy enough.  All you .html files will stay as is.

best of luck to you!

~Jennifer
Back to top
 
globalpro
Star Member
*****
Offline


Expect Something PRETTY
Big From The Fab Forum
5

Posts: 658
USA
Re: Question about Template Files
Reply #4 - Apr 21st, 2007 at 5:50pm
 
Ryan,

Jennifer forgot to mention the most important part.

If all else fails, using bad words can make a difference.

At least that's what I heard. Roll Eyes

John
Back to top
 
PotPie Queen
Senior Member
****
Offline


Expect Something PRETTY
Big from the Fab Forum
5

Posts: 295
Georgia
Re: Question about Template Files
Reply #5 - Apr 21st, 2007 at 5:51pm
 
Oh, TOTALLY...

and if THAT fails...

Get a sledge hammer!
Back to top
 
coter
Newbie
*
Offline



Posts: 27
Re: Question about Template Files
Reply #6 - Apr 22nd, 2007 at 8:38am
 
Wow, thanks everyone for your help.  You guys get back to me so quickly.

So all the .html files go into a 'template folder' and the php files (settings, config, ipn and index) can go in the root directory.  I'd of course have to make the 'template folder' name something impossible to guess.

Jennifer - you mentioned an ipn TEXT file...all I have is a ipn PHP file.  Is this the same thing?  You mentioned it goes into the 'template folder' but I thought only the HTML files go into the 'template folder'
Back to top
 
sublime-products
Forum Administrator
*****
Offline


I'm still learning - are
you?

Posts: 838
UK
Re: Question about Template Files
Reply #7 - Apr 22nd, 2007 at 9:18am
 
coter,

you have to create an ipn.txt file yourself and then upload it to the template folder. Just start a new document in Notepad and then save it and call it ipn.txt

Once you've uploaded it you need to set the permissions on it to 777 - and on the template folder itself. Otherwise when Paypal comes knocking to tell you you've had a sale the script won't be able to make a record of it.

And then your customer will shout at your for not getting his download!


Amin
Back to top
 
GarySmith
Junior Member
**
Offline



Posts: 75
USA
Re: Question about Template Files
Reply #8 - Apr 22nd, 2007 at 1:41pm
 
Thats right... your directory will look something like this.

www.yourwebsite.com
   |
   | - index.php
   | - ipn.php
   | - settings.php
   | - superhardtoguessfoldername123456
         \
         \ - salesletter.html
         \ - customersonly.html
         \ - download.html
         \ - downloadexpired.html
         \ - downloadoto.html
         \ - fraud.html
         \ - invalid.html
         \ - oto.html
         \ - squeeze.html
         \ - ipn.txt
Back to top
« Last Edit: Apr 22nd, 2007 at 1:42pm by GarySmith »  
coter
Newbie
*
Offline



Posts: 27
Re: Question about Template Files
Reply #9 - Apr 22nd, 2007 at 6:33pm
 
Got it!  Thanks guys...your help is much appreciated.
Back to top
 
PotPie Queen
Senior Member
****
Offline


Expect Something PRETTY
Big from the Fab Forum
5

Posts: 295
Georgia
Re: Question about Template Files
Reply #10 - Apr 22nd, 2007 at 6:54pm
 
Hey Gary.... nice diagram  Smiley

I vote we post that at the VERY top of the forum and make it sticky.  Also, add a diagram for those that put their scripts in a subfolder....

First off, its one the most common questions..

Secondly, I'm sure *I* will need it again (and again and again), and this way it will be easy for ME to find.
Back to top
 
globalpro
Star Member
*****
Offline


Expect Something PRETTY
Big From The Fab Forum
5

Posts: 658
USA
Re: Question about Template Files
Reply #11 - Apr 22nd, 2007 at 7:14pm
 
Gary,

I agree with Jennifer. It needs to be somewhere permanent.

John
Back to top
 
PotPie Queen
Senior Member
****
Offline


Expect Something PRETTY
Big from the Fab Forum
5

Posts: 295
Georgia
Re: Question about Template Files
Reply #12 - Apr 22nd, 2007 at 8:30pm
 
Or heck, hows about a Q&A section?  Common questions in each thread title with ONE answer in each (and each thread locked for comment)

Orrrrrrr...wait.... hows about we make a list of each question, write down the answer, compile it in a book, and sell it for $7.  We could write a script that performs the selling process automatically, and then start a forum, and....and.....

Wait a minute... I'm thinking that's not an original idea   Grin
Back to top
 
GarySmith
Junior Member
**
Offline



Posts: 75
USA
Re: Question about Template Files
Reply #13 - Apr 23rd, 2007 at 12:37am
 
Maybe this would be a little easier to decipher...

Left Image = Top Level Script Installation
Right Image = Subfolder Script Installation

......

The numbers in Red are the permissions that file should have (644 is default for most servers and can be taken to mean, this file needs no special permissions)
Back to top
« Last Edit: Apr 23rd, 2007 at 12:52am by GarySmith »  
globalpro
Star Member
*****
Offline


Expect Something PRETTY
Big From The Fab Forum
5

Posts: 658
USA
Re: Question about Template Files
Reply #14 - Apr 23rd, 2007 at 2:11am
 
Wow Gary,

That's awesome. I'm printing that out for the bulletin board.

Definitely a keeper. Wink

John
Back to top
 
Pages: 1 2 3 
Send Topic Print