PDA

View Full Version : AJAX Fast Open/Close Threads (vB 3.5 Replication)


Zero Tolerance
05-17-2005, 10:00 PM
Update: To fix the known 2 bugs (red x for new threads & in-functional on search pages), re-download, do the edit for the 'search_results' template, and re-upload clientscript/ajax_openclosethread.js

Well as i wrote a tutorial on how to use AJAX, i thought i might aswell release an addon which uses AJAX Technology.

I'm sure you've all seen the video of AJAX in action in the vBulletin v3.5 development announcement, and if you havn't, better go look at it for a preview.

This addon will do exactly what that video shows, opening and closing topics with no page reload what-so-ever (no, it does not include the fast edit topic title).

Very easy installation, upload 1 file, 1 file to edit and 2 templates to edit, should take you 5-10 minutes max :)

Enjoy,

- Zero Tolerance

Adrian Schneider
05-18-2005, 01:55 AM
Love ya. :D

**installs**

Dark Aura
05-18-2005, 02:01 AM
Wooh! Great Modification, Zero Tolerance!

Adrian Schneider
05-18-2005, 02:03 AM
Did it work for you Aura? I get the alt tag, but when I click IE displays error on page bottom right, and firefox just ignores. (no closing takes place)

Dark Aura
05-18-2005, 02:03 AM
Just click on the image and it should change to the locked image.Also it may be because you don't have vBulletin v3.0.7

Zero Tolerance
05-18-2005, 02:04 AM
Did you upload the javacript file specified in the upload folder and make the edit for the FORUMDISPLAY template? If you mised either of those out then the JS file won't load.

- Zero Tolerance

Adrian Schneider
05-18-2005, 02:05 AM
Ill check to see where I messed up, the JS file is in forumdir/clientscript.

Adrian Schneider
05-18-2005, 02:05 AM
Nevermind, reuploaded the file and it works.. :) nice job

Zero Tolerance
05-18-2005, 02:08 AM
Glad to hear it is working :)

- Zero Tolerance

cinq
05-18-2005, 02:37 AM
We're on a roll, aren't we :D
Good job, love that tutorial too.

Lizard King
05-18-2005, 02:45 AM
Great Job Zero Tolerance...

MrNase
05-18-2005, 03:50 AM
Nice work!! Keep them coming ;)


(btw. vB 3.5 is delaying.. Kier is trying to get more AJAX into it since now he knows AJAY isn't not that special ;))

Zero Tolerance
05-18-2005, 03:54 AM
Nice work!! Keep them coming ;)


(btw. vB 3.5 is delaying.. Kier is trying to get more AJAX into it since now he knows AJAY isn't not that special ;))
Sounds good, AJAX really opens up a lot of oppertunities to improve systems and more access to do things we couldn't in the past.

- Zero Tolerance

Lionel
05-18-2005, 04:58 AM
Amazing. Where can we read that tutorial?

Zero Tolerance
05-18-2005, 05:14 AM
Amazing. Where can we read that tutorial?
The tutorial can be found right here: https://vborg.vbsupport.ru/showthread.php?t=81626

:)

- Zero Tolerance

NuclioN
05-18-2005, 06:04 AM
Nifty :) Very nice add.

Neutral Singh
05-18-2005, 06:14 AM
I have checked up the installation guide twice... but when i click on the status icon i get a error message in internet explorer's status bar:

Object Expected.

I have not missed any steps. Please guide.

Regards

Zero Tolerance
05-18-2005, 06:45 AM
Ensure you have made all edits, then make sure you have uploaded the js file into its proper location (forumdir/clientscript), make sure its uploaded in ASCII mode :)

- Zero Tolerance

Lionel
05-18-2005, 06:53 AM
ZT, you are very good at what you do. Take a look at that (http://haitiwebs.com/haitianforums/test.htm) . Got the Java from yahoo to examine. Food for thought! ;)

Zero Tolerance
05-18-2005, 07:06 AM
ZT, you are very good at what you do. Take a look at that (http://haitiwebs.com/haitianforums/test.htm) . Got the Java from yahoo to examine. Food for thought! ;)
Yeah, google are also using AJAX technology, for GMail and Google Suggest (which is still in beta i believe).

Though i won't need any reference, all i needed reference to was the ajax core functions itself, i already know JS so really it's just a question of using what i know with ajax, like this modification for example :)

- Zero Tolerance

uae
05-18-2005, 08:48 AM
ZT, this AJAX is really amazing...

Way to go dude :)

clicked install...

Zero Tolerance
05-18-2005, 08:54 AM
ZT, this AJAX is really amazing...

Way to go dude :)

clicked install...
Aye, it surely is a great developers tool, and will probably widen IPB's eyes a little bit ;)

- Zero Tolerance

TTG
05-18-2005, 09:01 AM
Works on 3.0.6 .. thanks ZT

Zero Tolerance
05-18-2005, 09:03 AM
Works on 3.0.6 .. thanks ZT
Glad to hear it, i wasn't sure about compatability with older versions of vB3 installations. :)

- Zero Tolerance

TheComputerGuy
05-18-2005, 11:14 AM
Working here

Installed without a problem :)

Snake
05-18-2005, 11:46 AM
Man I love you!

*clicks on Install*

ranger2kxlt
05-18-2005, 12:49 PM
Ok found maybe a bug or an error.....

If the thread is a new topic (the env with the letters sticking out) if i click it i get the ALT tag, and the red X

If the thred is old (env is closed) it works perfect

I don't have any IE errors or anything like that, either i'm missing the image, or its linking to the wrong area to grab the image.

Zero Tolerance
05-18-2005, 12:51 PM
Ok found maybe a bug or an error.....

If the thread is a new topic (the env with the letters sticking out) if i click it i get the ALT tag, and the red X

If the thred is old (env is closed) it works perfect

I don't have any IE errors or anything like that, either i'm missing the image, or its linking to the wrong area to grab the image.
Right click on the red x, go to properties, and check what the image URL is, paste it here.

If it is a bug, ill fix it, only a minor issue, the topic would still change state.

- Zero Tolerance

Princeton
05-18-2005, 01:10 PM
great tool :up:

here's the Double Click Edit code if you are interested:
http://scyth.info/2005/05/03/double-click-edit

nexialys
05-18-2005, 01:17 PM
here's the Double Click Edit code if you are interested:
http://scyth.info/2005/05/03/double-click-edit
url not correct, can't reach... if it's a hack we can release, would be good to have it here, not on an external url... (you know, licenses etc...)

ericgtr
05-18-2005, 01:41 PM
Regardless of the functionality (which is very handy) this is the coolest "bells and whistles" mod yet.

j_86
05-18-2005, 01:42 PM
ZT, you are very good at what you do. Take a look at that (http://haitiwebs.com/haitianforums/test.htm) . Got the Java from yahoo to examine. Food for thought! ;)
!!!

Geek Auto Linker here I come with this.

Adrian Schneider
05-18-2005, 01:43 PM
I have checked up the installation guide twice... but when i click on the status icon i get a error message in internet explorer's status bar:

Object Expected.

I have not missed any steps. Please guide.

Regards
Get that sorted out yet? The same thing happened to be, reuploading postings.php fixed it.

ranger2kxlt
05-18-2005, 02:31 PM
ZT here is the URL i have for the new folder lock image

http://www.URL.com/forums/images/statusicon/thread_new_lock.gif

Also, just saw that on the search page, the images say click to open/close thread, well it gives an error in IE when this is done, i assume its only because you didn't implament the hack to work in the search option, can you do that?

ranger2kxlt
05-18-2005, 02:35 PM
nexialys, the link works for me....http://scyth.info/2005/05/03/double-click-edit its not for VB in general it just gives you code on how to make double-click-edit work

so someone would have to convert all the code to VB for us.

poolking
05-18-2005, 03:58 PM
nice one, just installed. :D

Bulent Tekcan
05-18-2005, 09:11 PM
nice one, just installed. :D
thread_new_lock.gif not there...I think must be thread_lock_new.gif because Vb not include thread_new_lock.gif icon.

Thanks

zell_11
05-18-2005, 09:23 PM
Great one ZT i love how you are starting to make all these lovely hacks?

Bulent Tekcan
05-18-2005, 09:55 PM
And also ranger2kxlt is right,search page error in IE.

Thanks

Zero Tolerance
05-19-2005, 03:01 AM
ranger @ - I have thread_new_lock.gif - Are you using vb 3.0.7? I can't garentee it's a default image however i see no reason why it shouldn't be. So, once the red x appears, refresh the page and see what image your system uses for that locked icon, then i know which to use :)

Ill make it compliant with the search page once i've comfirmed + fixed the above bug.

- Zero Tolerance

bigcurt
05-19-2005, 03:36 AM
Does this only work with 3.0.7?

poolking
05-19-2005, 04:48 AM
thread_new_lock.gif not there...I think must be thread_lock_new.gif because Vb not include thread_new_lock.gif icon.

Thanks

I think you've quoted the wrong person here.

Zero Tolerance
05-19-2005, 05:20 AM
Does this only work with 3.0.7?
It has been sucessful on vb 3.0.6, but i cannot garentee compliance with older versions.

- Zero Tolerance

ranger2kxlt
05-19-2005, 06:57 AM
ZT - after the refresh this is the URL i have

http://www.URL.com/forums/images/statusicon/thread_lock_new.gif

Zero Tolerance
05-19-2005, 07:20 AM
ZT - after the refresh this is the URL i have

http://www.URL.com/forums/images/statusicon/thread_lock_new.gif
Released the update, first post tells you more information, it will fix the image problem and allow the function to be used on the search results display page :)

- Zero Tolerance

ranger2kxlt
05-19-2005, 01:18 PM
ZT - your a god :-p HAHAHA the search had to be the easiest part of all this, haha

All seems to work good now :-) thanks for the support.

Zero Tolerance
05-19-2005, 01:47 PM
Yeah the JS file just needed to be included onto the page so the functions were loaded :)

And no worries, happy to help. Enjoy :)

- Zero Tolerance

marcel-ea
05-20-2005, 03:55 AM
zero:

thanks, wounderful toy :D

One Question.
You see a chance to make a hack like vb show to rename the thread?
thx

Allan
05-20-2005, 05:20 AM
Thanks Zerotolerance, works perfectly !

Good job :)

~~~~~~~~~~~~~~~~~~~~~
Click Install
~~~~~~~~~~~~~~~~~~~~~

Oblivion Knight
05-20-2005, 07:26 AM
Simply awesome.. :)

If this is a sign of things to come, then bring it on!!


Note: Perhaps you should add something which doesn't allow "Moved" threads to be closed in their old forum?

Logikos
05-21-2005, 06:05 AM
Nice work man!

/me clicks install as it works perfect!

Adrian Schneider
05-21-2005, 04:55 PM
It has been sucessful on vb 3.0.6, but i cannot garentee compliance with older versions.

- Zero Tolerance
It works on my 3.0.1 board too.

nexialys
05-21-2005, 05:08 PM
this is a javascript anyway, there is no difference between 3.0x versions for this, so it works with all version... and will be integrated as is on 3.5 !!!

j_86
05-21-2005, 10:51 PM
Hey - is this supposed to change the icon?

Zero Tolerance
05-22-2005, 06:06 AM
Hey - is this supposed to change the icon?
Yes, to indicate that the thread is opened/closed :)

- Zero Tolerance

j_86
05-22-2005, 11:45 AM
Hm strange - it wasn't on mine. I'll have to have a play - clicking worked but image swap did not.

Zero Tolerance
05-23-2005, 02:04 PM
Hm strange - it wasn't on mine. I'll have to have a play - clicking worked but image swap did not.
It's possible it took a few moments for your browser to load the image, which might occur for slow modems. Which browser are you using, and did it report and JS errors?

- Zero Tolerance

Princeton
05-23-2005, 03:42 PM
great hack! :up:

Oblivion Knight
05-23-2005, 05:35 PM
Note: Perhaps you should add something which doesn't allow "Moved" threads to be closed in their old forum?^ Bump.. :)

untold4you
05-23-2005, 05:36 PM
This Rocks! I'm gonna spit out how this thing works! TNX !

Slave
05-26-2005, 01:03 PM
Just installed on a 3.0.3 installation .. works perfectly .. thanks!

:)

Snitz
05-26-2005, 01:49 PM
any screen shots ??
I installed this hack on my localhost
and can't figure out how to use it :confused:

Snake
05-26-2005, 02:31 PM
Click on the thread's icon in forum view.

T3MEDIA
05-26-2005, 03:54 PM
Constantly refreshes (hybrid) and I have a thread that has 1,316 replies...
(all browsers) just turns into a 404 error file not found.

3.0.7 and 3.0.1 and 3.0.3 found this error.

besides that any huge forums it works.
maybe you guys will make a fix? I know not for me but maybe a user that installs for their system.

Peace.

T3MEDIA
05-26-2005, 04:16 PM
any screen shots ??
I installed this hack on my localhost
and can't figure out how to use it :confused:For some reason no one said this is for hybrid or threaded mode you are prob in linear mode... swith and you will see the differnce.... when you click on a thread it changes below.
I do not see a reply button so I just opted out. Good luck on your Snitz

T3MEDIA
05-27-2005, 12:04 AM
Yep threads over 1000 end up not showing at all.

Zero Tolerance
05-27-2005, 09:02 AM
I don't understand T3MEDIA, threaded/hybrid/linear displays modes are shown while "viewing" threads, this modification make's no alterations to "viewing" threads, only on forum view, you click the thread icon to open/close the thread.

Maybe i missed something in your post, but i don't see how the number of replies effects the script in anyway. If so please provide a little more information on the subject/problem so i can gain a better understanding.

Thanks,

- Zero Tolerance

mgurain
06-02-2005, 01:48 PM
Hello,,

Perfet hack Zero Tolerance !

I hope you Add to it TITLE EDIT + Inline moderation

thanks,,

waza
06-15-2005, 05:54 PM
You rule Man!!
Ajax was the reason why I would upgrade, but now I can just leave my forum with all my hacks & plugins

thx!!

iSpanish
06-15-2005, 10:19 PM
Nice
Click Install*

