Topic: Get the Admin interface to use AJAX

This is more of a "wouldn't it be cool if?" than a feature request, I understand there are far more important things than this.

Ever used Basecamp? Wouldn?t it be cool if you could?
- reordered the forums with a simple drag and drop
- add a forums and categories without reloading or going to several different pages
- Err... have lots of swooshy effects
- etc

Web 2.0! YAY! WOO!

...I'll shut up now.

2

Re: Get the Admin interface to use AJAX

I posted this about 6 months ago and I was considered as a fool smile

Now ... Ajax is really the FUTURE of the web : with dhtml and ajax, web can be more "friendly" smile

Re: Get the Admin interface to use AJAX

Rod when did you post specific suggestions like that?

Maybe there should be an ajax section of punres since its kind of a topic on its own, theres a couple of things already been done, and it would be nice to collate it all.

Re: Get the Admin interface to use AJAX

Connorhd wrote:

Rod when did you post specific suggestions like that?

Maybe there should be an ajax section of punres since its kind of a topic on its own, theres a couple of things already been done, and it would be nice to collate it all.

I second this suggestion.

Re: Get the Admin interface to use AJAX

infact, if i get some time (or if someone else wants to do it) we could make a section of the wiki, its really nice for collecting snippets of code and ideas.

6

Re: Get the Admin interface to use AJAX

Very good idea conn !

I suggested before to edit directly the profil of a person on the "viewtopic.php" > we have all infos of the admin profil : you click (or doubleclick) on a info you want to change (username, status, bann under ip ...) without going on the admin page smile > we work on it !!!

Re: Get the Admin interface to use AJAX

http://punres.org/doku.php?id=ajax:start and http://punres.org/doku.php?id=ajax:admi … ctionality for the admin interface ideas big_smile

8

Re: Get the Admin interface to use AJAX

Nice!
I entered that email/username verification thing there as well.

Btw. what do you mean with "Bit of a messy way of making it work without javascript"?
It does work without and it doesn't seem to break any standards doing so.
Or did I miss something?

The German PunBB Site:
PunBB-forum.de

9

Re: Get the Admin interface to use AJAX

very cool ideas !!!!

We can add
- change names of the forums by a "edit" button directly in index.php for example : you push "EDIT" and the title of the forum is inside a text area, and the textarea for forum description appears too ... when finished, you push again on edit, and all is done on the fly, without loading and loading or surfing to admin > user interface.

10

Re: Get the Admin interface to use AJAX

As for the Drag&Drop forum sorting:
It may be a bit more tricky than it sounds.
After draggging and dropping everything in place you will still have to press a submit button.
Else all minor changes on your way will become effective immediately, this will totally confuse your current visitors I bet smile
Otherwise it's a nice idea.
I played around with Drag'n'drop way back in 1999, but at that time it was a pain in the arm. No DOM, just a bunch of somewhat incomatible browsers, so I left it at that time.
I think I'll give it another try now...

The German PunBB Site:
PunBB-forum.de

Re: Get the Admin interface to use AJAX

It should take effect instantly, why would it confuse users? its not like you do it all the time.

as for "Bit of a messy way of making it work without javascript" i mean onmouseover is a bit intensive since it gets called every time the mouse goes over it, a better way is to make javascript "intercept" the click, i dunno how to do that though wink

12

Re: Get the Admin interface to use AJAX

Connorhd wrote:

as for "Bit of a messy way of making it work without javascript" i mean onmouseover is a bit intensive since it gets called every time the mouse goes over it, a better way is to make javascript "intercept" the click, i dunno how to do that though wink

Although I don't see why mouseover is a problem (I mean, it does not consume big resources or so...) I changed it to onmousedown in my board and that works as well.
OK ? smile

The German PunBB Site:
PunBB-forum.de

Re: Get the Admin interface to use AJAX

no, i still think its messy tongue 2 events for 1 url = messy tongue

14

Re: Get the Admin interface to use AJAX

Why?
What is messy about changing a URL dynamically?
Every Javascript function that is related to links uses two events. The HTML-click event that triggers something totally non-JavaScript and the JavaScript-onClick event that triggers some JS function.
That's absolutely normal.
If you find this messy you will find every Javascript code messy that sits inside an <a> tag. in fact, that would mean JavaScript as such being messy....

By the way - it is one JavaScript event, not two.
Unless you can tell me how to
a) detect a Javascript-disabled browser without Javascript and
b) set a normal HTML link for JavaScript disabled browser *with* Javascript
you should not call this solution messy I think (I mean sure you can do that here but not in a wiki that should contain rather unbiased information IMO)

The German PunBB Site:
PunBB-forum.de

Re: Get the Admin interface to use AJAX

You are adding 2 javascript events to every url, which i think is messy. and the wiki is for discussion. you have the onclick and onmousedown, anyway i'll find the javascript so you don't have to do that later.

16 (edited by Tobi 2005-11-04 08:01)

Re: Get the Admin interface to use AJAX

Connorhd wrote:

You are adding 2 javascript events to every url, which i think is messy. and the wiki is for discussion.

Yes?OK, then I misunderstood the concept.

Connorhd wrote:

you have the onclick and onmousedown, anyway i'll find the javascript so you don't have to do that later.

Would be great. The simpler the better.
There is a possibility to pass the call for "#" to a JavaScript function referenced by xajax so you would save the onmousedown. However, that I found messy.... smile
I'll fix that up later on and you can tell which one you find better.

The German PunBB Site:
PunBB-forum.de

17

Re: Get the Admin interface to use AJAX

Would you be OK with this version?

    $quote_link = '<a id="p'.$cur_post['id'].'" href="post.php?tid='.$id.'&qid='.$cur_post['id'].'" onClick="this.href=\'#req_message\';xajax_quote('.$cur_post['id'].')">';

Still two functions, but in one call.
Passing the href to xajax does not work.
This one should although I haven't tested on IE so far.
If it's problematic then onmousedown instead of onclick should do.

The German PunBB Site:
PunBB-forum.de

Re: Get the Admin interface to use AJAX

try this instead onClick="xajax_quote('.$cur_post['id'].');return false;" i haven't tried it but i think the return false stops the url from being clicked, if not then that solution is probably the nicest smile

19

Re: Get the Admin interface to use AJAX

Might work in general; however, in order to tell xajax to go to that anchor you'd have to write an extra JS snippet that would clutter the whole page even more. I think the above is as ideal as it can get.

So, will you now take that "messy" out? wink

The German PunBB Site:
PunBB-forum.de

Re: Get the Admin interface to use AJAX

just add this to the xajax
window.location.hash = 'req_message';
?

21

Re: Get the Admin interface to use AJAX

Doesn't work.

The German PunBB Site:
PunBB-forum.de

Re: Get the Admin interface to use AJAX

infact it would be even better if it put the focus in the message box under the quote wink

23

Re: Get the Admin interface to use AJAX

You just can't stop complaining... wink

In fact it would be best if it would receive your email in the morning, sort out the spam, then open your favourite 5 news sites, filter the news that are relavant for you, print them out, then cook the coffee, press some orange juice, prepare toast, bring the breakfast and the news to your bed, wish you a pleasant morning and read the emails to you.

unfortunately, this is not part of the current DOM smile

As for the focus: Sure, why not, just the third function to call.

The German PunBB Site:
PunBB-forum.de

Re: Get the Admin interface to use AJAX

replace the #req_message stuff with the focus, and put it at the end of the current function if you want. and no i can't i demand perfection tongue

25

Re: Get the Admin interface to use AJAX

No way, if I do that then the form will be sent although javaScript is enabled.
But don't worry - nobody is perfect after all.... tongue
This here is the only way:

      $quote_link = '<a id="p'.$cur_post['id'].'" href="post.php?tid='.$id.'&qid='.$cur_post['id'].'" onClick="this.href=\'#req_message\';xajax_quote('.$cur_post['id'].');document.getElementById(\'req_message\').focus()">';
The German PunBB Site:
PunBB-forum.de