Simply Merge Threads

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!
64
52%
Very Good
25
20%
Good
14
11%
Fair
6
5%
Poor
15
12%
 
Total votes: 124

User avatar
leviatan21
Registered User
Posts: 2663
Joined: Fri Aug 10, 2007 7:22 am
Location: Buenos Aires, Argentina
Name: Gabriel

Re: [2.0.6] Simply Merge Threads

Post by leviatan21 » Sat Dec 22, 2007 4:42 pm

Sylver Cheetah 53 wrote: Can this trick be used somehow on Split and Merge in One Step MOD? :?
http://www.phpbb.com/community/viewtopi ... 5&t=287988
Finally here is the fix for the

Code: Select all

MOD Title:		Split posts and merge in one step
MOD Version:		1.0.4

Code: Select all

#
#-----[ OPEN ]-------------------------------------------------
#
language/lang_english/lang_main.php

#
#-----[ FIND ]-------------------------------------------------
#
$lang['Destination_topic'] = 'Destination topic';

#
#-----[ AFTER, ADD ]-------------------------------------------------
#
$lang['Select_destination_topic'] = 'Select a destination topic';

#
#-----[ OPEN ]-------------------------
#
modcp.php

#
#-----[ FIND ]-------------------------------------------------
#
'L_DESTINATION_TOPIC' => $lang['Destination_topic'],

#
#-----[ AFTER, ADD ]-------------------------------------------------
#
'S_JUMPBOX_SELECT_2'    => select_topic('destination_topic',$to_topic),

#
#-----[ FIND ]-------------------------------------------------
#
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

#
#-----[ AFTER, ADD ]-------------------------------------------------
#
function select_topic($action, $match_topic_id = 0)
{
   global $userdata, $lang, $db, $phpEx, $SID;

   $sql = "SELECT t.topic_id, t.topic_title, t.forum_id
      FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f
      WHERE f.forum_id = t.forum_id
      GROUP BY t.forum_id, t.topic_id, t.topic_title";
   if ( !($result = $db->sql_query($sql)) )
   {
      message_die(GENERAL_ERROR, "Couldn't obtain topics list.", "", __LINE__, __FILE__, $sql);
   }
   
   $topic_rows = array();
   while ( $row = $db->sql_fetchrow($result) )
   {
      $topic_rows[] = $row;
   }

   if ( $total_topics = count($topic_rows) )
   {
      $sql = "SELECT *
         FROM " . FORUMS_TABLE . "
         ORDER BY forum_id, forum_order";
      if ( !($result = $db->sql_query($sql)) )
      {
         message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql);
      }

      $forum_rows = array();
      while ( $row = $db->sql_fetchrow($result) )
      {
         $forum_rows[] = $row;
      }

      $boxstring = '<select name="' . POST_FORUM_URL . '" onchange="if(this.options[this.selectedIndex].value != -1){ ' . $action . '.value = this.options[this.selectedIndex].value }"><option value="-1">' . $lang['Select_destination_topic'] . '</option>';
      if ( $total_forums = count($forum_rows) )
      {
         for($i = 0; $i < $total_forums; $i++)
         {
            $boxstring_topics = '';
            for($j = 0; $j < $total_topics; $j++)
            {
               if ( $topic_rows[$j]['forum_id'] == $forum_rows[$i]['forum_id'] && $forum_rows[$i]['auth_view'] <= AUTH_REG )
               {
                  $selected = ( $topic_rows[$j]['topic_id'] == $match_topic_id ) ? 'selected="selected"' : '';
                  $boxstring_topics .=  '<option value="' . $topic_rows[$j]['topic_id'] . '"' . $selected . '>(' . $topic_rows[$j]['topic_id'] . ')&nbsp;' . $topic_rows[$j]['topic_title'] . '</option>';
               }
            }

            if ( $boxstring_topics != '' )
            {
               $boxstring .= '<option value="-1">&nbsp;</option>';
               $boxstring .= '<option value="-1">(' . $forum_rows[$i]['forum_id'] . ')&nbsp;' . $forum_rows[$i]['forum_name'] . '</option>';
               $boxstring .= '<option value="-1">----------------</option>';
               $boxstring .= $boxstring_topics;
            }
         }
      }
      $boxstring .= '</select>';
   }
   else
   {
      $boxstring .= '<select name="' . POST_FORUM_URL . '" onchange="if(this.options[this.selectedIndex].value != -1){ to_topic.value = this.options[this.selectedIndex].value }"></select>';
   }

   $boxstring .= '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />';

   return $boxstring;
}

#
#-----[ OPEN ]-------------------------------------------------
#
templates/subSilver/modcp_split.tpl

#
#-----[ FIND ]-------------------------------------------------
#
<td class="row2" colspan="2"><input class="post" type="text" size="35" style="width: 350px" name="destination_topic" />

#
#-----[ AFTER, ADD ]-------------------------------------------------
#
{S_JUMPBOX_SELECT_2}

#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM
I test on a virgin phpBB 2.0.22 and work fine !

Good luck to you !
Excuse me for my poor English, I speak Spanish. | Image phpBB en Español

PetiteMiel
Registered User
Posts: 39
Joined: Sat May 26, 2007 8:09 pm

Re: [2.0.6] Simply Merge Threads

Post by PetiteMiel » Fri Jan 11, 2008 12:56 am

I just installed this on my test forum, version 2.0.22 which already has about 6 different mods on it and it works beautifully. I had no problems installing it and I'm going to install it on my live forum right now. This is a great mod. thanks for all your hard work in putting this together.

PetiteMiel
Registered User
Posts: 39
Joined: Sat May 26, 2007 8:09 pm

Re: [2.0.6] Simply Merge Threads

Post by PetiteMiel » Sat Jan 12, 2008 12:59 am

Sorry to post right after myself but I just noticed that after editing a post on the forum text appears beneath the signature stating who last edited ,the date of the last edit and time as well as how many times it was edited. This never used to show up and I'm just curious if this mod would have caused that or should I look elsewhere for the answer? I only ask because it never did it until today and I installed this mod yesterday so I figured it might have been the reason.

It's not really a big deal I just prefered it the other way and wondered if there was a way to stop it from doing that?

Still a great mod though. :D

User avatar
A_O_C
Registered User
Posts: 2383
Joined: Sun Jul 01, 2007 11:26 pm
Location: phpbb_

Re: [2.0.6] Simply Merge Threads

Post by A_O_C » Sat Jan 12, 2008 1:50 am

by default, phpbb does that only if a person has already replied. at least, that is my understanding. ;)

User avatar
2LadyDi
Registered User
Posts: 258
Joined: Fri Mar 15, 2002 6:01 am
Location: MD, USA
Contact:

Re: [2.0.6] Simply Merge Threads

Post by 2LadyDi » Sat Mar 01, 2008 3:39 am

jellybelly wrote:Hi i am trying to install this mod using easymod and i get this error
Critical Error

FIND FAILED: In file [includes/functions.php] could not find:

}
if ( empty($template) )

MOD script line #128 ::
is there someone who can please help with my problem



thanks
EM detected this same problem but the MOD script line # is 152 instead.

Any resolution? Thank you!!

User avatar
2LadyDi
Registered User
Posts: 258
Joined: Fri Mar 15, 2002 6:01 am
Location: MD, USA
Contact:

Re: [2.0.6] Simply Merge Threads

Post by 2LadyDi » Sat Mar 01, 2008 9:18 pm

EDIT: I have it all straightened out now out and it works great!!
WebMistress of SHAGGY's Studio.com
http://www.shaggysstudio.com

a_n_n_a_m
Registered User
Posts: 47
Joined: Wed Dec 12, 2007 11:30 am

Re: [2.0.6] Simply Merge Threads

Post by a_n_n_a_m » Sat Jun 28, 2008 4:58 pm

hi

first of all tnx for the great mod :) i've had it installed for 6 months now!

however i've gotten a few reports that after merging, some posts have gone missing. i'm using phpbb 2.0.22

any idea what could have gone wrong?

tnx

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Re: [2.0.6] Simply Merge Threads

Post by Ptirhiik » Sun Jun 29, 2008 5:37 pm

As the posts are re-oredered within the destination topic by post id, maybe they are "lost" in the previous pages ?

a_n_n_a_m
Registered User
Posts: 47
Joined: Wed Dec 12, 2007 11:30 am

Re: [2.0.6] Simply Merge Threads

Post by a_n_n_a_m » Sun Jun 29, 2008 11:33 pm

that's what i thought, but no.. in one case the lost post was one containing an embedded youtube video, which is why my moderator noticed that it was missing, and it is nowhere to be found in the topic. i also suggested that maybe he merged it to the wrong topic but the rest of the posts were there!
Last edited by a_n_n_a_m on Wed Jul 30, 2008 7:10 pm, edited 1 time in total.

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Re: [2.0.6] Simply Merge Threads

Post by Ptirhiik » Mon Jun 30, 2008 6:27 am

Honestly, I really can figure how a post would be deleted: the merge process is very straight away for the posts: update of the topic_id on the posts table. Have you attempted to find it in the database (posts_text & posts tables) to check its topic_id ?

a_n_n_a_m
Registered User
Posts: 47
Joined: Wed Dec 12, 2007 11:30 am

Re: [2.0.6] Simply Merge Threads

Post by a_n_n_a_m » Thu Jul 03, 2008 8:57 pm

no i haven't, dont know either. but i will keep an eye out and let you know if it happens again, hopefully i will have more details then.! tnx for your help

Sethernis
Registered User
Posts: 51
Joined: Mon May 12, 2008 5:12 am

Re: [2.0.6] Simply Merge Threads

Post by Sethernis » Wed Jul 30, 2008 4:47 pm

EDIT: I Fixed the select function.Now works.

EDIT 2: by browsing this topic i dicoverd many bug fixes and i applied them all.

Now i see the icon in viewtopic.

EDIT 3: Now all works.Sorry for this post!

User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Simply Merge Threads

Post by A_Jelly_Doughnut » Wed Sep 03, 2008 8:11 pm

MOD Updated to version 1.0.2
See first post for Download Link
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish

User avatar
Dogs and things
Registered User
Posts: 2114
Joined: Fri Sep 01, 2006 9:04 am
Location: Spain
Contact:

Re: Simply Merge Threads

Post by Dogs and things » Wed Sep 03, 2008 8:50 pm

Merci for the update. ;)
For phpBB2 support visit phpBB2refugees.

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: Simply Merge Threads

Post by asinshesq » Sat Sep 06, 2008 3:04 pm

With this update, I'm finding that on my board filling in the destination topic with a topic url does not work (it reports that it can't find the destination topic). The problem seems to be in the get_tpic_id() function (it returns false if the input is a topic url). I haven't yet studied that function to see if I can find the problem. Are other people seeing this issue or is it something about my board?

Post Reply

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