Ask Your Question
1

Where is defined askbot['functions']

asked 2012-05-19 13:06:37 -0500

darkness51 gravatar image darkness51
31 2 1

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

delete close flag offensive retag edit

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 ( 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 ( 2012-05-19 13:40:33 -0500 )edit

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

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 ( 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 ( 2012-05-19 13:53:40 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-05-19 13:13:17 -0500

zaf gravatar image zaf
554 8 9 26

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?

link publish delete flag offensive edit

Comments

Yes, thank you :)

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

zaf, do you get a notification for this one?

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

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

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

Notifications seem to work fine! Thanks

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 ( 2012-05-19 18:06:30 -0500 )edit

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Reliable Askbot Hosting

Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.

create your Q&A site
30 days free trial

Question tools

Follow
1 follower

subscribe to rss feed

Stats

Asked: 2012-05-19 13:06:37 -0500

Seen: 64 times

Last updated: May 19 '12