Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[AJAX] Drop Down Message Display / Selector Details »»
[AJAX] Drop Down Message Display / Selector
Version: 1.0.1, by harmor19 harmor19 is offline
Developer Last Online: May 2023 Show Printable Version Email this Page

Category: Mini Mods - Version: 3.6.0 Rating:
Released: 08-25-2006 Last Update: 08-26-2006 Installs: 21
DB Changes Uses Plugins Template Edits
Additional Files  
No support by the author.

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:
$cm['text'] = str_replace("[username]"$vbulletin->userinfo['username'], $cm['text']); 
Q: Can I use the hook for other things besides replacing text?
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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 08-27-2006, 08:28 PM
therocks therocks is offline
 
Join Date: Mar 2006
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by harmor19
therocks,
Download the hack and overwrite "custom_messages.php".
Import the product and select "Allow Overwrite".

acidburn,
You get a reply from me.
harmor.. replaced custom_messages.php and reinstalled the product with overwrite allowed... now getting this..

Code:
Database error in vBulletin 3.6.0:

Invalid SQL:
SELECT * FROM thread WHERE forumid='23' ORDER BY threadid DESC LIMIT 5;

MySQL Error  : Table '****.thread' doesn't exist
Error Number : 1146
Date         : Sunday, August 27th 2006 @ 02:26:29 PM
Script       : http://******.com/boards/custom_messages.php?display_order=1
Referrer     : 
IP Address   : ******
Username     : therocks
Classname    : vb_database
thanks for all the help btw
Reply With Quote
  #43  
Old 08-27-2006, 08:29 PM
Kirk Y's Avatar
Kirk Y Kirk Y is offline
 
Join Date: Apr 2005
Location: Tallahassee, Florida
Posts: 2,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

He forgot to add another table prefix.
Reply With Quote
  #44  
Old 08-27-2006, 08:36 PM
harmor19 harmor19 is offline
 
Join Date: Apr 2005
Posts: 1,324
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by therocks
harmor.. replaced custom_messages.php and reinstalled the product with overwrite allowed... now getting this..

Code:
Database error in vBulletin 3.6.0:

Invalid SQL:
SELECT * FROM thread WHERE forumid='23' ORDER BY threadid DESC LIMIT 5;

MySQL Error  : Table '****.thread' doesn't exist
Error Number : 1146
Date         : Sunday, August 27th 2006 @ 02:26:29 PM
Script       : http://******.com/boards/custom_messages.php?display_order=1
Referrer     : 
IP Address   : ******
Username     : therocks
Classname    : vb_database
thanks for all the help btw
Use this code
PHP Code:
$getthreads $db->query_read("SELECT * FROM " TABLE_PREFIX "thread WHERE forumid='23' ORDER BY threadid DESC LIMIT 5");    
while(
$lt $db->fetch_array($getthreads))
{
   
$latestthreads .= "Title: <a href='showthread.php?t=$lt[threadid]'>".$lt['title']."</a> | Posted By: <a href='member.php?u=$lt[postuserid]'>".$lt['lastposter']."</a><br />";

}

$cm['text'] = str_replace("[latestthreads]"$latestthreads$cm['text']); 
Reply With Quote
  #45  
Old 08-27-2006, 08:40 PM
therocks therocks is offline
 
Join Date: Mar 2006
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

working perfectly! thanks harmor!
Reply With Quote
  #46  
Old 08-27-2006, 10:36 PM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks! I'm loving it!
Reply With Quote
  #47  
Old 08-27-2006, 10:55 PM
harmor19 harmor19 is offline
 
Join Date: Apr 2005
Posts: 1,324
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Snake
Thanks! I'm loving it!
You could click "Install".
Reply With Quote
  #48  
Old 09-10-2006, 05:28 PM
DPSR DPSR is offline
 
Join Date: Aug 2006
Posts: 154
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hack is working fine but i wan't to request a small addon-

Can you please guide me how to add a close link to the open window..like when someone open the message from dropdown menu and then he/she click the 'close' of 'collapse' button in the bottom of the window to close it .... intsead of choosing 'Please choose a message' from dropmenu to close the current picture

anyway to do it?
Reply With Quote
  #49  
Old 09-10-2006, 08:21 PM
harmor19 harmor19 is offline
 
Join Date: Apr 2005
Posts: 1,324
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by DPSR
Hack is working fine but i wan't to request a small addon-

Can you please guide me how to add a close link to the open window..like when someone open the message from dropdown menu and then he/she click the 'close' of 'collapse' button in the bottom of the window to close it .... intsead of choosing 'Please choose a message' from dropmenu to close the current picture

anyway to do it?
Good idea. I'll get it done and add more features to it soon
Reply With Quote
  #50  
Old 09-11-2006, 01:57 AM
DPSR DPSR is offline
 
Join Date: Aug 2006
Posts: 154
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by harmor19
Good idea. I'll get it done and add more features to it soon
Thanks buddy, i'll be waiting
Reply With Quote
  #51  
Old 09-14-2006, 04:28 PM
DPSR DPSR is offline
 
Join Date: Aug 2006
Posts: 154
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any update harmor19 on this?
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.08008 seconds
  • Memory Usage 2,316KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_code
  • (2)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete