WP Digg Style Pagination Plugin V 1.0

Based on the modular version for the pagination, now I have created a version easier to implement, using classes for PHP version 4. The implementation is simple, is necessary to include the class with a require or an include. We defined basic properties for pagination such as an amount of elements to paginate, elements by page, page to which the element "page" will be sent, you need a CSS style and finally we generate the pagination to show it.

 
include(ABSPATH.'/includes/pagination.class.php');
/*
Now you can work with de pagination class
*/
 
The class.
  • Version 0.4 (2007-10-21)
    1. Added class next and prev to next and prev buttons.
    2. Bug fix
  • Version 0.3.3 (2007-10-05)
    1. Possibility to set 0 as the current page (no page selected). Back and Next buttons won't be shown.
  • Version 0.3.2 (2007-09-19)
    1. Changed round to ceil (line 122)
  • Version 0.3.1 (2007-08-23)
    1. Changed ceil to round (line 122)
  • Version 0.3 (2007-07-10)
    1. Added the URL friendly functionality.
  • Version 0.2 (2007-06-15)
    1. show an error and description if the function was called wrongly.
    2. Sends & instead of ? if the current file has vars in $_GET
    3. can change the name of the parameter ?page=
    4. there is no necessary to calculate in a manual way the pagination ($class->calculate()), is automatically when you show it the first time
    5. and others functionalities
  • Version 0.1 (2007-05-27)
    • First version

Dowload and unrar where you will work with the class. For the CSS, you can take one fromthis list.

If you forget a parameters to show or calculate the pagination. The class will show you a error to remember that. by example:

$p=new pagination();
$p->show();

the results:

It is necessary to specify the number of pages ($class->items(1000))
It is necessary to specify the limit of items to show per page ($class->limit(10))

by default, the target of the pagination link is the same file where the paginations is showed. you can change it. using $class->target(file)

$p = new pagination;
$p->items(1000);
$p->limit(10);
$p->target("?foo=var");
$p->show();
« Previous1234567...99100

You can change the name of the parameter that brings the current page value. Using the $class->parameterName("p") you will see how the links changes the target to ?p=X instead of ?page=X

$p = new pagination;
$p->items(1000);
$p->limit(10);
$p->currentPage(1);
$p->parameterName("p");
$p->show();
« Previous1234567...99100

Defining the pagination on its basic way, specifying an amount of items, limits of items by page, the pointed file by the pagination and the number of the present page.

$p = new pagination;
$p->Items(1000);
$p->limit(5);
$p->target("paginator.php");
$p->currentPage(2);
$p->show();

Defining in 1 the amount of adjacent pages to the present page.

$p = new pagination;
$p->Items(1000);
$p->limit(5);
$p->target("paginator.php");
$p->currentPage(50);
$p->adjacents(1);
$p->show();

Defining in 3 the amount of adjacent pages to the present page.

$p = new pagination;
$p->Items(1000);
$p->limit(5);
$p->target("paginator.php");
$p->currentPage(50);
$p->adjacents(3);
$p->show();

Defining in 4 the amount of adjacent pages to the present page.

$p = new pagination;
$p->Items(1000);
$p->limit(5);
$p->target("paginator.php");
$p->currentPage(50);
$p->adjacents(4);
$p->show();

Activating the functionality to show the pages amount.

$p = new pagination;
$p->Items(1000);
$p->limit(5);
$p->target("paginator.php");
$p->currentPage(6);
$p->showCounter(true);
$p->show();

Changing the text of the navigation tags and removing the icons.

$p = new pagination;
$p->Items(1000);
$p->limit(5);
$p->target("paginator.php");
$p->currentPage(7);
$p->nextLabel('<strong>Siguiente</strong>');//changing next text
$p->prevLabel('<strong>Anterior</strong>');//changing previous text
$p->nextIcon('');//removing next icon
$p->prevIcon('');//removing previous icon
$p->show();

Removing the text of the navigation tags.

$p = new pagination;
$p->Items(1000);
$p->limit(5);
$p->target("paginator.php");
$p->currentPage(8);
$p->nextLabel('');
$p->prevLabel('');
$p->show();

Changing the icons of the navigation tags

$p = new pagination;
$p->Items(1000);
$p->limit(5);
$p->target("paginator.php");
$p->currentPage(9);
$p->nextIcon('&#9658;');
$p->prevIcon('&#9668;');
$p->show();

Removing the text of the navigation tags and changing the icons.

$p = new pagination;
$p->Items(1000);
$p->limit(5);
$p->target("#");
$p->currentPage(10);
$p->nextLabel('');//removing next text
$p->prevLabel('');//removing previous text
$p->nextIcon('&#9658;');//Changing the next icon
$p->prevIcon('&#9668;');//Changing the previous icon
$p->show();

Changing the div class (<div class="class">Pagination</div>) that surrounds the pagination (to manipulate many CSS styles)

$p = new pagination;
$p->Items(1000);
$p->limit(5);
$p->target("#");
$p->currentPage(11);
$p->changeClass("jogger");
$p->show();
$p->changeClass("tres");
$p->show();
$p->currentPage(14);
$p->changeClass("meneame");
$p->show();
« Previous1234567...99100
« Previous1234567...99100

To use the URL friendly, we need to execute the function $p->urlFriendly();. So we need to add to the $p->target("#"); the placeholder % where we need the page numbers. If we need to change the placeholder, we can do it send it the desired char as parameter to the function $p->urlFriendly('[...]');, and to the $p->target("#[...]");.

$p = new pagination;
$p->Items(1000);
$p->limit(5);
$p->currentPage(14);
 
$p->urlFriendly();
$p->target("#page/%/");//#page/1/
$p->show();
 
$p->urlFriendly('[...]');
$p->target("#pagina/[...]/");//#pagina/1/
$p->show();
 
$p->urlFriendly(false);
$p->target("#");//#page=1
$p->show();
 
« Previous1234567...99100
« Previous1234567...99100
« Previous1234567...99100

Comentarios

2007-09-09 13:09:49
pecesama
Deberías poner en un solo paquete el plugin y la clase de paginación para evitar confusiones de los usuarios y ahorrar un paso extraño.
2007-09-10 15:01:14
Victor De la Rocha
Si, muy cierto. Lo haré en un tiempo libre :D hecho!
2007-09-15 05:38:59
beku
ahora funciona, :)

puedes borrar el comment anterior

thanks
2007-09-15 14:32:11
Victor De la Rocha
Hola beku, bien! :)

¿Que causaba el error?, ¿Como lo solucionaste?
2007-09-18 15:33:25
Edmundo Hidalgo
A mí tampoco me funcionaba!

Después de quebrarme la cabeza un par de horas, para averiguar cual era la causa de que no había output en el plugin, llegue a la conclusión de que el pattern en PCRE estaba *mal*, simplemente tuve que reemplazar el símbolo de # con los corchetes correspondientes, en la línea 217.

Así estaba en el archivo .rar que tienes arriba:

preg_match('#^(.*)sLIMIT#siU', $request, $matches);

Lo intercambié por esto, y comenzó a funcionar:

preg_match('{^(.*)sLIMIT}siU', $request, $matches);

Un saludo.
2007-09-18 20:41:13
bum
Good plugin! thnks

How can I use this plugin in "Single Post"?
It returns nothing, if it's single post.
2007-09-19 03:31:15
bum
I found a bug.

example.
Total # of article : 5
Option->Read->Show post : 4

This plugin returns nothing. in this case. this plugin works only (Total # of article) / (Show post) > 2

Would you fix it for me? :)
2007-09-19 09:23:41
Victor De la Rocha
Thanks Edmundo Hidalgo ;-)

hi bum, The bug was will fixed in the next release. Fixed.
2007-09-19 09:50:56
bum
Hello, Victor!
You are great!! thanks a lot!!!
2007-09-20 14:20:06
Jimmy
I would like to request a feature if possible. Would it be possible to have this plugin with for single posts (single.php) as well? Same format as it is now but would look like this



