Good art is a taste, good design is an opinion.


Come as guest, stay as family.
Board Index

Come as guest, stay as family.


You are not connected. Please login or register

Foto

[Javascript] Hide code content for guests



View previous topic View next topic Go down Message [Page 1 of 1]

1
Offline

  Shadow

avatar
Administrator
Administrator


[Tutorial] Fast topic edit

This will hide content of [ code ] tag for guests.

Version: PunBB
Autor: N/A

Admin Panel Display TemplatesOverall_footer_beginAt begin add code

Code:
[panda=html]<!-- BEGIN switch_user_logged_out -->
<script type="text/javascript">
jQuery(function(){
 jQuery(".cont_code").text("Please login or register, to see code content.");
});
</script>
<!-- END switch_user_logged_out -->

Powered by PunBB
Currently 0 users have thanked Shadow for this post:

2
Offline

  Daemon


Punbb Rookie
Punbb Rookie
Has an easier way, that would be creating a new javascript code and add this:
Code:
$(function() {
if(!document.getElementById('logout')) {
 $('.cont_code').text("Please login or register, to see code content.");
}
});
Wink!

Powered by PunBB
Currently 0 users have thanked Daemon for this post:

3
Offline

  Shadow

avatar
Administrator
Administrator
Thanks Daemon.

Powered by PunBB
Currently 0 users have thanked Shadow for this post:

View previous topic View next topic Back to top Message [Page 1 of 1]


Topic URL's

URL
BBcode
HTML

Permissions in this forum:
You cannot reply to topics in this forum