Need mod that can search topics/posts in Mod panel..

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Anti-Spam Guide
baller1234
Registered User
Posts: 129
Joined: Sat May 29, 2010 9:43 am

Need mod that can search topics/posts in Mod panel..

Post by baller1234 »

Hi all,

What i miss in the phpbb mod panel is a search function to search for topics with certain titles or posts.. That is so much easier then going thru all posts page by page...

Does such mod exist?
User avatar
AmigoJack
Registered User
Posts: 6128
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン

Re: Need mod that can search topics/posts in Mod panel..

Post by AmigoJack »

Why not using advanced search?
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
User avatar
HGN
Former Team Member
Posts: 4706
Joined: Wed Dec 03, 2008 1:53 pm
Location: The Netherlands
Name: Alfred

Re: Need mod that can search topics/posts in Mod panel..

Post by HGN »

Being in the MCP you want to move posts from one topic to another. Then you have to browse through lists of topics within forums to locate the topic you want to move the posts to.
It's a bit "cheap" to open a second window/tab and use the general search function to locate the intended destination topic and then copy the id from the URL to the first window/tab with MCP.
It would be nice to be able to search for a topic (on topic title, any posted words in the topic, topic starter) to quickly find the topic.
User avatar
AmigoJack
Registered User
Posts: 6128
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン

Re: Need mod that can search topics/posts in Mod panel..

Post by AmigoJack »

Right now you have this in the MCP: "Destination topic identification number:" and as alternative "Select topic". What you want is a third option, consisting of a textbox to put in your keywords and a submit-button, which then comes up with the MCP > Main > View forum list which now have your search results instead?

This implies, that
  1. search results need also to print the parent forum for each topic, as it won't be one anymore and
  2. searching would only include the topic title (or should it also include every post subject?).
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
User avatar
HGN
Former Team Member
Posts: 4706
Joined: Wed Dec 03, 2008 1:53 pm
Location: The Netherlands
Name: Alfred

Re: Need mod that can search topics/posts in Mod panel..

Post by HGN »

It could work the same as the "Find member" functionality when looking for a member in ACP or when PM-ing. Open a pop-up to search for topics and make it able to select one that goes into the destination topic ID.
User avatar
AmigoJack
Registered User
Posts: 6128
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン

Re: Need mod that can search topics/posts in Mod panel..

Post by AmigoJack »

So search results (displayed as topics) would need an additional radiobutton for a selection and the whole results page needs a submit button. Sounds like it can be done quite easily. Any last words on this? Otherwise I'd check it, test it and then provide the modification instructions.
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
User avatar
AmigoJack
Registered User
Posts: 6128
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン

Re: Need mod that can search topics/posts in Mod panel..

Post by AmigoJack »

Open /includes/mcp/mcp_topic.php and find:

Code: Select all

        'U_SELECT_TOPIC'    => "$url&i=$id&mode=forum_view&action=merge_select" . (($forum_id) ? "&f=$forum_id" : ''), 
After, add:

Code: Select all

        /*** 2012-03-01 BEGIN AmigoJack
            Also incorporate board seach for getting a topic ID ***/
        'U_FIND_TOPIC'=> append_sid( 'search.'. $phpEx, 'sr=topics&sf=titleonly&form=mcp&field=to_topic_id&simple=1' ),
        /*** 2012-03-01 END ***/ 
Open /styles/prosilver/template/mcp_topic.html and find:

Code: Select all

			<a href="{U_SELECT_TOPIC}" >{L_SELECT_TOPIC}</a>
After, add:

Code: Select all

			| <a href="{U_FIND_TOPIC}" onclick="find_username(this.href); return false;">{L_FIND_TOPIC}</a>
Open /search.php and find:

Code: Select all

$view            = request_var('view', ''); 
After, add:

Code: Select all

/*** 2012-03-01 BEGIN AmigoJack
    Also incorporate board seach for getting a topic ID ***/
$bSimplePopup= request_var( 'simple', 0 )== 1;
if( $bSimplePopup ) {
    $sFindForm= request_var( 'form', '' );
    $sFindField= request_var( 'field', '' );

    if( !preg_match( '/^[a-z0-9_-]+$/i', $sFindForm ) ) $sFindForm= '';
    if( !preg_match('/^[a-z0-9_-]+$/i', $sFindField ) ) $sFindField= '';
} else $sFindForm= $sFindField= '';
/*** 2012-03-01 END ***/ 
Find:

Code: Select all

    $u_search .= ($return_chars != 300) ? '&ch=' . $return_chars : ''; 
After, add:

Code: Select all

    /*** 2012-03-01 BEGIN AmigoJack
        Also incorporate board seach for getting a topic ID ***/
    if( $bSimplePopup ) {
        $u_search.= '&simple=1&form='. $sFindForm. '&field='. $sFindField;
        $user-> add_lang( 'memberlist' );
    }
    /*** 2012-03-01 END ***/ 
Find:

Code: Select all

        'S_SHOW_TOPICS'            => ($show_results == 'posts') ? false : true, 
After, add:

Code: Select all

        /*** 2012-03-01 BEGIN AmigoJack
            Also incorporate board seach for getting a topic ID ***/
        'S_IN_SEARCH_POPUP'=> $bSimplePopup,
        'S_FORM_NAME'=> $sFindForm,
        'S_FIELD_NAME'=> $sFindField,
        /*** 2012-03-01 END ***/ 
Find:

Code: Select all

if ($_SID)
{
    $s_hidden_fields['sid'] = $_SID;
} 
After, add:

Code: Select all

/*** 2012-03-01 BEGIN AmigoJack
    Also incorporate board seach for getting a topic ID ***/
if( $bSimplePopup ) {
    $s_hidden_fields['simple']= 1;
    $s_hidden_fields['form']= $sFindForm;
    $s_hidden_fields['field']= $sFindField;
}
/*** 2012-03-01 END ***/ 
Find:

Code: Select all

    'S_FORUM_OPTIONS'        => $s_forums,
    'S_SELECT_SORT_DIR'        => $s_sort_dir, 
After, add:

Code: Select all

    /*** 2012-03-01 BEGIN AmigoJack
        Also incorporate board seach for getting a topic ID ***/
    'S_SEARCH_FIELDS'=> $search_fields,
    'S_SHOW_RESULTS'=> $show_results,
    'S_IN_SEARCH_POPUP'=> $bSimplePopup,
    /*** 2012-03-01 END ***/ 
Open /styles/prosilver/template/search_body.html and find:

Code: Select all

<!-- INCLUDE overall_header.html -->
Replace with:

Code: Select all

<!-- IF S_IN_SEARCH_POPUP -->
	<!-- INCLUDE simple_header.html -->
<!-- ELSE -->
	<!-- INCLUDE overall_header.html -->
<!-- ENDIF -->
Find:

Code: Select all

		<dd><label for="sf1"><input type="radio" name="sf" id="sf1" value="all" checked="checked" /> {L_SEARCH_TITLE_MSG}</label></dd>
		<dd><label for="sf2"><input type="radio" name="sf" id="sf2" value="msgonly" /> {L_SEARCH_MSG_ONLY}</label></dd>
		<dd><label for="sf3"><input type="radio" name="sf" id="sf3" value="titleonly" /> {L_SEARCH_TITLE_ONLY}</label></dd>
		<dd><label for="sf4"><input type="radio" name="sf" id="sf4" value="firstpost" /> {L_SEARCH_FIRST_POST}</label></dd>
Replace with:

Code: Select all

		<dd><label for="sf1"><input type="radio" name="sf" id="sf1" value="all" <!-- IF S_SEARCH_FIELDS eq "all" -->checked="checked" <!-- ENDIF -->/> {L_SEARCH_TITLE_MSG}</label></dd>
		<dd><label for="sf2"><input type="radio" name="sf" id="sf2" value="msgonly" /> {L_SEARCH_MSG_ONLY}</label></dd>
		<dd><label for="sf3"><input type="radio" name="sf" id="sf3" value="titleonly" <!-- IF S_SEARCH_FIELDS eq "titleonly" -->checked="checked" <!-- ENDIF -->/> {L_SEARCH_TITLE_ONLY}</label></dd>
		<dd><label for="sf4"><input type="radio" name="sf" id="sf4" value="firstpost" /> {L_SEARCH_FIRST_POST}</label></dd>
Find:

Code: Select all

			<label for="show_results1"><input type="radio" name="sr" id="show_results1" value="posts" checked="checked" /> {L_POSTS}</label>
			<label for="show_results2"><input type="radio" name="sr" id="show_results2" value="topics" /> {L_TOPICS}</label>
Replace with:

Code: Select all

			<label for="show_results1"><input type="radio" name="sr" id="show_results1" value="posts" <!-- IF S_SHOW_RESULTS eq "posts" -->checked="checked" <!-- ENDIF -->/> {L_POSTS}</label>
			<label for="show_results2"><input type="radio" name="sr" id="show_results2" value="topics" <!-- IF S_SHOW_RESULTS eq "topics" -->checked="checked" <!-- ENDIF -->/> {L_TOPICS}</label>
Find:

Code: Select all

<!-- INCLUDE overall_footer.html -->
Replace with:

Code: Select all

<!-- IF S_IN_SEARCH_POPUP -->
	<!-- INCLUDE simple_header.html -->
<!-- ELSE -->
	<!-- INCLUDE overall_footer.html -->
<!-- ENDIF -->
Open /styles/prosilver/template/search_results.html and find:

Code: Select all

<!-- INCLUDE overall_header.html -->
Replace with:

Code: Select all

<!-- IF S_IN_SEARCH_POPUP -->
	<!-- INCLUDE simple_header.html -->
<script type="text/javascript">
// <![CDATA[
function insert_marked(topics)
{
	if (typeof(topics.length) == "undefined")
	{
		if (topics.checked) insert_id(topics.value);
	}
	else if (topics.length > 0)
	{
		for (i = 0; i < topics.length; i++)
		{
			if (topics[i].checked)
			{
				opener.document.forms['{S_FORM_NAME}'].{S_FIELD_NAME}.value= topics[i].value;
				break;
			}
		}
	}

	self.close();
}
// ]]>
</script>
<!-- ELSE -->
	<!-- INCLUDE overall_header.html -->
<!-- ENDIF -->
Find:

Code: Select all

<!-- IF S_SHOW_TOPICS -->

	<!-- IF .searchresults -->
After, add:

Code: Select all

	<!-- IF S_IN_SEARCH_POPUP -->
	<form method="post" id="results" action="{S_SEARCH_ACTION}" onsubmit="insert_marked(this.find_topic); return false">
	<!-- ENDIF -->
Find:

Code: Select all

					<dt <!-- IF searchresults.TOPIC_ICON_IMG -->style="background-image: url({T_ICONS_PATH}{searchresults.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF -->><span class="wrap-content">
After, add:

Code: Select all

						<!-- IF S_IN_SEARCH_POPUP --><label for="find_topic{searchresults.TOPIC_ID}"><input type="radio" name="find_topic" id="find_topic{searchresults.TOPIC_ID}" value="{searchresults.TOPIC_ID}" /> {L_SELECT}:</label><!-- ENDIF -->
Find:

Code: Select all

	<!-- ELSE -->
		<div class="panel">
			<div class="inner"><span class="corners-top"><span></span></span>
			<strong>{L_NO_SEARCH_RESULTS}</strong>
			<span class="corners-bottom"><span></span></span></div>
		</div>
	<!-- ENDIF -->

<!-- ELSE -->
Before, add:

Code: Select all

	<!-- IF S_IN_SEARCH_POPUP -->
		<fieldset class="display-options">
			<input type="submit" name="submit" value="{L_SELECT_MARKED}" class="button2" />
		</fieldset>
	</form>
	<!-- ENDIF -->
Find:

Code: Select all

<!-- INCLUDE jumpbox.html -->

<!-- INCLUDE overall_footer.html -->
Replace with:

Code: Select all

