1
wanikoo
XOOPS 2.0.x Basic Modules AJAX Hack Project
  • 2006/4/29 21:45

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


// ------------------------------------------------------------------------ //
// XOOPS 2.0.x Basic Modules AJAX Hack Project Stage5 //
// Just enjoy! Internet for everyone!! //
// wanikoo < http://www.wanisys.net/ > /
// ------------------------------------------------------------------------ //
// Based on XOOPS 2.0.x Basic Modules //
// ------------------------------------------------------------------------ //


## XOOPS 2.0.x Basic Modules AJAX Hack Project ##

-----------------------
PREFACE (sorry...just some chat ^^;; )
-----------------------
Yeah...another AJAX story!!! ^^;;
anyway....

Umm...
Have you ever thought that...
it's very inconvenient and inefficient that whole page(with many blocks)is refreshed/reloaded whenever we click any link in any module?
For example,
Let's assume we play with newbb module with many side blocks!
Ok..now...we click a topic! Whoops! Page refreshed with many side blocks(not related with this click-job) !
and...we click another topic! Whoops! refresh again with many side blocks!
and click! refresh! click! refresh! ............--;;
#OOPS# it!
Whenever we click a link, why does this whole page(with many side blocks) have to be refreshed/reloaded??!!
It's really inefficient!
Don't you think so?

IMHO,
We can solve this problem BY.....
1) redesigning the architecture of XOOPS (Cube).
( Umm...another fork of XOOPS..?!..^^;; )
2) making each module ajax-based( without page-refresh )
3) etc.

^^//
as for 1)redesigning the architecture of XOOPS (Cube),
it means we need
to abandon old phpnuke-style architecture(based on module with blocks).
and separate presentation part from logical-process part completely!
Umm...
If we want to do this, we'd better make another fork of XOOPS(Cube)!
(....^^;; tough story for lazy person like me....--;; )
OK! Next!

When it comes to 2) making each module ajax-based( without page-refresh ),
Umm....
maybe...we can do this easily....compared with 1)redesigning the architecture of XOOPS (Cube).
(...Umm....maybe...Umm...perhaps...Ummm....)
...
Anyway...
this project is all related with
2) making each module ajax-based( without page-refresh ).
and
this topic!
Related topic:XOOPS Cube Default Theme Drag&Drop&Resizing Version
http://xoopscube.org/modules/xhnewbb/viewtopic.php?topic_id=81&post_id=514#forumpost514


