Page 1 of 1

Image annotation BBCode

Posted: 30 Jun 2010, 07:13
by van de werde
This BBCode alow users add tags to images(as facebook)

BBCode :

Code: Select all

[tag]{LOCAL_URL}[/tag]

HTML Replacement :

Code: Select all

<img id="toAnnotate" src="{LOCAL_URL}"/>

Helpline:

Code: Select all

[tag]imagefoldername/imagename[/tag]

Instructions:
1.Unpack files from imagetag.rar and upload it to root.
2. Open overall_header.html and before </head> add

Code: Select all

<style type="text/css" media="all">@import "css/annotation.css";</style>
		<script type="text/javascript" src="js/jquery-1.3.2.js"></script>
		<script type="text/javascript" src="js/jquery-ui-1.7.1.js"></script>
		<script type="text/javascript" src="js/jquery.annotate.js"></script>
<!-- IF not S_IS_BOT and S_USER_LOGGED_IN -->
		<script language="javascript">
			$(window).load(function() {
				$("#toAnnotate").annotateImage({
					getUrl: "php-api/get.php",
					saveUrl: "php-api/save.php",
					deleteUrl: "php-api/delete.php",
					editable: true
				});
			});
		</script>
<!-- ENDIF -->

Screens:
Image
Image

Demo:Live demo
Login: testuser
Password: 123456


Important!
I cant set permision for this bbcode.Registered users can see,add, edit and delete exist tags added from other users.
If change this in overall_header.html "editable: true" to editable: "false" users see tags but cant add.
Someone help me how set permision:
-guest: only see tags
-registered users: see and add tags
-moderators:see,add,edit and delete tags