The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
UPDATE phrase SET text='www.mybackup.com' WHERE varname='backup_server';
Hello,
I have script that runs this command against the vB database to update one of the $vbphrases: UPDATE phrase SET text='www.mybackup.com' WHERE varname='backup_server'; It updates the database just fine, and I can see the new phrase text in the AdminCP, but the old text still shows up in the output. If I manually change the phrase text in the AdminCP it works fine; however if I do it from my one line MySQL UPDATE, it updates the dB but it does not seem to flush some cache or update right in the templates. Is there another command I need to issue to flush a cache or something? I am lost as to why the dB updates with my MySQL query but it does not work; but it works if I do it in the AdminCP. Thanks. --------------- Added [DATE]1260092793[/DATE] at [TIME]1260092793[/TIME] --------------- Looking at phrase.php, I noticed that vB actually deleted the old phrase and inserts and new one, incrementing the phraseid and dateline (timestamp). I guess that is the reason a simple UPDATE to the dB does not work. |
#2
|
|||
|
|||
Looking at admincp/phrase.php, it looks like after it updates a phrase it redirects to admincp/language.php?do=rebuild. In the language.php "do == rebuild' section, it looks like it essentially does the following (without the HTML status stuff):
PHP Code:
But I haven't tried it at all. ...or it could be that, I don't know. |
#3
|
|||
|
|||
Thanks. I missed that in phrase.php.....
It is getting more complicated than I hoped, so I think it is better to shift gears and do this with a PHP Global instead of changing phrases, as you first suggested and I suspected. --------------- Added [DATE]1260143196[/DATE] at [TIME]1260143196[/TIME] --------------- OK, this code is done using plugin code: [PHP] Server Check and Failover Code In case you need something like this ..... |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|