Page 61 of 66

Posted: Tue Mar 06, 2007 1:28 am
by RexxCrow
Is anybody using this MOD with the Vote Manger MOD? I am having several issues and am thinking it has do to with that MOD.

http://www.phpbb.com/phpBB/viewtopic.php?t=389862

Posted: Tue Mar 06, 2007 3:48 am
by RexxCrow
Ok, I went through to double check and found several errors that I corrected, (I manually install everything, hoping to learn things as I go, so I am not using EZMOD.)

After double checking I am now able to make topics (before I was getting a topic does not exist error) I can now post polls (before it did not work), I can edit, quote, and reply, though everything brings up errors (except editing), before I was getting different errors depending on what I was doing, now all the errors say the same thing which is:

Missing argument 24 and 25 for submit_post in functions_post.php line 204
also am getting modify header errors for functions_post.php:204 for 4 different lines in that file.

(I moved the draft inserts to the end hoping that would fix it, but it errors either way.)

Code: Select all

function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, &$bbcode_on, &$html_on, &$smilies_on, &$attach_sig, &$bbcode_uid, $post_username, $post_subject, $post_message, $poll_title, &$poll_options, &$poll_length, &$max_vote, &$hide_vote, &$undo_vote, &$was_a_draft, &$save_as_draft)
1st header error: posting.php

Code: Select all

setcookie($board_config['cookie_name'] . '_t', serialize($tracking_topics), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
2nd, 3rd, and 4th adjacent header errors: page_header.php

Code: Select all

header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0');  

header ('Expires: 0');

header ('Pragma: no-cache');
Also, to note I am unable to make drafts they submit errors come up and then just disappear.

Posted: Tue Mar 06, 2007 4:11 am
by asinshesq
RexxCrow wrote: Missing argument 24 and 25 for submit_post in functions_post.php line 204


Take a look in posting.php and find every occurance of submit_post (there is only one such occurance in a clean phpbb2 board, but with your other mods there may be more than one). For each occurance, make sure you added the $save_as_drraft and $was_a_draft parameters, and make sure you added them in exactly the same order that they appear in the line in includes/functions_post.php that begins:

Code: Select all

functions submit_post(...
also am getting modify header errors for functions_post.php:204 for 4 different lines in that file.

See if the above fix also happens to fix this error. If not, let me know and we'll see what else we can figure out.

Posted: Tue Mar 06, 2007 7:13 am
by RexxCrow
ROFL, yup that is what it was, there were 2 of those snuck in there. I love this MOD, totally kewl! Thx

BTW, where can I find the attachment MOD of this at? I have been UTL so far.

Posted: Tue Mar 06, 2007 11:52 am
by asinshesq
RexxCrow wrote: BTW, where can I find the attachment MOD of this at? I have been UTL so far.

Same place it was located the last time I answered your question ;)
See http://www.phpbb.com/phpBB/viewtopic.ph ... 60#2882560

Posted: Tue Mar 06, 2007 12:01 pm
by RexxCrow
Opps, sorry I missed that Post and didn't even think to look there, (sorry, got about 50 things floating around in my head at any given time lately) Thank you very much for ur help!

Posted: Tue Mar 06, 2007 3:33 pm
by drichardson
Hey there, i'd just like to say this is a great mod! However, i have a small problem.

When i save a post as a draft or delete a draft, it takes me to a blank page with myurl.com/posting.php in the address bar, so i'm guessing the redirects are not working properly.

The posts are saved and i can go and retrieve them later in the {SEARCH_SELF} page, but i can't see why it's coming up with a blank page.

The mod installed with few problems, i had to edit 2 FIND commands to get the script installed
1. $params = array('submit' => 'post'...
2. FIND submit_post(...

But i don't think that would affect the redirects would it?

Posted: Tue Mar 06, 2007 4:51 pm
by asinshesq
drichardson wrote: When i save a post as a draft or delete a draft, it takes me to a blank page with myurl.com/posting.php in the address bar, so i'm guessing the redirects are not working properly.

The posts are saved and i can go and retrieve them later in the {SEARCH_SELF} page, but i can't see why it's coming up with a blank page.


Here's the mod changes in posting.php that deals with redirection after you save a post as a draft:

Code: Select all

#
#-----[ FIND ]------------------------------------------------
#
		message_die(GENERAL_MESSAGE, $return_message);
	}

#
#-----[ AFTER, ADD ]------------------------------------------------
#
// start mod save draft posts...since the previous block of code excludes the case where user is saving as draft or there is a deletion of something that was just a draft,
// and in that case skipps the update_stats function that otherwise would do an END_TRANSACTION sql query, this next block does a meaningless END_TRANSACTION query
// and tells the script where to return in that case
	if ( $error_msg == '' && $save_as_draft || ($mode == 'delete' && $was_a_draft) )
	{

		$sql = "DROP TABLE IF EXISTS temporary_table";
		if (!$db->sql_query($sql, END_TRANSACTION))
		{
			message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
		}

		$redirect = "index.$phpEx?";
		redirect(append_sid($redirect, true) . $post_append);
		$template->assign_vars(array(
			'META' => $return_meta)
		);
		message_die(GENERAL_MESSAGE, $return_message);
	}
// end mod save draft posts
Take a look at that change in posting.php and see whether you did that one right.

If you can't figure it out, pm me your posting.php file (with code tags around it) and I'll take a look.

Posted: Tue Mar 06, 2007 7:06 pm
by drichardson
I installed the mod with EasyMod so the changes have been made successfully. I'll send you a link to my posting.php so you can see what the problem is...

Posted: Thu Mar 08, 2007 11:23 am
by drichardson
The problem is now resolved, thanks for all your help asinshesq!

Little tip for other users, there must be no spaces or characters before the <? or after the ?> in your php files :P

Posted: Thu Mar 08, 2007 12:04 pm
by asinshesq
drichardson wrote: Little tip for other users, there must be no spaces or characters before the <? or after the ?> in your php files :P

Good tip. But note that some files begin with <?php and some begin with <? (they all end with ?>). The important thing is that there should be no characters, spaces, line skips or anything before the opening <? or <?php or after the final ?>.

And a final point: there are some editors that have an annoying habbit of sticking hiden codes, spaces etc. in your document when you haven't told them to. That's why a lot of people run into this problem...they open up a php file in an editor that isn't a real 'plain text editor', make some changes, close the file and suddenly things don't work right because the editor has stuck in some extra coding, lines, etc. A lot of people using dreamweaver have this problem, because it is pretty tricky to configure dreamweaver not to stick in anything extra.

My advice: get a real plain text editor (there are lots of free ones out there...just google for them).

Re: Save posts as drafts

Posted: Tue Mar 20, 2007 2:31 am
by End of a Shadow
By chance can you provide a mirror download of this version or if not email it to me at webmaster@insyderonline.com and I'll add it as a mirror on my web space.

temporary download link while mod links are down:

Posted: Tue Mar 20, 2007 1:34 pm
by asinshesq
End of a Shadow wrote: By chance can you provide a mirror download of this version or if not email it to me...

Sure. You can download it here: http://www.phpbb.com/files/mods/save_po ... 1-0-25.zip

Re: Save posts as drafts

Posted: Thu Mar 29, 2007 1:59 am
by thewizard
I'm a little curious about how this works. Does it just store the post away until it is completed and they submit it as final that it shows up? Does it leave something as a place holder? I've got a forum where people tend to post community maintained stories. Each person writes their own chapter and was looking to see if something was already out that not only saved the post they were working on, but had a visual placeholder without showing the actual text.

Re: Save posts as drafts

Posted: Thu Mar 29, 2007 2:29 am
by MitchSchaft
No, it just saves it. When you submit, it shows up at the end like normal.