11
Ralfi
Re: Xoops Ajax Comment System?
  • 2007/12/20 6:07

  • Ralfi

  • Just popping in

  • Posts: 3

  • Since: 2007/12/18


No Demo you can look at - sorry. I'm using XOOPS at this moment only for internal use. May i will find some time to put a Demo to the internet...

12
giba
Re: Xoops Ajax Comment System?
  • 2007/12/20 8:50

  • giba

  • Just can't stay away

  • Posts: 638

  • Since: 2003/4/26


Please send image step by step about it if possible

13
maxxy
Re: Xoops Ajax Comment System?
  • 2007/12/20 12:26

  • maxxy

  • Quite a regular

  • Posts: 286

  • Since: 2007/6/11


Quote:

Ralfi wrote:
i just use with a simple Quickhack "Lightweight-Ajax" in XOOPS in the following way:

make two copies of the default theme ->

1. default (will be the switch)
2. empty (will render only what you want)
3. normal (the default layout)

the default/theme.html has the following content (Switch):

<{php}>
if (
$GLOBALS['empty_theme'] == true) {
    
$theme='empty';
} else {
    
$theme='normal';
}

$this->assign('themename'$theme.'/theme.html');
$this->assign('xoops_theme'$theme);
$this->assign('xoops_themecss'XOOPS_URL.'/themes/'.$theme.'/style.css');
$this->assign('xoops_imageurl'XOOPS_URL.'/themes/'.$theme.'/');
<{/
php}>
<{include 
file="$themename"}>

the empty/theme.html must have only the following line:

<{$xoops_contents}>


Now i use a simple AJAX-Request to generate parts of HTML and put this with innerhtml to the right place.

The called script only needs now the variable:

$empty_theme true;


so the default-Theme will use the empty one. Thats it.

...until the right AJAX-Version will come


is this ajax overall implementation in XOOPS ? or ajax XOOPS comment system ..is there anyto edit in the comment template or php file ?

- Lightweight-Ajax ? - do i need to install third party application/file in my server ?

in the first part
the default/theme.html has the following content (Switch):

you mean delete all the content in theme.html and replace with the code you given ? or where do i have to put it ? b4

a full theme.html example will be nice

hope this can be more clear...

14
adriana
Re: Xoops Ajax Comment System?
  • 2007/12/20 12:45

  • adriana

  • Just popping in

  • Posts: 1

  • Since: 2003/12/20


.

15
sarahmx
Re: Xoops Ajax Comment System?
  • 2007/12/21 4:00

  • sarahmx

  • Quite a regular

  • Posts: 381

  • Since: 2007/10/28


Quote:

Giba wrote:
Please send image step by step about it if possible


yep that would be nice....

agree that more clear instruction should be given

16
Ralfi
Re: Xoops Ajax Comment System?
  • 2007/12/21 10:27

  • Ralfi

  • Just popping in

  • Posts: 3

  • Since: 2007/12/18


so i will do my best:

Quote:
is this ajax overall implementation in XOOPS ? or ajax XOOPS comment system ..is there anyto edit in the comment template or php file ?


hmm i do not realy know what you are meaning. I'm useing this method in my own Moduls. And i'm not so familiar with XOOPS to patch it for the community.

Quote:
- Lightweight-Ajax ? - do i need to install third party application/file in my server ?

hmmm, i use only simple XMLHttpRequest and therefor i mean it is a very simple "Ajax". But it helps me for all my needs.

Quote:
the default/theme.html has the following content (Switch): ...
you mean delete all the content in theme.html and replace with the code you given ? or where do i have to put it?

the complete code(s) were complet printed above. The empty/theme.html only rendering the code from a module without anythin else (header, footer, menu, etc...).

the default-Theme is now in the normal-Theme and will render all things like business as usual.

Quote:
a full theme.html example will be nice

i wrote all things in the last posting ;)

So i code a two normal Page in a Modul with a php-script and a template. The differenz between the two pages are the variable $empty_theme = true; to do rendering the output onl the empty-Theme.

The "normal-Theme"-Modulpage contains a function like
function update(dividstrings...){    
    do = new 
myRequest();
    do.
add('divid'divid);
    do.
add('stings'encodeURI(strings));
    do.
add(....);    document.getElementById(divid).innerHTML unescape(do.execute('dosomthing.php','GET'));
}


which is called someware on this page. To put the output someware you need for example one div like:

here comes the output from the function


On the same Page you have a link or button which calls this function:

do click her for ajax

The function update() will process the "Ajax-Request" and put the output via innerHTML in the div-container. The HTML will be rendered by the php-script with the empty-flag.

17
sarahmx
Re: Xoops Ajax Comment System?
  • 2007/12/23 18:54

  • sarahmx

  • Quite a regular

  • Posts: 381

  • Since: 2007/10/28


hard to understand for me....

i hope this can be developed into module..

Login

Who's Online

222 user(s) are online (149 user(s) are browsing Support Forums)


Members: 0


Guests: 222


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