vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Is this a crazy Idea? (https://vborg.vbsupport.ru/showthread.php?t=112572)

Razasharp 04-09-2006 05:46 PM

Is this a crazy Idea?
 
Just wondering if it is possible to create a plug-in that will 'replace' certain words in any particular vB php file with one of my choice wherever any instances of the word appears?

For eg

In showthread.php the word 'thread' is used many times, so could some code as a vb plugin replace each instance in the file to 'mythread' for me?

is this possible or have I gone :bunny: ?

top end ms 04-09-2006 08:17 PM

This is exactly what the 'Phrases' section in the Admin CP is for. Every word / phrase in vB is a variable run from the Phrases database.

Razasharp 04-09-2006 08:24 PM

Phrases don't effect the actual PHP files as far as I know - or do you know different?

DrainBamaged 04-09-2006 10:25 PM

I would just take it to MS Word and click Edit>Replace.

Razasharp 04-09-2006 10:30 PM

I don't want to hack the files tho (prefer plug-in) and I want to use conditionals so the 'word' changes in different conditions...

DrainBamaged 04-09-2006 10:33 PM

I would just suggest editing the file itself. It's a lot cleaner and simpler.

majorxp 04-09-2006 10:41 PM

...if you have to ask...

just kidding...

Paul M 04-09-2006 10:59 PM

I think you have gone crazy - if you edit every occurance of 'thread' in showthread.php you would end up with a broken forum, unless of course you plan to start renaming tables and fields in mysql as well. I don't really think you understand what you are asking.

Razasharp 04-09-2006 11:43 PM

I only used thread as an example :)

I thought there was str replace or sommin :-/

Yeah it was a crazy idea - I'll try and find a work around... thanks for the replies :)


All times are GMT. The time now is 05:56 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.00909 seconds
  • Memory Usage 1,715KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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