Advertisement
programu

Untitled

Nov 28th, 2014
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.36 KB | None | 0 0
  1. Moderadores y admins pueden usar HTML en los posts:
  2. c.posts.php: (DOS VECES)
  3. Buscas:
  4. if($tsUser->is_admod == 1){
  5. $postData['body'] = html_entity_decode($postData['body']);
  6. }
  7.  
  8. Reemplazas por:
  9. if($tsUser->is_admod){
  10. $postData['body'] = html_entity_decode($postData['body']);
  11. }
  12.  
  13. USARLO BAJO VUESTRA RESPONSABILIDAD, NO ME RESPONSABILIZO DEL USO QUE LE DEIS AL MOD NI DE CUALQUIER TIPO DE PROBLEMA QUE PUEDA SURGIR POR EL USO DEL MISMO.
  14. --------------------------------------------------------------
  15. Re up de un post al editarlo
  16. Abres el m.agregar_form.tpl y buscas:
  17. {if $tsUser->is_admod || $tsUser->permisos.most}
  18. <div class="option clearbeta">
  19. <input type="checkbox" tabindex="7" name="sticky" id="sticky" class="floatL" {if $tsDraft.b_sticky == 1}checked="checked"{/if} >
  20. <p class="floatL">
  21. <label for="sticky">Sticky</label>
  22. Colocar a este post fijo en la home.
  23. </p>
  24. </div>
  25. {/if}
  26.  
  27. Abajo añades:
  28. {if $tsAction == 'editar'}
  29. <div class="option clearbeta">
  30. <input type="checkbox" tabindex="8" name="reup" id="reup" class="floatL">
  31. <p class="floatL">
  32. <label for="reup">Re up</label>
  33. Hacer que el post vuelva a aparecer de primero en la home como si estuviera recien agregado<br>
  34. <input type="pass" tabindex="8" name="pass" id="pass" class="floatL"/>
  35. </p>
  36. </div>
  37. {/if}
  38.  
  39. En el c.posts.php
  40. Buscas:
  41. $s_order = 'p.post_id';
  42. Reemplazas por:
  43. $s_order = 'p.post_date';
  44.  
  45. Buscas:
  46. $postData['block_comments'] = empty($_POST['sin_comentarios']) ? 0 : 1;
  47.  
  48. Abajo añades:
  49. $postData['reup'] = empty($_POST['reup']) ? 0 : 1;
  50.  
  51. Buscas:
  52. , post_sticky = \''.$postData['sticky'].'\'
  53.  
  54. Al lado añades:
  55. '.($postData['reup'] = 1 ? ', post_date = \''.time().'\'' : '').'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement