this will be my first question on the site, I hope I'll be clear!
So I'm working on adapting a regular php/html/js website to a drupal site. There are some specific things a can't do with the available modules, so a need to create some. I've been wandering a lot on the web, watch and read some tutorials but I dont get exactly how to display simple html/js/php with a block module for instance.
For example, I want to display this in a block module :
`<script type="text/javascript" src="jquery-min.js"></script>
<div class="myDiv"></div>
<script>
$(".maparea").append('<p class='myText'>Hello there!</p>');
</script>`
On the other hand I have my block_view function:
`function my_module_block_view($delta = '') {
$block = array();
$block['subject'] = 'my Module title';
$block['content'] = 'some content';
return $block;
}`
If i replace that 'some content' with my raw code, well first I don't think it is the best way, a overall it doesn't work so well. Besides, I would like to use the drupal API to insert js (drupal_add_js), but how?
`block['content'] .= drupal_add_js(drupal_get_path('module', 'my_module').'/myScript.js');`
Finally, I found some information about theme system, and templates. So it seems I have to implement my_module_template.tpl.php, and implement hook_theme in my_module.module.
It's pretty blurry, so I really need some help to understand the basics.
Thanks in advance!