[2.0.20] Vote Manager

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
34
64%
Very Good
10
19%
Good
4
8%
Fair
1
2%
Poor
4
8%
 
Total votes: 53

ktorp18
Registered User
Posts: 7
Joined: Thu Nov 15, 2007 12:00 am

Re: [2.0.20] Vote Manager

Post by ktorp18 »

I installed the MOD by following the directions exactly as they were written. Afterwards there seems to be a problem with my posting.php file. Whenever anyone tries to post a new thread or reply to one that already exists they get this error:

Parse error: syntax error, unexpected T_ELSE in /home/ktorp18/public_html/posting.php on line 573

Any suggestions?
aoswald
Registered User
Posts: 17
Joined: Sun Oct 28, 2007 2:18 pm

error message

Post by aoswald »

I'm getting this error when I try to post a poll
Error in posting

DEBUG MODE

SQL Error : 1054 Unknown column 'vote_max' in 'field list'

INSERT INTO phpbb_vote_desc (topic_id, vote_text, vote_start, vote_length, vote_max, vote_hide, vote_undo) VALUES (35, 'this is a test', 1196223309, 0, '2', '0', '0')

Line : 265
File : functions_post.php

CAn anybody tell me what to do?
thanks
User avatar
dellsystem
Former Team Member
Posts: 3879
Joined: Sat Apr 09, 2005 8:54 pm
Location: Montreal
Name: Wendy
Contact:

Re: [2.0.20] Vote Manager

Post by dellsystem »

ktorp18 wrote:I installed the MOD by following the directions exactly as they were written. Afterwards there seems to be a problem with my posting.php file. Whenever anyone tries to post a new thread or reply to one that already exists they get this error:

Parse error: syntax error, unexpected T_ELSE in /home/ktorp18/public_html/posting.php on line 573

Any suggestions?
Can you post lines 550-580 here, within tags please?
aoswald wrote:I'm getting this error when I try to post a poll
Make sure you run the SQL query and that the table prefix settings are correct.
Former moderator and website team member | My MODs, and more (GitHub)
aoswald
Registered User
Posts: 17
Joined: Sun Oct 28, 2007 2:18 pm

Re: [2.0.20] Vote Manager

Post by aoswald »

"Make sure you run the SQL query and that the table prefix settings are correct."

Not sure what you mean by this.
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: [2.0.20] Vote Manager

Post by RMcGirr83 »

aoswald wrote:"Make sure you run the SQL query and that the table prefix settings are correct."

Not sure what you mean by this.
that means that you have to do this part of the mod

Code: Select all

#
#-----[ SQL ]----------------------------------
#
# CHANGE TABLE PREFIX ACCORDINGLY!!!
#
ALTER TABLE phpbb_vote_desc ADD vote_max INT( 3 ) DEFAULT '1' NOT NULL;
ALTER TABLE phpbb_vote_desc ADD vote_voted INT( 7 ) DEFAULT '0' NOT NULL;
ALTER TABLE phpbb_vote_desc ADD vote_hide TINYINT( 1 ) DEFAULT '1' NOT NULL;
ALTER TABLE phpbb_vote_desc ADD vote_undo TINYINT ( 1 ) DEFAULT '0' NOT NULL;
ALTER TABLE phpbb_vote_voters ADD vote_option_id TINYINT( 4 ) DEFAULT '-1' NOT NULL;
unto your database using phpmyadmin
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
aoswald
Registered User
Posts: 17
Joined: Sun Oct 28, 2007 2:18 pm

Re: [2.0.20] Vote Manager

Post by aoswald »

that means that you have to do this part of the mod


Code: Select all
#
#-----[ SQL ]----------------------------------
#
# CHANGE TABLE PREFIX ACCORDINGLY!!!
#
ALTER TABLE phpbb_vote_desc ADD vote_max INT( 3 ) DEFAULT '1' NOT NULL;
ALTER TABLE phpbb_vote_desc ADD vote_voted INT( 7 ) DEFAULT '0' NOT NULL;
ALTER TABLE phpbb_vote_desc ADD vote_hide TINYINT( 1 ) DEFAULT '1' NOT NULL;
ALTER TABLE phpbb_vote_desc ADD vote_undo TINYINT ( 1 ) DEFAULT '0' NOT NULL;
ALTER TABLE phpbb_vote_voters ADD vote_option_id TINYINT( 4 ) DEFAULT '-1' NOT NULL;

unto your database using phpmyadmin

Ok - I did this and the error has gone away. But I still don't see how a person votes on the poll?
forum is here: http://www.oswaldreunion.com/bb/viewtopic.php?t=37
thanks
aoswald
Registered User
Posts: 17
Joined: Sun Oct 28, 2007 2:18 pm

Re: [2.0.20] Vote Manager

Post by aoswald »

I think it's working now

thanks for your help
aoswald
Registered User
Posts: 17
Joined: Sun Oct 28, 2007 2:18 pm

Re: [2.0.20] Vote Manager

Post by aoswald »

I get this error when I try to delete a poll - I don't know how to fix it:

Error in deleting poll

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2

DELETE FROM phpbb_vote_results WHERE vote_id =

Line : 514
File : functions_post.php

thanks in advance
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: [2.0.20] Vote Manager

Post by RMcGirr83 »

This mod does not touch the delete part of functions_post.php, so something else is amiss.

Course it would probably help if you were to post the 20 or so lines before and after line 514 of your functions_post.php file
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
aoswald
Registered User
Posts: 17
Joined: Sun Oct 28, 2007 2:18 pm

Re: [2.0.20] Vote Manager

Post by aoswald »

here is code on either side of 514


if ($mode == 'poll_delete' || ($mode == 'delete' && $post_data['first_post'] && $post_data['last_post']) && $post_data['has_poll'] && $post_data['edit_poll'])
{
$sql = "DELETE FROM " . VOTE_DESC_TABLE . "
WHERE topic_id = $topic_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql);
}

$sql = "DELETE FROM " . VOTE_RESULTS_TABLE . "
WHERE vote_id = $poll_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql);
}

$sql = "DELETE FROM " . VOTE_USERS_TABLE . "
WHERE vote_id = $poll_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql);
}
}

if ($mode == 'delete' && $post_data['first_post'] && $post_data['last_post'])
{
$meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . '=' . $forum_id) . '">';
$message = $lang['Deleted'];
}
else
{
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: [2.0.20] Vote Manager

Post by RMcGirr83 »

Can you post your entire functions_post.php file as a text link

...and please edit your last post using the [ code] [ /code] tags so it's easier on my old aching eyes. Thanks.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
aoswald
Registered User
Posts: 17
Joined: Sun Oct 28, 2007 2:18 pm

Re: [2.0.20] Vote Manager

Post by aoswald »

here is the code between code tags

Code: Select all

	if ($mode == 'poll_delete' || ($mode == 'delete' && $post_data['first_post'] && $post_data['last_post']) && $post_data['has_poll'] && $post_data['edit_poll'])
	{
		$sql = "DELETE FROM " . VOTE_DESC_TABLE . " 
			WHERE topic_id = $topic_id";
		if (!$db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql);
		}

		$sql = "DELETE FROM " . VOTE_RESULTS_TABLE . " 
			WHERE vote_id = $poll_id";
		if (!$db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql);
		}

		$sql = "DELETE FROM " . VOTE_USERS_TABLE . " 
			WHERE vote_id = $poll_id";
		if (!$db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql);
		}
	}

	if ($mode == 'delete' && $post_data['first_post'] && $post_data['last_post'])
	{
		$meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . '=' . $forum_id) . '">';
		$message = $lang['Deleted'];
	}
	else
	{
	
Can you post your entire functions_post.php file as a text link
I don't know what you mean by this?
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: [2.0.20] Vote Manager

Post by RMcGirr83 »

aoswald wrote:
Can you post your entire functions_post.php file as a text link
I don't know what you mean by this?
I mean can you open up your includes/functions_post.php file in a text editor, save it as functions_post.txt, upload it to your site and provide a link to it.

Somehow the code is dropping the $post_id variable which is what is causing the error.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
aoswald
Registered User
Posts: 17
Joined: Sun Oct 28, 2007 2:18 pm

Re: [2.0.20] Vote Manager

Post by aoswald »

Sorry I gave you the code from the wrong file. I have this running on two different sites and i gave you the code from the wrong site. This is the code from the site that is not working - -

Code: Select all

				}
			}
		}

		remove_search_post($post_id);
	}

	if ($mode == 'poll_delete' || ($mode == 'delete' && $post_data['first_post'] && $post_data['last_post']) && $post_data['has_poll'] && $post_data['edit_poll'])
	{
		$sql = "DELETE FROM " . VOTE_DESC_TABLE . " 
			WHERE topic_id = $topic_id";
		if (!$db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql);
		}

		$sql = "DELETE FROM " . VOTE_RESULTS_TABLE . " 
			WHERE vote_id = $poll_id";
		if (!$db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql);
		}

		$sql = "DELETE FROM " . VOTE_USERS_TABLE . " 
			WHERE vote_id = $poll_id";
		if (!$db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql);
		}
	}
I've also created a text file that you can see at: Click Here
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: [2.0.20] Vote Manager

Post by RMcGirr83 »

No idea. Your issue is not with this mod.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
Post Reply

Return to “[2.0.x] MOD Database Releases”