vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Using css in a non VB page? (https://vborg.vbsupport.ru/showthread.php?t=113206)

TomasDR 04-17-2006 02:36 AM

Using css in a non VB page?
 
I am not the best at html/php but based on what I found searching I have gotten quite far I just have two more issues I hope someone could help with.

I was hoping to use my VB CSS with this page I wrote since I included the navbar and footer. I also tried to manually add the colors to the <body> tag but then the page didn't work, I presume due to the javascript.

Worse case (2nd problem) how can I format the navbar to fit the screen, it is about 120% too large so I have horizontal scroll bar on my browser.

I would post the link but it's an adult site so I would prefer to send it by PM.

Thanks in advance

PHP Code:

<?php 
chdir
('/***/forum/');  
require_once(
'./global.php'); 
eval(
'$navbar = "' fetch_template('navbar') . '";'); 
print 
$headinclude
print 
$header
print 
$navbar
?> 
<html> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<head> 
<title>Learn Spanish</title>
<style type="text/css" id="vbulletin_css"></style>
</head> 
<body>
<script language="javascript" src="http://www.donquijote.org/ext/cont/free_pdd.js.asp"> </script> <br><center><a href="http://www.donquijote.org" target="_NEW">Learn Spanish with don Quijote </a></center> 
<script language="javascript" src="http://www.donquijote.org/ext/cont/free_lesson.js.asp"> </script> <br><center><a href="http://www.donquijote.org" TARGET="_new">Learn Spanish with don Quijote </a></center> 
</body> 
</html> 
<?php 
eval('$footer = "' fetch_template('footer') . '";'); 
print 
$footer
?>


SixteenOhNine 04-17-2006 05:03 AM

Would it not be easier to create a page powered by vBulletin as opposed to combining hard-coded PHP and HTML into a single page? There is a wonderful tutorial on how to do just that below :).

https://vborg.vbsupport.ru/showthread.php?t=98009


Worth a read and may help you, in addition to lightening your load.

Toneboy 04-17-2006 11:06 AM

It looks as if you're not linking to a css file.

Your header should begin something like this:
PHP Code:

<?php 
chdir
('/***/forum/');  
require_once(
'./global.php'); 
eval(
'$navbar = "' fetch_template('navbar') . '";'); 
print 
$headinclude
print 
$header
print 
$navbar
?> 
<html> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<head> 
<title>Learn Spanish</title>
<LINK rel=stylesheet type=text/css href=http://www.yourdomain.com/styles/style.css>
</head> 
<body>

Personally I swept up the css generated in vBulletin and made that into a separate .css file. Works fine with other pages on my site.

TomasDR 04-17-2006 08:07 PM

Quote:

Originally Posted by SixteenOhNine
Would it not be easier to create a page powered by vBulletin as opposed to combining hard-coded PHP and HTML into a single page? There is a wonderful tutorial on how to do just that below :).

https://vborg.vbsupport.ru/showthread.php?t=98009


Worth a read and may help you, in addition to lightening your load.

Completely missed that thread.

Thank you very much, worked perfectly!

SixteenOhNine 04-17-2006 09:48 PM

Quote:

Originally Posted by TomasDR
Completely missed that thread.

Thank you very much, worked perfectly!

No problem, thought it would be a bit easier seeing as you could simply update from the Admin CP instead of having to re-upload so many HTML pages.


All times are GMT. The time now is 01:28 AM.

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.00967 seconds
  • Memory Usage 1,733KB
  • 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
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete