vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=192478

Change prefixes with AJAX
by pipin
02 Oct 2008 09:56

4 Attachment(s)
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 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 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 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


3. change templates

change the templates as written in template_edits_english.txt


Q&A:

Can this be done without a separate column for the prefixes?

At the moment there is no solution for this

Wired1 02 Oct 2008 10:13

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 02 Oct 2008 11:56

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 02 Oct 2008 12:12

Quote:

Originally Posted by Wired1 (Post 1635440)
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.

Quote:

Originally Posted by Razasharp (Post 1635472)
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 02 Oct 2008 19:11

thanks,

jluerken 06 Oct 2008 13:34

Jelsoft please add this as standard in one of the future releases.
It makes sense to control the prefixes like this!

gael11 07 Oct 2008 08:02

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 08 Oct 2008 16:17

Quote:

Originally Posted by gael11 (Post 1639112)
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 15 Oct 2008 00:30

Quote:

Sorry.

Its fully translated now.
Danke mein Freund :up:

Alien 31 Oct 2008 19:39

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?

TiKu 01 Nov 2008 03:25

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 01 Nov 2008 09:52

nice addon. this should be default in vbulletin.

pipin 01 Nov 2008 14:35

I will later look into the problem with 3.7.3 cause 3.7.4 is almost around the corner.

TiKu 04 Nov 2008 20:55

1 Attachment(s)
There seems to be a problem with the Internet Explorer 7. In the js file, we're doing this (line 180):

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

"this.availableprefixes" contains the prefixes formatted like this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

"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 30 Dec 2008 17:07

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 deleted (Jelsoft terms and copyright)


Works with vB 3.7.4

Next version will be a product/plugin


All times are GMT. The time now is 01:03.

Powered by vBulletin® Version 3.8.14
Copyright © 2020, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.