![]() |
[AJAX] Drop Down Message Display / Selector
File Edits: 0
Template Edits: 2 Difficulty: Easy Description This hack adds a drop down menu underneath your navbar. When someone selects an option it'll load a table with the contents you put in it (without reloading the page). You can use HTML when you add a new message. I have added a new hook for the use of replacing text. I have hardcoded two replacements. [username] - This will display the username of the user browsing [userid] - This will display the userid of the user browsing. F.A.Q. Q: How can I add my own replacements? A: Add a new plugin under the hook "ajax_drop_menu_start". In the Plugin PHP code use this format: $cm['text'] = str_replace("find", "replace", $cm['text']); Example: PHP Code:
A: Yes. You can use it for almost anything. If you'd like to query the database for the lastest 5 threads and display them in the drop down menu you can. On the demo you'll see a drop down menu with the text "Select Message". View The Demo |
Examples of what you can do with the plugin are listed below.
Add the code to the hook "ajax_drop_menu_start" Example 1 You can have the latest 5 threads from a specific forum PHP Code:
Example 2 This will display the top five users with the highest post count PHP Code:
Example 3 This will display the latest 5 threads in every forum the user can access PHP Code:
|
great mod!! ... would there be a way to pull 5 or 10 of the latest threads from a specific forum into one of those boxes????
|
Quote:
|
Quote:
|
Interesting idea. What would be the ideal use for this?
|
Quote:
|
I've updated my hack. I hope you like it.
|
Quote:
If you need help coding the query I can assist you. |
I am using the first post to post examples. What other examples would you like to see posted?
|
All times are GMT. The time now is 02:11 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|