1
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:

<div id="divid">here comes the output from the function </div>

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

<a href="#" onClick="update('divid', 'stings',...)">do click her for ajax</a>

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.



2
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...



3
Ralfi
Re: Xoops Ajax Comment System?
  • 2007/12/19 9:33

  • Ralfi

  • Just popping in

  • Posts: 3

  • Since: 2007/12/18


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




TopTop



Login

Who's Online

225 user(s) are online (139 user(s) are browsing Support Forums)


Members: 0


Guests: 225


more...

Donat-O-Meter

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

Latest GitHub Commits