Previous Thread
Next Thread
Print Thread
Hop To
#167769 11/05/2006 12:10 AM
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
R
Former Developer
Former Developer
R Offline
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
UBB.threads Developer
UBB.threads Developer
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.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
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:

PHP Code
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
PHP Code

 <? 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
UBB.threads Developer
UBB.threads Developer
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 frown...

Looks like we may have to start our own little smarty templating study group lol...


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Aug 2006
Posts: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
Originally Posted by Gizmo
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 frown...

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
UBB.threads Developer
UBB.threads Developer
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 wink


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Aug 2006
Posts: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
That would be a very "smart" thing to do laugh

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.



Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
3 members (rootman, Gizmo, Nightcrawler), 562 guests, and 186 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)