Yeah!!!
Let's make basic modules of XOOPS(Cube).... ajax-based(without page-refresh).
Project Start!!!!
(...btw as you know, I am very lazy person ...
so..I can't guarantee this project will keep going on without stop/quit! )
-----------------
-----------------

################################
Download:(stage5 release)
http://dev.xoops.org/modules/xfmod/project/showfiles.php?group_id=1189&release_id=978&dl=2413
################################

-----------------

-----------------
--project stage5--(2006/4/29)
.All remaining modules AJAX-ized experimentally, too !!!! (except admin section and comment section )
( news mod, sections mod, xoopsfaq mod, xoopsmembers mod, xoopspartners mod, xoopspoll mod. )
.some bugs fixed!
(ex: You couldn't insert into or update DB with Firefox becasue of Referer problem!
Umm...It works well with IE...but not with Firefox!
Anyway..I modified prototype.js to fix it. )
.All changes/fix of XOOPS 2.0.14 RC are applied to this Ajax-ized modules.
.Now,you can see Ajax Processing Indicator(await.gif) during Ajax Process.
(For this function, you need to modify your theme.html!
------------
From:

<{$xoops_contents}>


To:


<{$xoops_contents}>

-------------
(^^I mean you have to add
to your theme.html)
.UI(User Interface) and functions of some modules improved to help users navigate each modules.
.etc.
--project stage4--(2006/4/15)
.newbb module AJAX-ized experimentally, too !!!! (except admin section)
( Umm..it was quite a tough job!!
Not perfect yet..but I will continue to improve it more and more! )
.To prevent IE from caching result-data(sent by XX_action.php), random string(&ajaxrandom=xxxxxx )is added to parameter.
( Umm...If you want to make IE cache it, use old update()( in old smarty_ajax.js )instead of new one. )
. some change in page header(of XX_action.php )
(^^.. I fogot to change it in the previous version. ^^..)
from:
header('Content-Type:text/html; charset='._CHARSET);
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
//header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: private, no-cache');
header('Pragma: no-cache');
to:
header('Content-Type:text/html; charset='._CHARSET);
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
.message_header() (in functions.php) redesigned
(^^;; the previous one had logical error! anyway...fixed! )
.some tiny bugs/typos fixed!
.etc
--project stage3--(2006/4/13)
.mylinks module AJAX-ized experimentally, too !!!! (except admin section and comment section )
(yeah...it was easy job because it's a kind of clone of mydownloads module! )
.some bugs(of mydownloads module) fixed!
(ex: sorting(in viewcat) didn't work properly because of my typo. anyway..fixed!! )

--project stage2--(2006/4/11)
.mydownloads module AJAX-ized experimentally, too !!!! (except admin section and comment section )
(yeah...it was tough job compared with contact module...as expected.
but..,as you know,mylinks module is very similar with mydownloads module fortunately and thankfully.
so..in effect,I've already made 4 modules ajax-based!! ^^// )
.some bugs of contact module fixed!
(...it failed to handle multi-bytes character such as Korean,Japanese properly. anyway..FIXED!! )

--project stage1--(2006/4/9)
Umm...
Experimentally,
I made contact and xoopsheadline ajax-based yesterday..(except admin section)
and confirmed it works well.
(why...contact and xoopsheadline?...because they are easy to play with ^^//)
------------------

-----------------------------------------------------------------
-WARNING-
This project is still in the stage of EXPERIMENT!
and this package is just Beta Version!
Don't use this in your production environment!
------------------------------------------------------------------
-----------------------------------------------------------------
-NOTICE-
----------
(1)
as for x2t theme and cube_default theme , they don't have id="content"

<{$xoops_contents}>

so we have to replace class with id like this!!

<{$xoops_contents}>

------------
If your theme has
, You must replace it with
!!!!!

(2)
These Ajax-ized modules are just for XOOPS 2.0.x.( I modified modules of XOOPS 2.0.13.x)
(so..maybe some of them won't work properly on XOOPS 2.O.x JP because of the difference of One-Time Token System.
the package for XOOPS 2.0.x JP already exits because I already released it!)

##XOOPS 2.0.x JP(Cube) Basic Modules AJAX Hack Project##
http://xoopscube.org/modules/xhnewbb/viewtopic.php?viewmode=flat&topic_id=86&forum=2

(3)
If you want to test these ajax-ized modules with my DD&Resize&Window themes,
You must replace prototype.js of theme with prototype.js of module!!(because I changed some codes for this project.)
And delete prototype.js of each module!!!
Otherwise, it won't work properly on IE because it's already included in page-header of my themes.
( Just delete prototype.js of each module!!
ex: in case of ajax-ized mydownloads module, Just delete mydownloads/include/prototype.js and it will work well on IE !!)
## XOOPS Cube/XOOPS Default Theme Drag&Drop&Resize&Window Version ##
https://xoops.org/modules/newbb/viewtopic.php?topic_id=48487&forum=14

-----------------------------------------------------------------

-------------------------------
How to install?!
---------------------------------
Simple!

First(of All),
we need to copy this three smarty plugins
block.ajax_formupdate.php
block.ajax_form.php
function.ajax_update.php
to smarty's plugin dir,html/class/smarty/plugins/

And..
Install each of them like normal modules!

That's all!
---------------------------
-------------------------------
How to upgrade?!
---------------------------------
more simple!
Overwrite and upgrade each module through Admin menu.
---------------------------

---------------------------
Basic Idea
-------------------------
Simple!
Using Ajax,
we refresh/rewrite only Content section(id="content")(I mean module section of theme) instead of whole page.
ex)
/themes/default/themes.html

<{$xoops_contents}>


------------------------
------------------------------
Now, let's check how they work!
------------------------------
(in case of contact)
1) access ~/modules/contact/
2) fill the contact form!
3) Click Send button!
Ha..Ha
No refresh!!
How is it possible?
Simple!
With Ajax,
we refresh/rewrite only Content section(id="content")(I mean module section of theme) instead of whole page.
ex)
/themes/default/themes.html

<{$xoops_contents}>


----------------
(in case of xoopsheadline)
1) access ~/modules/xoopsheadline/
2) select/click your favorite feed!
Ha..Ha
No Page-Refresh!!
click other feed!
No Page-Refresh!!
Just refresh of Content section( I mean
<{$xoops_contents}>
)

Don't you think it's interesting and more efficient than Page-refresh ?

--------------------
(in case of mydownloads, mylinks ,newbb and etc. )
..Just browse it!!! and you can understand how it works !!
--------------------

------------------------------
files and scripts used for this project!
------------------------------
prototype.js
/* Prototype JavaScript framework
* (c) 2005 Sam Stephenson
*
* Prototype is freely distributable under the terms of an MIT-style license.
* For details, see the Prototype web site: http://prototype.conio.net/
*
(modified for this project by wanikoo )
/*--------------------------------------------------------------------------*/
Smarty_ajax plugins
(modified for this project by wanikoo and based on AJAX-enabled Smarty plugins,author Dmytro Shteflyuk (GPL))
--------------------------------

-------------------------------------
Support Forum:
XOOPS 2.0.x JP(Cube) Basic Modules AJAX Hack Project
http://xoopscube.org/modules/xhnewbb/viewtopic.php?viewmode=flat&topic_id=86&forum=2
Related Project:
XOOPS Cube/XOOPS Default Theme Drag&Drop&Resize&Window Version
http://xoopscube.org/modules/xhnewbb/viewtopic.php?viewmode=flat&topic_id=81&forum=3
https://xoops.org/modules/newbb/viewtopic.php?topic_id=48487&forum=14

---------------------------------------

---------------------------------------
PS:
With Ajax, we can control output of any module more detailedly.
but...I think it just could make code very complicated and make us modify more files.
...
By refreshing/reloading the module content section of theme,
We can
easily make basic modules ajax-based
and
reuse/recycle most files of basic modules with little modification.


--------------------------------------------

From wanikoo

the most educational site, wanisys.net

2
wanikoo
Re: XOOPS 2.0.x Basic Modules AJAX Hack Project
  • 2006/4/29 21:48

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


Original project is
XOOPS 2.0.x JP(Cube) Basic Modules AJAX Hack Project
http://xoopscube.org/modules/xhnewbb/viewtopic.php?viewmode=flat&topic_id=86&forum=2
Ummm..
I changed/modified some codes for XOOPS 2.0.x!
anyway...
Just enjoy!

From wanikoo

3
damaster
Re: XOOPS 2.0.x Basic Modules AJAX Hack Project
  • 2006/4/30 1:39

  • damaster

  • Just can't stay away

  • Posts: 556

  • Since: 2003/5/11


I've been having a lot of fun testing the ajaxed XOOPS Cube.
Here the Theme xTiger OS built with the ancient script
this precursor, has all the current functions of XOOPS Cube ajaxed
Themes UI elements: scroll, minimize (bottom left), maximize/restore,
close drag and drop windows.


Resized Image

[size=x-small]Postnuke Theme 2001 by Damaster, review 2006 XOOPS Cube with xTiger graphical interface[/size]

Still porting that graphical interfaces to the ajaxed XOOPS Cube modules and themes.

Thanks for the fun thing!

