Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Has anybody rah_swap running?
I can´t get this plugin to work and wondering what I am doing wrong.
ETC pointed out already that there is a bug in the plugin ( replace php(‘echo 1;’) with php(null, ‘echo 1;’) on line 25. )
I changed that so I do not get any errors but the plugin still does nothing.
Does anybody have it running correctly on a 4.5.7 version?
I made sure the database I am trying to swap to is accessable by putting the credentials temporarily in the config. That works fine.
So with my DB all should be ok.
I tried container tag and stand-alone with reset. I tried “link” in config or credentials directly in the tag. Nothing. Dead. Any ideas?
Last edited by demoncleaner (2016-11-15 14:12:26)
Offline
Re: Has anybody rah_swap running?
I do. In my copy I have lines 25-28 commented out. I have my other database details stored in config.php as follows:
$rah_swap['db_members'] = array(
'db' => 'other_database_name',
'user' => '###',
'pass' => '###',
'host' => 'localhost',
);
and in my templates:
<txp:rah_swap link="db_members">
<txp:smd_query … … … …>
<!-- html code here with smd_query-style {Placeholders} -->
</txp:smd_query>
</txp:rah_swap>
I’m using smd_query because I’m querying the user columns of a non-txp database in order to provide a member search facility. It has been working reliably for a few years now.
TXP Builders – finely-crafted code, design and txp
Offline
Re: Has anybody rah_swap running?
Have just checked: etc’s replacement code also works. Did you perhaps remove the !
in front of it by accident? Then it doesn’t work.
TXP Builders – finely-crafted code, design and txp
Offline
Pages: 1