vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   New Posting Features - Form Hack (https://vborg.vbsupport.ru/showthread.php?t=126676)

trevanh 03-21-2008 06:34 AM

I set up 4 forms and got them all working beautifully. Then after a few weeks, they stopped working. Now, even logged in as admin01, I get the following error (when I try to simply access any of the forms):

you do not have permission to access this page. This could be due to one of several reasons:

Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.


I'm not sure what happened. They only thing I can think of is that I installed vBAdvanced CMPS, passiveVid, and GTUserCP since the forms were working.

Does anybody know what the cause of this problem may be? Is it a conflict with one of the other programs? I don't know where to go from here...

Help!

Brundlefly 03-21-2008 06:20 PM

Quote:

Originally Posted by trevanh (Post 1470470)
I set up 4 forms and got them all working beautifully. Then after a few weeks, they stopped working. Now, even logged in as admin01, I get the following error (when I try to simply access any of the forms):

you do not have permission to access this page. This could be due to one of several reasons:

Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.


I'm not sure what happened. They only thing I can think of is that I installed vBAdvanced CMPS, passiveVid, and GTUserCP since the forms were working.

Does anybody know what the cause of this problem may be? Is it a conflict with one of the other programs? I don't know where to go from here...

Help!

This looks like what you'd get if you have garbage in your $formforumid variable. Verify the forum ids you have the forms posting into.

trevanh 03-21-2008 06:58 PM

Here's what I see in the plugin manager for each and every form I've created:

$formforumid = "34";

That forum does exist, and functions normally.

Is that what you were referring to? Not sure where else to look for garbage...

This is a forum that only admins are allowed to view, but I do want users from specified groups to be able to post in that forum. So, in the plugin, I added the usergroups that I want to have access to the form, and for that forum, I allowed those usergroups permission to post but not view.

What am I missing?

So, to reiterate, even admin01 cannot so much as VIEW these forms- permissions errors every time.
:confused:

Deepdog009 03-21-2008 07:43 PM

Quote:

Originally Posted by trevanh (Post 1470977)
Here's what I see in the plugin manager for each and every form I've created:

$formforumid = "34";

That forum does exist, and functions normally.

Is that what you were referring to? Not sure where else to look for garbage...

This is a forum that only admins are allowed to view, but I do want users from specified groups to be able to post in that forum. So, in the plugin, I added the usergroups that I want to have access to the form, and for that forum, I allowed those usergroups permission to post but not view.

What am I missing?

So, to reiterate, even admin01 cannot so much as VIEW these forms- permissions errors every time.
:confused:

trevanh its probably another MOD that is affecting your forms...

Did U recently add anything new 2 your products???

Several folks had the same issue and unistalling permission MODs fixed it...

Also could be your usergroup permissions,,, maybe...

Im still recovering from a vehicle accident and haven't done much vbulletin troubleshooting,,, but if time permits and my back getts better, I will post more...

Good Luck 2 ya

trevanh 03-21-2008 08:39 PM

Thanks for your reply, Deepdog009.

Besides this Form Hack, I have the following mods installed:

passiveVid
vBAdvanced CMPS
GTUserCP

I just made them inactive but the problem remains.

Perhaps there's something that I need to run in diagnostics or maintenance to get the changes to take?

vbuser99 03-27-2008 03:05 PM

Nice work. This is what I was looking for.

trevanh 03-27-2008 03:27 PM

Quote:

Originally Posted by trevanh (Post 1471070)
Thanks for your reply, Deepdog009.

Besides this Form Hack, I have the following mods installed:

passiveVid
vBAdvanced CMPS
GTUserCP

I just made them inactive but the problem remains.

Perhaps there's something that I need to run in diagnostics or maintenance to get the changes to take?

OK, we found the problem:

We had to modify each Form we'd created in vBulletin with the following change (first the original code, then the new code):

ORIGINAL CODE
////////////////////////////////////////////////////////////////////////////////////////////////////
//USERGROUPS ALLOWED
//You can add or remove usegroups that are ALLOWED to use this form by changing the numbers below in the array.
//To enable this feature, remove the '//' before the 'if'.
////////////////////////////////////////////////////////////////////////////////////////////////////

if (!in_array($vbulletin->userinfo['11'], array(5,6,7,11))) print_no_permission();



NEW CODE
////////////////////////////////////////////////////////////////////////////////////////////////////
//USERGROUPS ALLOWED
//You can add or remove usegroups that are ALLOWED to use this form by changing the numbers below in the array.
//To enable this feature, remove the '//' before the 'if'.
////////////////////////////////////////////////////////////////////////////////////////////////////

// Use the line below to customize the allowed groups access to this form
$allowed_group_ids = array(6,7,11,12,13);

$form_view_permission = false;
$member_group_id_array = explode(',', $vbulletin->userinfo['membergroupids']);
if (in_array($vbulletin->userinfo['usergroupid'], $allowed_group_ids)) {
$form_view_permission = true;
}
foreach ($member_group_id_array as $membergroupid){
if(in_array($membergroupid, $allowed_group_ids)){
$form_view_permission = true;
}
}
if ($form_view_permission == false) print_no_permission();

This change allows users to access the Forms if their primary or member group ids match the list specified in the $form_view_permission array.

Deepdog009 03-30-2008 07:27 AM

Quote:

Originally Posted by trevanh (Post 1475949)
OK, we found the problem:

We had to modify each Form we'd created in vBulletin with the following change (first the original code, then the new code):

ORIGINAL CODE
////////////////////////////////////////////////////////////////////////////////////////////////////
//USERGROUPS ALLOWED
//You can add or remove usegroups that are ALLOWED to use this form by changing the numbers below in the array.
//To enable this feature, remove the '//' before the 'if'.
////////////////////////////////////////////////////////////////////////////////////////////////////

if (!in_array($vbulletin->userinfo['11'], array(5,6,7,11))) print_no_permission();



NEW CODE
////////////////////////////////////////////////////////////////////////////////////////////////////
//USERGROUPS ALLOWED
//You can add or remove usegroups that are ALLOWED to use this form by changing the numbers below in the array.
//To enable this feature, remove the '//' before the 'if'.
////////////////////////////////////////////////////////////////////////////////////////////////////

// Use the line below to customize the allowed groups access to this form
$allowed_group_ids = array(6,7,11,12,13);

$form_view_permission = false;
$member_group_id_array = explode(',', $vbulletin->userinfo['membergroupids']);
if (in_array($vbulletin->userinfo['usergroupid'], $allowed_group_ids)) {
$form_view_permission = true;
}
foreach ($member_group_id_array as $membergroupid){
if(in_array($membergroupid, $allowed_group_ids)){
$form_view_permission = true;
}
}
if ($form_view_permission == false) print_no_permission();

This change allows users to access the Forms if their primary or member group ids match the list specified in the $form_view_permission array.

*********************************************

That's great you found the issue and resolved it...

Its usually something that U missed or overlooked that's causing the problems...

I will be posting more and troubleshooting more in the near future...

Good Luck 2 U


*********************************************

ionian 03-30-2008 04:31 PM

Thank you very much for this usefull hack

Haltech 03-31-2008 07:18 PM

I don't quite understand this step:
#
# Edit the main plug-in - the instructions are all inside the hook itself, in the top half. Follow the instructions carefully!

where do I go?

Thanks


All times are GMT. The time now is 08:14 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.01877 seconds
  • Memory Usage 1,759KB
  • 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_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