4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
August 21, 2017, 12:53:29 AM

Login with username, password and session length
Search:     Advanced search
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Help / Hilfe
| |-+  FAQ, Tips
| | |-+  How to add a new, custom template page
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] 2 3 » »» Print
Author Topic: How to add a new, custom template page  (Read 178703 times)
Chris
4images Moderator
4images Guru
*****
Offline Offline

Posts: 4487

Thank You
-Given: 0
-Receive: 31

Did u ever stop to think and then forget to start?


View Profile
« on: April 06, 2003, 02:31:41 AM »

By using a built in feature found within index.php, it is possible to add your own custom template pages that are processed by 4images. This lets you create a new html template that supports many 4images features. In fact, your new template can use whatever you find inside the home.html template.

For example, if you want to create a Frequently Asked Questions page for your visitors:

  • Copy one of the existing templates like "error.html" to "FAQ.html"
  • Remove the {lang_error} {error_msg} from "FAQ.html"
  • Add your FAQ information to "FAQ.html"
  • Upload "FAQ.html" to the your template directory where you keep "error.html"

You can link to the new FAQ page by using a URL like the following example:
http://www.example.com/4images/index.php?template=FAQ

Please note that URLs are CaSe seNSitIve!
« Last Edit: November 24, 2005, 09:35:46 AM by V@no » Logged

jdbinion
Newbie
*
Offline Offline

Posts: 18

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #1 on: November 23, 2005, 05:23:54 AM »

I have tried this method many times...I can't get it to work. I used the home.html as my source to save. Saved it as...aboutus.html
On the original home.html..I added a link to the aboutus.html as you described. I keep getting a 404 file not found. The link I used was just as you describe and I  tried every variable I could think of. Still nothing.
Should this link work using: http://www.mysite.com/4images/index.php/aboutus
Or do I  need to create a new php for this??? Totally confused Rolling Eyes Any help would be greatly appreciated. If I can get one link working..I could then use the same process to create more.
I have searched and searched the FAQ, and everywhere else to find the answer before asking but, there's not much info on this topic......Thanks a heap in advance   Regards, Jeff
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 565

mmm PHP...


View Profile WWW
« Reply #2 on: November 23, 2005, 06:21:20 AM »

its index.php?template=aboutus
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
jdbinion
Newbie
*
Offline Offline

Posts: 18

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #3 on: November 23, 2005, 02:34:01 PM »

V@no...I tried that as well. Exactly as written in Chris's example. Still got the 404 file not found. In his example using the error.html template, he deletes the {lang_error} {error_msg}. Is there something in the Index.html template code on my aboutus.html that needs to be deleted to make it function ?
That's the only thing I can see that I might be doing differently than his example. Thanks for your help..Jeff
Logged
Acidgod
4images Moderator
4images Guru
*****
Offline Offline

Posts: 2420

Thank You
-Given: 0
-Receive: 1

It's me?


View Profile WWW
« Reply #4 on: November 23, 2005, 02:50:22 PM »

can we take a look to the Gallery and in to the Template File?
Logged

V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 565

mmm PHP...


View Profile WWW
« Reply #5 on: November 23, 2005, 03:07:55 PM »

404 error? doubtfull...
How about this idea: you do exactly as it sais in the tutorial, ones you got it working, then you do the changes you want? Wink
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
jdbinion
Newbie
*
Offline Offline

Posts: 18

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #6 on: November 24, 2005, 01:03:05 AM »

can we take a look to the Gallery and in to the Template File?
Acidgod...please do. The website address is: http://www.latinamodelo.com   I've tried this exactly as described and still no luck. I have created another link...unrelated to my site that opens in a "New Window". It works without a hitch so, I feel it's something in the link path that is not correct. The links I am working with are in the left of the table below the Random Image. About US..(doesn't work)  Free Translation..(works fine). Awaiting your opinion...Thanks again for your help.
Logged
jdbinion
Newbie
*
Offline Offline

Posts: 18

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #7 on: November 24, 2005, 03:07:24 AM »

V@no...I folllowed the directions carefully. I'm still getting the same "Page not Found". If you look at my last post, you can see the site and try the link. You see the link I've created goes exactly as described.
http://www.latinamodelo.com/4images/index.php?template=aboutus  You'll get the same results "Page not found".
If you access the aboutus.html directly using this path:
http://www.latinamodelo.com/templates/default/aboutus.html
You will see the html page is there.  Rolling Eyes  Any more suggestions ?
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 565

mmm PHP...


View Profile WWW
« Reply #8 on: November 24, 2005, 09:38:13 AM »

Sorry, but DOH! you dont have 4images folder which you are trying to access.
http://www.latinamodelo.com/4images/index.php?template=aboutus
http://www.latinamodelo.com/index.php?template=aboutus
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
Acidgod
4images Moderator
4images Guru
*****
Offline Offline

Posts: 2420

Thank You
-Given: 0
-Receive: 1

It's me?


View Profile WWW
« Reply #9 on: November 24, 2005, 10:26:22 AM »

(o:
Logged

jdbinion
Newbie
*
Offline Offline

Posts: 18

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #10 on: November 24, 2005, 01:14:04 PM »

THANK YOU so much for all your help!! I wasn't aware I was supposed to upload that folder. As you already know, I am new to PHP. By the description given in the original idea of this thread: I thought somehow that file path accessed 4images to do the processing of the page. Embarassed  But, that information opens another door I hadn't even considered. Idea Thanks again..V@no & Acidgod
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 565

mmm PHP...


View Profile WWW
« Reply #11 on: November 24, 2005, 02:39:54 PM »

I agree, the example in the tutorial could confuse beginners, I've updated it, should be more clear now Smile
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
jdbinion
Newbie
*
Offline Offline

Posts: 18

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #12 on: November 29, 2005, 08:01:16 AM »

O.K...I had successfully figured this part out but now, I've added a new template style. 4darkm by Bali...so what would my file path be to the new html pages now since they are in the 4darkm folder ??? This has me stumped again.
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 565

mmm PHP...


View Profile WWW
« Reply #13 on: November 29, 2005, 08:16:06 AM »

Just add your new template into your 4darkm folder, that's it.
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
jdbinion
Newbie
*
Offline Offline

Posts: 18

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #14 on: November 29, 2005, 03:46:43 PM »

I did add the new html template page to the 4dark folder but, the link example above doesn't work now. It just goes back to the home page.
Logged
Pages: [1] 2 3 » »» Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.075 seconds with 19 queries.