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)
-   -   Existing Topics Check (https://vborg.vbsupport.ru/showthread.php?t=59940)

NTLDR 01-14-2004 08:41 PM

Quote:

Originally Posted by buro9
I've used document.getElementById() rather than use IE based document.all access.

You should use fetch_object() (a vB JS function) this will give the best compatibility will all thr browsers vB supports properly.

Boofo 01-14-2004 09:45 PM

The fix in the first post works great if you type it in, but if you paste something in the thread title, it doesn't turn on the button. Any fix for this? ;)

Boofo 02-16-2004 01:28 AM

I'm getting a 406 error (object undefined) with this now after making the changes to the code in the first post. Any fix for this?

gmarik 02-22-2004 07:04 AM

nice working ...

Boofo 02-22-2004 03:54 PM

Quote:

Originally Posted by buro9
I had a very similar thing running on my old VB2 forums, I have now installed this hack on my VB3 test site... and it's nice :) Very nice.

I have made a few adjustments though:

I've used document.getElementById() rather than use IE based document.all access. This will ensure compatibility with standards compliant browsers. You need to add id="" to the relevant pieces of HTML, subject and findicon I think are the only two.

I already added an onKeyUp alongside the onChange on the subject input box. This runs it everytime a key is lifted... though I left the onChange in there as it makes no difference and ensures that more limited browsers will still support it.

Aside from that... lovely hack :)

Can you share the changes you made? ;)

buro9 02-22-2004 06:55 PM

Quote:

Originally Posted by Boofo
Can you share the changes you made? ;)

Yes, I hope this won't offend the hack creator... but here are snippets of my newthread template:

Code:

function showFind(element) {
  if(element.value != '') {
    document.getElementById('findicon').src = "$stylevar[imgdir_button]/findicon_on.gif";
    document.getElementById('findicon').style.cursor = "pointer";
  } else {
    document.getElementById('findicon').src = "$stylevar[imgdir_button]/findicon_off.gif";
    document.getElementById('findicon').style.cursor = "default";
  }
}

Code:

                <!-- subject field -->
                <table cellpadding="0" cellspacing="0" border="0" class="fieldset">
                <tr>
                        <td class="smallfont" colspan="3">$vbphrase[title]:</td>
                </tr>
                <tr>
                        <td><input type="text" class="bginput" name="subject" id="subject" onChange="showFind(this);" onKeyUp="showFind(this);" value="$subject" size="40" maxlength="85" tabindex="1" /></td>
<td>&nbsp;&nbsp;</td>
<td><img id="findicon" name="findicon" src="$stylevar[imgdir_button]/findicon_off.gif" alt="Search for existing topics" onclick="openWindow()" /></td>
                        <td>&nbsp;&nbsp;</td>
                        <td><img id="display_posticon" src="$selectedicon[src]" alt="$selectedicon[alt]" /></td>                </tr>
                </table>
                <!-- / subject field -->

Obviously I'm trusting that you can take the applicable small bits and merge them as appropriate into whatever you have.

Boofo 02-23-2004 03:01 AM

How can you get this to show the button on when you start typing in the subject filed Box (like from tthe first post)?

buro9 02-23-2004 04:26 AM

Quote:

Originally Posted by Boofo
How can you get this to show the button on when you start typing in the subject filed Box (like from tthe first post)?

Code:

onKeyUp="showFind(this);"
From the first key it is activated.

Though a trim() function should be added to prevent it being activated on pressing of the space bar.

Boofo 02-23-2004 05:19 AM

Quote:

Originally Posted by buro9
Code:

onKeyUp="showFind(this);"
From the first key it is activated.

Though a trim() function should be added to prevent it being activated on pressing of the space bar.

How do we add the trim code to this? ;)

Boofo 02-23-2004 10:01 AM

Found a bug with this hack. If you have quotes in a thread title, you will get a javascript error when you click the button to check the topic and also the window will have the table in it without any topics. The title I used was:

"Killing all my chickens"

Any fix for this?


All times are GMT. The time now is 10:31 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.01730 seconds
  • Memory Usage 1,742KB
  • 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
  • (4)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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