Log in

View Full Version : Is this a crazy Idea?


Razasharp
04-09-2006, 05:46 PM
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 :)