#include v <iframe>

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Vegan
Forum Regular
Posts: 574
Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:

#include v <iframe>

Post by Vegan »

right now my chess site is old fashioned HTML 5 with PHP document assembly

now I was pondering WordPress for the site but I have not been able to figure out how to get PHP include working

so I was thinking maybe <iframe> could allow me to add chess results to a page/post?

suggestions?
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: #include v <iframe>

Post by Celauran »

Both include and iframe seem like poor solutions. What are you trying to accomplish?
User avatar
Vegan
Forum Regular
Posts: 574
Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:

Re: #include v <iframe>

Post by Vegan »

I have some various things in mind

system requirements for games are almost boilerplate text so why not use 3 or 4 basic includes for the various classes of consoles etc

the chess site is made up of html files which are #included now
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: #include v <iframe>

Post by Celauran »

Oh I see. I was trying to steer you away from an include-based architecture. For fragments of markup, includes definitely make sense. Have you looked at get_template_part? I seldom use WP, but this looks like it might be what you want.
User avatar
Vegan
Forum Regular
Posts: 574
Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:

Re: #include v <iframe>

Post by Vegan »

My chess site is all modularized into PHP components like WP is. WP however has new ways to doing things so I was attempting to find alternatives.

So what is this class based architecture going to do for me?

iframes are flakey with WP, they do not position as easily as I would like but that is more of a CSS problem

eg:

CPU: i3-2100
RAM: 8GB
GPU: GTX 760 or R9-370
DISK: 68GB


NB: need a bulleted list for the forum
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: #include v <iframe>

Post by Celauran »

Vegan wrote:So what is this class based architecture going to do for me?
If you're going to be using WordPress, it's a moot point. Otherwise, it keeps your code organized and DRY
User avatar
Vegan
Forum Regular
Posts: 574
Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:

Re: #include v <iframe>

Post by Vegan »

Back with my roll your own I used 5 different machines for system requirements. So I used PHO #include to choose the one that was needed. Easy.

So now I have <iframe> which has been around for a while

Code: Select all

<iframe src="//hardcoregames.azurewebsites.net/"></iframe>
but I would have a folder with the relevant parts

so do I need to do anything with the iframe content, or do I need a new DOM to work with?
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
Post Reply