Loading....
Recent Article links:

Forum

You must be logged in to post Login

Search Forums:


 






further intalation questons

UserPost

February 16, 2010


cris

The methods addNamesList and addNameToList are used for user list initialization inside TagHim, so basically this list that will be shown as friends list. You can use emails as a names so they will be displayed in the user list and search will be done by emails. Example addNamesList( { '1' : 'test@test.com', '20' : 'test20@test20.com } ); is that what you were asking? If you ment something else please describe in details.

What I meant is that, for example, when you do a tag with a name not in the list it asks you for an email and it inserts given email onto the database. Is there a way to do the same with the users on the list or do I have to get the email before inserting?
 
You have to use property namelistOnly. Turn ON/OFF restriction select users only from user list. Example: taghim.setOption( "namelistOnly", true );
The property namelistOnlyErrorMessage – strung Error. Only apear if 'namelistOnly' set to 'true' and no users has been selected from userlist. Example: taghim.setOption( "namelistOnlyErrorMessage",  'Some error message' ); 

I tried it and it still sends the written text and the name and even let me tag a null user (no user was selected)

Here is the code I am testing:

var taghim = new tagging(

'taghim',

'my code', 

'cropp', 

3,

{

ajaxRequestURL : 'ProcessTag.aspx', 

ajaxReturnID : 'ret1',

style : 'mikkey1_',

showTagOnImage : true,

showTagBorders : true,

allowNamelistMode : true,

namelistOnly : true,

namelistAltEmail : false,

namelistOnlyErrorMessage : 'No user was selected'

}

);

 

taghim.setOption( 'namelistOnlyErrorMessage',  'No user was selected' );  

taghim.setOption( 'namelistOnly', true );


taghim.addNamesList({ '4': 'Mickeys Nous', '5': 'Mickeys Hand', '2': 'Skull Flamed' });

taghim.showTags();

Also I see that on the examples in the website when you do a mouseover over a tagged area it displays the tagged area and the description, how can I do the same functionality?

February 16, 2010


admin

The methods addNamesList and addNameToList are used for user list initialization inside TagHim, so basically this list that will be shown as friends list. You can use emails as a names so they will be displayed in the user list and search will be done by emails. Example addNamesList( { '1' : 'test@test.com', '20' : 'test20@test20.com } ); is that what you were asking? If you ment something else please describe in details.

What I meant is that, for example, when you do a tag with a name not in the list it asks you for an email and it inserts given email onto the database. Is there a way to do the same with the users on the list or do I have to get the email before inserting?
This is not common task usually if you have user list (friends list) you have all emails of this users already right. If user is not in the list than you can ask for email to notify this user when he get tags. This is the idea of existing version.
However if you want to have email field for the user list you have to explain us it in details. We have wish list we may include it to the next release. 
 
You have to use property namelistOnly. Turn ON/OFF restriction select users only from user list. Example: taghim.setOption( "namelistOnly", true );
The property namelistOnlyErrorMessage – strung Error. Only apear if 'namelistOnly' set to 'true' and no users has been selected from userlist. Example: taghim.setOption( "namelistOnlyErrorMessage",  'Some error message' ); 

I tried it and it still sends the written text and the name and even let me tag a null user (no user was selected)

 
With option namelistOnly : true the search field remains so you can search users inside the friend list.
You have to replace by method bellow inside file ProcessTag.apx.cs to tag users from user list only:

protected void Page_Load(object sender, EventArgs e)
{
action = Request.Form["action"];
imageId = int.Parse(Request.Form["imageId"]);
variable = Request.Form["variable"];
switch (action)
{
case "showTags":
break;
case "delete":
tagId = int.Parse(Request.Form["tagId"]);
DeleteTag(tagId);
break;
case "addNew":
x0 = int.Parse(Request.Form["x1"]);
y0 = int.Parse(Request.Form["y1"]);
x1 = int.Parse(Request.Form["x2"]);
y1 = int.Parse(Request.Form["y2"]);
id_account = int.Parse(Request.Form["userId"]);
name = Request.Form["tagname"];
email = Request.Form["email"];
description = Request.Form["description"];
color = Request.Form["color"];
if( id_account > 0 )
AddNewTag(imageId, x0, y0, x1, y1, name, description, color, id_account, email );
break;
}
}

Here is the code I am testing:

var taghim = new tagging(

'taghim',

'my code', 

'cropp', 

3,

{

ajaxRequestURL : 'ProcessTag.aspx', 

ajaxReturnID : 'ret1',

style : 'mikkey1_',

showTagOnImage : true,

showTagBorders : true,

allowNamelistMode : true,

namelistOnly : true,

namelistAltEmail : false,

namelistOnlyErrorMessage : 'No user was selected'

}

);

 

taghim.setOption( 'namelistOnlyErrorMessage',  'No user was selected' );  

taghim.setOption( 'namelistOnly', true );


taghim.addNamesList({ '4': 'Mickeys Nous', '5': 'Mickeys Hand', '2': 'Skull Flamed' });

taghim.showTags();

Also I see that on the examples in the website when you do a mouseover over a tagged area it displays the tagged area and the description, how can I do the same functionality?

To enable this option use showDescription.

taghim.setOption( 'showDescription', true )

February 16, 2010


cris

On second thougth including the email on the user list wouldn't be wise … showing all the emails from your users to everybody is not a good idea.
 
I have chequed my code and even copyed a few examples from the taghim page and it won't display the borders when I pass the mouse over the image and I even if I added the namelistOnly : true option it still sends the written text and the user name.