Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 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.2, by harmor19 harmor19 is offline
Developer Last Online: May 2023 Show Printable Version Email this Page

Version: 3.5.0 Rating:
Released: 10-29-2005 Last Update: 10-29-2005 Installs: 11
DB Changes Uses Plugins Template Edits
Additional Files  
No support by the author.

Author: Andrew Harmor
Version: 1.0.2
File Edits: 0
Template Edits: 2
Difficulty: Easy

Breaker has let me me use his site to demo this hack
It's the drop down menu above the shoutbox
Demo

Description
This hack adds a drop down menu underneath your navbar.
When someone selects a value it'll load a table with the contents you put in it (without reloading the page).

I have added a hook to make it possible to do replace on variables
The hook name is ajax_drop_menu_start and is located in "custom_messages.php"
In the product XML I have
PHP Code:
<hookname>ajax_drop_menu_start</hookname>
            <
phpcode><![CDATA[
            
$cm['title'] = str_replace("[you]"$vbulletin->userinfo['username'], "".$cm['title']."");
            
$cm['text'] = str_replace("[you]"$vbulletin->userinfo['username'], "".$cm['text']."");  
            ]]></
phpcode
What this does is replace [you] with the person viewing it username.
so instead of "hey [you]" I would see "hey harmor19".

###########################

If you are recieving this error when you upload the product please follow the directions below the error message
PHP Code:
MySQL Error You have an error in your SQL syntaxCheck the manual that corresponds to your MySQL server version for the right syntax to use near 'Messages = 'a:3:{s:20:\"custom_message_added\";s:46:\"The custo
Error Number : 1064 
Open the product xml in an editor (wordpad will do)

Find
PHP Code:
<phrasetype name="Error Messages" fieldname="Error Messages"
Replace With
PHP Code:
<phrasetype name="Front-End Error Messages" fieldname="Front-End Error Messages"
Save the file and import it.

################
Version 1.0.1
Added BBCode (Thanks to "Breaker" (again haha) )

Version 1.0.2
Added a hook in custom_messages.php

Show Your Support

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

Comments
  #32  
Old 11-05-2005, 01:40 AM
silurius silurius is offline
 
Join Date: Oct 2004
Posts: 404
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This question may seem very silly, but where exactly do I create the content for the dropdown? Directly in the database? Could you include a note at the top of this thread with a quick explanation for that? Also a nice feature request might be an admincp tool allowing for easy content creation. Otherwise, great hack!
Reply With Quote
  #33  
Old 11-05-2005, 08:09 AM
Breaker's Avatar
Breaker Breaker is offline
 
Join Date: Jan 2002
Location: Derby, UK
Posts: 184
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

theres an option on the ACP sidebar
Reply With Quote
  #34  
Old 11-05-2005, 08:18 AM
Gizmo5h1t3's Avatar
Gizmo5h1t3 Gizmo5h1t3 is offline
 
Join Date: Aug 2005
Location: ROCHDALE LANCS UK
Posts: 650
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by silurius
This question may seem very silly, but where exactly do I create the content for the dropdown? Directly in the database? Could you include a note at the top of this thread with a quick explanation for that? Also a nice feature request might be an admincp tool allowing for easy content creation. Otherwise, great hack!
there IS an ACP option m8
Reply With Quote
  #35  
Old 11-12-2005, 04:19 AM
silurius silurius is offline
 
Join Date: Oct 2004
Posts: 404
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you! Forgot I had Kirby's Admincp mod installed.

All right. I have had this hidden on my forums for a week and have been dying to find a reason to use it. So far I haven't come up with anything that would work perfectly for my forums. I'd love to see a list of some great uses for this very nifty hack.
Reply With Quote
  #36  
Old 11-14-2005, 05:11 AM
AshokForums.com AshokForums.com is offline
 
Join Date: Nov 2005
Posts: 160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I get this error

Database error in vBulletin 3.5.0:

Invalid SQL:
SELECT * FROM custom_messages WHERE display_order='1';

MySQL Error : Table 'aforums.custom_messages' doesn't exist
Error Number : 1146
Date : Monday, November 14th 2005 @ 12:44:47 PM
Script : http://AshokForums.com/----/custom_m...isplay_order=1
Referrer : http://AshokForums.com/----/showthread.php?p=9

Please help..

Thanks in advance
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 08:23 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.06234 seconds
  • Memory Usage 2,268KB
  • Queries Executed 22 (?)
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
  • (4)bbcode_php
  • (1)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
  • (2)pagenav_pagelink
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (6)postbit_onlinestatus
  • (6)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_postinfo_query
  • fetch_postinfo
  • 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