vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Forum Display Enhancements - Change prefixes with AJAX (https://vborg.vbsupport.ru/showthread.php?t=192478)

pipin 10-01-2008 10:00 PM

Change prefixes with AJAX
 
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 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

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 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

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 10-14-2008 10:30 PM

Quote:

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?

TiKu 11-01-2008 01:25 AM

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.

TiKu 11-04-2008 06:55 PM

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

this.selectobj.innerHTML = this.availableprefixes;
"this.availableprefixes" contains the prefixes formatted like this:
Code:

<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 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 there was an error in it.

GaiLoan 03-23-2009 04:53 PM

Quote:

Originally Posted by pipin (Post 1697218)
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

Quote:

Originally Posted by GaiLoan (Post 1775160)
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?

TiKu 02-27-2016 02:57 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.

Elixar 02-27-2016 03:10 PM

Quote:

Originally Posted by TiKu (Post 2565753)
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! :)

TiKu 02-28-2016 03:29 PM

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.


All times are GMT. The time now is 05:20 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.01149 seconds
  • Memory Usage 1,769KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (23)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete