vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Preview and copy buttons for Edit Template (https://vborg.vbsupport.ru/showthread.php?t=21518)

Johnny 07-11-2001 11:39 AM

ok here's another post from me! :(
i don't know why the people here don't tell me the answer on my questions!

In the attachtment
Quote:

Adds some helpful features to the admin edit template page - Highlight All and Copy - Quick & Dirty Preview Template - Find in template Made By Mutt VB2.0.1 edit templete.php right at the begining of the script just after function displayHTML() { var inf = document.name.template.value; win = window.open(\", \", 'popup', 'toolbar = no, status = no, scrollbars=yes'); win.document.write(\"\" + inf + \"\"); } function HighlightAll() { var tempval=eval(\"document.name.template\") tempval.focus() tempval.select() if (document.all){ therange=tempval.createTextRange() therange.execCommand(\"Copy\") window.status=\"Contents highlighted and copied to clipboard!\" setTimeout(\"window.status=''\",1800) } } var NS4 = (document.layers); // Which browser? var IE4 = (document.all); var win = window; // window to search. var n = 0; function findInPage(str) { var txt, i, found; if (str == '') return false; if (NS4) { if (!win.find(str)) while(win.find(str, false, true)) n++; else n++; if (n == 0) alert('Not found.'); } if (IE4) { txt = win.document.body.createTextRange(); for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) { txt.moveStart('character', 1); txt.moveEnd('textedit'); } if (found) { txt.moveStart('character', -1); txt.findText(str); txt.select(); txt.scrollIntoView(); n++; } else { if (n > 0) { n = 0; findInPage(str); } else alert('Not found.'); } } return false; } "; find ###################### Start add ####################### add makelabelcode("","$ButtonExtra"); right before makehiddencode("group", "$group"); find ###################### Start edit ####################### add makelabelcode("","$ButtonExtra"); right before makehiddencode("group", "$group");
ok what must i now change in the template "template.php"??
pleazz tell it me! this is a great hack and i want it too!!!

tnx
Johnny

Jpp 07-11-2001 11:56 PM

Ahhhh my find button dont work, damn!!!! what can be wrong??Nothing happends at all. it just clicks,

any suggestions

ShadowTech 07-12-2001 05:47 AM

The find feature doesn't work for me either.. there must be some wrong coding in the java cause everytime I push the find button I get the Error on Page message in the status bar of IE.

Ok.. after I posted this I went back to the templates to try it again and found out this:

The Find button will ONLY work until you hit the preview button. Once the preview button loads up the new page.. the Find will NO longer work.. simply refresh the template page and the find will work again.. however your code changes will be lost.

It still works after you press copy.. but for some reason it must not like the popup feature of the preview.

Mutt 08-03-2001 01:44 AM

Just wanted everyone to know that this works in 2.03 and I fixed the javascript bug that kills find after using the preview. the only changes were where $ButtonExtra is defined.

I'd like to add an undo button. Alt+U will undo changes to the text area and I need a way to make a button that simulates pressing Alt+U. Any ideas? If you know of anything where you can use javascript to make a link simulate a key press, let me know. thanx!

Admin 08-05-2001 12:19 PM

Tremendous hack!
Very useful, easy to install, simply great! :D

FWC 08-05-2001 07:01 PM

Excellent work, Mutt! Can't beat the ease of installation.

LuBi 08-26-2001 02:10 PM

Can anyone make something like this for 2.0.3?

webhost 08-26-2001 02:32 PM

I am running 2.0.3 runs fine for me.

LuBi 08-26-2001 04:54 PM

Did you follow the same instructions or did you have to modify different files?

webhost 08-26-2001 05:02 PM

i followed same instructions in the opening post of this thread


All times are GMT. The time now is 01:45 AM.

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.01219 seconds
  • Memory Usage 1,736KB
  • 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_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