First time here? Check out the FAQ!
1

Where is defined askbot['functions']

Hello,

I want know where is defined the js functions that askbot use, for example, I want see the code for askbot['functions']['renderAddCommentButton'] but I not know where is defined??

Can you help me with this?

Best Regards

darkness51's avatar
31
darkness51
asked 2012-05-19 13:06:37 -0500
edit flag offensive 0 remove flag close merge delete

Comments

Just a note - these functions must be written in pure javascript, without jquery or anything else, because these functions run before any javascript files are loaded. We need these to dynamically update display of some parts before the pages load completely. Since it is pure js - the cross browser support must be considered.

Evgeny's avatar Evgeny (2012-05-19 13:33:55 -0500) edit

@Evgeny, notifications in this community do not work lately, do they? (sorry for posting this here, I didn't want to make a whole new thread for this.

zaf's avatar zaf (2012-05-19 13:40:33 -0500) edit

Hmm, I am getting email alerts. Are you missing some?

Evgeny's avatar Evgeny (2012-05-19 13:50:47 -0500) edit

I want add a new functionality to askbot using the comment section, then, I need change the default comment form for one like new_answer form but the new form will continue store the content as a comment. What is the best way to do this?

darkness51's avatar darkness51 (2012-05-19 13:52:59 -0500) edit

Well, I got this one, but I didn't get the one from the comment in my answer here. Also, yesterday the same, under an answer of mine, there were comments, and only by chance I happen to realize it. Who knows, maybe now its working again..

zaf's avatar zaf (2012-05-19 13:53:40 -0500) edit

@darkness51 unfortunately I don't understand well what you're trying to do. If you want to deeply change the commenting function, you might as well remove it and build your own on it's place.

Evgeny's avatar Evgeny (2012-05-19 13:59:56 -0500) edit

@zaf your messages are filtered by ignored tags (I've looked at your subscription settings) - maybe that's why?

Evgeny's avatar Evgeny (2012-05-19 14:00:59 -0500) edit

@Evgeny , I have everything instantly and at tag filter I have put 'only selected' but this should filter the general forum questions, not the ones I have answered, isnt't it?

zaf's avatar zaf (2012-05-19 14:04:42 -0500) edit

Comments are always tag filtered, maybe not the best decision, not sure.

Evgeny's avatar Evgeny (2012-05-19 14:12:47 -0500) edit

for example, I receive mails from these comments here, but I didn't get the one in my answer here. So it shouldn't have to do with tags. Also note, I don't have any preffered or ignored tags. I think tag filtering goes only for the general questions I do not participate in, at least that's how it worked until yesterday that I noticed I don't get mails. I suppose, in subscription settings, the Entire forum (tag filtered): one is combined with Choose email tag filter:, which are general question settings, and for the ones you participate in, there are the rest settings. I think so..

zaf's avatar zaf (2012-05-19 14:21:40 -0500) edit

I've posted a comment under the answer, to test out the notifications.

Evgeny's avatar Evgeny (2012-05-19 14:24:31 -0500) edit

Yes, now I got everything! From answer as well!

zaf's avatar zaf (2012-05-19 14:52:36 -0500) edit

How I can add other form like new_answer_form in the same view??? I try to add a new form with the same editor on new_answer and I can't. The editor is not render and the preview view is not working.

darkness51's avatar darkness51 (2012-05-19 21:07:06 -0500) edit
add a comment see more comments

1 Answer

1

I see in file /skins/default/templates/question.html, there is this line

askbot['functions']['renderAddCommentButton'] = render_add_comment_button;

and lower in the same file there is the definition of render_add_comment_button. Is that you re looking for?

zaf's avatar
512
zaf
answered 2012-05-19 13:13:17 -0500
edit flag offensive 0 remove flag delete link

Comments

Yes, thank you :)

darkness51's avatar darkness51 (2012-05-19 13:34:42 -0500) edit

zaf, do you get a notification for this one?

Evgeny's avatar Evgeny (2012-05-19 14:23:14 -0500) edit

@zaf, how about this one? here I've added a mention too.

Evgeny's avatar Evgeny (2012-05-19 14:23:35 -0500) edit

Notifications seem to work fine! Thanks

zaf's avatar zaf (2012-05-19 14:52:59 -0500) edit

@Evgeny, @zaf if I need a new form with an editor like new answer, how I can do?

darkness51's avatar darkness51 (2012-05-19 18:06:30 -0500) edit
add a comment see more comments