Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-14-2008, 07:31 AM
veenuisthebest's Avatar
veenuisthebest veenuisthebest is offline
 
Join Date: Mar 2008
Location: India
Posts: 1,416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How do I create a alphabetical search menu

hii..

plz see the screenshot

https://vborg.vbsupport.ru/attachmen...2&d=1213432232

i want to create an alphabetical search menu for one of my custom pages exactly like we see in any vB site's memberlist page.

I looked at memberlist.php and found this that has a role in generating this menu but am not able to get it work. I am definitely missing more of code or something.

PHP Code:
$ltr $vbulletin->input->clean_gpc('r''ltr'TYPE_NOHTML);
    if (
$ltr != '')
    {
        if (
$ltr == '#')
        {
            
$condition "username NOT REGEXP(\"^[a-zA-Z]\")";
        }
        else
        {
            
$ltr chr(intval(ord($ltr)));
            
$condition 'username LIKE("' $db->escape_string_like($ltr) . '%")';
        }
    }
    
$selectedletter =& $ltr;

    
// build letter selector
    // start with non-alpha characters
    
$currentletter '#';
    
$linkletter urlencode('#');
    
$show['selectedletter'] = $selectedletter == '#' true false;
    eval(
'$letterbits = "' fetch_template('memberlist_letter') . '";');
    
// now do alpha-characters
    
for ($i=65$i 91$i++)
    {
        
$currentletter chr($i);
        
$linkletter =& $currentletter;
        
$show['selectedletter'] = $selectedletter == $currentletter true false;
        eval(
'$letterbits .= "' fetch_template('memberlist_letter') . '";');
    }
    
$sortaddon .= ($ltr != '') ? 'ltr=' urlencode($ltr) . '&' '';
    
$sortaddon .= ($urladd != '') ? $urladd '';

    
$sortaddon preg_replace('#&$#s'''$sortaddon);

    
$sorturl 'memberlist.php?' $vbulletin->session->vars['sessionurl'] . $sortaddon
I hope someone can help me get it done !! thank you
Attached Images
File Type: jpg pic.jpg (6.9 KB, 0 views)
Reply With Quote
  #2  
Old 06-15-2008, 07:43 AM
veenuisthebest's Avatar
veenuisthebest veenuisthebest is offline
 
Join Date: Mar 2008
Location: India
Posts: 1,416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i'm still waiting !!
Reply With Quote
  #3  
Old 06-17-2008, 03:10 PM
veenuisthebest's Avatar
veenuisthebest veenuisthebest is offline
 
Join Date: Mar 2008
Location: India
Posts: 1,416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is the code I got from arcade.php, just need some help now on how to implement the same on my custom page.

PHP Code:
    // alpha-navbar by MrZeropage
    
$alphabet = array(    "ALL""0-9" "A" "B" "C" "D" "E" "F" "G" "H" ,
                               
"I" "J" "K" "L" "M" "N" "O" "P" "Q" ,
                               
"R" "S" "T" "U" "V" "W" "X" "Y" "Z" );
    
$alphabar ""$currentfilter="ALL";
    if (
$ibforums->input['gsearch'] != "")
    {
        
$currentfilter $ibforums->input['gsearch'];
    }

    foreach (
$alphabet as $letter)
    {
        
$style="alt1"$boldon=""$boldoff=""$width="18";

        
$urlstring="act=Arcade&gsearch=".$letter."&search_type=";
        if (
$letter == "0-9")
        {
            
$urlstring.="3";
            
$width="24";
        }
        else
        {
            
$urlstring.="1";
        }

        if (
$letter == $currentfilter)
        {
            
$style="alt2";
            
$boldon="<b>";
            
$boldoff="</b>";
        }

        if (
$letter == "ALL")
        {
            
$urlstring="";
            
$letter=$ibforums->lang['acp_all'];
            
$width="26";
        }

        if (isset(
$ibforums->input['cat']))
        {
            
$urlstring .= "&amp;cat=".intval($ibforums->input['cat']);
        }

        
$alphabar .= '<td class="'.$style.'" width="'.$width.'" height="20"><div align="center"><a class="smallfont" href="'.$ibforums->base_url.$urlstring.'">'.$boldon.$letter.$boldoff.'</a></div></td>';
    }

    
$this->arcade->links['alphabar'] = $alphabar;
    
// end alpha-navbar 
Reply With Quote
  #4  
Old 06-19-2008, 09:53 AM
veenuisthebest's Avatar
veenuisthebest veenuisthebest is offline
 
Join Date: Mar 2008
Location: India
Posts: 1,416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

still need help !!
Reply With Quote
  #5  
Old 06-25-2008, 01:58 PM
veenuisthebest's Avatar
veenuisthebest veenuisthebest is offline
 
Join Date: Mar 2008
Location: India
Posts: 1,416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I swear, I am still waiting !!
Reply With Quote
  #6  
Old 06-25-2008, 02:28 PM
ade_dnb ade_dnb is offline
 
Join Date: Jan 2008
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is something i've been looking into as well.

Quote:
Originally Posted by Dismounted View Post
I have not seen a modification for this, put the query that fetches them would probably be pretty simple.
https://vborg.vbsupport.ru/showthread.php?p=1557516
Reply With Quote
  #7  
Old 08-01-2008, 05:23 PM
veenuisthebest's Avatar
veenuisthebest veenuisthebest is offline
 
Join Date: Mar 2008
Location: India
Posts: 1,416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is there any solution for this ??

thanks
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:12 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05866 seconds
  • Memory Usage 2,278KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (1)postbit_attachment
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete