<html>
<head>
<title>{$lang->newthread_in}</title>
{$headerinclude}
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/post.js?ver=1813"></script>
{$relatedThreadsJavaScript}
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=XXXXXXX&callback=initMap">
</script>
<script type="text/javascript">
var geocoder, map, map2;
function initialize() {
geocoder = new google.maps.Geocoder();
var geont = "{$GLOBALS['tplvars']['resrev_geo']}";
var myLatlng2 = new google.maps.LatLng{$GLOBALS['tplvars']['resrev_geo']};
if(geont == ""){
myLatlng2 = new google.maps.LatLng(0,0);
}
var myOptions2 = {
zoom: 4,
center: myLatlng2,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
map2 = new google.maps.Map(document.getElementById('map_geol'), myOptions2);
var marker2 = new google.maps.Marker({
position: myLatlng2,
map: map2
});
var myLatlng = new google.maps.LatLng{$GLOBALS['tplvars']['resrev_geo']};
var myOptions = {
zoom: 4,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
map = new google.maps.Map(document.getElementById('map_postbit'), myOptions);
var marker = new google.maps.Marker({
position: myLatlng,
map: map
});
}
function codeAddress() {
var address = document.getElementById('xthreads_resrev_location').value;
geocoder.geocode({'address': address}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
var mylocation = results[0].geometry.location;
map2.setCenter(mylocation);
var marker3 = new google.maps.Marker({
map: map2,
position: mylocation
});
document.getElementsByName("xthreads_resrev_geo")[0].value = mylocation;
} else {
alert("Geocode was not successful for the following reason: " + status);
}
});
}
</script>
</head>
<body onload="initialize()">
{$header}
{$preview}
{$thread_errors}
{$attacherror}
{$forumrules}
<form action="newthread.php?fid={$fid}&processed=1" method="post" enctype="multipart/form-data" name="input">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<div class="reply-header">
<h2>{$lang->thread_subject}</h2>
</div>
<div class="panel-body padding_0 trow1" style="border-radius: 3px;">
<div class="col-sm-12 my_ptop" style="padding-left: 0px; padding-right: 0px;">
<div class="col-sm-10 input-group-sm">
<div class="re-subject">
{$prefixselect} <input type="text" style="border: 2px solid rgba(91, 130, 164, 0.5);" name="subject" onkeyup="return relatedThreads.init(this.value);" class="form-control" placeholder="Erstelle ein neuen Thread "value="{$subject}" tabindex="1"><br />
</div>
</div>
</div>
<div class="col-sm-8">
<div class="panel-body padding_0 trow1" style="border-radius: 3px;">
<textarea id="message" name="message" rows="25" style="width: 100%;" tabindex="2" >{$message}</textarea>
{$codebuttons}
{$multiquote_external}
</div>
<div class="form-bottom">
{$pollbox}
{$captcha}
</div>
</div>
<div class="col-sm-4 my_pbottom">
<div class="post-icons">
<h3><strong>{$lang->post_icon}</strong></h3>
<div class="postico">
{$posticons}
</div>
<div class="resrevextra">
{$extra_threadfields}
</div>
</div>
<div id="relatedThreadsRow" style="display:none;">
<div class="post-icons" valign="top"><h3><strong>{$lang->relatedThreadsTitle}</strong></h3></div>
<div class="postico" id="relatedThreads">{$relatedThreads}</div>
</div>
<div class="text-left">
<label><input type="checkbox" class="modal-check" name="postoptions[signature]" value="1" tabindex="7"{$postoptionschecked['signature']} /> {$lang->options_sig}</label>
{$disablesmilies}
{$modoptions}
{$subscriptionmethod}
</div>
</div>
</div>
<div class="attach-box">
{$attachbox}
</div>
<div class="actions-bottom" align="center">
<input type="submit" class="button" name="submit" value="{$lang->post_thread}" tabindex="4" accesskey="s" />
<input type="submit" class="button" name="previewpost" value="{$lang->preview_post}" tabindex="5" />
{$savedraftbutton}
</div>
<input type="hidden" name="action" value="do_newthread" />
<input type="hidden" name="posthash" value="{$posthash}" />
<input type="hidden" name="attachmentaid" value="" />
<input type="hidden" name="attachmentact" value="" />
<input type="hidden" name="quoted_ids" value="{$quoted_ids}" />
<input type="hidden" name="tid" value="{$tid}" />
{$editdraftpid}
</form>
{$forumrules}
{$footer}
<script type="text/javascript">
$(".author_avatar img").error(function () {
$(this).unbind("error").closest('.author_avatar').remove();
});
</script>
</body>
</html>