
Custom table snippet with custom placeholders.
To access a custom table you have in your MODx database from a snippet and use some custom placeholders to render the output.
Create a new snippet to call on your page:
<?php $output = ''; $sql = $modx->db->query( 'SELECT * FROM `tblprojects` LIMIT 0, 1000'); $resultArray = $modx->db->makeArray( $sql ); foreach($resultArray as $item) { $params['award'] = $item['Grant_Award']; $params['ref'] = $item['Project_Ref']; $params['area'] = $item['LA_Area']; $output .= $modx->parseChunk('ProjectTpl', $params, '[+', '+]'); } return $output; ?>
Full wiki article is here.
Forgot username and password or been blocked ?
Assuming you have PHPMyAdmin or something similar.
Open your Modx database with said application.
Forgot
Step One :
- Go to the table modx_manager_users
- Edit record id 1
- username = admin
- password = e10adc3949ba59abbe56e057f20f883e
- Save record
- Exit database application
- Go to Modx Manager login
- Username = admin
- Password = 123456
Step Two :
- Go to the table modx_manager_users
- Edit record id 1
- username = admin
- password = e10adc3949ba59abbe56e057f20f883e
- Save record
- Exit database application
- Go to Modx Manager login
- Username = admin
- Password = 123456
Blocked
- Go to the table modx_user_attributes
- Edit record id 1
- blocked = 0
- Save record
- Exit database application
- Go to Modx Manager login
- Login with your username and password
Full wiki article is here.
