Page 1 of 1

[DEV] Post to Multiple Forums

Posted: Thu Oct 03, 2002 1:45 am
by Night4554
1) This is DEV! I will make it beta or alpha or theta or whatever when I actually have some code i could release, and not developing it from scratch right here.

OKAY: THIS IS NOT A MOD CODE
DO NOT EDIT YOUR FILES


So, I'm aiming for a list of all the forums with check boxes next to them (along with a Check All button, but that later) in a table row between the Subject feild and the upper row of BBCodes.

To do that, I guess I'll run an sql query something like:

Code: Select all

$sql = "SELECT forum_name, forum_id 
FROM " . FORUMS_TABLE . "
ORDER BY forum_id";
if( !($result = $db->sql_query($sql)) )
{
	message_die(GENERAL_ERROR, 'Can't Grab Forum Names', '', __LINE__, __FILE__, $sql);
}
while (($forum_names[] = $db->sql_fetchrow($result)));
$total_forums = count($forum_names)-1;
Then some code in posting.php

Code: Select all

for($i = 0; $i < $total_cats; $i++) { // loop through cats 
		$template->assign_block_vars('catrow', array(
			'FORUM_NAME' => $forum_names[$i]['forum_name'],
			'FORUM_ID' => $forum_names[$i]['forum_id']
			)
		);			
}
And somewhere else I got to put something that registers that in all the forums right? posting.php right?

Okay, I've found this:

Code: Select all

submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("\'", "''", $username), str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $poll_options, $poll_length, $msg_icon);
So I figured somehting like:
for($i=something;$i<=something;$i++)
{
submit_post($mode, $post_data, $return_message, $return_meta, $forums[$i], $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("\'", "''", $username), str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $poll_options, $poll_length, $msg_icon);
}


But the biggest help i need is where it accepts those values and passes them to the function, and how to store all the values into an array.




OKAY: THIS IS NOT A MOD CODE
DO NOT EDIT YOUR FILES

Posted: Thu Oct 03, 2002 5:25 am
by conanqtran
what is the purpose of this? u can just use the global announcement mod made by niels :D

Posted: Thu Oct 03, 2002 6:03 pm
by Night4554
No...... that posts it to EVERY Forum, and I just want to post to MULTIPLE Forums.

Posted: Fri Oct 04, 2002 2:21 am
by R45
You could just have the posted screen (after you click post) just get the same forum list again and match all the vars that have been passed checked. Remember you need to select forums based on permissions also. Then its easy to loop those checked forums and use submit_post

Posted: Fri Oct 04, 2002 3:34 am
by DJ P@CkMaN
If it was me, I would just be slack and do the whole post thing through SQL and not worry about any phpBB functions :wink:

Posted: Thu Oct 31, 2002 5:18 pm
by tjsundling
Have you gotten any further with this mod? I would like to do exactly what you are trying to do.

Posted: Thu Oct 31, 2002 5:23 pm
by DanielT
DJ P@CkMaN wrote: If it was me, I would just be slack and do the whole post thing through SQL and not worry about any phpBB functions :wink:


yup

Posted: Thu Oct 31, 2002 6:32 pm
by tjsundling
If it was me, I would just be slack and do the whole post thing through SQL and not worry about any phpBB functions

This is all well and good for site admins and SQL admins, but what about the normal user? I would like to have normal users of the forum be able to post into multiple forums at the same time (without them having access to my mySQL database). Or am I just misunderstanding what it is you're suggesting I do?

Posted: Thu Oct 31, 2002 8:50 pm
by DivScript
This sounds like a really good mod, because that global announcement mod is utterly stupid. It f***** my board up because the instructions are not correct !!DELETE THE GLOBAL ANNOUNCEMENT MOD OR TELL THE AUTHOR TO RETHINK HIS HELP FILE PLS KTHX!!.
If I could help, I would because this is a really good idea.

Dave.

Well

Posted: Thu Oct 31, 2002 8:52 pm
by tuck
actually the Global Announcements are working fine for me, what problems did you have?

Posted: Thu Oct 31, 2002 9:10 pm
by tjsundling
I am using the global announcement mod, which works, but not for what I would like this mod described in the first post of this topic to do. They are completely different mods with completely different purposes in my mind. So please keep their discussions separate.

I know a mod of this nature would be possible (if I knew how to code it I would), and rather useful. For example: If I wanted to post the same question to multiple forums for a response from people watching those specific forums, I would be able to post a topic and then select the forums I would like that message posted to by ctrl clicking a dropdown list.

I know I could go to each forum specifically and post a topic in each one manually, but when the number of topics is more than even 10 that I would like to post, it gets rather annoying. The global announcement mod would not work in this example because for one, it is "global" and for two, users are not able to respond to it (at with least the global announcement mod I am using).

Posted: Thu Oct 31, 2002 9:18 pm
by DivScript
The way the global announcements mod install file was worded, didn't make sense.
Therefore the files I edited screwed my board up.
I could login and whatnot, but I could not enter a specific forum, because some gay 'parse' error was displayed.
Therefore I think this mod would help me bunches, because it's better.
Keep it up.

Dave.

Posted: Fri Nov 01, 2002 6:50 pm
by Night4554
I got a pm about this, so I though I'd post:

I'm not developing this mod at all anymore; it's need has gone the way of the DooDoo for me. If anyone wants to take what I posted up there and work on it; go for it. I can edit anything you want into the first post if you pm me.

Posted: Fri Nov 29, 2002 9:59 pm
by Brandons
Topic Locked. You have not released the mod-code in two months.

PM me if you decide to continue development on this.