The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Some basics of vB3(mini howto)
![]() Some basics of vB3(mini howto) also some basic php junk the most important thing if you want to make pages based on templates or anything of the such would be to first know how to " connect" to vbulletin, and then learn how to call and eval templates. so lets take a look at the most BASIC page we can do PHP Code:
somthing abit more advanced. suchas calling more than one template, or doing an action it becomes abit more complicated PHP Code:
PHP Code:
if your going to write a script that is ALL actions you should add somthing like this right after the call to gobal.php PHP Code:
![]() Mini Tut by Faranth (with some help from Brad.loo fixing my silly newbie mistakes ![]() |
#32
|
||||
|
||||
![]() Quote:
|
#33
|
|||
|
|||
![]() 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> 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? |
#34
|
||||
|
||||
![]()
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.
|
#35
|
||||
|
||||
![]()
doh! i knew i forgot about sumthing, thanks NTLDR
![]() |
#36
|
|||
|
|||
![]()
Surely, easy fix... but how do I get that main/top nav into my page?
|
#37
|
||||
|
||||
![]() Quote:
eval('$front_header = "' . fetch_template('header') . '";'); |
#38
|
|||
|
|||
![]()
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> |
#39
|
|||
|
|||
![]()
To follow up my own question, I needed this within my code:
Code:
eval('$navbar = "' . fetch_template('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. |
#40
|
||||
|
||||
![]()
yeap you would
|
#41
|
||||
|
||||
![]()
Is it hard to set permissions for a page, if not, how would I do that?
I want to restrict usergroups to this page. |
#42
|
||||
|
||||
![]()
The following will show the no permission message to users who arn't in group 1, 2 or 3 (remove the ! to make it show if they are in 1, 2 or 3). Just replace 1, 2, 3 will a comma sperated list of usergroups to match your needs.
PHP Code:
|
#43
|
||||
|
||||
![]()
Thanks, it works perfectly.
![]() |
#44
|
|||
|
|||
![]() Quote:
username_loggedin username_loggedout So I fixed the pathing on each of them - yet I still can't get it to go correctly. I know I'm missing it somewhere else - does anyone know where? |
#45
|
||||
|
||||
![]()
The STANDARD_ERROR template contains the majority of the HTML for the no permission screen that you'll need to edit
![]() |
#46
|
|||
|
|||
![]()
Oh, one other thing - I pathed the navbar correctly (made it a separate template actually, just in case I f'd something up, but it appears right.
The only thing throwing me off is the logout javascript: Code:
<script type="text/javascript"> <!-- function log_out() { ht = document.getElementsByTagName("html"); ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)"; if (confirm('$vbphrase[sure_you_want_to_log_out]')) { return true; } else { ht[0].style.filter = ""; return false; } } //--> </script> Obviously a very minor issue. Another minor issue I am having is that my tables within my template go too wide (don't have this problem on my forums within the forum directory). I was able to tweak percentages to pixels for a temporary fix, but if anyone knows what this vague problem may be, thought I'd mention it as well; my post above is my big concern right now though :ermm: |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|