vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Custom Non-vB Page (https://vborg.vbsupport.ru/showthread.php?t=53743)

Breaker 06-02-2003 03:30 PM

Custom Non-vB Page
 
Created this hack for a friend and everything works well exept for one problem.

The problem is that the Replacement variables in the templates arent replaced by the replacement code, so the colors or images dont show up, if there is any file i have to "require" other than global.php could someone tell me?

Breaker 06-03-2003 02:53 PM

BUMP! Ne1 have ne ideas?

filburt1 06-03-2003 03:20 PM

Make sure you're using the appropriate code to eval the template:
PHP Code:

eval("gettemplate(\"" gettemplate("templatename") . "\");"); 


Breaker 06-03-2003 03:29 PM

I put that in, but the template didn't show, not sure if i missed something out or something. I'm currently using two lines to display the template which seems to work:
PHP Code:

eval("\$ranking = \"".gettemplate('ranking')."\";");
print 
$ranking

but the replacements aren't working

filburt1 06-03-2003 03:51 PM

Never echo directly from a vB page. Instead, always use dooutput (search in the source).

noppid 06-03-2003 04:38 PM

Quote:

Today at 12:29 PM Breaker said this in Post #4
I put that in, but the template didn't show, not sure if i missed something out or something. I'm currently using two lines to display the template which seems to work:
PHP Code:

eval("\$ranking = \"".gettemplate('ranking')."\";");
print 
$ranking

but the replacements aren't working

You are using single quotes where you need double quotes for one thing.

Try this...

eval("\$ranking = \"".gettemplate("ranking")."\";");
print $ranking;

filburt1 06-03-2003 04:41 PM

That's not the problem; PHP doesn't care which quote format you use (although I use double for everything except array keys). The only difference between the two is that single-quotes won't parse variables in the string.

Breaker 06-03-2003 04:44 PM

ye, i just noticed that the type of quotes doesn't really matter, i prefer to use single quotes, thats the way i do it, others may use double.

Quote:

Never echo directly from a vB page. Instead, always use dooutput (search in the source).
dont really understand exactly what you mean here, i'm still learning php :)

noppid 06-03-2003 04:45 PM

Quote:

Today at 01:41 PM filburt1 said this in Post #7
That's not the problem; PHP doesn't care which quote format you use (although I use double for everything except array keys). The only difference between the two is that single-quotes won't parse variables in the string.
In my experience with PHP and vB I've find that statement and it's assumed compatibility to be unreliable. Just my 2 cents.

http://us3.php.net/eval

filburt1 06-03-2003 04:51 PM

What do you mean? :)

Breaker: look in vB's files for examples on how to use dooutput(). :)


All times are GMT. The time now is 07:32 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.01035 seconds
  • Memory Usage 1,735KB
  • 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)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete