| |||||||
This is a discussion on Need completed Alphabetical Search Menu code within the vBulletin section, part of the Internet Forum Softwares category; Hello Webwizzy. Here is another mystery I am trying to solve. I think you posted a mod on vb .org ...
![]() |
|
| | LinkBack (1) | Thread Tools | Display Modes |
#1
| ||||
| ||||
|
Hello Webwizzy. Here is another mystery I am trying to solve. I think you posted a mod on vb.org called : Alphabetical Search Menu. It appears to be missing a few steps like the one to create the file page.php. Do you have the complete MOD stashed anywhere that I could look at how you finished it? I am thinking that I am suppose to create a custom page called page.php and add your php code to the bottom of it but the instructions on vb.org are missing that piece. I think its a template, a plug and a custom page. Does that make sense to you? TIA for any help you might have with this one. kindest regards, Michael. I really like this site. You are doing a really fine job with it.
__________________ vBPlusMe|AllAboutDatingSites|Practical vBulletin Solutions Support Project Honey Pot |
|
#2
| ||||
| ||||
|
I'm in need of that too. I have the template and plugin created, but the page.php is giving me fits. Here is my page.php code so far if it helps anyone: PHP Code: Last edited by wascallywabbit; 30-03-2009 at 10:40 AM. |
|
#3
| ||||
| ||||
|
Thanks wascally! ![]() As Said by vbplusme First of all, it isn't a mod, its an article. It just explains on how about achieving that. Its not a copy/paste code. It would require some php knowledge to get it going. Must read the Comments in the Code, have explained it to the max. The variables, table name, column names will have to be changed to go with your custom dynamic page. The code wascally posted can help you. Here's a tutorial on how about creating a Custom vBulletin page. Let me know if you have any problem.
__________________ Would you like to Link To Us | Support TECH6 by going Premium Know more about me at Vinayaks.com | Follow TECH6 at Twitter |
|
#4
| ||||
| ||||
|
Glad it helped, but I am having massive problems getting mine to actually work.I have messed around til I am about ready to hang myself. I get one of two things when clicking a letter. Either I get a sql error about undefined columns or I get nothing but a white page. I would love to get this working asap cause this is the on feature that my members love on the current phpbb3 site. So, I would REALLY appreciate all the help you can offer, keeping it simple, cause I am as mindless as a coma patient when it comes to this stuff :P Thanks Thanks |
|
#5
| ||||
| ||||
|
See because this is an article, there may arise a LOT of changes to be done for the code to actually apply in your case. 1. Did you create the template as described in the article? 2. Are you sure your itemcount query is correct? 3. What is the exact error you get? What is your custom page code and what are you trying to achieve?
__________________ Would you like to Link To Us | Support TECH6 by going Premium Know more about me at Vinayaks.com | Follow TECH6 at Twitter |
|
#6
| ||||
| ||||
As Said by webwizzy 2. No, that is one of the things I am not sure about. 3. The error I get is just an undefined column error, so I know I am not setting up the counts and others correctly. Also, I am not sure which database table I am even supposed to be pointing to. I thought it would be "threads" but then I looked at posts as well. When it comes to the itemcount querry, should it be something like threadid (for vb_thread) or postid (for vb_posts). I just have no clue which parts of the code I need to change and which I don't. How's that for starters :S, I really wish I knew more about php, but I just don't so it can be frustrating doing this stuff |
|
#7
| ||||
| ||||
|
err.. I did mention:- As Said by Original Article
__________________ Would you like to Link To Us | Support TECH6 by going Premium Know more about me at Vinayaks.com | Follow TECH6 at Twitter |
|
#8
| ||||
| ||||
|
I am fairly well versed in the sql part of it, the problem is more taking that information and getting it into the php script. For example, this section: Code: // Count all log entries
$itemcount = $db->query_first("
SELECT COUNT(`threadid`) AS `itemcount`
FROM `" . TABLE_PREFIX . "thread` WHERE title LIKE '" . $letter . "%'"); //Change colname to actual column name in table that you want to search in
Also, in this bit: Code: //Use this line of code to show alphamenu in any sub-page you want. Then simply use $alphamenu variable in the associated template.
$query_Searchltr=$db->query_read("SELECT * from " . TABLE_PREFIX . "thread WHERE title LIKE '" . $letter . "%' LIMIT " . ($limitlower - 1) . ", $perpage"); //Change colname to the same column name you had set in the above count query
Finally, with this part: Code:
while ($search_result = $db->fetch_array($query_Searchltr))
{
$row_id=$search_result['uid'];
$row_name=$search_result['name'];
$row_class=$search_result['class'];
// and so on...
}
I don't know if that will make it so you can help me, but if not, and you have the time, I will gladly allow you access to the database and site as it is running on my home computer, until I can get a lot of the kinks worked out with the phpbb3 transfer. Thanks |
|
#9
| ||||
| ||||
|
okay i have gone through your queries and they look fine to me. The thread table does exist in vb by default, threadid is the primarykey column and title column contains the thread's title. Code: while ($search_result = $db->fetch_array($query_Searchltr))
{
$row_id=$search_result['uid'];
$row_name=$search_result['name'];
// and so on...
}
Code: $row_id=$search_result['threadid']; $row_name=$search_result['title']; PHP Code: Hope it helps.
__________________ Would you like to Link To Us | Support TECH6 by going Premium Know more about me at Vinayaks.com | Follow TECH6 at Twitter |
|
#10
| ||||
| ||||
|
Yeah, that gave me a start, but after going through your changes and seeing the results, I am wondering if I am doing something majorly wrong or am trying to do something that would require far more than I am capable. I guess the best way to describe what I want is to show you it on my current site and then if you say it's probably above what I can do, I will drop it . I have created a temporary account on it using the login: testuser and pw: testing. If you go to this link and login, you will see the alphabet list on the top and when you click a letter, only those posts in that forum section with that beginning letter are shown.Now, I have made the changes you suggested and even gone as far as using the searchresults template to get it to show the results in the correct type layout. The problem is that when I click a letter, the result is pulled from any forum and it only shows one result and not in the "normal" table. I hope that makes some sense, but I am getting uber frustrated with myself and need to take a break from it for a few before I kill something. Again thanks a ton for helping me thus far. |
|
#11
| ||||
| ||||
| |
![]() |
| Bookmarks |
| Tags |
| alphabetical search menu |
| Thread Tools | |
| Display Modes | |
| |
LinkBacks (?)
LinkBack to this Thread: http://tech6.com/f51/need-completed-alphabetical-search-menu-code-t720/ | ||||
| Posted By | For | Type | Date | |
| vBPlusMe - About vBulletin Solutions Blog Archive Custom Templates - The Right Way | This thread | Refback | 31-03-2009 07:25 AM | |