JsnakeJ
06-20-2005, 03:11 PM
1 little thing. A few of my moderators are reporting to me that they can now open/close a topic anywhere they please and they're only a mod of 1 forum. Any help on that?

edbri871
06-26-2005, 02:28 PM
Great Hack!

Was wondering if there's a way to make it double click instead of single click? (to prevent closing topics by accident)

edbri871
06-26-2005, 08:51 PM
NVM, I got it:
ondblclick=""

:)

mgurain
06-26-2005, 09:40 PM
NVM, I got it:
ondblclick=""

:)

what did you change to do it ? I need that too because some mods really closed threads accidantly !!

thanks in advance edbri871,,

edbri871
06-27-2005, 02:41 AM
what did you change to do it ? I need that too because some mods really closed threads accidantly !!

thanks in advance edbri871,,
No Problem.

In the template edit you change onclick="" to ondblclick="".

So the code for the template change in THREADBIT will be:


<img src="$stylevar[imgdir_statusicon]/thread$thread[statusicon].gif" alt="<if condition="can_moderate($thread[forumid])">Click To Open/Close This Thread" ondblclick="requestData('postings.php?{$session[sessionurl]}do=openclosethread&amp;threadid={$thread[threadid]}','parseThread',this)<else /><if condition="$show['threadcount']"><phrase 1="$thread[dot_count]" 2="$thread[dot_lastpost]">$vbphrase[have_x_posts_in_thread_last_y]</phrase></if></if>" border="" />


:)

BillyFischbach
07-07-2005, 03:34 PM
Where is this thing supposed to show up? and when I goto a forum I get this "td>" under my statis icon

vakvak
07-19-2005, 12:04 AM
thanks very good

sketch42
07-19-2005, 02:50 AM
Great Mod... i Love AJAX!!!!! btw wheres the video ??

Yorixz
08-20-2005, 07:15 AM
Very nice hack, works perfectly. Sadly in Firefox it doesn't change the icon for me.

G-Unot
09-16-2005, 01:03 AM
This is nice, btw does anyone know if this works for vb 3.0.8?

Snake
09-16-2005, 04:18 PM
I'm wondering the same thing for 3.5 RC3 as well.

adill420
09-22-2005, 04:02 AM
installed on 3.0.9..works great!!

for those who are wondering here is the video

http://files.vbulletin.com/3.5/ajax.html

croportal
11-25-2005, 11:31 AM
where can i find the screenshots

Snake
11-25-2005, 12:22 PM
Why do you need screenshots for AJAX mods? lol

croportal
11-28-2005, 05:39 PM
i cant find this in postings.php

Open: postings.php
---------------------------------------------------
FIND:

case 'removeredirect':

$threadid = verify_id('thread', $_POST['threadid']);
break;

---------------------------------------------------

---------------------------------------------------
REPLACE WITH:

case 'removeredirect':

$threadid = verify_id('thread', iif($_POST['threadid'],$_POST['threadid'],$_GET['threadid']));
break;

Snake
11-29-2005, 12:19 PM
Make sure you are running on 3.0.7 (or above)>

croportal
11-29-2005, 12:23 PM
i have 3.5 version

Snake
11-29-2005, 12:29 PM
Then that's the problem! ;)

croportal
11-29-2005, 12:31 PM
this is for v3.5

ConqSoft
11-29-2005, 12:48 PM
This is for 3.0.x. 3.5.x has built in AJAX thread opening/closing.

Snake
11-29-2005, 12:57 PM
No it ain't my friend.

ConqSoft
11-29-2005, 12:58 PM
Um, 'fraid it is. This hack description even SAYS that it's in 3.5. Double-Click the thread status icon. (The envelope.) If you're not using default templates then it may not work on yours, but it's definately there.

Snake
11-29-2005, 01:03 PM
LOL Yes I know that. It seems that I have missed your post as I haven't seen it. :p

ConqSoft
11-29-2005, 01:41 PM
HA. Ok. I thought you were replying to my post. :)

hotwheels
12-18-2005, 02:57 AM
hotwheels clicks install

YLP1
01-11-2006, 11:08 PM
i cant find this in postings.php

Open: postings.php
---------------------------------------------------
FIND:

case 'removeredirect':

$threadid = verify_id('thread', $_POST['threadid']);
break;

---------------------------------------------------

---------------------------------------------------
REPLACE WITH:

case 'removeredirect':

$threadid = verify_id('thread', iif($_POST['threadid'],$_POST['threadid'],$_GET['threadid']));
break;

I too cannot find the above code. I am running vb 3.5.3.

Is this not for 3.5.?

Please advise.

ConqSoft
01-12-2006, 12:31 AM
See above. It's for 3.0.x. 3.5 has this BUILT IN by default.

bmanzzz
01-13-2006, 02:08 PM
installed.
love it.
thanks alot