vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Some basics of vB3(mini howto) (https://vborg.vbsupport.ru/showthread.php?t=59939)

Zachery 01-12-2004 08:37 PM

Quote:

Originally Posted by VodkaFish
If I slap your (longer) example into a blank .php page and use the shell_blank as my template (unchanged); I get an "object expected" error when the page tries to run this script:
Code:

<script type="text/javascript">
<!--
        // Main vBulletin Javascript Initialization
        vBulletin_init();
//-->
</script>

* The page I wrote was in a different directory, so I used this:
PHP Code:

chdir("../forums"); 


you know i also ran into that problem(with other things) i think its somthing with the header include but im not sure >.<

VodkaFish 01-13-2004 03:56 PM

Code:

<script type="text/javascript">
<!--
var SESSIONURL = "";
var IMGDIR_MISC = "images/misc";
// -->
</script>

<script type="text/javascript" src="clientscript/vbulletin_global.js"></script>
<script type="text/javascript" src="clientscript/vbulletin_menu.js"></script>

Well, this was in my header, and why the errors are probably showing. Seems the script locations aren't automatically changed. Probably just a header edit needed.

I put this in my forums directory and it was error-free.

However - despite the nav (with the user cp/register, faqs, etc.) being included in the shell, I still don't see that. Am I missing some other include?

NTLDR 01-13-2004 04:06 PM

If your not using Gamma you should prefix all the JS includes with $vboptions[bburl]/ to make sure they get included properly if you have pages outside of the forums directory.

Zachery 01-13-2004 04:08 PM

doh! i knew i forgot about sumthing, thanks NTLDR :)

VodkaFish 01-13-2004 06:07 PM

Surely, easy fix... but how do I get that main/top nav into my page?

Zachery 01-13-2004 06:52 PM

Quote:

Originally Posted by VodkaFish
Surely, easy fix... but how do I get that main/top nav into my page?

try

eval('$front_header = "' . fetch_template('header') . '";');

VodkaFish 01-13-2004 10:25 PM

Isn't that already called by shell_blank though?

Code:

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$pagetitle</title>
$headinclude
</head>
<body>
$header
$navbar

$html

$footer
</body>
</html>


VodkaFish 01-16-2004 04:39 AM

To follow up my own question, I needed this within my code:
Code:

eval('$navbar = "' . fetch_template('navbar') . '";');
I find that weird, since I didn't need the header or footer, etc. but I needed to call the navbar.

However - links, etc. were all wrong since the navbar template isn't pathed correctly (would need to add $vboptions[bburl]/ in many places I'm assuming).

Just thought I'd update.

Zachery 01-16-2004 04:40 AM

yeap you would

Ryan Ashbrook 01-16-2004 03:24 PM

Is it hard to set permissions for a page, if not, how would I do that?

I want to restrict usergroups to this page.


All times are GMT. The time now is 05:04 AM.

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03645 seconds
  • Memory Usage 1,738KB
  • 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
  • (4)bbcode_code_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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