vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   WebTemplates 3.5.x: VB Integrated CMS (Content Management System) (https://vborg.vbsupport.ru/showthread.php?t=103076)

dcpaq2xx 01-28-2006 04:24 AM

Group,

The htaccess file that is in the forum folder...

I dont see anything in the installation instructions indicating to do anything with it or what it is for.

Is this file suppose to be placed anywhere, and if so what is it for or do?

Thanks

Doug

Logician 01-28-2006 06:19 AM

Quote:

Originally Posted by dcpaq2
The htaccess file that is in the forum folder...

I dont see anything in the installation instructions indicating to do anything with it or what it is for.

Is this file suppose to be placed anywhere, and if so what is it for or do?

Details in User Manual, section IV : How to Enable Search Engine Friendly WebTemplate URLs

EasyTarget 01-30-2006 04:01 AM

hi Logician, I'm using the latest version of this but I seem to still have permission errors for users with quite a few usergroups.

I have the main user group set to yes and the various other groups set to no, and they get a no permission error.

Logician 01-30-2006 06:33 AM

Quote:

Originally Posted by EasyTarget
hi Logician, I'm using the latest version of this but I seem to still have permission errors for users with quite a few usergroups.

I have the main user group set to yes and the various other groups set to no, and they get a no permission error.

Sorry but this is not a bug, this is how the permission system works. More info:
https://vborg.vbsupport.ru/showpost....&postcount=118

bang 01-30-2006 09:13 PM

Logician, do you have any plans to add nested categories functionality to this great hack? It would be totally awesome for those that use vBSEO and want to build their site completely around vBulletin, and yet have it SEO'd.

For example, If I could have a site.com/view.php?cat=tutorials&subcat=php&pg=seo, using vBSEO I could turn this into site.com/page/tutorials/php/seo
and so on. plus cateries would make it a lot easier to sort information when there are a lot of pages that need to be created.

EasyTarget 01-30-2006 11:57 PM

Quote:

Originally Posted by Logician
Sorry but this is not a bug, this is how the permission system works. More info:
https://vborg.vbsupport.ru/showpost....&postcount=118

well according to that post that's the situation with secondary groups, but this is with a primary group.

I have no problems with the permissions on other parts of vb, its just in the pages created with webtemplates.

Logician 01-31-2006 05:53 AM

Quote:

Originally Posted by EasyTarget
well according to that post that's the situation with secondary groups, but this is with a primary group.

I have no problems with the permissions on other parts of vb, its just in the pages created with webtemplates.

Actually it does not matter whether it is a primary group or secondary. The important point in the hack's permission structure is that, if you check a usergroup as "banned usergroup" for a webtemplate, the user who in any way related to this usergroup (as a member of secondary of primary usergroup) will be denied access.

Logician 01-31-2006 05:56 AM

Quote:

Originally Posted by bang
Logician, do you have any plans to add nested categories functionality to this great hack? It would be totally awesome for those that use vBSEO and want to build their site completely around vBulletin, and yet have it SEO'd.

For example, If I could have a site.com/view.php?cat=tutorials&subcat=php&pg=seo, using vBSEO I could turn this into site.com/page/tutorials/php/seo
and so on. plus cateries would make it a lot easier to sort information when there are a lot of pages that need to be created.

I'm sorry but I don't have more time to commit for improving this hack. Any hackers who like to improve it has my blessing though.

EasyTarget 01-31-2006 03:23 PM

Quote:

Originally Posted by Logician
Actually it does not matter whether it is a primary group or secondary. The important point in the hack's permission structure is that, if you check a usergroup as "banned usergroup" for a webtemplate, the user who in any way related to this usergroup (as a member of secondary of primary usergroup) will be denied access.

is there any solution to this besides not using secondary usergroups?

my situation..
its a gaming forum with different teams. The team captain has access to stuff that the rest of his team doesn't. The team captain is a member of the team captain group and his team group. Because this hack handles permissions differently than the forum the team captain can't access the team captain page because he's a member of the team group.

There's also an administration page for admins. Some admins are also team members. The admins can't access their pages because they are also in the team group which can't have access to the administration pages.

WAR 01-31-2006 04:04 PM

Quote:

Originally Posted by EasyTarget
is there any solution to this besides not using secondary usergroups?

my situation..
its a gaming forum with different teams. The team captain has access to stuff that the rest of his team doesn't. The team captain is a member of the team captain group and his team group. Because this hack handles permissions differently than the forum the team captain can't access the team captain page because he's a member of the team group.

There's also an administration page for admins. Some admins are also team members. The admins can't access their pages because they are also in the team group which can't have access to the administration pages.

That was the same problem that I ran into. It's just a different mindset for how you are using vbulletin's permission system compared to how Logician apparently uses it (both being perfectly valid methods)

Here is one fix:

WARNING: The following changes will completely reverse the way that Logician has set up the permissions for this Hack. DO NOT USE this unless you completely understand what it is for!!!
Code:

function WT_UsergroupPermission($userinfo, $return10 = 1, $usergroupname = '')
{
        global $WT; 

        $permitted = 0;

        $WT['banusergroups'] = trim($WT['banusergroups']);

        if ($WT['banusergroups'])
        {
                $WT_banusergroups = explode(" ", $WT['banusergroups']);
               
                if (WTis_member_of($userinfo, $WT_banusergroups))
                {
                        $permitted = 1;
                }
                else
                {
                        $permitted = 0;
                }
               
                if ($userinfo[userid] > 0 AND in_array('('.$userinfo[userid].')', $WT_banusergroups))
                {
                        $permitted = 1;
                }
        }


       
        if ($WT['draft'] == 1 AND !WTis_member_of($userinfo, array("6"))) //draft webtemplate
        {
                $permitted = 0;
        }

        if ($return10) //return 1 or 0
        {
                return $permitted;
        }
    else //return usergroup name with color (permitten green, banned red)
        {
                if ($permitted)
                {
                        return '<font color="#006600">'.$usergroupname.'</font>';
                }
                else
                {
                        return '<font color="#C40000">'.$usergroupname.'</font>';
                }
        }

}

EasyTarget, if you replace the default "function WT_UsergroupPermission" code found in wt_include.php with the above version, it will switch the way webtemplates permissions work from being an "opt-out" system to being an "opt-in" system. What that means is that the section marked
"Disallowed Usergroups
Mark usergroups who can NOT display this page"

Should now be treated as if it said
"Allowed Usergroups
Mark usergroups who CAN display this page"

and the "Disallowed Usernames" section should be treated as if it read:
"Allowed Usernames
Enter usernames who CAN display this page even if their usergroup is disallowed."

The above text will NOT ACTUALLY CHANGE unless you go in and edit it (I haven't bothered yet so I am not sure where it is), but you need to realize that by applying the above code you have completely changed how webtemplates processes usergroup permissions.

Logician is in no way responsible for the above change, and I am officially recommending that you do not apply this change unless you completely understand exactly what it does and are willing to accept complete responsibility for anything it or you may mess up in the process. (the code does work though, I have it running on two different live sites)


All times are GMT. The time now is 06:55 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.02176 seconds
  • Memory Usage 1,764KB
  • 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
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (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