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)

LuBi 08-26-2001 05:05 PM

thanks I look forward to installing. the reason i'm being so annoying is because I wasi nstalling hack before and kept fouling up my forum. now I use all 2.0.3 hacks and they seem to work :D go figure.

LuBi 08-26-2001 05:40 PM

Can this hack work with this one? [RELEASE] Template Control Panel for 2.0

webhost 08-26-2001 05:42 PM

don't know never installed that one

ToraTora! 08-26-2001 07:50 PM

1) the instructions, seem to say..."edit templete.php right at the begining of the script just after function displayHTML() "
now, I dont know where the function display HTML went, but its not in any template.php file i have. Could this be clarified>?


2) the only function that is shown somewhere even resembling the beginning, is Start search area, which is a quarter of the way down. I might add, there is nothing said about display HTML there either...just this...
PHP Code:

function confirmaction(theform) {
    if ((
theform.searchstring.value=="") || (theform.replacestring.value=="")) {
        
theform.searchstring.select();
        return 
confirm("WARNING:\n\nYou have chosen to perform a FIND/REPLACE operation on all your templates,\nbut at least one of the fields is empty.\n\nAre you SURE?");
    } else {
        return 
true;
    } 

is there something i am missing here?
The instuctions send mixed signals. Is it function display HTML, is it after the function, we add the code, is it after functionhtml we add code?

Is the php file, template.php, which is found in the admin folder??

Either way, im not finding this elusive display HTML code, and it is on 2.03...

any help would be greatly appreciated.

FWC 08-26-2001 08:00 PM

Quote:

Is the php file, template.php, which is found in the admin folder??
I added the code to admin/template.php right below "error_reporting(7);" at the top of the file. It works fine that way.

ToraTora! 08-27-2001 12:08 AM

Quote:

Originally posted by FWC


I added the code to admin/template.php right below "error_reporting(7);" at the top of the file. It works fine that way.

thank you. I was thinking of doing that myself, however backed out until i recieved a straight answer here.

One last question, and than im off to install this bad boy.

exactly where do you start with the hacked code to add below the error 7?

this?

PHP Code:


{ var inf document.name.template.valuewin window.open(\", \", 'popup', 'toolbar = no, status = no, scrollbars=yes'); 

Thanks again. :)

FWC 08-27-2001 01:03 AM

Quote:

exactly where do you start with the hacked code to add below the error 7?
I started with:

$ButtonExtra="

I assume that was right because it works. It's really a nice tool to have, too.

ToraTora! 08-27-2001 05:08 AM

one thing i was going to ask about, was the preview feature. will this actually show a HTML preview of the template>?

It looks to me like a very usefull hack. The documentation is a little loose on the edges, but other than that, it sounds like he did one hell of a job on it.

ToraTora! 08-27-2001 05:23 AM

Here is the problem I add that long code, under the error 7,

PHP Code:

{ var inf document.name.template.valuewintwo window.open(\", \", 'popup', 'toolbar = no, status = no, scrollbars=yes'); wintwo.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; }       "




Now i am getting a parse error, on line three, which is the code under the error 7.

Any hints?

This documentation needs work.

LuBi 08-27-2001 05:30 AM

I had the same problem the anser is in the error. I think its like template.php and you'll see the rroer infront of <?php or something. I got the same thing I installed the hack by the instructions..goodluck that fix worked for me


All times are GMT. The time now is 04:53 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.01224 seconds
  • Memory Usage 1,755KB
  • 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
  • (3)bbcode_php_printable
  • (3)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