Skip to content

Instantly share code, notes, and snippets.

@araeuchle
Created January 3, 2018 20:27
Show Gist options
  • Save araeuchle/7ada3f3e2d0bed872abaa72667b0ed1d to your computer and use it in GitHub Desktop.
Save araeuchle/7ada3f3e2d0bed872abaa72667b0ed1d to your computer and use it in GitHub Desktop.
$timestamp = time();
$token = ossn_generate_action_token($timestamp);
<form action="<?= ossn_site_url('action/post/add') ?>" enctype="multipart/form-data" method="post">
<div id="post-writer">
<div class="header">
Schreibe einen Beitrag
</div>
<div class="body">
<div class="row">
<div class="col-xs-12 col-md-6">
<textarea name="content" id="post-content" placeholder="Was tust du gerade?"></textarea>
<input type="hidden" name="ossn_ts" value="<?php echo $timestamp;?>" />
<input type="hidden" name="ossn_token" value="<?php echo $token;?>" />
</div>
<div class="col-xs-12 col-md-6">
<input type="file" name="file[]" id="file" class="inputfile" data-multiple-caption="{count} Dateien ausgewählt" multiple="multiple"/>
<label for="file"><i class="fa fa-cloud-upload" aria-hidden="true" style="margin-right:10px;"></i>
<span>Bilder auswählen</span></label>
</div>
</div>
</div>
<div class="footer">
<input type="submit" name="submit" class="btn btn-primary pull-right" style="width: 150px;" value="Jetzt posten" />
<div class="clearfix"></div>
</div>
</div>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment