vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Applying Stylesheet to IFRAME contents (https://vborg.vbsupport.ru/showthread.php?t=91261)

tamarian 06-30-2005 01:51 PM

Quote:

Originally Posted by m0nde
HTML Code:

<html>
<head>
<? echo $style['css']; ?>
</head>
<body>
<span class="alt1"><strong>Blah...</strong><br /><br />Blah Blah</span>
</body>
</html>


You're missing global.php. Try this:
HTML Code:

<? require_once('global.php'); ?>
<html>
<head>
<? echo $style['css']; ?>
</head>
<body>
<span class="alt1"><strong>Blah...</strong><br /><br />Blah Blah</span>
</body>
</html>

Which may produce some warning, but let's see if it works.

m0nde 06-30-2005 02:20 PM

Actually, no warning occurs and no changes either :(
It still shows a white background with black text.

- Sid

tamarian 06-30-2005 02:34 PM

We may have missed something very simple. alt1 and alt2 do not apply to <span>, I don't think.

You can test by accessing ther iframe page directly from the browser, and view the source, to see if the style is there as expected.

m0nde 06-30-2005 02:54 PM

Quote:

Originally Posted by tamarian
We may have missed something very simple. alt1 and alt2 do not apply to <span>, I don't think.

You can test by accessing ther iframe page directly from the browser, and view the source, to see if the style is there as expected.

If I access this page directly it still shows up as black Times New Roman (browser default font) text with a white background.

Even if the alt1 and alt2 aren't working properly, shouldn't the colour work? ...and the font?

I know that people have used IFRAMEs to display things like the shoutbox, etc.

- Sid

tamarian 06-30-2005 02:59 PM

I'm not sure because I don't have the files.

But what happens when you view the page source? What style is defined there?

m0nde 06-30-2005 03:07 PM

The source, when viewing the file directly in a web browser doesn't expand the PHP script at all!
It just shows the literal text. Why is this?

- Sid

tamarian 06-30-2005 03:43 PM

Quote:

Originally Posted by m0nde
The source, when viewing the file directly in a web browser doesn't expand the PHP script at all!
It just shows the literal text. Why is this?

- Sid

That's how it should work. You're all set.

m0nde 06-30-2005 10:53 PM

Quote:

Originally Posted by tamarian
That's how it should work. You're all set.

You're telling me the source, when viewed in a web browser is supposed to show up like:
HTML Code:

<? require_once('/forums/global.php'); ?>
<html>
<head>
<? echo $style['css']; ?>
</head>
<body>
<span class="alt1"><strong>Blah</strong><br /><br />Blah Blah</span>
</body>
</html>

I thought that the require_once was supposed to actually include all of global.php in that space and that the command to echo the style variable was supposed to type out the contents of that variable in that space.

tamarian 06-30-2005 10:58 PM

No, I thought you said it showed the lirterals. I took that to mean the actual colour codes for alt1 and alt2.

The page view you showed tells me that you have not made the file a .php as I suggested earlier. To interpret it as PHP, it needs to be a PHP extension. :)

m0nde 06-30-2005 11:35 PM

Quote:

Originally Posted by tamarian
To interpret it as PHP, it needs to be a PHP extension. :)

Thanks. I have tried this both with an HTML extension and a PHP extension. When I try it with a PHP extension, it just shows up as blank with a white background. You've seen above what happens when I try it with an HTML extension.

The source of the PHP file if viewed after being parsed shows up as follows:

PHP Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<
HTML><HEAD>
<
META http-equiv=Content-Type content="text/html; charset=iso-8859-1"></HEAD>
<
BODY></BODY></HTML

It seems that the global.php is the problem because if that is excluded the rest of the file shows something. I know that global.php resides in that place (/forums/global.php) and I've tried replacing the whole thing with:
PHP Code:

<? phpinfo(); ?>

to test whether anything's going on and this does show the information page in the IFRAME.

- Sid


All times are GMT. The time now is 06:19 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02615 seconds
  • Memory Usage 1,747KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_html_printable
  • (2)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete