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)
-   -   Mozilla/Firefox users: Search when editing templates (https://vborg.vbsupport.ru/showthread.php?t=91241)

sv1cec 06-27-2005 10:00 PM

Mozilla/Firefox users: Search when editing templates
 
I am not sure if this is a real hack, so moderators, please feel free to remove it, if you do not consider it worthy.

I am an avid Mozilla user, having IE only for testing my forums, so I never use IE in the admincp. However, I was given access to a site, in which, for some reason, I had to use IE to access its admincp. I noticed that while editing a template, there was a "Search" box at the bottom of the form. That same box, didn't show up when using Firefox!

So I started asking around and I was told that this works only in IE. Then, when vB 3.5 came out, I noticed that the search function, was present in Firefox as well. Puzzled, I posted a question in vB.com, and the answer I got said to upload the clientscript/vbulletin_templatemgr.js, to get the same functionality.

Well, I did but nothing changed. So then I compared the file includes/adminfunctions_template.php and noticed some small differences. I incorporated them in vb 3.0.7 adminfunctions_template.php and voila, I got the search working fine.

If you are not in a hurry to update to vb 3.5 and if you want that functionality, edit your includes/adminfunctions_template.php and find:

PHP Code:

function print_template_javascript()
{
    global 
$stylevar$vbphrase$vboptions;

    
print_phrase_ref_popup_javascript();

    echo 
'<script type="text/javascript" src="../clientscript/vbulletin_templatemgr.js"></script>';

    
print_label_row(iif(is_browser('ie'), $vbphrase['search_in_template'], $vbphrase['additional_functions']), iif(is_browser('ie'), '
    <input type="text" class="bginput" name="string" accesskey="t" value="' 
htmlspecialchars_uni($GLOBALS['searchstring']) . '" size="20" onChange="n=0;" tabindex="1" /> 

replace that with:

PHP Code:

function print_template_javascript()
{
    global 
$stylevar$vbphrase$vboptions;

    
print_phrase_ref_popup_javascript();

    echo 
'<script type="text/javascript" src="../clientscript/vbulletin_templatemgr.js"></script>';

    
print_label_row(iif(is_browser('ie') OR is_browser('mozilla''20040707'), $vbphrase['search_in_template'], $vbphrase['additional_functions']), iif(is_browser('ie') OR is_browser('mozilla''1.7'), '
    <input type="text" class="bginput" name="string" accesskey="t" value="' 
htmlspecialchars_uni($GLOBALS['searchstring']) . '" size="20" onChange="n=0;" tabindex="1" /> 

With only this change, the search is working OK for me, but if you have problems, try uploading the clientscript/vbulletin_templatemgr.js from vb 3.5. It was not needed in my case, and it does not seem to have any differences that can affect the search, but I am not an expert in js.

Rgds

Snake 06-28-2005 12:51 PM

Uhh I know I'm not a blind person but I coudn't search for the adminfunctions_template.php file. o.O

FightRice.com 06-28-2005 12:53 PM

did you look inside your /includes folder?

TCattitude 06-28-2005 12:57 PM

includes\adminfunctions_template.php

Nice mini mod ;)

Snake 06-28-2005 01:19 PM

Sorry guys my bad.

Injektilo 06-28-2005 01:28 PM

this is by far the BEST hack ever!!! :) i hated using explorer for editing templates

sv1cec 06-28-2005 01:35 PM

I hate using IE for anything!

Snake 06-28-2005 01:51 PM

Quote:

Originally Posted by sv1cec
I hate using IE for anything!

Good point. I'm a fan of Firefox after all. :nervous:

waza 06-28-2005 02:11 PM

thx, really nice! *clicked install*
You know, i have installed over 50 hacks with template modification just by reading the whole template, I never use IE so i didn't know this function was in.

this will make installing hacks A LOT easier

jugo 06-28-2005 02:22 PM

WOW...and here i thought that it was something I did that made it disappear.

Thank ...

/me installs.

Freezerator 06-28-2005 03:48 PM

HoTM :p

Nice hack, really handy.

TheComputerGuy 06-28-2005 03:59 PM

sweet deal

DS MrSinister 06-28-2005 08:49 PM

Thank You Thank You u made my life soooooooooo much better.. WHat a great hack.


:)

Clicks Install

Littlebit 06-28-2005 10:52 PM

Thanks a bunch!

iceman-x 06-28-2005 10:55 PM

thanks you, wery nice, i have ben missing it for some time. :)

Adrian Schneider 06-28-2005 10:56 PM

Great minds think alike ;)
https://vborg.vbsupport.ru/showthread.php?t=81936

Thanks:D

Picside 06-29-2005 01:40 AM

awesome! i always thought that was weird not to be able to search with the VB editor. thanks!

Adrian Schneider 06-29-2005 03:49 AM

But it's not a template mod. ;)

yoyoyoyo 06-29-2005 04:28 AM

Quote:

Originally Posted by TheSpecialist
But it's not a template mod. ;)

I was actually replying to the wrong thread .. oops. Thanks for this one, too

mkdevo 06-29-2005 11:30 AM

wow.. as a firefox user, i never even knew this existed! :) thanks!

Princeton 06-29-2005 03:31 PM

great little mod

Aeolian_X 06-29-2005 06:03 PM

Quote:

Originally Posted by princeton
great little mod

I wish I would have seen this mod a while back. I could ahve used it. I installed it anyway, because it's definately useful. Thank you.

Snake 07-05-2005 08:44 AM

sv1cec in the screenshot, which chat system are you currently running?

sv1cec 07-05-2005 09:40 AM

vBChat, heavily customized!

Snake 07-05-2005 09:59 AM

Oh I thought you were using a JAVA chat hack. vBChat is bad, I don't like it that much.

sv1cec 07-05-2005 11:10 AM

Each one is entitled to his opinion. I find it the best chat hack for vB, since it integrates completely with vB and allows you to customize it, to suite your site needs. I tried a couple of others, but either they had no connection to vB or (even worst) didn't allow you to customize even the way the screen looks.

I find vBChat the best for my needs, that does not necessarily make it suitable for yours.

Rgds

Snake 07-05-2005 11:18 AM

Quote:

Originally Posted by sv1cec
Each one is entitled to his opinion. I find it the best chat hack for vB, since it integrates completely with vB and allows you to customize it, to suite your site needs. I tried a couple of others, but either they had no connection to vB or (even worst) didn't allow you to customize even the way the screen looks.

lol There is no way you could intergrate it with vB because it is using JAVA! You cannot perform that since vBulletin is coded in PHP/MYSQL. ;)

MorrisMcD 07-10-2005 12:51 AM

Quote:

Originally Posted by Snake
lol There is no way you could intergrate it with vB because it is using JAVA! You cannot perform that since vBulletin is coded in PHP/MYSQL. ;)

Very nice! Thanks.. However, I seem to be having less luck than the rest of you.. I see the search box.. But no find button... :confused:

sv1cec 07-10-2005 04:43 AM

Maybe you accidentally deleted the next line in that file? Here is what that part of the file should look:

PHP Code:

function print_template_javascript()
{
    global 
$stylevar$vbphrase$vboptions;

    
print_phrase_ref_popup_javascript();

    echo 
'<script type="text/javascript" src="../clientscript/vbulletin_templatemgr.js"></script>';

    
print_label_row(iif(is_browser('ie') OR is_browser('mozilla''20040707'), $vbphrase['search_in_template'], $vbphrase['additional_functions']), iif(is_browser('ie') OR is_browser('mozilla''1.7'), '
    <input type="text" class="bginput" name="string" accesskey="t" value="' 
htmlspecialchars_uni($GLOBALS['searchstring']) . '" size="20" onChange="n=0;" tabindex="1" />
    <input type="button" class="button" style="font-weight:normal" value=" ' 
$vbphrase['find'] . ' " accesskey="f" onClick="findInPage(document.cpform.string.value);" tabindex="1" />
    &nbsp;'
) .
    
'<input type="button" class="button" style="font-weight:normal" value="' $vbphrase['preview'] . '" accesskey="p" onclick="displayHTML();" tabindex="1" />
    <input type="button" class="button" style="font-weight:normal" value=" ' 
$vbphrase['copy'] . ' " accesskey="c" onclick="HighlightAll();" tabindex="1" />
    &nbsp;
    <input type="button" class="button" style="font-weight:normal" value="' 
$vbphrase['view_quickref'] . '" accesskey="v" onclick="js_open_phrase_ref(0, 0);" tabindex="1" />
    '
);


Rgds

BillyFischbach 07-10-2005 05:13 AM

Works great, installed

sv1cec 07-10-2005 05:26 AM

Thanks.

I know my site is not moving up to vB 3.5 any time soon, with so many hacks and patches I've made in it, so I thought maybe others are in the same boat as I am, and put this here.

Rgds

c0d3x 07-10-2005 05:41 AM

is possible to change the colour of the selected test?

Dennis B 07-10-2005 06:55 PM

John,

Thanks so much for this simple yet very effective mod. :up:

akanevsky 07-10-2005 07:21 PM

Good mod, however since I use Opera, it is no use to me... How about you do the same thing for opera? :)

sv1cec 07-12-2005 11:53 AM

I am not sure. You may try to replace that part of the code, with :

PHP Code:

function print_template_javascript()
{
    global 
$stylevar$vbphrase$vboptions;

    
print_phrase_ref_popup_javascript();

    echo 
'<script type="text/javascript" src="../clientscript/vbulletin_templatemgr.js"></script>';

    
print_label_row(iif(is_browser('ie') OR is_browser('mozilla''20040707') OR is_browser('opera'), $vbphrase['search_in_template'], $vbphrase['additional_functions']), iif(is_browser('ie') OR is_browser('mozilla''1.7'), '
    <input type="text" class="bginput" name="string" accesskey="t" value="' 
htmlspecialchars_uni($GLOBALS['searchstring']) . '" size="20" onChange="n=0;" tabindex="1" /> 

And see if it is working. If not, you may also try copying the clientscript/vbulletin_templatemgr.js file from vb 3.5 to your server and see if it will work.

I have absolutely no idea about Opera.

Rgds

akanevsky 07-12-2005 03:05 PM

Nope, it will display the field but won't search.

sv1cec 07-12-2005 05:14 PM

It was far-fetched anyway, sorry!

Kirk Y 07-20-2005 02:40 AM

Brilliant! I wondered why this didn't show in Firefox, excellent hack and thanks for sharing!

MorrisMcD 07-24-2005 03:16 AM

Quote:

Originally Posted by sv1cec
Maybe you accidentally deleted the next line in that file? Here is what that part of the file should look:

PHP Code:

function print_template_javascript()
{
    global 
$stylevar$vbphrase$vboptions;

    
print_phrase_ref_popup_javascript();

    echo 
'<script type="text/javascript" src="../clientscript/vbulletin_templatemgr.js"></script>';

    
print_label_row(iif(is_browser('ie') OR is_browser('mozilla''20040707'), $vbphrase['search_in_template'], $vbphrase['additional_functions']), iif(is_browser('ie') OR is_browser('mozilla''1.7'), '
    <input type="text" class="bginput" name="string" accesskey="t" value="' 
htmlspecialchars_uni($GLOBALS['searchstring']) . '" size="20" onChange="n=0;" tabindex="1" />
    <input type="button" class="button" style="font-weight:normal" value=" ' 
$vbphrase['find'] . ' " accesskey="f" onClick="findInPage(document.cpform.string.value);" tabindex="1" />
    &nbsp;'
) .
    
'<input type="button" class="button" style="font-weight:normal" value="' $vbphrase['preview'] . '" accesskey="p" onclick="displayHTML();" tabindex="1" />
    <input type="button" class="button" style="font-weight:normal" value=" ' 
$vbphrase['copy'] . ' " accesskey="c" onclick="HighlightAll();" tabindex="1" />
    &nbsp;
    <input type="button" class="button" style="font-weight:normal" value="' 
$vbphrase['view_quickref'] . '" accesskey="v" onclick="js_open_phrase_ref(0, 0);" tabindex="1" />
    '
);


Rgds


Forgot to come back to see if someone answered this yet... ;)

I was missing this

Quote:

<input type="button" class="button" style="font-weight:normal" value=" ' . $vbphrase['find'] . ' " accesskey="f" onClick="findInPage(document.cpform.string.value); " tabindex="1" />
Not sure how and when I did it.. I thought I was always careful :)

Thanks for the help

sv1cec 07-24-2005 04:01 AM

Most welcome.


All times are GMT. The time now is 04:48 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.02679 seconds
  • Memory Usage 1,852KB
  • 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
  • (5)bbcode_php_printable
  • (7)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
  • (40)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