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

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
darkness51's avatar
31
darkness51
asked 12 years ago

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 (12 years ago)

@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 (12 years ago)

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

Evgeny's avatar Evgeny (12 years ago)

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 (12 years ago)

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 (12 years ago)
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?

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
zaf's avatar
512
zaf
answered 12 years ago
link

Comments

Yes, thank you :)

darkness51's avatar darkness51 (12 years ago)

zaf, do you get a notification for this one?

Evgeny's avatar Evgeny (12 years ago)

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

Evgeny's avatar Evgeny (12 years ago)

Notifications seem to work fine! Thanks

zaf's avatar zaf (12 years ago)

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

darkness51's avatar darkness51 (12 years ago)
see more comments