Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > Premium Archives > Advanced Warning System (AWS)

Closed Thread
 
Thread Tools
Problem when installing... Details »»
Problem when installing...
Version: , by CrimsonGT CrimsonGT is offline
Developer Last Online: Jul 2009 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 04-19-2005 Last Update: Never Installs: 0
 
No support by the author.

Okay, I am a tad bit upset because I just bought my VBulletin forums and this was the first hack I chose to install. I get to the very end and I am almost done and everythings looking great then this happens...

Code:
2. MEMBERINFO TEMPLATE

In your MEMBERINFO template, find:

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle] - $vbphrase[view_profile]: $userinfo[username]</title>
$headinclude
</head>
<body>
$header
$navbar

<!-- main info - avatar, profilepic etc. -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
and so on and so on, its a big block of code...

and then it says replace it with another big block. When I do this, I get the following error when I try to save it.

Quote:
The following error occurred when attempting to evaluate this template:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/nightmar/public_html/forum/includes/adminfunctions_template.php(3096) : eval()'d code on line 132

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
Im so close to finishing and for some reason I am getting this error when I try and save the edited MEMBERINFO template...please help?

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 04-20-2005, 03:37 AM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The error is not there, it is normally before that. You need to send me more code, to find it out.

Rgds
  #13  
Old 04-20-2005, 05:02 AM
CrimsonGT CrimsonGT is offline
 
Join Date: Apr 2005
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
	build_new_post('thread', $foruminfo, array(), 0, $newpost, $errors);

	if (sizeof($errors) > 0)
	{
		// ### POST HAS ERRORS ###
		$postpreview = construct_errors($errors); // this will take the preview's place
		construct_checkboxes($newpost);
		$_REQUEST['do'] = 'newthread';
		$newpost['message'] = htmlspecialchars_uni($newpost['message']);
	}
	else if ($newpost['preview'])
	{
		// ### PREVIEW POST ###
		$postpreview = process_post_preview($newpost);
		$_REQUEST['do'] = 'newthread';
		$newpost['message'] = htmlspecialchars_uni($newpost['message']);
	}
	else
	{
		// ### NOT PREVIEW - ACTUAL POST ###
		if ($newpost['postpoll'])
		{
			$url = "poll.php?$session[sessionurl]t=$newpost[threadid]&amp;polloptions=$newpost[polloptions]";
		}
		else if ($newpost['visible'])
			// Change for automatic warning
			// You have to use "ObsceneWords" as Title of the Warning.
			// You have to use a Hidden Warner.
			if ($vboptions['warn_automatic'] == 1)
			{
				$Protected_Usergroups = explode("|",$vboptions['warn_protected_usergroups']);
				if($Protected_Usergroups[0])
				{
					foreach($Protected_Usergroups as $pro)
					{
						if($pro == $bbuserinfo['usergroupid'])
						{
							$userprotected = 1;
						}
					}
				}
				if ($bbuserinfo['userid'] != 1 AND $userprotected != 1 AND $wehavecensoredwords == 1)
				{
					// Get Warning Types
					$warn_type = array();
					$warn_type = $DB_site->query_first("SELECT * FROM " . TABLE_PREFIX . "warning_types  WHERE warn_name='ObsceneWords'");
					
					$thread1="}/showthread.php?p={$newpost['postid']}']Warned  Post";
					$thread2="$vboptions[bburl]/showthread.php?p=$newpost[postid]";
					$warnerdata=$DB_site->query_first("select username, email from ".TABLE_PREFIX."user  where userid='{$vboptions['warn_automatic_warner']}'");
					$wcomment="(This is an automatic warning, no moderator was involved.)";
					if ($alert=='')
					{
						$alert='No';
					}
					warn_calculations($warn_type['tid'], $wcomment, $newpost['postid'], $bbuserinfo,  $vboptions['warn_automatic_warner'],$alert);
					
					warn_notify($thread1, $thread2, $bbuserinfo, $warnerdata['email'],  $warnerdata['username'], $vboptions['warn_automatic_warner'], $warn_type, $level, $wcomment, $alert);
				}
			}
			// End of automated warnings things
		{
			$url = "showthread.php?$session[sessionurl]p=$newpost[postid]#post$newpost[postid]";
		}
		else
		{
			$_REQUEST['forceredirect'] = 1;
			$url = "forumdisplay.php?$session[sessionurl]f=$foruminfo[forumid]";
		}
		eval(print_standard_redirect('redirect_postthanks'));
	} // end if
}
  #14  
Old 04-20-2005, 05:16 AM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Find this:

PHP Code:
else if ($newpost['visible'])
            
// Change for automatic warning
            // You have to use "ObsceneWords" as Title of the Warning.
            // You have to use a Hidden Warner. 
Replace with:

PHP Code:
else if ($newpost['visible'])
{
            
// Change for automatic warning
            // You have to use "ObsceneWords" as Title of the Warning.
            // You have to use a Hidden Warner. 
you missed a curly bracket { there.

Rgds
  #15  
Old 04-20-2005, 05:41 AM
CrimsonGT CrimsonGT is offline
 
Join Date: Apr 2005
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Still getting the same error even after that. Im sorry I cannot do this for myself, I am an idiot Here is the updated code if you get a chance to take another look. I included a little bit more of the code this time.

Code:
if ($_POST['do'] == 'postthread')
{

	globalize($_POST, array('posthash' => STR_NOHTML, 'poststarttime' => STR_NOHTML));

	if (isset($_POST['WYSIWYG_HTML']))
	{
		require_once('./includes/functions_wysiwyg.php');
		$newpost['message'] = convert_wysiwyg_html_to_bbcode($_POST['WYSIWYG_HTML'], $foruminfo['allowhtml']);
	}
	else
	{
		$newpost['message'] = &$_POST['message'];
	}

	if (!($forumperms & CANPOSTPOLL))
	{
		unset($_POST['postpoll']);
	}

	$newpost['title'] = $_POST['subject'];
	$newpost['iconid'] = $_POST['iconid'];
	$newpost['parseurl'] = $_POST['parseurl'];
	$newpost['email'] = $_POST['email'];
	$newpost['signature'] = $_POST['signature'];
	$newpost['preview'] = $_POST['preview'];
	$newpost['disablesmilies'] = $_POST['disablesmilies'];
	$newpost['rating'] = $_POST['rating'];
	$newpost['username'] = $_POST['username'];
	$newpost['postpoll'] = $_POST['postpoll'];
	$newpost['polloptions'] = intval($_POST['polloptions']);
	$newpost['folderid'] = $_POST['folderid'];
	$newpost['emailupdate'] = $_POST['emailupdate'];
	$newpost['poststarttime'] = $poststarttime;
	$newpost['posthash'] = $posthash;
	// moderation options
	$newpost['stickunstick'] = $_POST['stickunstick'];
	$newpost['openclose'] = $_POST['openclose'];

	build_new_post('thread', $foruminfo, array(), 0, $newpost, $errors);

	if (sizeof($errors) > 0)
	{
		// ### POST HAS ERRORS ###
		$postpreview = construct_errors($errors); // this will take the preview's place
		construct_checkboxes($newpost);
		$_REQUEST['do'] = 'newthread';
		$newpost['message'] = htmlspecialchars_uni($newpost['message']);
	}
	else if ($newpost['preview'])
	{
		// ### PREVIEW POST ###
		$postpreview = process_post_preview($newpost);
		$_REQUEST['do'] = 'newthread';
		$newpost['message'] = htmlspecialchars_uni($newpost['message']);
	}
	else
	{
		// ### NOT PREVIEW - ACTUAL POST ###
		if ($newpost['postpoll'])
		{
			$url = "poll.php?$session[sessionurl]t=$newpost[threadid]&amp;polloptions=$newpost[polloptions]";
		}
		else if ($newpost['visible'])
		{
			// Change for automatic warning
			// You have to use "ObsceneWords" as Title of the Warning.
			// You have to use a Hidden Warner.
			if ($vboptions['warn_automatic'] == 1)
			{
				$Protected_Usergroups = explode("|",$vboptions['warn_protected_usergroups']);
				if($Protected_Usergroups[0])
				{
					foreach($Protected_Usergroups as $pro)
					{
						if($pro == $bbuserinfo['usergroupid'])
						{
							$userprotected = 1;
						}
					}
				}
				if ($bbuserinfo['userid'] != 1 AND $userprotected != 1 AND $wehavecensoredwords == 1)
				{
					// Get Warning Types
					$warn_type = array();
					$warn_type = $DB_site->query_first("SELECT * FROM " . TABLE_PREFIX . "warning_types  WHERE warn_name='ObsceneWords'");
					
					$thread1="}/showthread.php?p={$newpost['postid']}']Warned  Post";
					$thread2="$vboptions[bburl]/showthread.php?p=$newpost[postid]";
					$warnerdata=$DB_site->query_first("select username, email from ".TABLE_PREFIX."user  where userid='{$vboptions['warn_automatic_warner']}'");
					$wcomment="(This is an automatic warning, no moderator was involved.)";
					if ($alert=='')
					{
						$alert='No';
					}
					warn_calculations($warn_type['tid'], $wcomment, $newpost['postid'], $bbuserinfo,  $vboptions['warn_automatic_warner'],$alert);
					
					warn_notify($thread1, $thread2, $bbuserinfo, $warnerdata['email'],  $warnerdata['username'], $vboptions['warn_automatic_warner'], $warn_type, $level, $wcomment, $alert);
				}
			}
			// End of automated warnings things
		{
			$url = "showthread.php?$session[sessionurl]p=$newpost[postid]#post$newpost[postid]";
		}
		else
		{
			$_REQUEST['forceredirect'] = 1;
			$url = "forumdisplay.php?$session[sessionurl]f=$foruminfo[forumid]";
		}
		eval(print_standard_redirect('redirect_postthanks'));
	} // end if
}
  #16  
Old 04-20-2005, 09:10 AM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Find this:

PHP Code:
            // End of automated warnings things
        

And delete that curly bracket {
Closed Thread

Thread Tools

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 02:17 PM.


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.09433 seconds
  • Memory Usage 2,265KB
  • Queries Executed 20 (?)
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
  • (3)bbcode_code
  • (3)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (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_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete