Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-02-2006, 12:33 AM
Quarterbore Quarterbore is offline
 
Join Date: Mar 2005
Location: Valley Forge PA
Posts: 538
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Need to redirect GUESTS after post thread to my Support Forum ... which template?

I needed a support forum where members and guests could post problems (registering, logging in, accessing things, etc) and e-mail via the Contact US form just is less helpful as I have a full staff that can address most issues.

So, I created a forum where anybody can post, registered users can see their own posts, staff can see all posts, but unregistered guests can not see any posts...

So, what happens is the guest enters their trouble ticket (Name, UserName, E-mail, Problem) and then they see the message that they can not see the page because...


Quote:
You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:
  1. You are not logged in. Fill in the form at the bottom of this page and try again.
  2. You 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?
  3. If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
I will never allow unregistered users to otherwise post...

Can some help me figure out where I need to redirect the Unregistered user group? Obviously I just need to find the code that executes after the post is submitted that refreshes the browser with the ViewPost and add a conditional that says:

if <usergroup = Unregistered >> Go to Thank You Page I will Create
else <view the new Post>

I really just need some help finding the template because it is just ugly for my guests that are having problems to see that message...

Thanks for any advise!

I am still trying to trace out the code and I would like to know if this is likley the code I need to alter...

In File newthread.php

Code:
		// ### NOT PREVIEW - ACTUAL POST ###
		$threadinfo = fetch_threadinfo($newpost['threadid']); // need the forumread variable from this
		mark_thread_read($threadinfo, $foruminfo, $vbulletin->userinfo['userid'], TIMENOW);

		if ($newpost['postpoll'])
		{
			$forceredirect = false;
			$vbulletin->url = 'poll.php?' . $vbulletin->session->vars['sessionurl'] . "t=$newpost[threadid]&polloptions=$newpost[polloptions]";
		}
		else if ($newpost['visible'])
		{
			$forceredirect = false;
			$vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "p=$newpost[postid]#post$newpost[postid]";
		}
		else
		{
			$forceredirect = true;
			$vbulletin->url = 'forumdisplay.php?' . $vbulletin->session->vars['sessionurl'] . "f=$foruminfo[forumid]";
		}

		($hook = vBulletinHook::fetch_hook('newthread_post_complete')) ? eval($hook) : false;
		eval(print_standard_redirect('redirect_postthanks', true, $forceredirect));
	} // end if
}
And specifically the following part of that code...

Code:
		else if ($newpost['visible'])
		{
			$forceredirect = false;
			$vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "p=$newpost[postid]#post$newpost[postid]";
		}
Again, all I want to be able to do is add a conditional such as...

else if ($newpost['visible'] and ($vbulletin->userinfo['usergroupid'] == '1')) redirect to Thanks For Contacting Support page (say thanks.php)

else if ($newpost['visible'] and ($vbulletin->userinfo['usergroupid'] != '1')) Uses the code above to allow member to see the post.

I can't FTP from here to see if this works but I figured I would post my guess in case someone with more knowledge could help me with my Syntax or advise if I am looking at the wrong code...

I am also woried that I may be making a mistake doing this but I don't see a likely chance that I will ever let unregistered people post otherwise on my forums...
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:59 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.03599 seconds
  • Memory Usage 2,250KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_threadedmode.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete