Back to vBulletin 3.5 Add-ons

[AJAX] Drop Down Message Display / Selector
Mod Version: 1.0.2, by harmor19

This modification is in the archives.
vB Version: 3.5.0 Rating: (1 vote - 5.00 average) Installs: 11
Released: 30 Oct 2005 Last Update: 30 Oct 2005 Downloads: 14
Not Supported DB Changes Uses Plugins Template Edits Additional Files  

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

has let me me use his site to demo this hack
It's the drop down menu above the shoutbox
http://bpgaming.com/forums/

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

Download

This modification is archived and cannot be downloaded.

Screenshots

       

Similar Mods

Mini Mods [AJAX] Drop Down Message Display / Selector vBulletin 3.6 Add-ons
Thread Display For Nonregistered Users (Limit Characters, Display Message) 2.0.5 vBulletin 3.5 Add-ons

vblts.ru supports vBulletin®, 2022-2025