Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

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
  #12  
Old 10-30-2005, 11:44 AM
Gizmo5h1t3's Avatar
Gizmo5h1t3 Gizmo5h1t3 is offline
 
Join Date: Aug 2005
Location: ROCHDALE LANCS UK
Posts: 650
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[AJAX] Drop down message display / selecter
Reply With Quote
  #13  
Old 10-30-2005, 11:44 AM
Breaker's Avatar
Breaker Breaker is offline
 
Join Date: Jan 2002
Location: Derby, UK
Posts: 184
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i have kind of got the bbcode working, although now i get <br /> pasted on every new line.... back to editing this file i guess
Reply With Quote
  #14  
Old 10-30-2005, 11:55 AM
harmor19 harmor19 is offline
 
Join Date: Apr 2005
Posts: 1,324
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gizmo5h1t3
[AJAX] Drop down message display / selecter
Thanks, I'll use that
Reply With Quote
  #15  
Old 10-30-2005, 12:04 PM
Breaker's Avatar
Breaker Breaker is offline
 
Join Date: Jan 2002
Location: Derby, UK
Posts: 184
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I now have BBCode working on my site
Reply With Quote
  #16  
Old 10-30-2005, 02:01 PM
harmor19 harmor19 is offline
 
Join Date: Apr 2005
Posts: 1,324
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Updated.
I have added a hook, I'm not sure anyone has done this or thought they could.

Please read the information in the block at the top for more information.
If you have any questions on what else it could be used for don't hesitate to ask.

Edit: I just saw the tutorial for adding hooks.
Reply With Quote
  #17  
Old 10-30-2005, 02:54 PM
Rich's Avatar
Rich Rich is offline
 
Join Date: Mar 2004
Location: U.S.A
Posts: 921
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,

Quote:
MySQL Error : You have an error in your SQL syntax. Check 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
Date : Sunday, October 30th 2005 @ 11:49:46 AM
Reply With Quote
  #18  
Old 10-30-2005, 02:55 PM
Breaker's Avatar
Breaker Breaker is offline
 
Join Date: Jan 2002
Location: Derby, UK
Posts: 184
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

where did you recieve that message?



hardcoded it.... but i have my variables working... ish
Reply With Quote
  #19  
Old 10-30-2005, 02:56 PM
Rich's Avatar
Rich Rich is offline
 
Join Date: Mar 2004
Location: U.S.A
Posts: 921
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,

I got that when I tried to import the product via the product manager. BTW, I just downloaded this, so if it was upgraded, it was messed up during the upgrade.
Reply With Quote
  #20  
Old 10-30-2005, 03:01 PM
harmor19 harmor19 is offline
 
Join Date: Apr 2005
Posts: 1,324
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You'll probably using "Front-End Error Message"
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="Font-End Error Messages" fieldname="Font-End Error Messages"
Reply With Quote
  #21  
Old 10-30-2005, 03:37 PM
Rich's Avatar
Rich Rich is offline
 
Join Date: Mar 2004
Location: U.S.A
Posts: 921
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,

That corrected the error. Thank you. (edit the "replace" to read Front, and not Font). Others may encounter this problem as well.
Reply With Quote
Reply

Thread Tools

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 03:09 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04585 seconds
  • Memory Usage 2,315KB
  • 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
  • (6)bbcode_php
  • (2)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