xvids Posted May 21, 2020 Share Posted May 21, 2020 1 Quote Link to comment Share on other sites More sharing options...
Tech Support Posted May 22, 2020 Share Posted May 22, 2020 It is the same functionality as report video: It uses flags to report some text message for a video. What you need is to create a new flag for this, e.g. flag_suggest_model and then duplicate flagging form but replace raio button group with hidden input that locks flag ID. You can also find example of this form in default template of video_view block: Website UI -> Page blocks overview -> video_view. Quote Link to comment Share on other sites More sharing options...
xvids Posted May 22, 2020 Author Share Posted May 22, 2020 Hi, Can please post a tutorial step by step. Because I already try: {{if count($data.tags)>0}} <div class="item"> {{$lang.videos.video_details_label_tags}}: {{foreach item="item" from=$data.tags}} <a {{if $lang.enable_tags=='true'}}href="{{$lang.urls.videos_by_tag|replace:"%DIR%":$item.tag_dir|replace:"%ID%":$item.tag_id}}"{{/if}}>{{$item.tag}}</a> {{/foreach}} <button onclick="myFunction()">+Suggest</button> </div> {{/if}} <script> function myFunction() { var x = document.getElementById("suggestbox"); if (x.style.display === "none") { x.style.display = "block"; } else { x.style.display = "none"; } } </script> <div id="suggestbox" class="tab-content hidden"> <form action="{{$data.canonical_url}}" method="post" data-form="ajax"> <div class="generic-error hidden"></div> <div class="success hidden">{{$lang.videos.video_details_success_message_flag}}</div> <input type="hidden" name="video_id" value="{{$data.video_id}}"> <textarea id="flag_message" name="flag_message" rows="3" class="textarea" placeholder="{{$lang.videos.video_details_field_flag_reason_hint}}"></textarea> <input type="submit" class="submit" value="{{$lang.suggest}}"> </form> </div> Quote Link to comment Share on other sites More sharing options...
xvids Posted May 22, 2020 Author Share Posted May 22, 2020 If no model: {{if count($data.models)>0}} <div itemprop="name" itemtype="http://schema.org/Person" class="item"> {{$lang.videos.video_details_label_models}}: {{foreach item="item" from=$data.models}} <a itemprop="url" {{if $lang.enable_models=='true'}}href="{{$lang.urls.videos_by_model|replace:"%DIR%":$item.dir|replace:"%ID%":$item.model_id}}"{{/if}}>{{$item.title}}</a> {{/foreach}} {{else}} <button onclick="myFunction()">+Suggest</button> </div> {{/if}} Quote Link to comment Share on other sites More sharing options...
Tech Support Posted May 23, 2020 Share Posted May 23, 2020 If you have problems with some specific code, please create a support ticket. From what we currently see, in your form code you should also add this hidden input, as we stated on the screenshot: <input type="hidden" name="flag_id" value="flag_suggest_model"/> And of cause you should also create a new flag for video with External ID = flag_suggest_model (in Categorization -> Flags). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.