Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » [solved] Old recipe code not working...
[solved] Old recipe code not working on new site
[solved] Old recipe code not working on new site
Hi,
We have been using Metamod Pro on our Joomla 2.5 site with no problems with the following PHP....
// change some_guy23 to the login name of the person you are tracking
$search_user_name = 'admin';
$username = $db->getEscaped($search_user_name);
$query = "SELECT username "
. " FROM jos_session WHERE username = '$username' "
. " AND guest = 0 "
. " AND client_id = 0 ;" ;
$db->setQuery( $query );
$found = $db->loadAssoc();
if (is_array($found)) {
$changes->mod(183)->disable(); /* gets rid of this module if it exists */
return 209; /* and display this module */ }
We have just purchased the newest Metamod for our new Joomla 3.2 site that is being built but the code above is no longer working. We have checked all the basics and know that Metamod is operational using testing functions but seems not to be able to grab the DB or session data.
The module IDs are also correct.
Any ideas please ?
Regards
Phil
Joomla version is 3.2.4
MetaMod v3.17, 2014-04-14
MetaMod Pro plugin v3.17, 2014-04-14 is installed and enabled.
JomGenius v20 is provided by MetaMod
Re: [solved] Old recipe code not working on new site
It might be the jos_ thing. Your new database will have a different prefix. The official way to do it is to replace jos_ with # _ _ (without the spaces) in the query above.
Actually it's probably this:
JDatabase::getEscaped() has been removed. Use JDatabase::escape() instead.
If you make that change it will probably fix it :-)
- Index
- » MetaMod
- » MetaMod General Support
- » [solved] Old recipe code not working...
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5943
- Posts this week:
- 2
- User Info:
- Total Users:
- 7642
- Newest User:
- mary26
- Members Online:
- 0
- Guests Online:
- 163
- Online:
- There are no members online
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked