vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Yet Another Multi-Quote Hack (https://vborg.vbsupport.ru/showthread.php?t=76594)

chriswible 02-17-2005 10:00 PM

Yet Another Multi-Quote Hack
 
This particular hack allows users to multi-quote directly from the newreply page instead of in the thread itself. A "quote" link is placed in each post in the thread review, allowing for quck, efficient multi-quoting without the need to plan posts in advance. ;)

Only two file edits and a template tweak, nothing major.

Suggestions/bug reports (and fixes) are welcome... this is my first hack so be nice. XD Thanks to Snow for pointing out WYSIWYG incompatibility problem and fixing my javascript. ;)

*INSTALLATION*

In newreply.php:

FIND:
PHP Code:

    require_once('./includes/functions_bbcodeparse.php');
    
$reviewmessage parse_bbcode($post['pagetext'], $foruminfo['forumid'], $post['allowsmilie']); 

ABOVE, INSERT:
PHP Code:

$poststep1 strip_quotes($post['pagetext']);
$b1 '[';
$b2 ']';
$quo 'QUOTE';
$poststep2 "$b1$quo=$username$b2$poststep1$b1/$quo$b2";
$poststep3 addslashes($poststep2);
$poststep4 explode("\n",$poststep3);
for (
$xyz 0$xyz count($poststep4); $xyz++){
$poststep4[$xyz] = rtrim($poststep4[$xyz]);
}
$poststep5 implode('\n',$poststep4);
$poststep5 "\\n$poststep5\\n"

in clientscript/vbulletin_editor.js:
at the end, ADD:
Code:

function do_quote_hack(quotestring,is_ie)
{
        if (document.getElementById('htmlbox'))
        {
                if (is_moz)
                {
                        moz_insert_smilie('<br>'+quotestring+'<br>');
                }
                else
                {
                        document.getElementById('htmlbox').innerHTML += quotestring;
                }
        }
        else
        {
                document.vbform.message.value += quotestring;
        }
}

In the template newreply_reviewbit:
FIND:
HTML Code:

<td class="alt1" width="125" align="center">$username</td>
REPLACE WITH:
HTML Code:

        <td class="alt1" width="125" align="center"><p align=center>$username</p>

<script language=javascript>
var quotestring$post[postid] = '$poststep5';
</script>
<p align=center><a href=# onClick="do_quote_hack(quotestring$post[postid],is_ie);"><img src="$stylevar[imgdir_button]/quote.gif" border=0></a></p></td>



Screenshot is of the Thread Review section in newreply.

OrangeFlea 02-19-2005 02:16 AM

screenshots?

chriswible 02-19-2005 03:01 AM

Not much visual in this hack, but okay.

saree 02-19-2005 06:35 AM

nice hack that going to save me alot of quoting time. i trust you when you said that you tried it and it's fully working with no errors. :rolleyes:

thanks again. :smoke:

Snow 02-19-2005 09:34 AM

It doesn't work for me :( When I click on the multi-quote (when posting a new reply), nothing happens other than adding a # to the end of the url.

chriswible 02-19-2005 06:09 PM

Quote:

Originally Posted by Snow
It doesn't work for me :( When I click on the multi-quote (when posting a new reply), nothing happens other than adding a # to the end of the url.

Do you get a javascript error? if so, does it occur on loading the page or when you click?

EDIT: Er... I just visited your forums and it works for me. :ermm: What browser are you using?

Snow 02-19-2005 06:53 PM

Quote:

Originally Posted by chriswible
Do you get a javascript error? if so, does it occur on loading the page or when you click?

Nope, no errors that I've noticed, it just doesn't so anything (at least for me) :disappointed:

Quote:

EDIT: Er... I just visited your forums and it works for me. :ermm: What browser are you using?
:surprised:
Firefox 1.0

chriswible 02-19-2005 09:24 PM

Yeesh, I tried firefox 1.0 and it still worked. :speechless:

Maybe you should try polling your users to see if they're having problems. :ermm:

Snow 02-21-2005 04:41 AM

Quote:

Originally Posted by chriswible
Yeesh, I tried firefox 1.0 and it still worked. :speechless:

Maybe you should try polling your users to see if they're having problems. :ermm:

OKI've found out what the problem is (I think). I tried it with theStandard Editor and it does work, but it refuses to work with theWYSIWYG editor. I will run a poll to see if anyone has managed toget it working with the WYSIWYG editor as you suggested.

chriswible 02-21-2005 05:21 AM

Yeah, you got it. :o how n00bish of me. I'll get right to fixing that...


All times are GMT. The time now is 11:18 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.01189 seconds
  • Memory Usage 1,754KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_html_printable
  • (2)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete