View Full Version : Forum Display Enhancements - Change prefixes with AJAX
pipin
10-01-2008, 10:00 PM
This hack allows you to change the prefix of a thread through AJAX. The prefix is shown in a separate column.
At the moment there is no product version of this hack, if someone has ideas or wants to build such a solution with this hack, just pm me.
Thanks to TiKu (http://www.timosoft-software.de) the original coder of this hack.
Release history:
Version 1.1 (12/30/08)
- template edits corrected
- prefix no more in a seperate column on searches
- workaround a newly introduced bug in Internet Explorer
- vbulletin_ajax_threadlist.zip (https://vborg.vbsupport.ru/attachment.php?attachmentid=87585&stc=1&d=1222937389) deleted (Jelsoft terms and copyright)
Version 1.01 (10/02/08)
- first version on vb.org
- template edits corrected
How to install:
1. file edit and upload
edit /clientscript/vbulletin_ajax_threadlist.js according to change_vbulletin_ajax_threadslist.txt (https://vborg.vbsupport.ru/attachment.php?attachmentid=91427&stc=1&d=1230658780) and upload vbulletin_ajax_threadlist.js to the directory clientscript.
2. creating plugin
create a plugin with this data:
Product: vBulletin
Hook: ajax_complete
Title: AJAX for Prefixes
Plugin PHP Code: the code in plugin_code.txt (https://vborg.vbsupport.ru/attachment.php?attachmentid=87586&stc=1&d=1222937389)
3. change templates
change the templates as written in template_edits_english.txt (https://vborg.vbsupport.ru/attachment.php?attachmentid=91425&stc=1&d=1230656611)
Q&A:
Can this be done without a separate column for the prefixes?
At the moment there is no solution for this
Wired1
10-02-2008, 08:13 AM
I would suggest you make a plugin / product XML file instead of telling users to make the plugin themselves. This way you can link it back to this thread, not to mention limit install mistakes.
Razasharp
10-02-2008, 09:56 AM
Would it be possible to change/add to this so you can change prefix with ajax whilst on the show thread page?
Sometimes a prefix can only be decided on after seeing the content of the post :)
Cheers!
pipin
10-02-2008, 10:12 AM
I would suggest you make a plugin / product XML file instead of telling users to make the plugin themselves. This way you can link it back to this thread, not to mention limit install mistakes.
We will see, never created a product so far.
Would it be possible to change/add to this so you can change prefix with ajax whilst on the show thread page?
Sometimes a prefix can only be decided on after seeing the content of the post :)
Cheers!
Thats one thing i would like to have, too. But it may be much moore difficult to code. You even cant change the title in the showthread with AJAX in the vB standard.
In addition the coder of this hack is at the moment finishing his IT university studies.
GaiLoan
10-02-2008, 05:11 PM
thanks,
jluerken
10-06-2008, 11:34 AM
Jelsoft please add this as standard in one of the future releases.
It makes sense to control the prefixes like this!
gael11
10-07-2008, 06:02 AM
Could you translate in english the template.txt's file ?
Thank you
What does that mean:
dies einfügen
vor
hinter
(kommt 2 mal vor)
jeweils
pipin
10-08-2008, 02:17 PM
Could you translate in english the template.txt's file ?
Thank you
What does that mean:
dies einf?gen
vor
hinter
(kommt 2 mal vor)
jeweils
Sorry.
Its fully translated now.
LeatherNeck
10-14-2008, 10:30 PM
Sorry.
Its fully translated now.
Danke mein Freund :up:
Alien
10-31-2008, 05:39 PM
If I use images (via html code) as the thread prefixes, will the images display in the pulldown instead of the text? If not, how would I go about showing the images instead?
Or will this show the text version of the images, but still show an image there once selected?
In the drop-down menu (combobox) the text versions of the prefixes are displayed. Once a prefix has been selected, the image is displayed.
soulface
11-01-2008, 07:52 AM
nice addon. this should be default in vbulletin.
pipin
11-01-2008, 12:35 PM
I will later look into the problem with 3.7.3 cause 3.7.4 is almost around the corner.
There seems to be a problem with the Internet Explorer 7. In the js file, we're doing this (line 180):
this.selectobj.innerHTML = this.availableprefixes;
"this.availableprefixes" contains the prefixes formatted like this:
<option value="f135_0" class="" >New -</option>
<option value="f135_1" class="" >Done -</option>
<option value="f135_2" class="" >Discuss -</option>
<option value="f135_3" class="" >Nothing -</option>
"this.selectobj" is an (empty) <select /> tag. So line 180 should add the available prefixes to the combo box, which later is inserted into the document (line 184).
This works fine if you're using Firefox. It works fine if you're using Internet Explorer 6. It used to work fine if you were using Internet Explorer 7. But some time ago, it stopped working and IE7 is showing a blank combo box now. The reason is, that the js code for some reason produces broken HTML code, which can be seen in the attachment. There's something missing before the first prefix: <OPTION class="" value="f135_0">
It isn't missing in Firefox. Does anybody have a clue what IE7 is doing here? I'm running out of ideas. I bet this is a new IE7 bug that has been introduced on one of the recent Microsoft patch days.
pipin
12-30-2008, 03:07 PM
New Version:
Version 1.1 (12/30/08)
- template edits corrected
- prefix no more in a seperate column on searches
- workaround a newly introduced bug in Internet Explorer
- vbulletin_ajax_threadlist.zip (https://vborg.vbsupport.ru/attachment.php?attachmentid=87585&stc=1&d=1222937389) deleted (Jelsoft terms and copyright)
Works with vB 3.7.4
Next version will be a product/plugin
pipin
12-30-2008, 03:41 PM
Just updated the change_vbulletin_ajax_threadslist.txt (https://vborg.vbsupport.ru/attachment.php?attachmentid=91427&stc=1&d=1230658780) there was an error in it.
GaiLoan
03-23-2009, 04:53 PM
New Version:
Works with vB 3.7.4
Next version will be a product/plugin
[/COLOR]
thanks, so when the product/plugin version will release ?
pipin
03-23-2009, 05:32 PM
thanks, so when the product/plugin version will release ?
Don't know too much work right now.
robbiefritz
04-27-2009, 06:13 PM
interesting
Elixar
02-27-2016, 02:26 PM
Any way to get this on vB 4.2?
I'm the original author of this mod and have forgotten that pipin did upload it here.
I have the mod working with vBulletin 4.2.3. If I find the time to check the code (for instance I'm not sure whether it still requires modifications to vB files), I'll upload it in the vBulletin 4 Mod section.
Elixar
02-27-2016, 03:10 PM
I'm the original author of this mod and have forgotten that pipin did upload it here.
I have the mod working with vBulletin 4.2.3. If I find the time to check the code (for instance I'm not sure whether it still requires modifications to vB files), I'll upload it in the vBulletin 4 Mod section.
You're awesome, thank you so much! :)
Here it is: https://vborg.vbsupport.ru/showthread.php?t=321951
It is my first upload of a Mod, so I hope I did everything right.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.