1

Topic: Instant Quote with xajax

##        Mod title:  InstantQuote
##
##      Mod version:  1.0
##   Works on PunBB:  1.2.9
##     Release date:  2005-10-28
##           Author:  Tobi (tobi@script.gr)
##
##      Description:  This mod needs the xajax library.
##                    It is written by and copyright (c) 2005 by J. Max Wilson
##                    and it is included in this mod package.
##                    The homepage of xajax is here:
##                    http://xajax.sourceforge.net

##                    This mod replaces the quote - function in viewtopic.
##                    For this mod JavaScript must be enabled.
##                    It inserts a quote to the quick reply box at te bottom.
##                    of viewtopic.php without reloading the page and scrolls down there.
##                    Multiple quotes can be made.

##                 
##   Affected files:  header.php
##                    viewtopic.php
##
##       Affects DB:  No

This one contradicts my last post inasmuch as it replaces the quote function of punBB. So - no JavaScript, no fun here.
And therefore I consider it more an experiment than a real mod.
If you're interested check it out:
mod-InstantQuote-1.0.tgz
or
mod-InstantQuote-1.0.zip

Demo here:
http:www.script.gr/board/

The German PunBB Site:
PunBB-forum.de

Re: Instant Quote with xajax

I have installed it, but it will not go in IE.

It's a very well idea, but I think there should be an alternative if there is no JavaScript or if the browser is unsupported.

Re: Instant Quote with xajax

Yeh, if you leave the current punbb functions and use javascript to "intercept" it if javascript is enabled then it will not cause people without javascript problems, also it only lets you quote one message?

4

Re: Instant Quote with xajax

Connorhd wrote:

Yeh, if you leave the current punbb functions and use javascript to "intercept" it if javascript is enabled

Interesting. would be a solution indeed. How would you do that?
I mean, possibly without  ugly "document.write" directives ? smile

Connorhd wrote:

also it only lets you quote one message?

I tested it with more than one succesfully. Which browser are you using?

The German PunBB Site:
PunBB-forum.de

Re: Instant Quote with xajax

Firefox, it might be because i was ticking the disable javascript box to test, i might have left it ticked lol wink

As for the javascript i have no idea how it is done (i know very little javascript only some stuff from my own Ajax experiments) but this site does it http://punbb.org/forums/viewtopic.php?id=9190

6

Re: Instant Quote with xajax

I found a way to have it working with and without JavaScript. Yes.

If you have the mod installed, go to viewtopic.php line 273 and replace this line

   
$quote_link = '<a href="#req_message" onClick="xajax_quote('.$cur_post['id'].')">';

with this one

   
 $quote_link = '<a href="post.php?tid='.$id.'&qid='.$cur_post['id'].'" onMouseOver="this.href=\'#req_message\'" onClick="xajax_quote('.$cur_post['id'].')">';

This way the "normal" link is active but is changed on mouseover - of course only if JavaScript is enabled.

I am now updating the download files and since it's now working without Javscript as well I'll put it also on Punres.

Another issue I found on the script.gr board using JavaScript:
The beautiful german umlaut characters lead to a JS error, I therefore added a utf8_encode() call to the quote.server.php

The German PunBB Site:
PunBB-forum.de