Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-30-2003, 11:45 AM
Jensie180 Jensie180 is offline
 
Join Date: Jan 2003
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Replacements

Hi everyone

Does anyone know how to execute the replacement thing on a non-vb page so it replaces the {replacething} on that page too?

Help would be very much appreciated
Reply With Quote
  #2  
Old 07-30-2003, 11:51 AM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
$var dovars($var); 
Make sure that you have included global.php if you using vB. If not then something similar to:

PHP Code:
$var str_replace("{replacement}""value"$var); 
Reply With Quote
  #3  
Old 07-30-2003, 11:54 AM
Jensie180 Jensie180 is offline
 
Join Date: Jan 2003
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for your help, I saw that on php.net too. But what I'm looking for is that it includes the replacement thing of Vb in the non-vb page. Without doing it with the str_replace.
Reply With Quote
  #4  
Old 07-30-2003, 11:56 AM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The first example shown should parse all vB replacements on the variable $var.
Reply With Quote
  #5  
Old 07-30-2003, 04:32 PM
Jensie180 Jensie180 is offline
 
Join Date: Jan 2003
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried this but my page went blanc when adding $var = dovars($var); and yes I included the global.php. How do you use the $var anyway? I just want it to be global on the page so everything that can be replaced by the vb replacements system IS replaced. Anyone? Please, it's very urgent
Reply With Quote
  #6  
Old 07-31-2003, 12:27 AM
Jensie180 Jensie180 is offline
 
Join Date: Jan 2003
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can someone please tell me how I should do this, it's very urgent as I want my site up tomorrow and it won't be without this. Thanks!
Reply With Quote
  #7  
Old 07-31-2003, 04:24 AM
Highlander Highlander is offline
 
Join Date: Apr 2002
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm i just wannt to know it also.. but here in vbulletin.org the help is soo poorly managed.. all the coders are looking for their own problems and issues they aant to know..

but if someone asks..something that would mean to spend some minutes for figuring it out.. you wont get helped!

i hate that here..the helpouts are really POOR..

sorry.. ut i feel so, cause i just asked a few question some weeks ago.. and any of my questions has been answered !
Reply With Quote
  #8  
Old 07-31-2003, 11:51 AM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nobody is paid to help here Highlander, we all do it out of our own free will. If you paying for to help then you would have reason to complain, but your not. People just expect everyone to do everything for them for free, well sorry thats not how it works. Give to the community and perhaps it will give back to you...

@Jensie180 are you using vB's templates to create the page? I'll have a look and see if I can find a vB2 functions.php and see why its not working
Reply With Quote
  #9  
Old 07-31-2003, 12:17 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looking at the dovars() funtion in vB 2.3.0 I can't see why this wouldn't work.

IMO, if you not using the vB template system then you should be, remember this will use the default replacement set:

PHP Code:
$replacementsetid X// the replacement set to use
$var dovars($var); // $var contains the HTML for the replacements to be issued on
echo $var// outputs the HTML to the browser 
Reply With Quote
  #10  
Old 07-31-2003, 09:32 PM
Jensie180 Jensie180 is offline
 
Join Date: Jan 2003
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok thanks again but while I was waiting I already solved it with variables. Like $tableheadbgcolor = '#color'; and in the table I put $tableheadbgcolor
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:17 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.05024 seconds
  • Memory Usage 2,251KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete