|
Joined: Aug 2006
Posts: 583
old hand
|
old hand
Joined: Aug 2006
Posts: 583 |
I have figured out how to integrate siple HTML pages by making a seperate template, script and langage file and it all seems to work fine. But if I was to integrate a page that used PHP, how would I do that? I have a PhPMyCHat page that I would like to integrate so that when I click the link for it, it comes up in the center, surreounded by the side bars as do all teh other pages. Like I said, I have been able to do this with plane HTML pages, but is it possible with PhP script to integrate into templats?
Basil
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
I'm not at my home computer right now so I can't access the code, but there is a sample script on how to do this in the scripts directory called sample.inc.php I believe. I'm not sure if I have this totally finished, but I know a good portion of it is that might help you get started.
|
|
|
|
Joined: Jun 2006
Posts: 16,292 Likes: 116
|
Joined: Jun 2006
Posts: 16,292 Likes: 116 |
You should check out my modification at UBBDev.com for the IRC Chat for a great working example of how to achieve this.
|
|
|
|
Joined: Aug 2006
Posts: 583
old hand
|
old hand
Joined: Aug 2006
Posts: 583 |
Actually it was that sample script that I have used successfully with a corresponding script file and a language file to make a number of intergrated pages that only use html. That much I seem to be able to do ok. What I don't quite understand is how to integrate PhP script into an integrated page. The template page seems to be where I put the HTML I want displayed. But, just for a simple example, lets say I wanted to add some dynamic content to my integrated page and have something like: echo "This is some ".$content;
How would I do that? I have tried just putting it in the template file with the start and end php tags, put that doesn't work. Basil ( a newbie)
|
|
|
|
Joined: Aug 2006
Posts: 583
old hand
|
old hand
Joined: Aug 2006
Posts: 583 |
I looked at your IRC mod and it was a little like a chicken looking at a card trick...over my head. I did not see how you were integrating "PhP" into the page. Lets say I have a page that is mostly HTML, but uses a small amount of PhP to say, open a database. Or say I just wanted to echo some variabel with PhP. WHat I'm trying to figure out is how to do that. When I put for example
<? echo "This is some ".$variable;
?>
If I put that in my template, it just displays the raw PhP code and it does get translated. I'm hoping to understang the relationship between the template files, the scripts and the language "wordlets" and how I might incorporate a currnet page that uses PhP into this Threads 7 format. I have several pages I have integrated into my current 6.5.X version that are PhP files, but I can't seem to get anything but plain HTML to integrate into 7.0. Is there a tutorial somewhere that migh help? Thanks, Basil
|
|
|
|
Joined: Jun 2006
Posts: 16,292 Likes: 116
|
Joined: Jun 2006
Posts: 16,292 Likes: 116 |
Ahh, the templates use the smarty templating engine, so raw php code won't work in there; I'm all thumbs when it comes to smarty templating, I honestly have 0 idea how to deal with them ... Looks like we may have to start our own little smarty templating study group lol...
|
|
|
|
Joined: Aug 2006
Posts: 583
old hand
|
old hand
Joined: Aug 2006
Posts: 583 |
Ahh, the templates use the smarty templating engine, so raw php code won't work in there; I'm all thumbs when it comes to smarty templating, I honestly have 0 idea how to deal with them ... Looks like we may have to start our own little smarty templating study group lol... I'm game! I want to better understand the relationship between templates, scropts and language files. I manages to integrate a couple of simple HTML pages using the sample template provided, but I reall don't understand what I'm doing yet. Basil
|
|
|
|
Joined: Jun 2006
Posts: 16,292 Likes: 116
|
Joined: Jun 2006
Posts: 16,292 Likes: 116 |
hmm, lemme finish fiddling with my centos box (this week) and I'll do some digging with smarty tutorials
|
|
|
|
Joined: Aug 2006
Posts: 583
old hand
|
old hand
Joined: Aug 2006
Posts: 583 |
That would be a very "smart" thing to do
|
|
|
|
Joined: Aug 2006
Posts: 583
old hand
|
old hand
Joined: Aug 2006
Posts: 583 |
I think I am staring to sort of kinda understand Smarty and templates. I have been playing around with a test script and template for the past couple of days and also reading up on some online "smarty" tutorials. Still a long way to go, but I'm starting to at least get a grasp of it I think.
|
|
|
|
|