I like people more than machines or money. But that's me!
Lets do something good and great: Lets do open source!

4
JMorris
Re: XOOPS 2.0.x Basic Modules AJAX Hack Project
  • 2006/4/30 3:04

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


Damaster,

Unless your intent is to port such a nice theme to XOOPS, I'm finding it hard to understand what your post has to do with XOOPS.

Please remember that these forums are for discussion of XOOPS related topics.

Thank you,

James
Insanity can be defined as "doing the same thing over and over and expecting different results."

Stupidity is not a crime. Therefore, you are free to go.

5
wtravel
Re: XOOPS 2.0.x Basic Modules AJAX Hack Project

I think for both XOOPS Cube and XOOPS this work can be of great use. Thanks for the contribution! This could be interesting to have in the XOOPS core I think, as a useable set of functions/classes for developers to work with.

Just I think it should not be used in standard themes because of the browser incompatibility (so I have read).

6
damaster
Re: XOOPS 2.0.x Basic Modules AJAX Hack Project
  • 2006/4/30 8:14

  • damaster

  • Just can't stay away

  • Posts: 556

  • Since: 2003/5/11


edited: not related to the subject

I reply to JMorris, that's on top:

Quote:

// Based on XOOPS 2.0.x Basic Modules //


Why did you edit my post!?
It's X O O P S !

P.S. That's not cool you're abusing of your forum moderator Rank!
I like people more than machines or money. But that's me!
Lets do something good and great: Lets do open source!

7
wtravel
Re: XOOPS 2.0.x Basic Modules AJAX Hack Project

Sorry, I should have mentioned my name. I moderated your post because it had nothing to do with the subject. You posted an image of the way XOOPS Cube came to be (fork to fork). That was it. Please stick to the topic.

8
damaster
Re: XOOPS 2.0.x Basic Modules AJAX Hack Project
  • 2006/4/30 8:38

  • damaster

  • Just can't stay away

  • Posts: 556

  • Since: 2003/5/11


Where you see a fork, i see XOOPS evolution.

All that still runing on XOOPS founder work
a XOOPS 2.0x release

Without re-invent the wheel we can still
improve it to the futur web.

But you're making another point, that we can't
contribute here, and maybe that's why people
move away...

I like people more than machines or money. But that's me!
Lets do something good and great: Lets do open source!

9
davidl2
Re: XOOPS 2.0.x Basic Modules AJAX Hack Project
  • 2006/4/30 9:15

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


wanikoo - some excellent work you've done.. I was very impressed with relocatable blocks etc... and as this is essentially 2.0.x based - it's something we can all use

10
JMorris
Re: XOOPS 2.0.x Basic Modules AJAX Hack Project
  • 2006/4/30 14:28

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


Quote:

Damaster wrote:
I've been having a lot of fun testing the ajaxed XOOPS Cube.
Here the Theme xTiger OS built with the ancient script
this precursor, has all the current functions of XOOPS Cube ajaxed
Themes UI elements: scroll, minimize (bottom left), maximize/restore,
close drag and drop windows.

[snip]

Still porting that graphical interfaces to the ajaxed XOOPS Cube modules and themes.

Thanks for the fun thing!



Damaster,

The above is what I was referencing. You were talking about XOOPS Cube, not XOOPS.

As I said in my original post, if you're intention is to port your theme, that's one thing. Talking about XOOPS Cube just for the sake of talking about it is not.

Note: Abusing Moderator privileges would be to delete your post without reason. I did not do that.

I too apprciate wanikoo's contribution to XOOPS, regardless of where it came from.

Now, can we please stay on topic... This interesting hack for XOOPS

Best Regards,

James
Insanity can be defined as "doing the same thing over and over and expecting different results."

Stupidity is not a crime. Therefore, you are free to go.

Login

Who's Online

414 user(s) are online (298 user(s) are browsing Support Forums)


Members: 0


Guests: 414


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits