cotonti.com : Ajax help. https://www.cotonti.com Последние сообщения в теме Cotonti en Mon, 12 Jan 2026 04:18:26 -0000 Trustmaster Have a look at userposts, it has a Siena version.

]]>
чт, 16 мая 2013 07:31:51 -0000
tensh I think working example is in user's wall plugin... but i don't remember if it's siena or not. Also admin panel is pretty ajaxified, when you set category page limit to a lower value, category tree in admin panel gets paginated, as far as I remember.

]]>
чт, 16 мая 2013 06:55:24 -0000
lukgoh Thank you Trustmaster I will give this a go!

Added 4 days later:

All I seem to get is: AJAX Error: objectobject ?

Added 2 hours later:

Is there a working example in the Cotonti Siena source code any where?

]]>
пт, 10 мая 2013 18:50:48 -0000
Trustmaster I think you should make an AJAX part in your plugin that would output the exact piece of HTML that you want and link to it instead, e.g.:

$pagenav = cot_pagenav('plug', 'r=pagesbyuser&id=' .$id . '&c=' .$c, $d, $totalitems, $cfg['plugin']['pagesbyuser']['pages_perpage'], 'd', '', true, 'pagesbyuser');

You might also want to replace 'd' with something else in the variable name to avoid conflicts with other plugins.

]]>
пт, 10 мая 2013 18:38:35 -0000
lukgoh Okay awesome, so I still hook into the users module so the tags work there?

]]>
пт, 10 мая 2013 18:16:21 -0000
Trustmaster That is a correct example, though pagination above links to users?m=details&id=123 rather than a 3rd-party plugin, so it loads the output of the users module.

]]>
пт, 10 мая 2013 18:04:06 -0000
lukgoh When you say an AJAX handler, do you mean like this:

if (COT_AJAX)
{
    // AJAX-specific code here
}
else
{
    // Normal mode code here
}
 
// Common code here

 

]]>
пт, 10 мая 2013 09:40:17 -0000
Trustmaster If you want to paginate a smaller block, you need to make an AJAX handler that would do it on the server side. AJAX helpers are rather primitive, they only paginate entire "content" area by default.

]]>
пт, 10 мая 2013 06:55:09 -0000
lukgoh Sorry I wasn't very clear. It doesn't include the header or footer just repeats the page contents inside that div. 

]]>
чт, 09 мая 2013 21:47:52 -0000
Trustmaster Normally it should not include header/footer in the response if the request was sent with AJAX, regardless of what the pagination links look like. Does AJAX pagination work correctly in other areas?

]]>
чт, 09 мая 2013 17:34:00 -0000
lukgoh Hey guys, trying to learn how to use ajax pagination properly following this: http://www.cotonti.com/docs/devel/ajax_helpers

However, when I use a div where I would like the list to load for each page of items it re-loads the whole page inside the div (so you see the whole page twice). Can anyone provide a little more information on what I could be doing wrong?

$pagenav = cot_pagenav('users', '&m=details&id=' .$id . '&c=' .$c. '&s=' .$s. '&w='.$w, $d, $totalitems,
        $cfg['plugin']['pagesbyuser']['pages_perpage'], 'd', '', true, 'pagesbyuser');

 

]]>
чт, 09 мая 2013 13:55:25 -0000