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)

NTLDR 01-16-2004 03:28 PM

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:

if (!in_array($bbuserinfo['usergroupid'], array(123))) {
    
print_no_permission();



Ryan Ashbrook 01-16-2004 03:38 PM

Thanks, it works perfectly. :)

VodkaFish 01-18-2004 10:07 PM

Quote:

Originally Posted by NTLDR
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:

if (!in_array($bbuserinfo['usergroupid'], array(123))) {
    
print_no_permission();



That works for me. However - the login displayed does not (pathing issues). I looked around, found the print_no_permission() function and followed it to these templates:
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?

NTLDR 01-18-2004 10:18 PM

The STANDARD_ERROR template contains the majority of the HTML for the no permission screen that you'll need to edit :)

VodkaFish 01-18-2004 10:19 PM

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>

It will not fade color in IE anymore.

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:

VodkaFish 01-18-2004 10:22 PM

Quote:

Originally Posted by NTLDR
The STANDARD_ERROR template contains the majority of the HTML for the no permission screen that you'll need to edit :)

Awesome, that was it. Please give yourself a secondary title of booty-kicker. Thank you :)

Mijae 01-31-2004 04:49 PM

Quote:

Originally Posted by VodkaFish
Awesome, that was it. Please give yourself a secondary title of booty-kicker. Thank you :)

I've been trying to get my gallery to work all day long...if I put the template calling at the end of the file, it will load the images ABOVE the header...if I add the template calling before the images, nothing will load after the header...

Its driving me mad...here is my thread

I also tried editing another gallery script, but I ended up with the same problems, images would only load above header, but nothing would load under it.

Zachery 01-31-2004 08:43 PM

it looks like your hard coding the file, this howto deals more with using the template system directly

Mijae 02-01-2004 05:01 PM

Quote:

Originally Posted by Faranth
it looks like your hard coding the file, this howto deals more with using the template system directly

Seems so, so there is no way to add footer/header templates to hard coded page then?

Zachery 02-01-2004 07:52 PM

Im sure there is, but i dont know how to do it really


All times are GMT. The time now is 04:51 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.03553 seconds
  • Memory Usage 1,743KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (4)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