I've created a custom block in Drupal 7, to display, in the upper right corner on every page, a menu that is context sensitive. Based on certain user attributes some functionalities are enabled or disabled. This block displays a list of available functionality to the user.
small example:
<li><a href="?q=node/add/article">write new article</a></li>
<?php
if (og_is_member('node', 12, 'user')){
print('<li><a href="?q=board">Board of directors</a></li>');
print('<li><a href="?q=admin/reports/pages">statistics</a></li>');
}
?>
<?php
global $user;
// Check to see if $user has the administrator role.
if (in_array('content_manager', array_values($user->roles))) {
print('<li><a href="?q=comment_review">Manage comments</a></li>');
}
?>
<a href="?q=user/logout">Log out</a></li>
</ul>
I've noticed that when I make an SQL dump on the live site and put it on my laptop's local database for backup, this context sensitive menu is not there, while on the production site it displays just fine.
first I thought I just had to readjust the visibility settings of this new block on the backup site. But when I visited admin/structure/blocks the block wasn't even there. So I figures something must have gone wrong with the sql dump. So I tried again, still no block in the list.
This new block's name is 'nav_menu_block', so I did a text search on the sql dump from the production site. Nothing....
So I googled a bit to find out where the data for custom blocks is stored. Found a few web pages stating this is stored in the table "block_custom". But when I go there with phpMyAdmin, this table is empty.
So now I have this problem: if I ever have to put the backup version up again it will not contain this new block, and who knows what else will be missing....
Can anyone PLEASE tell me where to find the data for this custom block with PHP code in the database?
many thanks