Thread: Private Messages Enhancements - User PM Search
View Single Post
  #243  
Old 08-27-2008, 05:39 PM
Quarterbore Quarterbore is offline
 
Join Date: Mar 2005
Location: Valley Forge PA
Posts: 538
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried to read all the posts but I just installed 2.0 and I am curious what I would need to do to get the search box to show above the new PMs when a user just opens their PM Box?

I like how the search results open in a new window, my users will just have a tough time finding the search :erm:

I thought that the search was in a box above the PM box in the last version but I can't verify now.

OK, I figured it out, it was easy really...

Open Template: pm_messagelist

Find:

PHP Code:
<if condition="$show['messagelist']"
ABOVE ADD:

PHP Code:
<!-- PM Search START-->
<if 
condition="$show['pm_search']">
            
            <
script type="text/javascript">
              <!--
                  function 
check_all_group(checkobjvalue)
                  {
                  
formobj checkobj.form;
                  for (var 
0formobj.elements.lengthi++)
                                      {
                                      
elm formobj.elements[i];
                                      if (
elm.type == "checkbox" && elm.value == value)
                                      {
                                      
elm.checked checkobj.checked;
                                      }
                                      }
                                      }
                                      
//-->
                  
</script>
                  
                  
                  <
form action="private.php?pmsearch=1" method="post">
<
input type="hidden" name="s" value="$session[sessionhash]/>
<
input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]/>
                    <
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
                      <
thead>
                        <
tr>
                          <
td class="tcat">
                            <
a style="float:$stylevar[right]href="#top" onclick="return toggle_collapse('pmsearch')"><img id="collapseimg_pmsearch" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_pmsearch].gif" alt="" border="0" /></a>
                            
$vbphrase[private_message_search]
                          </
td>
                        </
tr>
                      </
thead>
                      <
tbody id="collapseobj_pmsearch" style="$vbcollapse[collapseobj_pmsearch]">
                        <
tr>
                          <
td class="panelsurround" align="center">
                            <
div class="panel">
                              <
table cellpadding="0" cellspacing="$stylevar[formspacer]border="0" width="100%">
                                <
tr>
                                  <
td align="$stylevar[left]valign="top" width="50%">
                                    <
fieldset class="fieldset" style="margin:0px">
                                      <
legend>$vbphrase[search_by_key_word]</legend>
                                      <
table cellpadding="0" cellspacing="$stylevar[formspacer]border="0">
                                        <
tr>
                                          <
td colspan="2">
                                            <
div>$vbphrase[key_words]:</div>
                                            <
div><input type="text" class="bginput" name="pmquery" size="35" value="$pmquerystyle="width:250px" /></div>
                                          </
td>
                                        </
tr>
                                        <
tr>
                                          <
td>        
                                            <
select name="titleonly">
                                              <
option value="0" $titleonlyselected[0]>$vbphrase[search_entire_pms]</option>
                                              <
option value="1" $titleonlyselected[1]>$vbphrase[search_titles_only]</option>
                                            </
select>
                                          </
td>
                                        </
tr>
                                        <
tr>
                                          <
td>        
                                            <
select name="folders">
                                              <
option value="-2" $folders[all]>$vbphrase[pmsearch_all_folders]</option>
                                              <
option value="0" $folders[in]>$vbphrase[pmsearch_incoming]</option>
                                              <
option value="-1" $folders[sent]>$vbphrase[pmsearch_outgoing]</option>
                                              
$pmfolders
                                            
</select>
                                            
                                          </
td>
                                        </
tr>
                                      </
table>
                                    </
fieldset>
                                  </
td>
                                  <
td align="$stylevar[left]valign="top" width="50%">                    
                                    <
fieldset class="fieldset" style="margin:0px">
                                      <
legend>$vbphrase[search_by_user_name]</legend>
                                      <
table cellpadding="0" cellspacing="$stylevar[formspacer]border="0">
                                        <
tr>
                                          <
td>
                                            <
div>$vbphrase[username]:</div>
                                            <
div id="userfield">
                                              <
input type="text" class="bginput" name="searchuser" id="userfield_txt" size="35"  value="$searchuserstyle="width:250px" autocomplete="off" />
                                            </
div>
                                            <if 
condition="$show['popups']">
                                              <
div id="userfield_menu" class="vbmenu_popup" style="display:none"></div>
                                              <
script type="text/javascript" src="clientscript/vbulletin_ajax_namesugg.js?v=$vboptions[simpleversion]"></script>
                                              <
script type="text/javascript">
                                                <!--
                                                    
vbmenu_register('userfield'true);
                                                    
snc = new vB_AJAX_NameSuggest('snc''userfield_txt''userfield');
                                                    
//-->
                                              
</script>
                                            </if>
                                          </
td>
                                        </
tr>
                                        <
tr>
                                          <
td>
                                            <
select name="toby">
                                              <
option value="0" $tobyuser[0]>$vbphrase[find_pms_by_user]</option>
                                              <
option value="1" $tobyuser[1]>$vbphrase[find_pms_to_user]</option>
                                              <
option value="2" $tobyuser[2]>$vbphrase[pmsearch_toby_user]</option>
                                            </
select>
                                          </
td>
                                        </
tr>
                                        <
tr><td><label for="cb_exactname"><input type="checkbox" name="exactname" value="1" id="cb_exactname" $exactnamechecked[1] />$vbphrase[exact_name]</label></td></tr>
                                      </
table>
                                    </
fieldset>
                                    
                                  </
td>
                                </
tr>
                              </
table>
                              
                            </
div>
                            <
div style="margin-top:$stylevar[cellpadding]px">
                              <
input type="submit" class="button" name="dosearch" value="$vbphrase[search_now]accesskey="s" />
                              <
input type="reset" class="button" value="$vbphrase[reset_fields]accesskey="r" />
                            </
div>
                          </
td>
                        </
tr>
                      </
tbody>
                    </
table>
                  </
form>
 
<
br />
</if> 
<!-- 
PM Search end --> 
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01378 seconds
  • Memory Usage 1,968KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete