HTML Block contents - where are they stored? To search for string

Re: HTML Block contents - where are they stored? To search for string

by Randy Thornton -
Number of replies: 0
Picture of Documentation writers

It is stored in the configdata field of the mdl_block_instances table. You just need to know the id number of the instance of the block you want.

The field is in Base64 format, not straight text format.

You can use an online Base64 encoder/decoder (such as http://convertstring.com/EncodeDecode/Base64Decode) to turn it into text, edit it, encode it back, then paste it back (using Adminer etc.)

 Here's an example of a decoded HTML Block configdata field:

O:8:"stdClass":3{s:5:"title";s:0:"";s:6:"format";s:1:"1";s:4:"text";s:335:"<p>
<span style="color: #888888; font-family: 'courier new', courier, monospace;">
<em><span style="font-size: large;">It was only when the government increased
the size of Australia’s commitment to the war in Vietnam in May 1966, making the use
of conscripts necessary, that significant public opposition arose.</span>
</em></span></p>";}

 

 

Average of ratings: Useful (1)