<!-- IF S_IN_SEARCH_POPUP -->
	<!-- INCLUDE simple_footer.html -->
<!-- ELSE -->
	<!-- INCLUDE jumpbox.html -->
	<!-- INCLUDE overall_footer.html -->
<!-- ENDIF -->
Open /language/en/mcp.php and find:

Code: Select all

)); 
Before, add:

Code: Select all

    /*** 2012-03-01 BEGIN AmigoJack
        Also incorporate board seach for getting a topic ID ***/
    'FIND_TOPIC'=> 'Find topic',
    /*** 2012-03-01 END ***/ 
Tested.
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
baller1234
Registered User
Posts: 129
Joined: Sat May 29, 2010 9:43 am

Re: Need mod that can search topics/posts in Mod panel..

Post by baller1234 »

Thanks Amigo!! You rock.. Im going to install this and report back..

Thanks Again!!
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica

Re: Need mod that can search topics/posts in Mod panel..

Post by Jessica »

works perfectly, but for some reason it's not going into a popup. any reason why that could be?

(also does that when I got to send a PM and click on Find a Member)
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
User avatar
AmigoJack
Registered User
Posts: 6128
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン

Re: Need mod that can search topics/posts in Mod panel..

Post by AmigoJack »

Jessica wrote:it's not going into a popup
Do you get a popup at all? If not: does it stay in the same tab/window? Or does a new maximized tab or window open?
Jessica wrote:(also does that when I got to send a PM and click on Find a Member)
Do you mean that clicking on "find member" does not open a popup, too - or in contrast to "find topic" does open a popup?

I can't reproduce it anyway: I get a popup (speak: a window or tab with lower height and width dimensions than the browser itself) the same way as clicking on "find member".
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
baller1234
Registered User
Posts: 129
Joined: Sat May 29, 2010 9:43 am

Re: Need mod that can search topics/posts in Mod panel..

Post by baller1234 »

mm i installed your modifications but i cant find anything.. no popup or link.. Dont know where to find it either..
User avatar
AmigoJack
Registered User
Posts: 6128
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン

Re: Need mod that can search topics/posts in Mod panel..

Post by AmigoJack »

Refresh your template cache in the ACP. After that, go to some topic and from the quick mod combobox at the bottom select "move posts", which brings you to the MCP topic view.
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
baller1234
Registered User
Posts: 129
Joined: Sat May 29, 2010 9:43 am

Re: Need mod that can search topics/posts in Mod panel..

Post by baller1234 »

ah, i see good.. But this modification is not what i had in mind.. This is to merge topics to another ID..

I thought you created a text field with a submit button in modpanel. (another tab next to banning) to search for a topic. And that the search results look like Forum view (mcp) on a new tab Move posts. So you can move topics (results of the search) in bulk mode..

Hope im clear now.. I feel bad you did all this trouble :(
Last edited by baller1234 on Fri Mar 02, 2012 11:09 pm, edited 1 time in total.
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica

Re: Need mod that can search topics/posts in Mod panel..

Post by Jessica »

AmigoJack wrote:
Jessica wrote:it's not going into a popup
Do you get a popup at all? If not: does it stay in the same tab/window? Or does a new maximized tab or window open?
Jessica wrote:(also does that when I got to send a PM and click on Find a Member)
Do you mean that clicking on "find member" does not open a popup, too - or in contrast to "find topic" does open a popup?

I can't reproduce it anyway: I get a popup (speak: a window or tab with lower height and width dimensions than the browser itself) the same way as clicking on "find member".
it goes to the same tab

clicking on "Find a member" also takes me to the same tab but not a popup

I must be missing something if it works for you. It's been like this for a while. I remember before it worked fine though

also, in the ACP, the Find a member DOES go in a popup.
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
User avatar
AmigoJack
Registered User
Posts: 6128
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン

Re: Need mod that can search topics/posts in Mod panel..

Post by AmigoJack »

(Although this somehow goes beyond this topic) Give me a link to your board and a test account, so I have at least the ability to click on the "find member" when composing a PM.
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28

Return to “[3.0.x] MOD Requests”