so the website looks more consistent? thank you
2007-09-20 17:23:22
Victor De la Rocha
Jimmy: maybe, in the next release.
2007-09-20 18:04:02
Ítalo
gracias edmundo! yo por más que me rompí la cabeza no logré nada jajaja pero ya funciona
2007-09-22 01:59:31
antoine
Hi Victor,
I have installed the gengo plugin (http://jamietalbot.com/wp-hacks/gengo/). It works good with your plugin so far. but Gengo add a 2-letters path like "/en/" to the permalink. With your plugin, a link to "page 2" looks like this : "/en/page/2/en/", it works but the path looks false. I don't know in your code how change the permalink. do you have an idea ?
2007-09-24 07:52:27
  Хороший плагин для страниц by AlexWeb.org
[...] Pagination Plugin V 1.0 [...]
2007-09-24 15:31:18
Victor De la Rocha
Hola @antoine, revisaré el plugin Gengo, haber si puedo encontrar una solución en el transcurso de la semana (Si el trabajo me lo permite) :)

Saludos
2007-09-25 07:09:26
Kristoffer
This is a great plugin, but it seems to break on the archive pages in Wordpress 2.3

WordPress database error: [Unknown column 'post_id' in 'field list']
SELECT count(DISTINCT post_id) FROM wp_posts LEFT JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) LEFT JOIN wp_term_taxonomy ON (wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id) WHERE 1=1 AND wp_term_taxonomy.taxonomy = 'category' AND wp_term_taxonomy.term_id IN ('1') AND post_type = 'post' AND (post_status = 'publish' OR post_status = 'private') ORDER BY post_date DESC

Any solution?
2007-09-25 07:10:25
Kristoffer
I meant the category and search page by the way... =)
2007-09-25 07:22:37
Kristoffer
Sorry for tripple posting...
It was a silly mistake by me.

However, in my search result I now get "It is necessary to specify the number of pages ($class->items(1000))" instead of the pagination bar, and it doesn't matter if the pagination bar shouldn't show...
2007-09-25 11:52:32
Victor De la Rocha
Hi @kristoffer, wait for the next version uff
2007-09-27 08:26:13
Carballada
Muchas gracias por tu plugin, lo uso hace tiempo y me encanta...
pero.. yo utilizo asides y no me interesa que determinadas categorías se tengan en cuenta a la hora de contar las páginas.
en la versión anterior había modificado el sql para que no contara los post de la categoría aside, pero en la última versión que has lanzado no hay sql, como se podría implementar ésto?
los que usamos asides nos devuelve más páginas de las que hay, al tener en cuenta los post de la categoria de aside tambien

ya contaras....
2007-09-27 09:35:37
AlexWeb.org - Блог обо всем» Blog Archive » Digg Style Pagination Plugin V 1.0
[...] плагин вы сможете зкачать на сайте Mis Algoritmos. А тут вы сможете найти стили плагина. По вопросам [...]
2007-09-27 10:43:47
kca
The plugin does not work with (only in) the categories pagination in WP 2.3, i got something like:

[Unknown column 'post_id' in 'field list']
SELECT count(DISTINCT post_id) FROM wp_posts LEFT JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) LEFT JOIN wp_term_taxonomy ON (wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id) WHERE 1=1 AND wp_term_taxonomy.taxonomy = 'category' AND wp_term_taxonomy.term_id IN ('12') AND post_type = 'post' AND (post_status = 'publish' OR post_status = 'private') ORDER BY post_date DESC
2007-09-28 19:32:57
links for 2007-09-14 through 2007-09-28 | spreading the aloha spirit | aloha WEBLOG
[...] WP Digg Style Pagination Plugin V 1.0Update vom 07.08.07 [...]
2007-09-29 19:37:26
Ponchito147
It doesn´t work on Wordpress 2.3 or it´s just my blog ?

No funciona en Wordpress 2.3 es algun error en mi blog ?
2007-09-30 04:37:34
Solución a Unknown column ‘post_id’ in ‘field list’ — Viciao2k3
[...] Gracias a tikitakfire me entero que hay una versión 1.1 del plugin WP-Digg Style Paginator con la que no hay problemas en la versión 2.3 de [...]
2007-09-30 05:11:50
Paginación tipo digg o menéame — Viciao2k3
[...] Descarga el plugin WP-Digg Style Paginator [...]
2007-09-30 11:36:00
This Site is Built With. | StylishLabs
[...] Wp Digg-Style Pagination [...]
2007-10-03 18:55:24
antoine
Hola, Gracias Victor. but i think i've found a solution: there's a checkbox in the gengo settings page i've uncheck to not add the language code to the url. now it's working great ! thanks again for your plugin. you can see it in action here :
http://innerfrance.com/archives/region/paris/
2007-10-04 04:57:35
diarioTHC | Mejora la navegación de wordpress, WP Digg Style Pagination Plugin
[...] Existe otra versión más nueva que soluciona algunos problemas WP Digg Style Pagination Plugin V1.0 pero parece ser que sigue dando problemas en Wordpress [...]
2007-10-05 01:12:36
bum
Hello, Victor

Many people are waiting for your great plugin! I don't want to upgrade my wordpress without your plugin. I love this.
Would you let us know, the expected time for next version that support WP2.3?
2007-10-05 01:30:17
Wordpress 2.3으로 옮겨가기전 확인 사항
[...] WP-Digg Style Paginator : WP 2.3에서 정상동작하지 않음. 개발자가 다음 버전에 지원예정이라는데, 다음 버전에 대한 일정은 나오지 않았음. 결정적으로 이 플러그인 때문에 WP 2.3으로의 이주가 늦어질 듯하다. 혹시 이걸 대체할만한 플러그인이 없을까? K2의 그것이라면 좋겠지만 [...]
2007-10-05 10:40:17
Victor De la Rocha
Hola, Tengo mucho trabajo. Espero el fin de semana poder trabajar en una solución.
--
Hi, I have a lot of work. Maybe in the weekend.


@Carballada: Si hay una consulta SQL, está en la variable $request. Dentro de la clase heredada wp_pagination_plugin en el método show().

@Ponchito147: Estoy trabajando en una solución para WP 2.3.

@antoine: Excellent! :D

I'm looking for a fix for WP 2.3 Fixed! Download the new version ;-)

2007-10-05 16:45:57
Paginación para Wordpress y tus scripts en PHP
[...] Digg style pagination plugin [...]
2007-10-06 03:30:22
bum
Hola, Victor. Soy muy feliz con su plugin. y gracias por su esfuerzo. ¿Yo tienen una pregunta, son los trabajos de esta versión con WP2.3? Su plugin es muy importante para mí, así que no me trasladaré a WP2.3 sin su plugin. picosegundo. ¡Aprendí español!
2007-10-06 09:48:40
Victor De la Rocha
hi @bum, the plugin works with WP 2.3 :D
2007-10-08 06:16:49
bum
Great! thanks Victor. now i'm moving to wp2.3!
2007-10-08 06:27:16
Quelques plugins et widgets pour WordPress | 64k
[...] WP-Digg Style Paginator : un plugin pour avoir une pagination à la Digg [...]
2007-11-01 08:16:43
milko´s spotLight » Beitrag » Wordpress Theme winter_de 2007
[...] Digg Style Paginator von Victor De la Rocha [...]
2007-11-03 14:31:01
Actualizado a Wordpress 2.3.1 : EREBE
[...] Digg-style Paginator, para mejorar la navegación entre las páginas. Se lo puede ver en acción al final de listado de [...]
2007-11-03 17:13:18
Une pagination pour Wordpress - JBJ’s Blog
[...] WP-Digg Style Paginator est malheureusement distribué sous forme d’arive .rar, ce qui n’est pas pour arranger les Linuxiens. Nous devons en effet installer le programme unrar, qui permet de dézipper ce format proprio. sudo apt-get install unrar [...]
2007-11-05 01:10:00
dano
Thank u very much for this plugin !!!!

But i've got a problem. Go to this link : http://test.tdconcepts.free.fr/requinV2/?m=200711
and try to go to page 1 from page 2 ; it's impossible... Why?

We can go to page 2 from page 1, or go to page 3 from page 2, or page 2 from page 3.

On any page I can't came back on page 1 from page 2.... :-(
2007-11-07 11:47:03
» Cambiar estilo de paginacion en WordPress - TecnosWA
[...] hay varios plugins con la misma funcion, yo uso el “WP Digg Style Pagination Plugin“. Les recomiendo que bajen la version 1.2.1 que, hasta el momento, es la ultima version [...]
2007-11-08 11:48:29
Mister
It doesn't work with WASSUP WP Plugin.
2007-11-18 21:09:11
Michael Aulia’s Blog » WordPress Pagination Plugin and Style
[...] The plugin is called “Digg Style Pagination” Plugin and can be found here. [...]
2007-11-19 19:31:31
Interesting websites for SEO, Web Marketing and everday work from Sante - November 19th
[...] WP Digg Style Pagination Plugin V 1.0 - WP-digg style pagination plugin allows to add or replace the Wordpress pagination by one easy and more comfortable navigation like Digg, Flickr, Meneame and Sabros.us. [...]
2007-12-01 17:27:46
Xray
Tengo el mismo problema que dano, le doy a la pagina 2 pero luego al volver a darle a la pagina 1 no va...
2007-12-02 03:36:54
Victor De la Rocha
La nueva versión de Wordpress hizo cambios en su base de datos, por lo que haré modificaciones considerables en la próxima versión del plugin. Espero esto resuelva el problema.

Por el momento tendrán que esperar un poco, ya que tengo un poco de trabajo y estoy en los últimos pasos de la facultad.

Creo que a mediados de Diciembre me pondré a trabajar en ella. ;)

Disculpen los inconvenientes.
2007-12-05 15:53:06
abita
amigos, alguien me diria como instalarlo, es que la verdad deberian de poner un manual de instalacion para novatos, la verdad no entiendo nada, me lo descargue, lo subi, lo active, despues no se que mas hacer, espero sus pronta respuesta, gracias

saludos
2007-12-08 05:00:09
WordPress Plugins: inline php | Defensio antispam | Digg style pagination | Templatedia
[...] WP Digg Style Pagination Plugin V 1.0 - WP-digg style pagination plugin allows to add or replace the Wordpress pagination by one easy and more comfortable navigation like Digg, Flickr, Meneame and Sabros.us. [...]
2007-12-10 19:46:36
Victor De la Rocha
@abita: Intenta leyendo este artículo en español. No sólo es cuestion de subir y activar, hay que agregar unas cuantas líneas en el theme (skin o tema) de tu wordpress.
2007-12-10 23:35:13
Khirr » Archivo Blog » Paginando con estilo en Wordpress
[...] theme, cansado de ver esto, sin querer encontré en Código Geek la solución definitiva para esto. Aquí dejo como hacerlo y diferentes css para poder adaptarlo a tu gusto, espero les [...]
2007-12-11 00:57:21
Michael Aulia
If you want to know how to modify your single.php to include this pagination on your single posts, I've written the "hack" here:
http://www.michaelaulia.com/blogs/2007/11/wordpress-pagination-plugin-and-style.html

It's not exactly perfect , but will do until we have a clear instruction here on how-to
2007-12-14 03:07:46
Theme Ingonza liberado | Blog de Alaingonza
[...] y se le ha intentado dar aspecto de web 2.0. Está optimizado para SEO, viene preparado para el plugin digg style pagination (aunque no es necesario), y acepta [...]
2007-12-19 01:09:36
emarts
Hola, esta bueno el plugin pero en la pagina de resultados de busqueda (search.php) me sale:

It is necessary to specify the number of pages ($class->items(1000))
2007-12-20 15:43:51
Recopilación de temas para WordPress (3)
[...] y se le ha intentado dar aspecto de web 2.0. Está optimizado para SEO, viene preparado para el plugin digg style pagination (aunque no es necesario), y acepta widgets. Enlaces: Descarga del tema ; Demo y [...]
2007-12-23 15:26:32
[PEDIDO] Personalizacin de Wordpress - Pgina 2 - psicofxp.com
[...] WP-Digg Style Paginator: cambia los vinculos "Entradas anteriores" y "Entradas siguientes" por una paginacion estilo digg. Trata de no usar los widgets y meter las cosas a mano en el theme asi aprendes algo de programacion y como funcionan las plantillas para que despues te hagas una totalmente personalizada , ademas los widgets hacen que WP sea un poco lento cuando carga la pagina. Si tenes alguna duda o necesitas ayuda en algo no dudes en preguntarme ... saludos... [...]
2007-12-27 19:00:32
WP Digg Style Pagination Plugin V 1.0 | Creeva's World 2.0
[...] WP Digg Style Pagination Plugin V 1.0 [...]
2007-12-31 13:46:57
Wordpress Style Pagination Plugin versión 1.2.1 >> Doctor Informática
[...] Acabo de instalar este plugin ahora mismo para remplazar mi antiguo Pagebar, para instalarlo tenemos que ir primero a la web del author. [...]
2008-01-02 21:40:38
» Style Pagination in Wordpress | Ivan`s Weblog
[...] pluginnya WP-digg style pagination download di [...]
2008-01-06 08:19:04
Michael Aulia’s Blog » Top 10 (Best) Wordpress Plugins in 2007
[...] WP-Digg Style Paginator Paginate your blog and posts with this plugin (Digg-style or other CSS styles) [...]
2008-01-11 13:57:01
Moises
Hola Amigo, tengo un problema con el plugin

1.- Pagina muy bien pero No me limita los posts a los resultados que pido

/*

$p = new wp_pagination_plugin;
$p->changeClass("pagination");
$p->items(5);
$p->limit(4);
$p->adjacents(4);
*/

2.- En mi seccion de categorias (esta con url amigable).

http:/www.dominio.com/categoria/xxxx

No me pagina bien (es como que no esta recibiendo el argumento categoria) y simplemente el paginador me enlaza al index/numero_de_pag.

Te agradeceria una orientaci­ón.

Muchas gracias

Moisés R.

P.D. a ver si pones un enlace a paypal. Para hacer colaboración por tu plugin y asi poder reconocer tu trabajo (de forma voluntaria). Este plugin es bueno .
2008-01-11 18:40:48
Victor De la Rocha
hola @emarts, no tengo idea que esté causando ese error, pero lo revisaré con detenimiento estos días. Estoy trabajando en una nueva versión del plugin basandome en la tabla con contadores que maneja internamente Wordpress, para evitar re-contabilizar con consultas SQL en tiempo de ejecución.

@Moises: ¿que estas tratando de hacer? No es necesario modificar el plugin de paginación si lo usas para Wordpress. Wordpress lo hace sólo.

¿Intentas implementar la clase de paginación en algún sistema por aparte? Si es así intenta leyendo la documentación de la clase, y me cuentas ;)

Creo que sería bueno incluír un botón de paypal. ¡Lo haré ahora mismo! ...


Un saludo a todos, y gracias por sus comentarios y hacer viral todo esto. Se agradece realmente.

¡Feliz año a todos! :D Yo ya estoy de vuelta nuevamente.
2008-01-18 10:39:57
hre_truk
there is a error in this plugin.

look at: http://uploaded.to/?id=jyiijb
2008-02-08 05:13:53
Fabienthomas.com » Un thème wordpress vite fait.. pas si vite en fait !
[...] pré-installés : wp-digg style paginator, flickr-rss, feedburner feedcount, gravatar, [...]
2008-02-12 09:44:40
turboliux blog » Blog Archive » Pamoka. Diegiam Wordpress puslapių numeravimą
[...] yra gan paprasta, reikia tiktai šiek tiek laiko ir kantrybės =] Taigi pamokysiu kaip įsidiegti WP Digg Style Pagination įskiepį (ačiū už nuorodą [...]
2008-02-27 18:18:11
liquidgirl
Hi
Thanks for the plug-in!

I installed the plug in here
http://alteredstaterecords.com/blog/

And I'm having the following happen:
The page 1 link is retaining the link to the current page.

And on page 2 the link to the previous button stays as page 2 instead of page 1
and the link to page 1 is also page 2.

And further in, say on page 9
the previous link is working right with a link to page 8
but the link to page 1 stays as link to page 9.

Is there something simple that I'm overlooking?
2008-02-28 10:11:14
Fabien
I think there is a problem with the pagination in search results.

The second page of search results gives me the second page of the index, and is not related to the search keywords.

Any idea ?
2008-03-03 11:30:27
Miguel
Hola a todos, no tengo narices de conseguir que se mueva a la pagna adecuada. Es decir, el paginador le consigo meter con el estilo que deseo, pero no pagina. Alguien le ha pasado algo similar? puedes mirar un ejemplo en www.descenso-de-barrancos.es y en www.nalusurf.info tambien me pasa
2008-04-03 20:46:48
精通Wordpress系列教程- 3: 78个强大的Wordpress插件列表 | 49AI
[...] Photo Dropper WordPress plugin- [...]
2008-04-06 18:28:14
baron
perfect,thanks