diff --git a/.docker/Makefile b/.docker/Makefile deleted file mode 100644 index 759a834..0000000 --- a/.docker/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -sitemap-dev-php74-up: - sudo docker-compose -f sitemap-dev-php7.4/docker-compose.yml up -d -sitemap-dev-php74-stop: - sudo docker-compose -f sitemap-dev-php7.4/docker-compose.yml stop -sitemap-dev-php74-install: - sudo ln -sf /src/administrator/components/com_schuweb_sitemap ${CURDIR}/sitemap-dev-php7.4/public/administrator/components/ - sudo ln -sf /src/administrator/components/com_schuweb_sitemap/language/en-GB/en-GB.com_schuweb_sitemap.ini ${CURDIR}/sitemap-dev-php7.4/public/administrator/language/en-GB/ - sudo ln -sf /src/administrator/components/com_schuweb_sitemap/language/en-GB/en-GB.com_schuweb_sitemap.sys.ini ${CURDIR}/sitemap-dev-php7.4/public/administrator/language/en-GB/ - sudo ln -sf /src/components/com_schuweb_sitemap ${CURDIR}/sitemap-dev-php7.4/public/components/ - sudo ln -sf /src/components/com_schuweb_sitemap/language/en-GB/en-GB.com_schuweb_sitemap.ini ${CURDIR}/sitemap-dev-php7.4/public/language/en-GB/ - sudo ln -sf /src/components/com_schuweb_sitemap/language/en-GB/en-GB.com_schuweb_sitemap.sys.ini ${CURDIR}/sitemap-dev-php7.4/public/language/en-GB/ - sudo ln -sf /src/plugins/schuweb_sitemap ${CURDIR}/sitemap-dev-php7.4/public/plugins/ - sudo ln -sf /src/plugins/schuweb_sitemap/com_content/language/en-GB.plg_schuweb_sitemap_com_content.ini ${CURDIR}/sitemap-dev-php7.4/public/administrator/language/en-GB/ - sudo ln -sf /src/plugins/schuweb_sitemap/com_k2/language/en-GB.plg_schuweb_sitemap_com_k2.ini ${CURDIR}/sitemap-dev-php7.4/public/administrator/language/en-GB/ - sudo ln -sf /src/plugins/schuweb_sitemap/com_kunena/language/en-GB.plg_schuweb_sitemap_com_kunena.ini ${CURDIR}/sitemap-dev-php7.4/public/administrator/language/en-GB/ - sudo ln -sf /src/plugins/schuweb_sitemap/com_sobipro/language/en-GB.plg_schuweb_sitemap_com_sobipro.ini ${CURDIR}/sitemap-dev-php7.4/public/administrator/language/en-GB/ - sudo ln -sf /src/plugins/schuweb_sitemap/com_virtuemart/language/en-GB.plg_schuweb_sitemap_com_virtuemart.ini ${CURDIR}/sitemap-dev-php7.4/public/administrator/language/en-GB/ - sudo ln -sf /src/plugins/schuweb_sitemap/com_weblinks/language/en-GB.plg_schuweb_sitemap_com_weblinks.ini ${CURDIR}/sitemap-dev-php7.4/public/administrator/language/en-GB/ -updateTest-php7.4-up: - sudo docker-compose -f updateTest-php7.4/docker-compose.yml up -d -updateTest-php7.4-stop: - sudo docker-compose -f updateTest-php7.4/docker-compose.yml stop \ No newline at end of file diff --git a/.docker/sitemap-dev-php7.4/docker-compose.yml b/.docker/sitemap-dev-php7.4/docker-compose.yml deleted file mode 100644 index 1e1f654..0000000 --- a/.docker/sitemap-dev-php7.4/docker-compose.yml +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################### -# Generated on phpdocker.io # -############################################################################### -version: "3.1" -services: - - mariadb: - image: mariadb:5.5 - container_name: sitemap-dev-mariadb - working_dir: /application - volumes: - - .:/application - - ./db:/var/lib/mysql - environment: - - MYSQL_ROOT_PASSWORD=sitemap - - MYSQL_DATABASE=sitemap - - MYSQL_USER=sitemap - - MYSQL_PASSWORD=sitemap - ports: - - "5558:3306" - - webserver: - image: nginx:alpine - container_name: sitemap-dev-webserver - working_dir: /application - volumes: - - .:/application - - ./phpdocker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf - ports: - - "5555:80" - - php-fpm: - build: phpdocker/php-fpm - container_name: sitemap-dev-php-fpm - working_dir: /application - volumes: - - .:/application - - ./../..:/src - - ./phpdocker/php-fpm/php-ini-overrides.ini:/etc/php/7.4/fpm/conf.d/99-overrides.ini - diff --git a/.docker/sitemap-dev-php7.4/phpdocker/README.html b/.docker/sitemap-dev-php7.4/phpdocker/README.html deleted file mode 100644 index 34f9d7d..0000000 --- a/.docker/sitemap-dev-php7.4/phpdocker/README.html +++ /dev/null @@ -1,125 +0,0 @@ - - - PHPDocker.io Readme - - - - - - -
-
-
-

PHPDocker.io generated environment

- -

Add to your project

- -

Simply, unzip the file into your project, this will create docker-compose.yml on the root of your project and a folder named phpdocker containing nginx and php-fpm config for it.

- -

Ensure the webserver config on phpdocker/nginx/nginx.conf is correct for your project. PHPDocker.io will have customised this file according to the application type you chose on the generator, for instance web/app|app_dev.php on a Symfony project, or public/index.php on generic apps.

- -

Note: you may place the files elsewhere in your project. Make sure you modify the locations for the php-fpm dockerfile, the php.ini overrides and nginx config on docker-compose.yml if you do so.

- -

How to run

- -

Dependencies:

- - - -

Once you're done, simply cd to your project and run docker-compose up -d. This will initialise and start all the containers, then leave them running in the background.

- -

Services exposed outside your environment

- -

You can access your application via localhost, if you're running the containers directly, or through `` when run on a vm. nginx and mailhog both respond to any hostname, in case you want to add your own hostname on your /etc/hosts

- - - - - - - - - - - - - - - - - - -
ServiceAddress outside containers
Webserverlocalhost:5555
MariaDBhost: localhost; port: 5558
- -

Hosts within your environment

- -

You'll need to configure your application to use any services you enabled:

- - - - - - - - - - - - - - - - - - - - - -
ServiceHostnamePort number
php-fpmphp-fpm9000
MariaDBmariadb3306 (default)
- -

Docker compose cheatsheet

- -

Note: you need to cd first to where your docker-compose.yml file lives.

- - - -

Recommendations

- -

It's hard to avoid file permission issues when fiddling about with containers due to the fact that, from your OS point of view, any files created within the container are owned by the process that runs the docker engine (this is usually root). Different OS will also have different problems, for instance you can run stuff in containers using docker exec -it -u $(id -u):$(id -g) CONTAINER_NAME COMMAND to force your current user ID into the process, but this will only work if your host OS is Linux, not mac. Follow a couple of simple rules and save yourself a world of hurt.

- - -
-
-
- - - - diff --git a/.docker/sitemap-dev-php7.4/phpdocker/README.md b/.docker/sitemap-dev-php7.4/phpdocker/README.md deleted file mode 100644 index 77cb6fd..0000000 --- a/.docker/sitemap-dev-php7.4/phpdocker/README.md +++ /dev/null @@ -1,65 +0,0 @@ -PHPDocker.io generated environment -================================== - -# Add to your project # - -Simply, unzip the file into your project, this will create `docker-compose.yml` on the root of your project and a folder named `phpdocker` containing nginx and php-fpm config for it. - -Ensure the webserver config on `phpdocker/nginx/nginx.conf` is correct for your project. PHPDocker.io will have customised this file according to the application type you chose on the generator, for instance `web/app|app_dev.php` on a Symfony project, or `public/index.php` on generic apps. - -Note: you may place the files elsewhere in your project. Make sure you modify the locations for the php-fpm dockerfile, the php.ini overrides and nginx config on `docker-compose.yml` if you do so. - -# How to run # - -Dependencies: - - * Docker engine v1.13 or higher. Your OS provided package might be a little old, if you encounter problems, do upgrade. See [https://docs.docker.com/engine/installation](https://docs.docker.com/engine/installation) - * Docker compose v1.12 or higher. See [docs.docker.com/compose/install](https://docs.docker.com/compose/install/) - -Once you're done, simply `cd` to your project and run `docker-compose up -d`. This will initialise and start all the containers, then leave them running in the background. - -## Services exposed outside your environment ## - -You can access your application via **`localhost`**, if you're running the containers directly, or through **``** when run on a vm. nginx and mailhog both respond to any hostname, in case you want to add your own hostname on your `/etc/hosts` - -Service|Address outside containers -------|---------|----------- -Webserver|[localhost:5555](http://localhost:5555) -MariaDB|**host:** `localhost`; **port:** `5558` - -## Hosts within your environment ## - -You'll need to configure your application to use any services you enabled: - -Service|Hostname|Port number -------|---------|----------- -php-fpm|php-fpm|9000 -MariaDB|mariadb|3306 (default) - -# Docker compose cheatsheet # - -**Note:** you need to cd first to where your docker-compose.yml file lives. - - * Start containers in the background: `docker-compose up -d` - * Start containers on the foreground: `docker-compose up`. You will see a stream of logs for every container running. - * Stop containers: `docker-compose stop` - * Kill containers: `docker-compose kill` - * View container logs: `docker-compose logs` - * Execute command inside of container: `docker-compose exec SERVICE_NAME COMMAND` where `COMMAND` is whatever you want to run. Examples: - * Shell into the PHP container, `docker-compose exec php-fpm bash` - * Run symfony console, `docker-compose exec php-fpm bin/console` - * Open a mysql shell, `docker-compose exec mysql mysql -uroot -pCHOSEN_ROOT_PASSWORD` - -# Application file permissions # - -As in all server environments, your application needs the correct file permissions to work proberly. You can change the files throught the container, so you won't care if the user exists or has the same id on your host. - -`sudo docker exec -it -php-fpm chown -R www-data:www-data /application/public` - - -# Recommendations # - -It's hard to avoid file permission issues when fiddling about with containers due to the fact that, from your OS point of view, any files created within the container are owned by the process that runs the docker engine (this is usually root). Different OS will also have different problems, for instance you can run stuff in containers using `docker exec -it -u $(id -u):$(id -g) CONTAINER_NAME COMMAND` to force your current user ID into the process, but this will only work if your host OS is Linux, not mac. Follow a couple of simple rules and save yourself a world of hurt. - - * Run composer outside of the php container, as doing so would install all your dependencies owned by `root` within your vendor folder. - * Run commands (ie Symfony's console, or Laravel's artisan) straight inside of your container. You can easily open a shell as described above and do your thing from there. diff --git a/.docker/sitemap-dev-php7.4/phpdocker/nginx/nginx.conf b/.docker/sitemap-dev-php7.4/phpdocker/nginx/nginx.conf deleted file mode 100644 index e650838..0000000 --- a/.docker/sitemap-dev-php7.4/phpdocker/nginx/nginx.conf +++ /dev/null @@ -1,26 +0,0 @@ -server { - listen 80 default; - - client_max_body_size 108M; - - access_log /var/log/nginx/application.access.log; - - - root /application/public; - index index.php; - - if (!-e $request_filename) { - rewrite ^.*$ /index.php last; - } - - location ~ \.php$ { - fastcgi_pass php-fpm:9000; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_param PHP_VALUE "error_log=/var/log/nginx/application_php_errors.log"; - fastcgi_buffers 16 16k; - fastcgi_buffer_size 32k; - include fastcgi_params; - } - -} diff --git a/.docker/sitemap-dev-php7.4/phpdocker/php-fpm/Dockerfile b/.docker/sitemap-dev-php7.4/phpdocker/php-fpm/Dockerfile deleted file mode 100644 index 0a5f7b7..0000000 --- a/.docker/sitemap-dev-php7.4/phpdocker/php-fpm/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM phpdockerio/php74-fpm:latest -WORKDIR "/application" - -# Fix debconf warnings upon build -ARG DEBIAN_FRONTEND=noninteractive - -# Install selected extensions and other stuff -RUN apt-get update \ - && apt-get -y --no-install-recommends install php7.4-mysql php7.4-gd \ - && apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* \ No newline at end of file diff --git a/.docker/sitemap-dev-php7.4/phpdocker/php-fpm/php-ini-overrides.ini b/.docker/sitemap-dev-php7.4/phpdocker/php-fpm/php-ini-overrides.ini deleted file mode 100644 index 850ae11..0000000 --- a/.docker/sitemap-dev-php7.4/phpdocker/php-fpm/php-ini-overrides.ini +++ /dev/null @@ -1,2 +0,0 @@ -upload_max_filesize = 100M -post_max_size = 108M diff --git a/.docker/updateTest-php7.4/docker-compose.yml b/.docker/updateTest-php7.4/docker-compose.yml deleted file mode 100644 index f82ded6..0000000 --- a/.docker/updateTest-php7.4/docker-compose.yml +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################### -# Generated on phpdocker.io # -############################################################################### -version: "3.1" -services: - - mariadb: - image: mariadb:5.5 - container_name: updatetest-mariadb - working_dir: /application - volumes: - - .:/application - - ./db:/var/lib/mysql - environment: - - MYSQL_ROOT_PASSWORD=sitemap - - MYSQL_DATABASE=sitemap - - MYSQL_USER=sitemap - - MYSQL_PASSWORD=sitemap - ports: - - "5558:3306" - - webserver: - image: nginx:alpine - container_name: updatetest-webserver - working_dir: /application - volumes: - - .:/application - - ./phpdocker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf - ports: - - "5555:80" - - php-fpm: - build: phpdocker/php-fpm - container_name: updatetest-php-fpm - working_dir: /application - volumes: - - .:/application - - ./../..:/src - - ./phpdocker/php-fpm/php-ini-overrides.ini:/etc/php/7.4/fpm/conf.d/99-overrides.ini - diff --git a/.docker/updateTest-php7.4/phpdocker/README.html b/.docker/updateTest-php7.4/phpdocker/README.html deleted file mode 100644 index 34f9d7d..0000000 --- a/.docker/updateTest-php7.4/phpdocker/README.html +++ /dev/null @@ -1,125 +0,0 @@ - - - PHPDocker.io Readme - - - - - - -
-
-
-

PHPDocker.io generated environment

- -

Add to your project

- -

Simply, unzip the file into your project, this will create docker-compose.yml on the root of your project and a folder named phpdocker containing nginx and php-fpm config for it.

- -

Ensure the webserver config on phpdocker/nginx/nginx.conf is correct for your project. PHPDocker.io will have customised this file according to the application type you chose on the generator, for instance web/app|app_dev.php on a Symfony project, or public/index.php on generic apps.

- -

Note: you may place the files elsewhere in your project. Make sure you modify the locations for the php-fpm dockerfile, the php.ini overrides and nginx config on docker-compose.yml if you do so.

- -

How to run

- -

Dependencies:

- - - -

Once you're done, simply cd to your project and run docker-compose up -d. This will initialise and start all the containers, then leave them running in the background.

- -

Services exposed outside your environment

- -

You can access your application via localhost, if you're running the containers directly, or through `` when run on a vm. nginx and mailhog both respond to any hostname, in case you want to add your own hostname on your /etc/hosts

- - - - - - - - - - - - - - - - - - -
ServiceAddress outside containers
Webserverlocalhost:5555
MariaDBhost: localhost; port: 5558
- -

Hosts within your environment

- -

You'll need to configure your application to use any services you enabled:

- - - - - - - - - - - - - - - - - - - - - -
ServiceHostnamePort number
php-fpmphp-fpm9000
MariaDBmariadb3306 (default)
- -

Docker compose cheatsheet

- -

Note: you need to cd first to where your docker-compose.yml file lives.

- -
    -
  • Start containers in the background: docker-compose up -d
  • -
  • Start containers on the foreground: docker-compose up. You will see a stream of logs for every container running.
  • -
  • Stop containers: docker-compose stop
  • -
  • Kill containers: docker-compose kill
  • -
  • View container logs: docker-compose logs
  • -
  • Execute command inside of container: docker-compose exec SERVICE_NAME COMMAND where COMMAND is whatever you want to run. Examples: - * Shell into the PHP container, docker-compose exec php-fpm bash - * Run symfony console, docker-compose exec php-fpm bin/console - * Open a mysql shell, docker-compose exec mysql mysql -uroot -pCHOSEN_ROOT_PASSWORD
  • -
- -

Recommendations

- -

It's hard to avoid file permission issues when fiddling about with containers due to the fact that, from your OS point of view, any files created within the container are owned by the process that runs the docker engine (this is usually root). Different OS will also have different problems, for instance you can run stuff in containers using docker exec -it -u $(id -u):$(id -g) CONTAINER_NAME COMMAND to force your current user ID into the process, but this will only work if your host OS is Linux, not mac. Follow a couple of simple rules and save yourself a world of hurt.

- -
    -
  • Run composer outside of the php container, as doing so would install all your dependencies owned by root within your vendor folder.
  • -
  • Run commands (ie Symfony's console, or Laravel's artisan) straight inside of your container. You can easily open a shell as described above and do your thing from there.
  • -
-
-
-
- - - - diff --git a/.docker/updateTest-php7.4/phpdocker/README.md b/.docker/updateTest-php7.4/phpdocker/README.md deleted file mode 100644 index 77cb6fd..0000000 --- a/.docker/updateTest-php7.4/phpdocker/README.md +++ /dev/null @@ -1,65 +0,0 @@ -PHPDocker.io generated environment -================================== - -# Add to your project # - -Simply, unzip the file into your project, this will create `docker-compose.yml` on the root of your project and a folder named `phpdocker` containing nginx and php-fpm config for it. - -Ensure the webserver config on `phpdocker/nginx/nginx.conf` is correct for your project. PHPDocker.io will have customised this file according to the application type you chose on the generator, for instance `web/app|app_dev.php` on a Symfony project, or `public/index.php` on generic apps. - -Note: you may place the files elsewhere in your project. Make sure you modify the locations for the php-fpm dockerfile, the php.ini overrides and nginx config on `docker-compose.yml` if you do so. - -# How to run # - -Dependencies: - - * Docker engine v1.13 or higher. Your OS provided package might be a little old, if you encounter problems, do upgrade. See [https://docs.docker.com/engine/installation](https://docs.docker.com/engine/installation) - * Docker compose v1.12 or higher. See [docs.docker.com/compose/install](https://docs.docker.com/compose/install/) - -Once you're done, simply `cd` to your project and run `docker-compose up -d`. This will initialise and start all the containers, then leave them running in the background. - -## Services exposed outside your environment ## - -You can access your application via **`localhost`**, if you're running the containers directly, or through **``** when run on a vm. nginx and mailhog both respond to any hostname, in case you want to add your own hostname on your `/etc/hosts` - -Service|Address outside containers -------|---------|----------- -Webserver|[localhost:5555](http://localhost:5555) -MariaDB|**host:** `localhost`; **port:** `5558` - -## Hosts within your environment ## - -You'll need to configure your application to use any services you enabled: - -Service|Hostname|Port number -------|---------|----------- -php-fpm|php-fpm|9000 -MariaDB|mariadb|3306 (default) - -# Docker compose cheatsheet # - -**Note:** you need to cd first to where your docker-compose.yml file lives. - - * Start containers in the background: `docker-compose up -d` - * Start containers on the foreground: `docker-compose up`. You will see a stream of logs for every container running. - * Stop containers: `docker-compose stop` - * Kill containers: `docker-compose kill` - * View container logs: `docker-compose logs` - * Execute command inside of container: `docker-compose exec SERVICE_NAME COMMAND` where `COMMAND` is whatever you want to run. Examples: - * Shell into the PHP container, `docker-compose exec php-fpm bash` - * Run symfony console, `docker-compose exec php-fpm bin/console` - * Open a mysql shell, `docker-compose exec mysql mysql -uroot -pCHOSEN_ROOT_PASSWORD` - -# Application file permissions # - -As in all server environments, your application needs the correct file permissions to work proberly. You can change the files throught the container, so you won't care if the user exists or has the same id on your host. - -`sudo docker exec -it -php-fpm chown -R www-data:www-data /application/public` - - -# Recommendations # - -It's hard to avoid file permission issues when fiddling about with containers due to the fact that, from your OS point of view, any files created within the container are owned by the process that runs the docker engine (this is usually root). Different OS will also have different problems, for instance you can run stuff in containers using `docker exec -it -u $(id -u):$(id -g) CONTAINER_NAME COMMAND` to force your current user ID into the process, but this will only work if your host OS is Linux, not mac. Follow a couple of simple rules and save yourself a world of hurt. - - * Run composer outside of the php container, as doing so would install all your dependencies owned by `root` within your vendor folder. - * Run commands (ie Symfony's console, or Laravel's artisan) straight inside of your container. You can easily open a shell as described above and do your thing from there. diff --git a/.docker/updateTest-php7.4/phpdocker/nginx/nginx.conf b/.docker/updateTest-php7.4/phpdocker/nginx/nginx.conf deleted file mode 100644 index e650838..0000000 --- a/.docker/updateTest-php7.4/phpdocker/nginx/nginx.conf +++ /dev/null @@ -1,26 +0,0 @@ -server { - listen 80 default; - - client_max_body_size 108M; - - access_log /var/log/nginx/application.access.log; - - - root /application/public; - index index.php; - - if (!-e $request_filename) { - rewrite ^.*$ /index.php last; - } - - location ~ \.php$ { - fastcgi_pass php-fpm:9000; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_param PHP_VALUE "error_log=/var/log/nginx/application_php_errors.log"; - fastcgi_buffers 16 16k; - fastcgi_buffer_size 32k; - include fastcgi_params; - } - -} diff --git a/.docker/updateTest-php7.4/phpdocker/php-fpm/Dockerfile b/.docker/updateTest-php7.4/phpdocker/php-fpm/Dockerfile deleted file mode 100644 index 0a5f7b7..0000000 --- a/.docker/updateTest-php7.4/phpdocker/php-fpm/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM phpdockerio/php74-fpm:latest -WORKDIR "/application" - -# Fix debconf warnings upon build -ARG DEBIAN_FRONTEND=noninteractive - -# Install selected extensions and other stuff -RUN apt-get update \ - && apt-get -y --no-install-recommends install php7.4-mysql php7.4-gd \ - && apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* \ No newline at end of file diff --git a/.docker/updateTest-php7.4/phpdocker/php-fpm/php-ini-overrides.ini b/.docker/updateTest-php7.4/phpdocker/php-fpm/php-ini-overrides.ini deleted file mode 100644 index 850ae11..0000000 --- a/.docker/updateTest-php7.4/phpdocker/php-fpm/php-ini-overrides.ini +++ /dev/null @@ -1,2 +0,0 @@ -upload_max_filesize = 100M -post_max_size = 108M diff --git a/build/builder.xml b/build/builder.xml index b727b5c..e5e0d58 100644 --- a/build/builder.xml +++ b/build/builder.xml @@ -11,7 +11,9 @@ - + + + @@ -55,6 +57,21 @@ + + + + + + + + + + + + + + + @@ -99,7 +116,8 @@ - + + diff --git a/components/com_schuweb_sitemap/displayer.php b/components/com_schuweb_sitemap/displayer.php index 310a3de..48e47b2 100644 --- a/components/com_schuweb_sitemap/displayer.php +++ b/components/com_schuweb_sitemap/displayer.php @@ -112,6 +112,17 @@ public function getMenuTitle($menutype,$module='mod_menu') . "LIMIT 1" ); $module = $db->loadObject(); + + if (empty($module)){ + $query = $db->getQuery(true); + $query->select($db->quoteName('title')) + ->from($db->quoteName('#__menu_types')) + ->where($db->quoteName('menutype') .' = ' .$db->quote($menutype)); + $db->setQuery($query); + } + + $module = $db->loadObject(); + if ($module) { $title = $module->title; } diff --git a/pkg_schuweb_sitemap.xml b/pkg_schuweb_sitemap.xml index 38b694c..1558c81 100644 --- a/pkg_schuweb_sitemap.xml +++ b/pkg_schuweb_sitemap.xml @@ -12,14 +12,14 @@ The Site Map generator for Joomla! install.script.php - com_schuweb_sitemap_sw.build.version_sw.build.date.zip - plg_content_sw.build.version_sw.build.date.zip - plg_kunena_sw.build.version_sw.build.date.zip - plg_sobipro_sw.build.version_sw.build.date.zip - plg_virtuemart_sw.build.version_sw.build.date.zip - + com_schuweb_sitemap_sw.build.version_sw.build.dstamp.zip + plg_content_sw.build.version_sw.build.dstamp.zip + plg_kunena_sw.build.version_sw.build.dstamp.zip + plg_sobipro_sw.build.version_sw.build.dstamp.zip + plg_virtuemart_sw.build.version_sw.build.dstamp.zip + plg_weblinks_sw.build.version_sw.build.dstamp.zip + plg_newsfeeds_sw.build.version_sw.build.dstamp.zip + plg_zoo_sw.build.version_sw.build.dstamp.zip https://raw.githubusercontent.com/svanschu/SchuWeb-Sitemap/master/update/schuweb_sitemap.xml diff --git a/plugins/schuweb_sitemap/com_kunena/com_kunena.php b/plugins/schuweb_sitemap/com_kunena/com_kunena.php index e3ebff1..62b0681 100644 --- a/plugins/schuweb_sitemap/com_kunena/com_kunena.php +++ b/plugins/schuweb_sitemap/com_kunena/com_kunena.php @@ -1,13 +1,11 @@ isNews) // This component does not provide news content. don't waste time/resources + if ($sitemap->isNews) // This component does not provide news content. don't waste time/resources return false; // Make sure that we can load the kunena api @@ -67,9 +65,9 @@ static function getTree($xmap, $parent, &$params) $include_topics = ArrayHelper::getValue($params, 'include_topics', 1); $include_topics = ($include_topics == 1 - || ($include_topics == 2 && $xmap->view == 'xml') - || ($include_topics == 3 && $xmap->view == 'html') - || $xmap->view == 'navigator'); + || ($include_topics == 2 && $sitemap->view == 'xml') + || ($include_topics == 3 && $sitemap->view == 'html') + || $sitemap->view == 'navigator'); $params['include_topics'] = $include_topics; $priority = ArrayHelper::getValue($params, 'cat_priority', $parent->priority); @@ -99,7 +97,7 @@ static function getTree($xmap, $parent, &$params) if (!in_array($ordering, array('id', 'ordering', 'time', 'subject', 'hits'))) $ordering = 'ordering'; $params['topics_order'] = 't.`' . $ordering . '`'; - $params['include_pagination'] = ($xmap->view == 'xml'); + $params['include_pagination'] = ($sitemap->view == 'xml'); $params['limit'] = 0; $params['days'] = ''; @@ -110,18 +108,18 @@ static function getTree($xmap, $parent, &$params) $days = ArrayHelper::getValue($params, 'max_age', ''); $params['days'] = false; if (intval($days)) - $params['days'] = ($xmap->now - (intval($days) * 86400)); + $params['days'] = ($sitemap->now - (intval($days) * 86400)); } $params['table_prefix'] = '#__kunena'; - schuweb_sitemap_com_kunena::getCategoryTree($xmap, $parent, $params, $catid); + schuweb_sitemap_com_kunena::getCategoryTree($sitemap, $parent, $params, $catid); } /* * Builds the Kunena's tree */ - static function getCategoryTree($xmap, $parent, &$params, $parentCat) + static function getCategoryTree($sitemap, $parent, &$params, $parentCat) { // Load categories @@ -129,7 +127,7 @@ static function getCategoryTree($xmap, $parent, &$params, $parentCat) $categories = KunenaForumCategoryHelper::getChildren($parentCat); /* get list of categories */ - $xmap->changeLevel(1); + $sitemap->changeLevel(1); foreach ($categories as $cat) { $node = new stdclass; $node->id = $parent->id; @@ -139,16 +137,19 @@ static function getCategoryTree($xmap, $parent, &$params, $parentCat) $node->priority = $params['cat_priority']; $node->changefreq = $params['cat_changefreq']; - $attribs = json_decode($xmap->sitemap->attribs); + $attribs = json_decode($sitemap->sitemap->attribs); $node->xmlInsertChangeFreq = $attribs->xmlInsertChangeFreq; $node->xmlInsertPriority = $attribs->xmlInsertPriority; $node->link = KunenaRoute::normalize('index.php?option=com_kunena&view=category&catid=' . $cat->id); $node->expandible = true; $node->secure = $parent->secure; + $node->lastmod = $parent->lastmod; - if ($xmap->printNode($node) !== FALSE) { - schuweb_sitemap_com_kunena::getCategoryTree($xmap, $parent, $params, $cat->id); + $node->modified = intval($cat->last_post_time); + + if ($sitemap->printNode($node) !== FALSE) { + schuweb_sitemap_com_kunena::getCategoryTree($sitemap, $parent, $params, $cat->id); } } @@ -177,7 +178,7 @@ static function getCategoryTree($xmap, $parent, &$params, $parentCat) $node->priority = $params['topic_priority']; $node->changefreq = $params['topic_changefreq']; - $attribs = json_decode($xmap->sitemap->attribs); + $attribs = json_decode($sitemap->sitemap->attribs); $node->xmlInsertChangeFreq = $attribs->xmlInsertChangeFreq; $node->xmlInsertPriority = $attribs->xmlInsertPriority; @@ -186,7 +187,7 @@ static function getCategoryTree($xmap, $parent, &$params, $parentCat) $node->expandible = false; $node->secure = $parent->secure; $node->lastmod = $parent->lastmod; - if ($xmap->printNode($node) !== FALSE) { + if ($sitemap->printNode($node) !== FALSE) { // Pagination will not work with K2.0, revisit this when that version is out and stable if ($params['include_pagination'] && isset($topic->msgcount) && $topic->msgcount > self::$config->messages_per_page) { $msgPerPage = self::$config->messages_per_page; @@ -208,13 +209,13 @@ static function getCategoryTree($xmap, $parent, &$params, $parentCat) $subnode->modified = $node->modified; $subnode->secure = $node->secure; $subnode->lastmod = $node->lastmod; - $xmap->printNode($subnode); + $sitemap->printNode($subnode); } } } } } - $xmap->changeLevel(-1); + $sitemap->changeLevel(-1); } private static function loadKunenaApi() diff --git a/plugins/schuweb_sitemap/com_mtree/com_mtree.php b/plugins/schuweb_sitemap/com_mtree/com_mtree.php deleted file mode 100644 index 28249da..0000000 --- a/plugins/schuweb_sitemap/com_mtree/com_mtree.php +++ /dev/null @@ -1,163 +0,0 @@ -isNews) // This component does not provide news content. don't waste time/resources - return false; - - $db = JFactory::getDbo(); - - $catid=0; - if ( strpos($parent->link, 'task=listcats') ) { - $link_query = parse_url( $parent->link ); - parse_str( html_entity_decode($link_query['query']), $link_vars); - $catid = JArrayHelper::getValue($link_vars,'cat_id',0); - } - - $include_links = JArrayHelper::getValue($params,'include_links',1); - $include_links = ( $include_links == 1 - || ( $include_links == 2 && $xmap->view == 'xml') - || ( $include_links == 3 && $xmap->view == 'html') - || $xmap->view == 'navigator'); - $params['include_links'] = $include_links; - - $priority = JArrayHelper::getValue($params,'cat_priority',$parent->priority); - $changefreq = JArrayHelper::getValue($params,'cat_changefreq',$parent->changefreq); - if ($priority == '-1') - $priority = $parent->priority; - if ($changefreq == '-1') - $changefreq = $parent->changefreq; - - $params['cat_priority'] = $priority; - $params['cat_changefreq'] = $changefreq; - - $priority = JArrayHelper::getValue($params,'link_priority',$parent->priority); - $changefreq = JArrayHelper::getValue($params,'link_changefreq',$parent->changefreq); - if ($priority == '-1') - $priority = $parent->priority; - - if ($changefreq == '-1') - $changefreq = $parent->changefreq; - - $params['link_priority'] = $priority; - $params['link_changefreq'] = $changefreq; - - $ordering = JArrayHelper::getValue($params,'cats_order','cat_name'); - $orderdir = JArrayHelper::getValue($params,'cats_orderdir','ASC'); - if ( !in_array($ordering,array('ordering','cat_name','cat_created')) ) - $ordering = 'cat_name'; - - if ( !in_array($orderdir,array('ASC','DESC')) ){ - $orderdir = 'ASC'; - } - - $params['cats_order'] = $db->quoteName($ordering)." $orderdir"; - - if ( $include_links ) { - $ordering = JArrayHelper::getValue($params,'links_order','ordering'); - $orderdir = JArrayHelper::getValue($params,'links_orderdir','ASC'); - if ( !in_array($ordering,array('ordering','link_name','link_modified','link_created','link_hits')) ) - $ordering = 'ordering'; - - if ( !in_array($orderdir,array('ASC','DESC')) ){ - $orderdir = 'ASC'; - } - - $params['links_order'] = $db->quoteName($ordering)." $orderdir"; - - $params['limit'] = ''; - $params['days'] = ''; - $limit = JArrayHelper::getValue($params,'max_links',0); - if ( intval($limit) ) - $params['limit'] = ' LIMIT '.intval($limit); - - $days = JArrayHelper::getValue($params,'max_age',''); - if ( intval($days) ) - $params['days'] = ' AND a.link_created >=\''.date('Y-m-d H:i:s',($xmap->now - ($days*86400))) ."' "; - } - - xmap_com_mtree::getMtreeCategory($xmap,$parent,$params,$catid); - } - - /* Returns URLs of all Categories and links in of one category using recursion */ - static function getMtreeCategory ($xmap, $parent, &$params, $catid ) - { - $database =& JFactory::getDbo(); - - $query = "SELECT cat_name, cat_id ". - "FROM #__mt_cats WHERE cat_published='1' AND cat_approved='1' AND cat_parent = $catid " . - "ORDER BY " . $params['cats_order']; - - $database->setQuery($query); - $rows = $database->loadObjectList(); - - $xmap->changeLevel(1); - foreach($rows as $row) { - $node = new stdclass; - $node->name = $row->cat_name; - $node->link = 'index.php?option=com_mtree&task=listcats&cat_id='.$row->cat_id.'&Itemid='.$parent->id; - $node->id = $parent->id; - $node->uid = $parent->uid .'c'.$row->cat_id; - $node->browserNav = $parent->browserNav; - $node->modified = NULL; - $node->priority = $params['cat_priority']; - $node->changefreq = $params['cat_changefreq']; - $node->expandible = true; - $node->secure = $parent->secure; - $node->lastmod = $parent->lastmod; - - if ( $xmap->printNode($node) !== FALSE) { - xmap_com_mtree::getMtreeCategory($xmap,$parent,$params,$row->cat_id); - } - } - - /* Returns URLs of all listings in the current category */ - if ($params['include_links']) { - $query = " SELECT a.link_name, a.link_id, a.link_created as created, a.link_modified as modified \n". - " FROM #__mt_links AS a, #__mt_cl as b \n". - " WHERE a.link_id = b.link_id \n". - " AND b.cat_id = $catid " . - " AND ( link_published='1' AND link_approved='1' ) " . - $params['days'] . - " ORDER BY " . $params['links_order'] . - $params['limit']; - - $database->setQuery($query); - - $rows = $database->loadObjectList(); - - foreach($rows as $row) { - if ( !$row->modified || ($row->modified == $database->getNullDate())) { - $row->modified = $row->created; - } - - $node = new stdclass; - $node->name = $row->link_name; - $node->link = 'index.php?option=com_mtree&task=viewlink&link_id='.$row->link_id.'&Itemid='.$parent->id; - $node->id = $parent->id; - $node->uid = $parent->uid.'l'.$row->link_id; - $node->browserNav = $parent->browserNav; - $node->modified = $row->modified; - $node->priority = $params['link_priority']; - $node->changefreq = $params['link_changefreq']; - $node->expandible = false; - $node->secure = $parent->secure; - $node->lastmod = $parent->lastmod; - $xmap->printNode($node); - } - } - $xmap->changeLevel(-1); - - } -} diff --git a/plugins/schuweb_sitemap/com_mtree/com_mtree.xml b/plugins/schuweb_sitemap/com_mtree/com_mtree.xml deleted file mode 100755 index a63daa8..0000000 --- a/plugins/schuweb_sitemap/com_mtree/com_mtree.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - Xmap - Mosets Tree Plugin - Guillermo Vargas - sw.build.date - GNU GPL - http://www.gnu.org/copyleft/gpl.html GNU/GPL - guille@vargas.co.cr - joomla.vargas.co.cr - sw.build.version - SCHUWEB_SITEMAP_MTREE_PLUGIN_DESCRIPTION - - com_mtree.php - index.html - - - - en-GB.plg_schuweb_sitemap_com_mtree.ini - es-ES.plg_schuweb_sitemap_com_mtree.ini - fa-IR.plg_schuweb_sitemap_com_mtree.ini - cs-CZ.plg_schuweb_sitemap_com_mtree.ini - nl-NL.plg_schuweb_sitemap_com_mtree.ini - ru-RU.plg_schuweb_sitemap_com_mtree.ini - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
diff --git a/plugins/schuweb_sitemap/com_mtree/language/cs-CZ.plg_xmap_com_mtree.ini b/plugins/schuweb_sitemap/com_mtree/language/cs-CZ.plg_xmap_com_mtree.ini deleted file mode 100644 index cfaa50c..0000000 --- a/plugins/schuweb_sitemap/com_mtree/language/cs-CZ.plg_xmap_com_mtree.ini +++ /dev/null @@ -1,49 +0,0 @@ -SCHUWEB_SITEMAP_MTREE_PLUGIN_DESCRIPTION="Přidá podporu pro komponentu Virtuemart Mosets Tree" -SCHUWEB_SITEMAP_SETTING_SHOW_LISTINGS_LABEL="Zobrazit záznamy?" -SCHUWEB_SITEMAP_SETTING_SHOW_LISTINGS_DESC="Mají být jednotlivé záznamy zahrnuty do mapy stránek?" -SCHUWEB_SITEMAP_SETTING_MAX_ENTRIES_LABEL="Max. počet" -SCHUWEB_SITEMAP_SETTING_MAX_ENTRIES_DESC="Maximální počet záznamů v kategorii, které se zahrnou do mapy stránek (prázdné znamená bez omezení)" -SCHUWEB_SITEMAP_SETTING_CATEGORIES_ORDER_LABEL="Řazení kategorií" -SCHUWEB_SITEMAP_SETTING_CATEGORIES_ORDER_DESC="Jak mají být kategorie v mapě stránek seřazeny?" -SCHUWEB_SITEMAP_SETTING_CATEGORIES_ORDER_DIR_LABEL="Způsob řazení kategorií" -SCHUWEB_SITEMAP_SETTING_CATEGORIES_ORDER_DIR_DESC="Jakým způsobem mají být kategorie v mapě stránek seřazeny?" -SCHUWEB_SITEMAP_SETTING_LISTINGS_ORDER_LABEL="Řazení záznamů" -SCHUWEB_SITEMAP_SETTING_LISTINGS_ORDER_DESC="Jak mají být záznamy v mapě stránek seřazeny?" -SCHUWEB_SITEMAP_SETTING_LISTINGS_ORDER_DIR_LABEL="Způsob řazení záznamů" -SCHUWEB_SITEMAP_SETTING_LISTINGS_ORDER_DIR_DESC="Jakým způsobem mají být záznamy v mapě stránek seřazeny?" -SCHUWEB_SITEMAP_SETTING_LISTINGS_NEWER_THAN_LABEL="Novější než" -SCHUWEB_SITEMAP_SETTING_LISTINGS_NEWER_THAN_DESC="Zobrazovat pouze záznamy novější než zde uvedený počet dní (ponechte prázdné pro zobrazení všech záznamů)" - -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_DEFAULT="Výchozí řazení" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_NAME="Název" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_CREATED="Datum vytvoření" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_MODIFIED="Datum úpravy" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_HITS="Počet zobrazení" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_DIR_ASC="Vzestupně" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_DIR_DESC="Sestupně" - -; Generic Extension settings strings -COM_PLUGINS_BASIC_FIELDSET_LABEL="Základní nastavení" -COM_PLUGINS_XML_FIELDSET_LABEL="Nastavení XML verze" -COM_PLUGINS_NEWS_FIELDSET_LABEL="Nastavení News verze" -SCHUWEB_SITEMAP_OPTION_USE_PARENT_MENU="Použít nastavení nadřazené položky menu" -SCHUWEB_SITEMAP_OPTION_NEVER="Nikdy" -SCHUWEB_SITEMAP_OPTION_ALWAYS="Vždy" -SCHUWEB_SITEMAP_OPTION_XML_ONLY="Pouze v XML verzi" -SCHUWEB_SITEMAP_OPTION_HTML_ONLY="Pouze v HTML verzi" -SCHUWEB_SITEMAP_OPTION_WEEKLY="Týdně" -SCHUWEB_SITEMAP_OPTION_DAILY="Denně" -SCHUWEB_SITEMAP_OPTION_MONTHLY="Měsíčně" -SCHUWEB_SITEMAP_OPTION_YEARLY="Ročně" -SCHUWEB_SITEMAP_OPTION_HOURLY="Každou hodinu" - -; Added by JoomlaCommunity.eu - -SCHUWEB_SITEMAP_MTREE_CATEGORY_PRIORITY_LABEL="Priorita kategorií" -SCHUWEB_SITEMAP_MTREE_CATEGORY_PRIORITY_DESC="Nastavte prioritu kategorí" -SCHUWEB_SITEMAP_MTREE_CATEGORY_CHANGEFREQ_LABEL="Četnost změn kategorií" -SCHUWEB_SITEMAP_MTREE_CATEGORY_CHANGEFREQ_DESC="Nastavte četnost změn kategorií" -SCHUWEB_SITEMAP_MTREE_LISTING_PRIORITY_LABEL="Priorita záznamů" -SCHUWEB_SITEMAP_MTREE_LISTING_PRIORITY_DESC="Nastavte prioritu záznamů" -SCHUWEB_SITEMAP_MTREE_LISTING_CHANGEFREQ_LABEL="Četnost změn záznamů" -SCHUWEB_SITEMAP_MTREE_LISTING_CHANGEFREQ_DESC="Nastavte četnost změn záznamů" diff --git a/plugins/schuweb_sitemap/com_mtree/language/en-GB.plg_xmap_com_mtree.ini b/plugins/schuweb_sitemap/com_mtree/language/en-GB.plg_xmap_com_mtree.ini deleted file mode 100755 index 28a2eb0..0000000 --- a/plugins/schuweb_sitemap/com_mtree/language/en-GB.plg_xmap_com_mtree.ini +++ /dev/null @@ -1,49 +0,0 @@ -SCHUWEB_SITEMAP_MTREE_PLUGIN_DESCRIPTION="AddS support for Mosets Tree categories and listings" -SCHUWEB_SITEMAP_SETTING_SHOW_LISTINGS_LABEL="Show listings?" -SCHUWEB_SITEMAP_SETTING_SHOW_LISTINGS_DESC="Should we include listings into the site map?" -SCHUWEB_SITEMAP_SETTING_MAX_ENTRIES_LABEL="Max listings per cat." -SCHUWEB_SITEMAP_SETTING_MAX_ENTRIES_DESC="Max number of listings per category to include on sitemap (Leave empty for no limit)" -SCHUWEB_SITEMAP_SETTING_CATEGORIES_ORDER_LABEL="Categories order" -SCHUWEB_SITEMAP_SETTING_CATEGORIES_ORDER_DESC="How to order the categories listed on your sitemap?" -SCHUWEB_SITEMAP_SETTING_CATEGORIES_ORDER_DIR_LABEL="Order direction" -SCHUWEB_SITEMAP_SETTING_CATEGORIES_ORDER_DIR_DESC="How should the categories be ordered in the sitemap?" -SCHUWEB_SITEMAP_SETTING_LISTINGS_ORDER_LABEL="Listings order" -SCHUWEB_SITEMAP_SETTING_LISTINGS_ORDER_DESC="How to order the listings listed on your sitemap?" -SCHUWEB_SITEMAP_SETTING_LISTINGS_ORDER_DIR_LABEL="Order direction" -SCHUWEB_SITEMAP_SETTING_LISTINGS_ORDER_DIR_DESC="How should the listings be ordered in the sitemap?" -SCHUWEB_SITEMAP_SETTING_LISTINGS_NEWER_THAN_LABEL="Newer than" -SCHUWEB_SITEMAP_SETTING_LISTINGS_NEWER_THAN_DESC="Only show links newer than this number of days (Leave it blank to ignore this option)" - -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_DEFAULT="Default ordering" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_NAME="Name" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_CREATED="Creation date" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_MODIFIED="Modified date" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_HITS="Number of hits" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_DIR_ASC="Ascendant" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_DIR_DESC="Descendant" - -; Generic Extension settings strings -COM_PLUGINS_BASIC_FIELDSET_LABEL="Basic Settings" -COM_PLUGINS_XML_FIELDSET_LABEL="XML Sitemap Settings" -COM_PLUGINS_NEWS_FIELDSET_LABEL="News Sitemap Settings" -SCHUWEB_SITEMAP_OPTION_USE_PARENT_MENU="Use Parent Menu Settings" -SCHUWEB_SITEMAP_OPTION_NEVER="Never" -SCHUWEB_SITEMAP_OPTION_ALWAYS="Always" -SCHUWEB_SITEMAP_OPTION_XML_ONLY="In XML Sitemap Only" -SCHUWEB_SITEMAP_OPTION_HTML_ONLY="In HTML Sitemap Only" -SCHUWEB_SITEMAP_OPTION_WEEKLY="Weekly" -SCHUWEB_SITEMAP_OPTION_DAILY="Daily" -SCHUWEB_SITEMAP_OPTION_MONTHLY="Monthly" -SCHUWEB_SITEMAP_OPTION_YEARLY="Yearly" -SCHUWEB_SITEMAP_OPTION_HOURLY="Hourly" - -; Added by JoomlaCommunity.eu - -SCHUWEB_SITEMAP_MTREE_CATEGORY_PRIORITY_LABEL="Category Priority" -SCHUWEB_SITEMAP_MTREE_CATEGORY_PRIORITY_DESC="Set the priority for the categories" -SCHUWEB_SITEMAP_MTREE_CATEGORY_CHANGEFREQ_LABEL="Category Change frequency" -SCHUWEB_SITEMAP_MTREE_CATEGORY_CHANGEFREQ_DESC="Set the change frequency for the categories" -SCHUWEB_SITEMAP_MTREE_LISTING_PRIORITY_LABEL="Listing Priority" -SCHUWEB_SITEMAP_MTREE_LISTING_PRIORITY_DESC="Set the priority for the links" -SCHUWEB_SITEMAP_MTREE_LISTING_CHANGEFREQ_LABEL="Listing Change frequency" -SCHUWEB_SITEMAP_MTREE_LISTING_CHANGEFREQ_DESC="Set the chage frequency for the links" diff --git a/plugins/schuweb_sitemap/com_mtree/language/es-ES.plg_xmap_com_mtree.ini b/plugins/schuweb_sitemap/com_mtree/language/es-ES.plg_xmap_com_mtree.ini deleted file mode 100644 index e49d32f..0000000 --- a/plugins/schuweb_sitemap/com_mtree/language/es-ES.plg_xmap_com_mtree.ini +++ /dev/null @@ -1,47 +0,0 @@ -SCHUWEB_SITEMAP_MTREE_PLUGIN_DESCRIPTION="AddS support for Mosets Tree categories and listings" -SCHUWEB_SITEMAP_SETTING_SHOW_LISTINGS_LABEL="Show listings?" -SCHUWEB_SITEMAP_SETTING_SHOW_LISTINGS_DESC="Should we include listings into the site map?" -SCHUWEB_SITEMAP_SETTING_MAX_ENTRIES_LABEL="Max listings per cat." -SCHUWEB_SITEMAP_SETTING_MAX_ENTRIES_DESC="Max number of listings per category to include on sitemap (Leave empty for no limit)" -SCHUWEB_SITEMAP_SETTING_CATEGORIES_ORDER_LABEL="Categories order" -SCHUWEB_SITEMAP_SETTING_CATEGORIES_ORDER_DESC="How to order the categories listed on your sitemap?" -SCHUWEB_SITEMAP_SETTING_CATEGORIES_ORDER_DIR_LABEL="Order direction" -SCHUWEB_SITEMAP_SETTING_CATEGORIES_ORDER_DIR_DESC="How should the categories be ordered in the sitemap?" -SCHUWEB_SITEMAP_SETTING_LISTINGS_ORDER_LABEL="Listings order" -SCHUWEB_SITEMAP_SETTING_LISTINGS_ORDER_DESC="How to order the listings listed on your sitemap?" -SCHUWEB_SITEMAP_SETTING_LISTINGS_ORDER_DIR_LABEL="Order direction" -SCHUWEB_SITEMAP_SETTING_LISTINGS_ORDER_DIR_DESC="How should the listings be ordered in the sitemap?" -SCHUWEB_SITEMAP_SETTING_LISTINGS_NEWER_THAN_LABEL="Newer than" -SCHUWEB_SITEMAP_SETTING_LISTINGS_NEWER_THAN_DESC="Only show links newer than this number of days (Leave it blank to ignore this option)" - -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_DEFAULT="Default ordering" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_NAME="Name" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_CREATED="Creation date" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_MODIFIED="Modified date" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_HITS="Number of hits" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_DIR_ASC="Ascendant" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_DIR_DESC="Descendant" - -; Generic Extension settings strings -COM_PLUGINS_BASIC_FIELDSET_LABEL="Basic Settings" -COM_PLUGINS_XML_FIELDSET_LABEL="XML Sitemap Settings" -COM_PLUGINS_NEWS_FIELDSET_LABEL="News Sitemap Settings" -SCHUWEB_SITEMAP_OPTION_USE_PARENT_MENU="Use Parent Menu Settings" -SCHUWEB_SITEMAP_OPTION_NEVER="Never" -SCHUWEB_SITEMAP_OPTION_ALWAYS="Always" -SCHUWEB_SITEMAP_OPTION_XML_ONLY="In XML Sitemap Only" -SCHUWEB_SITEMAP_OPTION_HTML_ONLY="In HTML Sitemap Only" -SCHUWEB_SITEMAP_OPTION_WEEKLY="Weekly" -SCHUWEB_SITEMAP_OPTION_DAILY="Daily" -SCHUWEB_SITEMAP_OPTION_MONTHLY="Monthly" -SCHUWEB_SITEMAP_OPTION_YEARLY="Yearly" -SCHUWEB_SITEMAP_OPTION_HOURLY="Hourly" - -SCHUWEB_SITEMAP_MTREE_CATEGORY_PRIORITY_LABEL="Category Priority" -SCHUWEB_SITEMAP_MTREE_CATEGORY_PRIORITY_DESC="Set the priority for the categories" -SCHUWEB_SITEMAP_MTREE_CATEGORY_CHANGEFREQ_LABEL="Category Change frequency" -SCHUWEB_SITEMAP_MTREE_CATEGORY_CHANGEFREQ_DESC="Set the change frequency for the categories" -SCHUWEB_SITEMAP_MTREE_LISTING_PRIORITY_LABEL="Listing Priority" -SCHUWEB_SITEMAP_MTREE_LISTING_PRIORITY_DESC="Set the priority for the links" -SCHUWEB_SITEMAP_MTREE_LISTING_CHANGEFREQ_LABEL="Listing Change frequency" -SCHUWEB_SITEMAP_MTREE_LISTING_CHANGEFREQ_DESC="Set the chage frequency for the links" \ No newline at end of file diff --git a/plugins/schuweb_sitemap/com_mtree/language/fa-IR.plg_xmap_com_mtree.ini b/plugins/schuweb_sitemap/com_mtree/language/fa-IR.plg_xmap_com_mtree.ini deleted file mode 100644 index e45496d..0000000 --- a/plugins/schuweb_sitemap/com_mtree/language/fa-IR.plg_xmap_com_mtree.ini +++ /dev/null @@ -1,60 +0,0 @@ -; @package Joomla 2.5 -; @subpackage SchuWeb Sitemap -; @description فارسی - ایران -; @version 2.2.1 -; @date 2012-09-02 -; @author محمد حسنی اقتدار -; @copyright http://joomlacode.org/gf/project/farsilanguage -; @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL -; @note Client Administrator -; @note All ini files need to be saved as UTF-8 - No BOM - -SCHUWEB_SITEMAP_MTREE_PLUGIN_DESCRIPTION="پشتیبانی از مجموعه های فهرست ساز را به نقشه سایت می افزاید" -SCHUWEB_SITEMAP_SETTING_SHOW_LISTINGS_LABEL="نمایش فهرست ها" -SCHUWEB_SITEMAP_SETTING_SHOW_LISTINGS_DESC="آیا فهرست ها در نقشه سایت نمایش داده شوند؟" -SCHUWEB_SITEMAP_SETTING_MAX_ENTRIES_LABEL="حداکثر فهرست ها در هر مجموعه" -SCHUWEB_SITEMAP_SETTING_MAX_ENTRIES_DESC="حداکثر تعداد فهرست های هر مجموعه جهت نمایش در نقشه سایت (جهت نمایش همه فهرست ها، خالی بگذارید)" -SCHUWEB_SITEMAP_SETTING_CATEGORIES_ORDER_LABEL="ترتیب مجموعه ها" -SCHUWEB_SITEMAP_SETTING_CATEGORIES_ORDER_DESC="نحوه مرتب سازی مجموعه ها در نقشه سایت؟" -SCHUWEB_SITEMAP_SETTING_CATEGORIES_ORDER_DIR_LABEL="جهت مرتب سازی" -SCHUWEB_SITEMAP_SETTING_CATEGORIES_ORDER_DIR_DESC="نحوه مرتب سازی مجموعه ها در نقشه سایت؟" -SCHUWEB_SITEMAP_SETTING_LISTINGS_ORDER_LABEL="ترتیب فهرست ها" -SCHUWEB_SITEMAP_SETTING_LISTINGS_ORDER_DESC="نحوه مرتب سازی فهرست ها در نقشه سایت؟" -SCHUWEB_SITEMAP_SETTING_LISTINGS_ORDER_DIR_LABEL="جهت مرتب سازی" -SCHUWEB_SITEMAP_SETTING_LISTINGS_ORDER_DIR_DESC="نحوه مرتب سازی فهرست ها در نقشه سایت؟" -SCHUWEB_SITEMAP_SETTING_LISTINGS_NEWER_THAN_LABEL="جدیدتر از" -SCHUWEB_SITEMAP_SETTING_LISTINGS_NEWER_THAN_DESC="نمایش فقط مباحثی که جدیدتر از این تعداد روز هستند (جهت نادیده گرفتن این گزینه، آن را خالی بگذارید)" - -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_DEFAULT="ترتیب پیش فرض" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_NAME="نام" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_CREATED="تاریخ ایجاد" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_MODIFIED="تاریخ ویرایش" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_HITS="تعداد بازدید" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_DIR_ASC="صعودی" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_DIR_DESC="نزولی" - -; Generic Extension settings strings -COM_PLUGINS_BASIC_FIELDSET_LABEL="تنظیمات پایه" -COM_PLUGINS_XML_FIELDSET_LABEL="تنظیمات نقشه سایت XML" -COM_PLUGINS_NEWS_FIELDSET_LABEL="تنظیمات نقشه سایت خبری" -SCHUWEB_SITEMAP_OPTION_USE_PARENT_MENU="استفاده از تنظیمات منوی مرجع" -SCHUWEB_SITEMAP_OPTION_NEVER="هرگز" -SCHUWEB_SITEMAP_OPTION_ALWAYS="همیشه" -SCHUWEB_SITEMAP_OPTION_XML_ONLY="فقط در نقشه سایت XML" -SCHUWEB_SITEMAP_OPTION_HTML_ONLY="فقط در نقشه سایت HTML" -SCHUWEB_SITEMAP_OPTION_WEEKLY="هفتگی" -SCHUWEB_SITEMAP_OPTION_DAILY="روزانه" -SCHUWEB_SITEMAP_OPTION_MONTHLY="ماهانه" -SCHUWEB_SITEMAP_OPTION_YEARLY="سالانه" -SCHUWEB_SITEMAP_OPTION_HOURLY="ساعتی" - -; Added by JoomlaCommunity.eu - -SCHUWEB_SITEMAP_MTREE_CATEGORY_PRIORITY_LABEL="اولویت مجموعه ها" -SCHUWEB_SITEMAP_MTREE_CATEGORY_PRIORITY_DESC="تنظیم اولویت مجموعه ها" -SCHUWEB_SITEMAP_MTREE_CATEGORY_CHANGEFREQ_LABEL="فرکانس تغییر مجموعه ها" -SCHUWEB_SITEMAP_MTREE_CATEGORY_CHANGEFREQ_DESC="تنظیم فرکانس تغییر مجموعه ها" -SCHUWEB_SITEMAP_MTREE_LISTING_PRIORITY_LABEL="اولویت فهرست ها" -SCHUWEB_SITEMAP_MTREE_LISTING_PRIORITY_DESC="تنظیم اولویت فهرست ها" -SCHUWEB_SITEMAP_MTREE_LISTING_CHANGEFREQ_LABEL="فرکانس تغییر فهرست ها" -SCHUWEB_SITEMAP_MTREE_LISTING_CHANGEFREQ_DESC="تنظیم فرکانس تغییر فهرست ها" diff --git a/plugins/schuweb_sitemap/com_mtree/language/nl-NL.plg_xmap_com_mtree.ini b/plugins/schuweb_sitemap/com_mtree/language/nl-NL.plg_xmap_com_mtree.ini deleted file mode 100644 index f869894..0000000 --- a/plugins/schuweb_sitemap/com_mtree/language/nl-NL.plg_xmap_com_mtree.ini +++ /dev/null @@ -1,49 +0,0 @@ -SCHUWEB_SITEMAP_MTREE_PLUGIN_DESCRIPTION="Voegt ondersteuning voor Mosets Tree categorieën en lijsten toe" -SCHUWEB_SITEMAP_SETTING_SHOW_LISTINGS_LABEL="Toon lijsten?" -SCHUWEB_SITEMAP_SETTING_SHOW_LISTINGS_DESC="Moeten lijsten in de sitemap opgenomen worden?" -SCHUWEB_SITEMAP_SETTING_MAX_ENTRIES_LABEL="Max aantal lijsten per cat." -SCHUWEB_SITEMAP_SETTING_MAX_ENTRIES_DESC="Max aantal lijsten per categorie die moeten worden opgenomen in de sitemap (Laat leeg voor geen limiet)" -SCHUWEB_SITEMAP_SETTING_CATEGORIES_ORDER_LABEL="Categorieën volgorde" -SCHUWEB_SITEMAP_SETTING_CATEGORIES_ORDER_DESC="Hoe moeten de categorieën gesorteerd worden die in de sitemap getoond worden?" -SCHUWEB_SITEMAP_SETTING_CATEGORIES_ORDER_DIR_LABEL="Volgorde richting" -SCHUWEB_SITEMAP_SETTING_CATEGORIES_ORDER_DIR_DESC="In welke richting moeten de categorieën gesorteerd worden in de sitemap?" -SCHUWEB_SITEMAP_SETTING_LISTINGS_ORDER_LABEL="Lijst volgorde" -SCHUWEB_SITEMAP_SETTING_LISTINGS_ORDER_DESC="Hoe moeten de lijsten gesorteerd worden in uw sitemap?" -SCHUWEB_SITEMAP_SETTING_LISTINGS_ORDER_DIR_LABEL="Volgorde richting" -SCHUWEB_SITEMAP_SETTING_LISTINGS_ORDER_DIR_DESC="In welke richting moeten de lijsten gesorteerd worden in uw sitemap?" -SCHUWEB_SITEMAP_SETTING_LISTINGS_NEWER_THAN_LABEL="Nieuwer dan" -SCHUWEB_SITEMAP_SETTING_LISTINGS_NEWER_THAN_DESC="Toon alleen links jonger dan dit aantal dagen (Laat leeg om deze optie te negeren)" - -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_DEFAULT="Standaard volgorde" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_NAME="Naam" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_CREATED="Aanmaakdatum" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_MODIFIED="Wijzigingsdatum" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_HITS="Aantal hits" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_DIR_ASC="Oplopend" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_DIR_DESC="Aflopend" - -; Generic Extension settings strings -COM_PLUGINS_BASIC_FIELDSET_LABEL="Standaard instellingen" -COM_PLUGINS_XML_FIELDSET_LABEL="XML sitemap instellingen" -COM_PLUGINS_NEWS_FIELDSET_LABEL="Nieuws sitemap instellingen" -SCHUWEB_SITEMAP_OPTION_USE_PARENT_MENU="Gebruik Hoofdmenu instellingen" -SCHUWEB_SITEMAP_OPTION_NEVER="Nooit" -SCHUWEB_SITEMAP_OPTION_ALWAYS="Altijd" -SCHUWEB_SITEMAP_OPTION_XML_ONLY="Alleen in XML sitemap" -SCHUWEB_SITEMAP_OPTION_HTML_ONLY="Alleen in HTML sitemap" -SCHUWEB_SITEMAP_OPTION_WEEKLY="Wekelijks" -SCHUWEB_SITEMAP_OPTION_DAILY="Dagelijks" -SCHUWEB_SITEMAP_OPTION_MONTHLY="Maandelijks" -SCHUWEB_SITEMAP_OPTION_YEARLY="Jaarlijks" -SCHUWEB_SITEMAP_OPTION_HOURLY="Ieder uur" - -; Added by JoomlaCommunity.eu - -SCHUWEB_SITEMAP_MTREE_CATEGORY_PRIORITY_LABEL="Prioriteit van categorieën" -SCHUWEB_SITEMAP_MTREE_CATEGORY_PRIORITY_DESC="Stel de prioriteit van de categorieën in" -SCHUWEB_SITEMAP_MTREE_CATEGORY_CHANGEFREQ_LABEL="Wijzigfrequentie van categorieën" -SCHUWEB_SITEMAP_MTREE_CATEGORY_CHANGEFREQ_DESC="Stel de wijzigfrequentie van categorieën in" -SCHUWEB_SITEMAP_MTREE_LISTING_PRIORITY_LABEL="Prioriteit van de lijsten" -SCHUWEB_SITEMAP_MTREE_LISTING_PRIORITY_DESC="Stel de prioriteit van de links in" -SCHUWEB_SITEMAP_MTREE_LISTING_CHANGEFREQ_LABEL="Wijzigfrequentie van lijsten" -SCHUWEB_SITEMAP_MTREE_LISTING_CHANGEFREQ_DESC="Stel de wijzigfrequentie van links in" diff --git a/plugins/schuweb_sitemap/com_mtree/language/ru-RU.plg_xmap_com_mtree.ini b/plugins/schuweb_sitemap/com_mtree/language/ru-RU.plg_xmap_com_mtree.ini deleted file mode 100644 index d84ce76..0000000 --- a/plugins/schuweb_sitemap/com_mtree/language/ru-RU.plg_xmap_com_mtree.ini +++ /dev/null @@ -1,49 +0,0 @@ -SCHUWEB_SITEMAP_MTREE_PLUGIN_DESCRIPTION="Плагин добавляет ​поддержку для категорий и списков Mosets Tree" -SCHUWEB_SITEMAP_SETTING_SHOW_LISTINGS_LABEL="Показать списки?" -SCHUWEB_SITEMAP_SETTING_SHOW_LISTINGS_DESC="Нужно ли содержать списки в карте сайта?" -SCHUWEB_SITEMAP_SETTING_MAX_ENTRIES_LABEL="Макс. списков в категории" -SCHUWEB_SITEMAP_SETTING_MAX_ENTRIES_DESC="Максимальное количество списков из категории для внесения в карту сайта (оставьте поле пустым, чтобы не иметь ограничения)" -SCHUWEB_SITEMAP_SETTING_CATEGORIES_ORDER_LABEL="Сортировка категорий" -SCHUWEB_SITEMAP_SETTING_CATEGORIES_ORDER_DESC="Как упорядочить категории перечисленные в карте сайта?" -SCHUWEB_SITEMAP_SETTING_CATEGORIES_ORDER_DIR_LABEL="Направление сортировки" -SCHUWEB_SITEMAP_SETTING_CATEGORIES_ORDER_DIR_DESC="Как должны располагаться категории в карте сайта?" -SCHUWEB_SITEMAP_SETTING_LISTINGS_ORDER_LABEL="Сортировка списков" -SCHUWEB_SITEMAP_SETTING_LISTINGS_ORDER_DESC="Как упорядочить списки перечисленные в карте сайта?" -SCHUWEB_SITEMAP_SETTING_LISTINGS_ORDER_DIR_LABEL="Направление сортировки" -SCHUWEB_SITEMAP_SETTING_LISTINGS_ORDER_DIR_DESC="Как должны располагаться списки в карте сайта?" -SCHUWEB_SITEMAP_SETTING_LISTINGS_NEWER_THAN_LABEL="Новее, чем" -SCHUWEB_SITEMAP_SETTING_LISTINGS_NEWER_THAN_DESC="Показывать ссылки только новее, чем это количество дней (оставьте это поле пустым, чтобы игнорировать эту опцию)" - -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_DEFAULT="по умолчанию" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_NAME="по названию" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_CREATED="по дате создания" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_MODIFIED="по дате изменения" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_HITS="по просмотрам" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_DIR_ASC="по возрастанию" -SCHUWEB_SITEMAP_SETTING_OPTION_ORDERING_DIR_DESC="по убыванию" - -; Generic Extension settings strings -COM_PLUGINS_BASIC_FIELDSET_LABEL="Основные настройки" -COM_PLUGINS_XML_FIELDSET_LABEL="Настройки XML карты" -COM_PLUGINS_NEWS_FIELDSET_LABEL="Настройки новостей карты сайта" -SCHUWEB_SITEMAP_OPTION_USE_PARENT_MENU="Использовать настройки родительского меню" -SCHUWEB_SITEMAP_OPTION_NEVER="Никогда" -SCHUWEB_SITEMAP_OPTION_ALWAYS="Всегда" -SCHUWEB_SITEMAP_OPTION_XML_ONLY="Только в XML карте" -SCHUWEB_SITEMAP_OPTION_HTML_ONLY="Только в HTML карте" -SCHUWEB_SITEMAP_OPTION_WEEKLY="Еженедельно" -SCHUWEB_SITEMAP_OPTION_DAILY="Ежедневно" -SCHUWEB_SITEMAP_OPTION_MONTHLY="Ежемесячно" -SCHUWEB_SITEMAP_OPTION_YEARLY="Ежегодно" -SCHUWEB_SITEMAP_OPTION_HOURLY="Ежечасно" - -; Added by JoomlaCommunity.eu - -SCHUWEB_SITEMAP_MTREE_CATEGORY_PRIORITY_LABEL="Приоритет категории" -SCHUWEB_SITEMAP_MTREE_CATEGORY_PRIORITY_DESC="Задайте приоритет для категорий" -SCHUWEB_SITEMAP_MTREE_CATEGORY_CHANGEFREQ_LABEL="Частота изменения категории" -SCHUWEB_SITEMAP_MTREE_CATEGORY_CHANGEFREQ_DESC="Задайте частоту изменения для категорий" -SCHUWEB_SITEMAP_MTREE_LISTING_PRIORITY_LABEL="Приоритете списка" -SCHUWEB_SITEMAP_MTREE_LISTING_PRIORITY_DESC="Задайте приоритет для ссылки" -SCHUWEB_SITEMAP_MTREE_LISTING_CHANGEFREQ_LABEL="Частота изменения списка" -SCHUWEB_SITEMAP_MTREE_LISTING_CHANGEFREQ_DESC="Задайте частоту изменения для ссылки" diff --git a/plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.php b/plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.php new file mode 100644 index 0000000..11ead0a --- /dev/null +++ b/plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.php @@ -0,0 +1,187 @@ +link); + parse_str(html_entity_decode($newsfeed_query['query']), $newsfeed_vars); + $view = ArrayHelper::getValue($newsfeed_vars, 'view', ''); + if ($view == 'newsfeed') { + $id = intval(ArrayHelper::getValue($newsfeed_vars, 'id', 0)); + if ($id) { + $node->uid = 'com_newsfeedsi' . $id; + $node->expandible = false; + } + } elseif ($view == 'categories') { + $node->uid = 'com_newsfeedscategories'; + $node->expandible = true; + } elseif ($view == 'category') { + $catid = intval(ArrayHelper::getValue($newsfeed_vars, 'id', 0)); + $node->uid = 'com_newsfeedsc' . $catid; + $node->expandible = true; + } + } + + static function getTree($sitemap, $parent, &$params) + { + self::initialize($params); + + $app = JFactory::getApplication(); + $newsfeeds_params = $app->getParams('com_newsfeeds'); + + $newsfeed_query = parse_url($parent->link); + parse_str(html_entity_decode($newsfeed_query['query']), $newsfeed_vars); + $view = ArrayHelper::getValue($newsfeed_vars, 'view', 0); + + $app = JFactory::getApplication(); + $menu = $app->getMenu(); + $menuparams = $menu->getParams($parent->id); + + if ($view == 'category') { + $catid = intval(ArrayHelper::getValue($newsfeed_vars, 'id', 0)); + } elseif ($view == 'categories') { + $catid = 0; + } else { // Only expand category menu items + return; + } + + $include_newsfeeds = ArrayHelper::getValue($params, 'include_newsfeeds', 1, ''); + $include_newsfeeds = ( $include_newsfeeds == 1 + || ( $include_newsfeeds == 2 && $sitemap->view == 'xml') + || ( $include_newsfeeds == 3 && $sitemap->view == 'html') + || $sitemap->view == 'navigator'); + $params['include_newsfeeds'] = $include_newsfeeds; + + $priority = ArrayHelper::getValue($params, 'cat_priority', $parent->priority, ''); + $changefreq = ArrayHelper::getValue($params, 'cat_changefreq', $parent->changefreq, ''); + if ($priority == '-1') + $priority = $parent->priority; + if ($changefreq == '-1') + $changefreq = $parent->changefreq; + + $params['cat_priority'] = $priority; + $params['cat_changefreq'] = $changefreq; + + $priority = ArrayHelper::getValue($params, 'newsfeed_priority', $parent->priority, ''); + $changefreq = ArrayHelper::getValue($params, 'newsfeed_changefreq', $parent->changefreq, ''); + if ($priority == '-1') + $priority = $parent->priority; + + if ($changefreq == '-1') + $changefreq = $parent->changefreq; + + $params['newsfeed_priority'] = $priority; + $params['newsfeed_changefreq'] = $changefreq; + + $options = array(); + $options['countItems'] = false; + $options['catid'] = rand(); + $categories = JCategories::getInstance('Newsfeeds', $options); + $category = $categories->get($catid? $catid : 'root', true); + + $params['count_clicks'] = $newsfeeds_params->get('count_clicks'); + + schuweb_sitemap_com_newsfeeds::getCategoryTree($sitemap, $parent, $params, $category); + } + + static function getCategoryTree($sitemap, $parent, &$params, $category) + { + $children = $category->getChildren(); + $sitemap->changeLevel(1); + foreach ($children as $cat) { + $node = new stdclass; + $node->id = $parent->id; + $node->uid = $parent->uid . 'c' . $cat->id; + $node->name = $cat->title; + $node->link = NewsfeedsHelperRoute::getCategoryRoute($cat); + $node->priority = $params['cat_priority']; + $node->changefreq = $params['cat_changefreq']; + + $attribs = json_decode($sitemap->sitemap->attribs); + $node->xmlInsertChangeFreq = $attribs->xmlInsertChangeFreq; + $node->xmlInsertPriority = $attribs->xmlInsertPriority; + + $node->lastmod = $parent->lastmod; + $node->modified = $cat->modified_time; + + $node->expandible = true; + if ($sitemap->printNode($node) !== FALSE) { + schuweb_sitemap_com_newsfeeds::getCategoryTree($sitemap, $parent, $params, $cat); + } + } + $sitemap->changeLevel(-1); + + if ($params['include_newsfeeds']) { //view=category&catid=... + $newsfeedsModel = new NewsfeedsModelCategory(); + $newsfeedsModel->getState(); // To force the populate state + $newsfeedsModel->setState('list.limit', ArrayHelper::getValue($params, 'max_newsfeeds', NULL)); + $newsfeedsModel->setState('list.start', 0); + $newsfeedsModel->setState('list.ordering', 'ordering'); + $newsfeedsModel->setState('list.direction', 'ASC'); + $newsfeedsModel->setState('category.id', $category->id); + $newsfeeds = $newsfeedsModel->getItems(); + $sitemap->changeLevel(1); + foreach ($newsfeeds as $newsfeed) { + $item_params = new JRegistry; + $item_params->loadString($newsfeed->params); + + $node = new stdclass; + $node->id = $parent->id; + $node->uid = $parent->uid . 'i' . $newsfeed->id; + $node->name = $newsfeed->name; + + // Find the Itemid + $Itemid = intval(preg_replace('/.*Itemid=([0-9]+).*/','$1',NewsfeedsHelperRoute::getNewsfeedRoute($newsfeed->id, $category->id))); + + if ($item_params->get('count_clicks', $params['count_clicks']) == 1) { + $node->link = 'index.php?option=com_newsfeeds&task=newsfeed.go&id='. $newsfeed->id.'&Itemid='.($Itemid ? $Itemid : $parent->id); + } else { + $node->link = $newsfeed->link; + } + $node->priority = $params['newsfeed_priority']; + $node->changefreq = $params['newsfeed_changefreq']; + + $node->lastmod = $parent->lastmod; + $node->modified = $newsfeed->modified; + + $attribs = json_decode($sitemap->sitemap->attribs); + $node->xmlInsertChangeFreq = $attribs->xmlInsertChangeFreq; + $node->xmlInsertPriority = $attribs->xmlInsertPriority; + + $node->expandible = false; + $sitemap->printNode($node); + } + $sitemap->changeLevel(-1); + } + } + + static public function initialize(&$params) + { + if (self::$_initialized) { + return; + } + + self::$_initialized = true; + require_once JPATH_SITE.'/components/com_newsfeeds/models/category.php'; + require_once JPATH_SITE.'/components/com_newsfeeds/helpers/route.php'; + } +} \ No newline at end of file diff --git a/plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.xml b/plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.xml new file mode 100644 index 0000000..50799f4 --- /dev/null +++ b/plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.xml @@ -0,0 +1,83 @@ + + + SchuWeb Sitemap - Newsfeeds Plugin + Sven Schultschik + sw.build.date + GNU GPL + http://www.gnu.org/copyleft/gpl.html GNU/GPL + sven@schultschik.de + www.schultschik.de + sw.build.version + SCHUWEB_SITEMAP_NF_PLUGIN_DESCRIPTION + + com_newsfeeds.php + index.html + + + en-GB.plg_schuweb_sitemap_com_newsfeeds.ini + nl-NL.plg_schuweb_sitemap_com_newsfeeds.ini + ru-RU.plg_schuweb_sitemap_com_newsfeeds.ini + + + +
+ + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
diff --git a/plugins/schuweb_sitemap/com_mtree/index.html b/plugins/schuweb_sitemap/com_newsfeeds/index.html similarity index 100% rename from plugins/schuweb_sitemap/com_mtree/index.html rename to plugins/schuweb_sitemap/com_newsfeeds/index.html diff --git a/plugins/schuweb_sitemap/com_newsfeeds/language/en-GB.plg_schuweb_sitemap_com_newsfeeds.ini b/plugins/schuweb_sitemap/com_newsfeeds/language/en-GB.plg_schuweb_sitemap_com_newsfeeds.ini new file mode 100644 index 0000000..c6bff1a --- /dev/null +++ b/plugins/schuweb_sitemap/com_newsfeeds/language/en-GB.plg_schuweb_sitemap_com_newsfeeds.ini @@ -0,0 +1,29 @@ +SCHUWEB_SITEMAP_NF_PLUGIN_DESCRIPTION="Adds support for Newsfeeds component" +SCHUWEB_SITEMAP_NF_SETTING_SHOW_LINKS_LABEL="Show newsfeeds?" +SCHUWEB_SITEMAP_NF_SETTING_SHOW_LINKS_DESC="Should we include feeds into the site map?" +SCHUWEB_SITEMAP_NF_SETTING_MAX_LINKS_LABEL="Max links" +SCHUWEB_SITEMAP_NF_SETTING_MAX_LINKS_DESC="Max number of feeds per category to include on sitemap (Leave empty for no limit)" + +; Generic Extension settings strings +COM_PLUGINS_BASIC_FIELDSET_LABEL="Basic Settings" +COM_PLUGINS_XML_FIELDSET_LABEL="XML Sitemap Settings" +COM_PLUGINS_NEWS_FIELDSET_LABEL="News Sitemap Settings" +SCHUWEB_SITEMAP_OPTION_USE_PARENT_MENU="Use Parent Menu Settings" +SCHUWEB_SITEMAP_OPTION_NEVER="Never" +SCHUWEB_SITEMAP_OPTION_ALWAYS="Always" +SCHUWEB_SITEMAP_OPTION_XML_ONLY="In XML Sitemap Only" +SCHUWEB_SITEMAP_OPTION_HTML_ONLY="In HTML Sitemap Only" +SCHUWEB_SITEMAP_OPTION_WEEKLY="Weekly" +SCHUWEB_SITEMAP_OPTION_DAILY="Daily" +SCHUWEB_SITEMAP_OPTION_MONTHLY="Monthly" +SCHUWEB_SITEMAP_OPTION_YEARLY="Yearly" +SCHUWEB_SITEMAP_OPTION_HOURLY="Hourly" + +SCHUWEB_SITEMAP_NF_CATEGORY_PRIORITY_LABEL="Category Priority" +SCHUWEB_SITEMAP_NF_CATEGORY_PRIORITY_DESC="Set the priority for the categories" +SCHUWEB_SITEMAP_NF_CATEGORY_CHANGEFREQ_LABEL="Category Change frequency" +SCHUWEB_SITEMAP_NF_CATEGORY_CHANGEFREQ_DESC="Set the change frequency for the categories" +SCHUWEB_SITEMAP_NF_LINK_PRIORITY_LABEL="Link Priority" +SCHUWEB_SITEMAP_NF_LINK_PRIORITY_DESC="Set the priority for the feeds" +SCHUWEB_SITEMAP_NF_LINK_CHANGEFREQ_LABEL="Feed Change frequency" +SCHUWEB_SITEMAP_NF_LINK_CHANGEFREQ_DESC="Set the change frequency for the feeds" \ No newline at end of file diff --git a/plugins/schuweb_sitemap/com_newsfeeds/language/nl-NL.plg_schuweb_sitemap_com_newsfeeds.ini b/plugins/schuweb_sitemap/com_newsfeeds/language/nl-NL.plg_schuweb_sitemap_com_newsfeeds.ini new file mode 100644 index 0000000..9d9434d --- /dev/null +++ b/plugins/schuweb_sitemap/com_newsfeeds/language/nl-NL.plg_schuweb_sitemap_com_newsfeeds.ini @@ -0,0 +1,29 @@ +SCHUWEB_SITEMAP_NF_PLUGIN_DESCRIPTION="Voegt ondersteuning voor de newsfeeds component toe" +SCHUWEB_SITEMAP_NF_SETTING_SHOW_LINKS_LABEL="Toon feeds?" +SCHUWEB_SITEMAP_NF_SETTING_SHOW_LINKS_DESC="Moeten feeds opgenomen worden in de sitemap?" +SCHUWEB_SITEMAP_NF_SETTING_MAX_LINKS_LABEL="Max aantal feeds" +SCHUWEB_SITEMAP_NF_SETTING_MAX_LINKS_DESC="Max aantal feeds per categorie die moeten worden opgenomen in de sitemap (Laat leeg voor geen limiet)" + +; Generic Extension settings strings +COM_PLUGINS_BASIC_FIELDSET_LABEL="Standaard instellingen" +COM_PLUGINS_XML_FIELDSET_LABEL="XML sitemap instellingen" +COM_PLUGINS_NEWS_FIELDSET_LABEL="Nieuws sitemap instellingen" +SCHUWEB_SITEMAP_OPTION_USE_PARENT_MENU="Gebruik Hoofdmenu instellingen" +SCHUWEB_SITEMAP_OPTION_NEVER="Nooit" +SCHUWEB_SITEMAP_OPTION_ALWAYS="Altijd" +SCHUWEB_SITEMAP_OPTION_XML_ONLY="Alleen in XML sitemap" +SCHUWEB_SITEMAP_OPTION_HTML_ONLY="Alleen in HTML sitemap" +SCHUWEB_SITEMAP_OPTION_WEEKLY="Wekelijks" +SCHUWEB_SITEMAP_OPTION_DAILY="Dagelijks" +SCHUWEB_SITEMAP_OPTION_MONTHLY="Maandelijks" +SCHUWEB_SITEMAP_OPTION_YEARLY="Jaarlijks" +SCHUWEB_SITEMAP_OPTION_HOURLY="Ieder uur" + +SCHUWEB_SITEMAP_NF_CATEGORY_PRIORITY_LABEL="Prioriteit van categorieën" +SCHUWEB_SITEMAP_NF_CATEGORY_PRIORITY_DESC="Stel de prioriteit van de categorieën in" +SCHUWEB_SITEMAP_NF_CATEGORY_CHANGEFREQ_LABEL="Wijzigfrequentie van categorieën" +SCHUWEB_SITEMAP_NF_CATEGORY_CHANGEFREQ_DESC="Stel de wijzigfrequentie van categorieën in" +SCHUWEB_SITEMAP_NF_LINK_PRIORITY_LABEL="Prioriteit van feeds" +SCHUWEB_SITEMAP_NF_LINK_PRIORITY_DESC="Stel de prioriteit van feeds in" +SCHUWEB_SITEMAP_NF_LINK_CHANGEFREQ_LABEL="Wijzigfrequentie van feeds" +SCHUWEB_SITEMAP_NF_LINK_CHANGEFREQ_DESC="Stel de wijzigfrequentie van feeds in" \ No newline at end of file diff --git a/plugins/schuweb_sitemap/com_newsfeeds/language/ru-RU.plg_schuweb_sitemap_com_newsfeeds.ini b/plugins/schuweb_sitemap/com_newsfeeds/language/ru-RU.plg_schuweb_sitemap_com_newsfeeds.ini new file mode 100644 index 0000000..3d44151 --- /dev/null +++ b/plugins/schuweb_sitemap/com_newsfeeds/language/ru-RU.plg_schuweb_sitemap_com_newsfeeds.ini @@ -0,0 +1,29 @@ +SCHUWEB_SITEMAP_NF_PLUGIN_DESCRIPTION="Дополнительная поддержка для компонента Newsfeeds" +SCHUWEB_SITEMAP_NF_SETTING_SHOW_LINKS_LABEL="Показать ленты?" +SCHUWEB_SITEMAP_NF_SETTING_SHOW_LINKS_DESC="Должна ли карта сайта содержать в себе ленты?" +SCHUWEB_SITEMAP_NF_SETTING_MAX_LINKS_LABEL="Максимум лент" +SCHUWEB_SITEMAP_NF_SETTING_MAX_LINKS_DESC="Максимальное количество лент из категории содержащихся в карте сайта (Оставьте поле пустым для снятия ограничений)" + +; Generic Extension settings strings +COM_PLUGINS_BASIC_FIELDSET_LABEL="Основные настройки" +COM_PLUGINS_XML_FIELDSET_LABEL="Настройки XML карты" +COM_PLUGINS_NEWS_FIELDSET_LABEL="Настройки новостей карты сайта" +SCHUWEB_SITEMAP_OPTION_USE_PARENT_MENU="Использовать настройки родительского меню" +SCHUWEB_SITEMAP_OPTION_NEVER="Никогда" +SCHUWEB_SITEMAP_OPTION_ALWAYS="Всегда" +SCHUWEB_SITEMAP_OPTION_XML_ONLY="Только в XML карте" +SCHUWEB_SITEMAP_OPTION_HTML_ONLY="Только в HTML карте" +SCHUWEB_SITEMAP_OPTION_WEEKLY="Еженедельно" +SCHUWEB_SITEMAP_OPTION_DAILY="Ежедневно" +SCHUWEB_SITEMAP_OPTION_MONTHLY="Ежемесячно" +SCHUWEB_SITEMAP_OPTION_YEARLY="Ежегодно" +SCHUWEB_SITEMAP_OPTION_HOURLY="Ежечасно" + +SCHUWEB_SITEMAP_NF_CATEGORY_PRIORITY_LABEL="Приоритет категории" +SCHUWEB_SITEMAP_NF_CATEGORY_PRIORITY_DESC="Задайте приоритет для категорий" +SCHUWEB_SITEMAP_NF_CATEGORY_CHANGEFREQ_LABEL="Частота изменения категории" +SCHUWEB_SITEMAP_NF_CATEGORY_CHANGEFREQ_DESC="Задайте частоту изменения для категорий" +SCHUWEB_SITEMAP_NF_LINK_PRIORITY_LABEL="Приоритет ленты" +SCHUWEB_SITEMAP_NF_LINK_PRIORITY_DESC="Задайте приоритет для ленты" +SCHUWEB_SITEMAP_NF_LINK_CHANGEFREQ_LABEL="Частота изменения ленты" +SCHUWEB_SITEMAP_NF_LINK_CHANGEFREQ_DESC="Задайте частоту изменения для ленты" \ No newline at end of file diff --git a/plugins/schuweb_sitemap/com_virtuemart/com_virtuemart.php b/plugins/schuweb_sitemap/com_virtuemart/com_virtuemart.php index c4cc5ba..a0c0b9c 100644 --- a/plugins/schuweb_sitemap/com_virtuemart/com_virtuemart.php +++ b/plugins/schuweb_sitemap/com_virtuemart/com_virtuemart.php @@ -1,17 +1,16 @@ name = stripslashes($row->category_name); $node->priority = $params['cat_priority']; $node->changefreq = $params['cat_changefreq']; + $node->lastmod = $parent->lastmod; $attribs = json_decode($sitemap->sitemap->attribs); $node->xmlInsertChangeFreq = $attribs->xmlInsertChangeFreq; @@ -210,6 +210,7 @@ static function getCategoryTree($sitemap, $parent, &$params, $catid=0) $node->name = $row->product_name; $node->modified = strtotime($row->modified_on); $node->expandible = false; + $node->lastmod = $parent->lastmod; $node->link = 'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $row->virtuemart_product_id . '&virtuemart_category_id=' . $row->virtuemart_category_id . '&Itemid=' . $parent->id; if ($params['include_product_images']) diff --git a/plugins/schuweb_sitemap/com_weblinks/com_weblinks.php b/plugins/schuweb_sitemap/com_weblinks/com_weblinks.php index bd19b07..e743f7f 100644 --- a/plugins/schuweb_sitemap/com_weblinks/com_weblinks.php +++ b/plugins/schuweb_sitemap/com_weblinks/com_weblinks.php @@ -1,16 +1,17 @@ link); parse_str(html_entity_decode($link_query['query']), $link_vars); - $view = JArrayHelper::getValue($link_vars, 'view', ''); + $view = ArrayHelper::getValue($link_vars, 'view', ''); if ($view == 'weblink') { - $id = intval(JArrayHelper::getValue($link_vars, 'id', 0)); + $id = intval(ArrayHelper::getValue($link_vars, 'id', 0)); if ($id) { $node->uid = 'com_weblinksi' . $id; $node->expandible = false; @@ -34,13 +35,13 @@ static function prepareMenuItem($node, &$params) $node->uid = 'com_weblinkscategories'; $node->expandible = true; } elseif ($view == 'category') { - $catid = intval(JArrayHelper::getValue($link_vars, 'id', 0)); + $catid = intval(ArrayHelper::getValue($link_vars, 'id', 0)); $node->uid = 'com_weblinksc' . $catid; $node->expandible = true; } } - static function getTree($xmap, $parent, &$params) + static function getTree($sitemap, $parent, &$params) { self::initialize($params); @@ -49,29 +50,29 @@ static function getTree($xmap, $parent, &$params) $link_query = parse_url($parent->link); parse_str(html_entity_decode($link_query['query']), $link_vars); - $view = JArrayHelper::getValue($link_vars, 'view', 0); + $view = ArrayHelper::getValue($link_vars, 'view', 0); $app = JFactory::getApplication(); $menu = $app->getMenu(); $menuparams = $menu->getParams($parent->id); if ($view == 'category') { - $catid = intval(JArrayHelper::getValue($link_vars, 'id', 0)); + $catid = intval(ArrayHelper::getValue($link_vars, 'id', 0)); } elseif ($view == 'categories') { $catid = 0; } else { // Only expand category menu items return; } - $include_links = JArrayHelper::getValue($params, 'include_links', 1, ''); + $include_links = ArrayHelper::getValue($params, 'include_links', 1, ''); $include_links = ( $include_links == 1 - || ( $include_links == 2 && $xmap->view == 'xml') - || ( $include_links == 3 && $xmap->view == 'html') - || $xmap->view == 'navigator'); + || ( $include_links == 2 && $sitemap->view == 'xml') + || ( $include_links == 3 && $sitemap->view == 'html') + || $sitemap->view == 'navigator'); $params['include_links'] = $include_links; - $priority = JArrayHelper::getValue($params, 'cat_priority', $parent->priority, ''); - $changefreq = JArrayHelper::getValue($params, 'cat_changefreq', $parent->changefreq, ''); + $priority = ArrayHelper::getValue($params, 'cat_priority', $parent->priority, ''); + $changefreq = ArrayHelper::getValue($params, 'cat_changefreq', $parent->changefreq, ''); if ($priority == '-1') $priority = $parent->priority; if ($changefreq == '-1') @@ -80,8 +81,8 @@ static function getTree($xmap, $parent, &$params) $params['cat_priority'] = $priority; $params['cat_changefreq'] = $changefreq; - $priority = JArrayHelper::getValue($params, 'link_priority', $parent->priority, ''); - $changefreq = JArrayHelper::getValue($params, 'link_changefreq', $parent->changefreq, ''); + $priority = ArrayHelper::getValue($params, 'link_priority', $parent->priority, ''); + $changefreq = ArrayHelper::getValue($params, 'link_changefreq', $parent->changefreq, ''); if ($priority == '-1') $priority = $parent->priority; @@ -99,15 +100,15 @@ static function getTree($xmap, $parent, &$params) $params['count_clicks'] = $weblinks_params->get('count_clicks'); - xmap_com_weblinks::getCategoryTree($xmap, $parent, $params, $category); + schuweb_sitemap_com_weblinks::getCategoryTree($sitemap, $parent, $params, $category); } - static function getCategoryTree($xmap, $parent, &$params, $category) + static function getCategoryTree($sitemap, $parent, &$params, $category) { $db = JFactory::getDBO(); $children = $category->getChildren(); - $xmap->changeLevel(1); + $sitemap->changeLevel(1); foreach ($children as $cat) { $node = new stdclass; $node->id = $parent->id; @@ -117,27 +118,30 @@ static function getCategoryTree($xmap, $parent, &$params, $category) $node->priority = $params['cat_priority']; $node->changefreq = $params['cat_changefreq']; - $attribs = json_decode($xmap->sitemap->attribs); + $node->lastmod = $parent->lastmod; + $node->modified = $cat->modified_time; + + $attribs = json_decode($sitemap->sitemap->attribs); $node->xmlInsertChangeFreq = $attribs->xmlInsertChangeFreq; $node->xmlInsertPriority = $attribs->xmlInsertPriority; $node->expandible = true; - if ($xmap->printNode($node) !== FALSE) { - xmap_com_weblinks::getCategoryTree($xmap, $parent, $params, $cat); + if ($sitemap->printNode($node) !== FALSE) { + schuweb_sitemap_com_weblinks::getCategoryTree($sitemap, $parent, $params, $cat); } } - $xmap->changeLevel(-1); + $sitemap->changeLevel(-1); if ($params['include_links']) { //view=category&catid=... $linksModel = new WeblinksModelCategory(); $linksModel->getState(); // To force the populate state - $linksModel->setState('list.limit', JArrayHelper::getValue($params, 'max_links', NULL)); + $linksModel->setState('list.limit', ArrayHelper::getValue($params, 'max_links', NULL)); $linksModel->setState('list.start', 0); $linksModel->setState('list.ordering', 'ordering'); $linksModel->setState('list.direction', 'ASC'); $linksModel->setState('category.id', $category->id); $links = $linksModel->getItems(); - $xmap->changeLevel(1); + $sitemap->changeLevel(1); foreach ($links as $link) { $item_params = new JRegistry; $item_params->loadString($link->params); @@ -158,14 +162,17 @@ static function getCategoryTree($xmap, $parent, &$params, $category) $node->priority = $params['link_priority']; $node->changefreq = $params['link_changefreq']; - $attribs = json_decode($xmap->sitemap->attribs); + $attribs = json_decode($sitemap->sitemap->attribs); $node->xmlInsertChangeFreq = $attribs->xmlInsertChangeFreq; $node->xmlInsertPriority = $attribs->xmlInsertPriority; - $node->expandible = false; - $xmap->printNode($node); + $node->lastmod = $parent->lastmod; + $node->modified = $link->modified; + + $node->expandible = false; + $sitemap->printNode($node); } - $xmap->changeLevel(-1); + $sitemap->changeLevel(-1); } } diff --git a/plugins/schuweb_sitemap/com_weblinks/com_weblinks.xml b/plugins/schuweb_sitemap/com_weblinks/com_weblinks.xml index d32e09d..5d0adb0 100644 --- a/plugins/schuweb_sitemap/com_weblinks/com_weblinks.xml +++ b/plugins/schuweb_sitemap/com_weblinks/com_weblinks.xml @@ -1,6 +1,6 @@ - - Xmap - WebLinks Plugin + + SchuWeb Sitemap - Weblinks Plugin Guillermo Vargas sw.build.date GNU GPL @@ -27,16 +27,16 @@
- + - +
- + @@ -50,7 +50,7 @@ - + @@ -60,7 +60,7 @@ - + @@ -73,7 +73,7 @@ - + diff --git a/plugins/schuweb_sitemap/com_weblinks/language/cs-CZ.plg_xmap_com_weblinks.ini b/plugins/schuweb_sitemap/com_weblinks/language/cs-CZ.plg_schuweb_sitemap_com_weblinks.ini similarity index 99% rename from plugins/schuweb_sitemap/com_weblinks/language/cs-CZ.plg_xmap_com_weblinks.ini rename to plugins/schuweb_sitemap/com_weblinks/language/cs-CZ.plg_schuweb_sitemap_com_weblinks.ini index 2789ca8..1f9cd1d 100644 --- a/plugins/schuweb_sitemap/com_weblinks/language/cs-CZ.plg_xmap_com_weblinks.ini +++ b/plugins/schuweb_sitemap/com_weblinks/language/cs-CZ.plg_schuweb_sitemap_com_weblinks.ini @@ -26,4 +26,4 @@ SCHUWEB_SITEMAP_WL_CATEGORY_CHANGEFREQ_DESC="Nastavte četnost změn kategorií" SCHUWEB_SITEMAP_WL_LINK_PRIORITY_LABEL="Priorita odkazů" SCHUWEB_SITEMAP_WL_LINK_PRIORITY_DESC="Nastavte prioritu odkazů" SCHUWEB_SITEMAP_WL_LINK_CHANGEFREQ_LABEL="Četnost změn odkazů" -SCHUWEB_SITEMAP_WL_LINK_CHANGEFREQ_DESC="Nastavte četnost změn odkazů" \ No newline at end of file +SCHUWEB_SITEMAP_WL_LINK_CHANGEFREQ_DESC="Nastavte četnost změn odkazů" diff --git a/plugins/schuweb_sitemap/com_weblinks/language/es-ES.plg_xmap_com_weblinks.ini b/plugins/schuweb_sitemap/com_weblinks/language/en-GB.plg_schuweb_sitemap_com_weblinks.ini old mode 100644 new mode 100755 similarity index 98% rename from plugins/schuweb_sitemap/com_weblinks/language/es-ES.plg_xmap_com_weblinks.ini rename to plugins/schuweb_sitemap/com_weblinks/language/en-GB.plg_schuweb_sitemap_com_weblinks.ini index ef0a2eb..11e421b --- a/plugins/schuweb_sitemap/com_weblinks/language/es-ES.plg_xmap_com_weblinks.ini +++ b/plugins/schuweb_sitemap/com_weblinks/language/en-GB.plg_schuweb_sitemap_com_weblinks.ini @@ -26,4 +26,4 @@ SCHUWEB_SITEMAP_WL_CATEGORY_CHANGEFREQ_DESC="Set the change frequency for the ca SCHUWEB_SITEMAP_WL_LINK_PRIORITY_LABEL="Link Priority" SCHUWEB_SITEMAP_WL_LINK_PRIORITY_DESC="Set the priority for the links" SCHUWEB_SITEMAP_WL_LINK_CHANGEFREQ_LABEL="Link Change frequency" -SCHUWEB_SITEMAP_WL_LINK_CHANGEFREQ_DESC="Set the change frequency for the links" \ No newline at end of file +SCHUWEB_SITEMAP_WL_LINK_CHANGEFREQ_DESC="Set the change frequency for the links" diff --git a/plugins/schuweb_sitemap/com_weblinks/language/en-GB.plg_xmap_com_weblinks.ini b/plugins/schuweb_sitemap/com_weblinks/language/es-ES.plg_schuweb_sitemap_com_weblinks.ini old mode 100755 new mode 100644 similarity index 98% rename from plugins/schuweb_sitemap/com_weblinks/language/en-GB.plg_xmap_com_weblinks.ini rename to plugins/schuweb_sitemap/com_weblinks/language/es-ES.plg_schuweb_sitemap_com_weblinks.ini index ef0a2eb..11e421b --- a/plugins/schuweb_sitemap/com_weblinks/language/en-GB.plg_xmap_com_weblinks.ini +++ b/plugins/schuweb_sitemap/com_weblinks/language/es-ES.plg_schuweb_sitemap_com_weblinks.ini @@ -26,4 +26,4 @@ SCHUWEB_SITEMAP_WL_CATEGORY_CHANGEFREQ_DESC="Set the change frequency for the ca SCHUWEB_SITEMAP_WL_LINK_PRIORITY_LABEL="Link Priority" SCHUWEB_SITEMAP_WL_LINK_PRIORITY_DESC="Set the priority for the links" SCHUWEB_SITEMAP_WL_LINK_CHANGEFREQ_LABEL="Link Change frequency" -SCHUWEB_SITEMAP_WL_LINK_CHANGEFREQ_DESC="Set the change frequency for the links" \ No newline at end of file +SCHUWEB_SITEMAP_WL_LINK_CHANGEFREQ_DESC="Set the change frequency for the links" diff --git a/plugins/schuweb_sitemap/com_weblinks/language/fa-IR.plg_xmap_com_weblinks.ini b/plugins/schuweb_sitemap/com_weblinks/language/fa-IR.plg_schuweb_sitemap_com_weblinks.ini similarity index 98% rename from plugins/schuweb_sitemap/com_weblinks/language/fa-IR.plg_xmap_com_weblinks.ini rename to plugins/schuweb_sitemap/com_weblinks/language/fa-IR.plg_schuweb_sitemap_com_weblinks.ini index bc4d654..fe78262 100644 --- a/plugins/schuweb_sitemap/com_weblinks/language/fa-IR.plg_xmap_com_weblinks.ini +++ b/plugins/schuweb_sitemap/com_weblinks/language/fa-IR.plg_schuweb_sitemap_com_weblinks.ini @@ -37,4 +37,4 @@ SCHUWEB_SITEMAP_WL_CATEGORY_CHANGEFREQ_DESC="تنظیم فرکانس تغییر SCHUWEB_SITEMAP_WL_LINK_PRIORITY_LABEL="اولویت پیوندها" SCHUWEB_SITEMAP_WL_LINK_PRIORITY_DESC="تنظیم اولویت برای پیوندها" SCHUWEB_SITEMAP_WL_LINK_CHANGEFREQ_LABEL="فرکانس تغییر پیوندها" -SCHUWEB_SITEMAP_WL_LINK_CHANGEFREQ_DESC="تنظیم فرکانس تغییر پیوندها" \ No newline at end of file +SCHUWEB_SITEMAP_WL_LINK_CHANGEFREQ_DESC="تنظیم فرکانس تغییر پیوندها" diff --git a/plugins/schuweb_sitemap/com_weblinks/language/nl-NL.plg_xmap_com_weblinks.ini b/plugins/schuweb_sitemap/com_weblinks/language/nl-NL.plg_schuweb_sitemap_com_weblinks.ini similarity index 99% rename from plugins/schuweb_sitemap/com_weblinks/language/nl-NL.plg_xmap_com_weblinks.ini rename to plugins/schuweb_sitemap/com_weblinks/language/nl-NL.plg_schuweb_sitemap_com_weblinks.ini index d8433a2..6afabaa 100644 --- a/plugins/schuweb_sitemap/com_weblinks/language/nl-NL.plg_xmap_com_weblinks.ini +++ b/plugins/schuweb_sitemap/com_weblinks/language/nl-NL.plg_schuweb_sitemap_com_weblinks.ini @@ -26,4 +26,4 @@ SCHUWEB_SITEMAP_WL_CATEGORY_CHANGEFREQ_DESC="Stel de wijzigfrequentie van catego SCHUWEB_SITEMAP_WL_LINK_PRIORITY_LABEL="Prioriteit van links" SCHUWEB_SITEMAP_WL_LINK_PRIORITY_DESC="Stel de prioriteit van links in" SCHUWEB_SITEMAP_WL_LINK_CHANGEFREQ_LABEL="Wijzigfrequentie van links" -SCHUWEB_SITEMAP_WL_LINK_CHANGEFREQ_DESC="Stel de wijzigfrequentie van links in" \ No newline at end of file +SCHUWEB_SITEMAP_WL_LINK_CHANGEFREQ_DESC="Stel de wijzigfrequentie van links in" diff --git a/plugins/schuweb_sitemap/com_weblinks/language/ru-RU.plg_xmap_com_weblinks.ini b/plugins/schuweb_sitemap/com_weblinks/language/ru-RU.plg_schuweb_sitemap_com_weblinks.ini similarity index 97% rename from plugins/schuweb_sitemap/com_weblinks/language/ru-RU.plg_xmap_com_weblinks.ini rename to plugins/schuweb_sitemap/com_weblinks/language/ru-RU.plg_schuweb_sitemap_com_weblinks.ini index fdb553d..e7776dd 100644 --- a/plugins/schuweb_sitemap/com_weblinks/language/ru-RU.plg_xmap_com_weblinks.ini +++ b/plugins/schuweb_sitemap/com_weblinks/language/ru-RU.plg_schuweb_sitemap_com_weblinks.ini @@ -26,4 +26,4 @@ SCHUWEB_SITEMAP_WL_CATEGORY_CHANGEFREQ_DESC="Задайте частоту из SCHUWEB_SITEMAP_WL_LINK_PRIORITY_LABEL="Приоритет ссылки" SCHUWEB_SITEMAP_WL_LINK_PRIORITY_DESC="Задайте приоритет для ссылки" SCHUWEB_SITEMAP_WL_LINK_CHANGEFREQ_LABEL="Частота изменения ссылки" -SCHUWEB_SITEMAP_WL_LINK_CHANGEFREQ_DESC="Задайте частоту изменения для ссылки" \ No newline at end of file +SCHUWEB_SITEMAP_WL_LINK_CHANGEFREQ_DESC="Задайте частоту изменения для ссылки" diff --git a/plugins/schuweb_sitemap/com_zoo/com_zoo.php b/plugins/schuweb_sitemap/com_zoo/com_zoo.php new file mode 100644 index 0000000..54e4005 --- /dev/null +++ b/plugins/schuweb_sitemap/com_zoo/com_zoo.php @@ -0,0 +1,241 @@ +link); + parse_str(html_entity_decode($link_query['query']), $link_vars); + $component = ArrayHelper::getValue($link_vars, 'option', ''); + $view = ArrayHelper::getValue($link_vars, 'view', ''); + + if ($component == 'com_zoo' && $view == 'frontpage') + { + $id = intval(ArrayHelper::getValue($link_vars, 'id', 0)); + if ($id != 0) + { + $node->uid = 'zoo' . $id; + $node->expandible = false; + } + } + } + + static function getTree(&$schuweb_sitemap, &$parent, &$params) + { + + $link_query = parse_url($parent->link); + parse_str(html_entity_decode($link_query['query']), $link_vars); + $view = ArrayHelper::getValue($link_vars, 'view', 0); + + $include_categories = ArrayHelper::getValue($params, 'include_categories', 1, ''); + $include_categories = ($include_categories == 1 + || ($include_categories == 2 && $schuweb_sitemap->view == 'xml') + || ($include_categories == 3 && $schuweb_sitemap->view == 'html') + || $schuweb_sitemap->view == 'navigator'); + $params['include_categories'] = $include_categories; + + $include_items = ArrayHelper::getValue($params, 'include_items', 1, ''); + $include_items = ($include_items == 1 + || ($include_items == 2 && $schuweb_sitemap->view == 'xml') + || ($include_items == 3 && $schuweb_sitemap->view == 'html') + || $schuweb_sitemap->view == 'navigator'); + $params['include_items'] = $include_items; + + $priority = ArrayHelper::getValue($params, 'cat_priority', $parent->priority, ''); + $changefreq = ArrayHelper::getValue($params, 'cat_changefreq', $parent->changefreq, ''); + if ($priority == '-1') + $priority = $parent->priority; + if ($changefreq == '-1') + $changefreq = $parent->changefreq; + + $params['cat_priority'] = $priority; + $params['cat_changefreq'] = $changefreq; + + $priority = ArrayHelper::getValue($params, 'item_priority', $parent->priority, ''); + $changefreq = ArrayHelper::getValue($params, 'item_changefreq', $parent->changefreq, ''); + if ($priority == '-1') + $priority = $parent->priority; + + if ($changefreq == '-1') + $changefreq = $parent->changefreq; + + $params['item_priority'] = $priority; + $params['item_changefreq'] = $changefreq; + + self::getCategoryTree($schuweb_sitemap, $parent, $params); + + } + + static function getCategoryTree(&$schuweb_sitemap, &$parent, &$params) + { + $db = JFactory::getDBO(); + + // first we fetch what application we are talking about + + $app = JFactory::getApplication('site'); + $menu = $app->getMenu(); + $menuparams = $menu->getParams($parent->id); + $appid = intval($menuparams->get('application', 0)); + + // if selected, we print title category + if ($params['include_categories']) + { + + // we print title if there is any + // commented out as non-functioning - Matt Faulds + // if ($params['categories_title'] != "" && $schuweb_sitemap->view == 'html') { + // echo "<".$params['categories_title_tag'].">".$params['categories_title'].""; + // } + // get categories info from database + $queryc = 'SELECT c.id, c.name ' . + 'FROM #__zoo_category c ' . + ' WHERE c.application_id = ' . $appid . ' AND c.published=1 ' . + ' ORDER by c.ordering'; + + $db->setQuery($queryc); + $cats = $db->loadObjectList(); + + // now we print categories + $schuweb_sitemap->changeLevel(1); + foreach ($cats as $cat) + { + + // Added by Matt Faulds to allow SEF urls + if (!($Itemid = self::_find('frontpage', $appid)->id)) + { + $Itemid = self::_find('category', $appid)->id; + } + + $node = new stdclass; + $node->id = $parent->id; + $node->uid = $parent->uid . 'c' . $cat->id; + $node->name = $cat->name; + $node->link = 'index.php?option=com_zoo&task=category&category_id=' . $cat->id . '&Itemid=' . $Itemid; + $node->priority = $params['cat_priority']; + $node->changefreq = $params['cat_changefreq']; + + $attribs = json_decode($schuweb_sitemap->sitemap->attribs); + $node->xmlInsertChangeFreq = $attribs->xmlInsertChangeFreq; + $node->xmlInsertPriority = $attribs->xmlInsertPriority; + + $node->expandible = true; + $node->lastmod = $parent->lastmod; + $schuweb_sitemap->printNode($node); + } + $schuweb_sitemap->changeLevel(-1); + } + + if ($params['include_items']) + { + // get items info from database + // basically it select those items that are published now (publish_up is less then now, meaning it's in past) + // and not unpublished yet (either not have publish_down date set, or that date is in future) + $queryi = 'SELECT i.id, i.name, i.publish_up ,i.application_id ,i.modified' . + ' FROM #__zoo_item i' . + ' WHERE i.application_id= ' . $appid . + ' AND DATEDIFF( i.publish_up, NOW( ) ) <=0' . + ' AND IF( i.publish_down >0, DATEDIFF( i.publish_down, NOW( ) ) >0, true )' . + ' ORDER BY i.publish_up'; + $db->setQuery($queryi); + $items = $db->loadObjectList(); + + // now we print items + $schuweb_sitemap->changeLevel(1); + foreach ($items as $item) + { + if (is_null($menuitem = self::_find('frontpage', $appid))) + { + if (is_null($menuitem = self::_find('category', $appid))) + { + $menuitem = self::_find('item', $item->id); + } + } + $Itemid = $menuitem->id; + + // if we are making news map, we should ignore items older then 3 days + if ($schuweb_sitemap->isNews && strtotime($item->publish_up) < ($schuweb_sitemap->now - (3 * 86400))) + { + continue; + } + $node = new stdclass; + $node->id = $parent->id; + $node->uid = $parent->uid . 'i' . $item->id; + $node->name = $item->name; + $node->link = 'index.php?option=com_zoo&task=item&item_id=' . $item->id . '&Itemid=' . $Itemid; + $node->priority = $params['item_priority']; + $node->changefreq = $params['item_changefreq']; + + $attribs = json_decode($schuweb_sitemap->sitemap->attribs); + $node->xmlInsertChangeFreq = $attribs->xmlInsertChangeFreq; + $node->xmlInsertPriority = $attribs->xmlInsertPriority; + + $node->expandible = true; + $node->lastmod = $parent->lastmod; + $node->modified = strtotime($item->modified); + $node->newsItem = 1; // if we are making news map and it get this far, it's news + $schuweb_sitemap->printNode($node); + + } + $schuweb_sitemap->changeLevel(-1); + } + } + + // Adapted from ZOO 2.5.10 + // Added by Matt Faulds to allow SEF urls + static protected function _find($type, $id) + { + + // load config + require_once(JPATH_ADMINISTRATOR . '/components/com_zoo/config.php'); + + // get ZOO app + $app = App::getInstance('zoo'); + + if (self::$_menu_items == null) + { + $menu_items = $app->object->create('JSite')->getMenu()->getItems('component_id', JComponentHelper::getComponent('com_zoo')->id); + + $menu_items = $menu_items ? $menu_items : array(); + + self::$_menu_items = array_fill_keys(array('category', 'frontpage', 'item'), array()); + foreach ($menu_items as $menu_item) + { + switch (@$menu_item->query['view']) + { + case 'frontpage': + self::$_menu_items['frontpage'][$app->parameter->create($menu_item->params)->get('application')] = $menu_item; + break; + case 'category': + self::$_menu_items['category'][$app->parameter->create($menu_item->params)->get('category')] = $menu_item; + break; + case 'item': + self::$_menu_items['item'][$app->parameter->create($menu_item->params)->get('item_id')] = $menu_item; + break; + } + } + } + + if (array_key_exists($type, self::$_menu_items) && array_key_exists($id, self::$_menu_items[$type])) + { + return self::$_menu_items[$type][$id]; + } + else + { + return null; + } + } + +} \ No newline at end of file diff --git a/plugins/schuweb_sitemap/com_zoo/com_zoo.xml b/plugins/schuweb_sitemap/com_zoo/com_zoo.xml new file mode 100644 index 0000000..e846be7 --- /dev/null +++ b/plugins/schuweb_sitemap/com_zoo/com_zoo.xml @@ -0,0 +1,86 @@ + + + + SchuWeb Sitemap - Zoo Plugin + Sven Schultschik + sw.build.date + GNU/GPL + http://www.gnu.org/copyleft/gpl.html GNU/GPL + schuwebext@schultschik.de + extensions.schultschik.com + sw.build.version + SCHUWEB_SITEMAP_ZOO_PLUGIN_DESCRIPTION + + com_zoo.php + index.html + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
diff --git a/plugins/schuweb_sitemap/com_zoo/index.html b/plugins/schuweb_sitemap/com_zoo/index.html new file mode 100644 index 0000000..3af6301 --- /dev/null +++ b/plugins/schuweb_sitemap/com_zoo/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/plugins/schuweb_sitemap/com_zoo/language/en-GB.plg_schuweb_sitemap_com_zoo.ini b/plugins/schuweb_sitemap/com_zoo/language/en-GB.plg_schuweb_sitemap_com_zoo.ini new file mode 100644 index 0000000..96b2d00 --- /dev/null +++ b/plugins/schuweb_sitemap/com_zoo/language/en-GB.plg_schuweb_sitemap_com_zoo.ini @@ -0,0 +1,20 @@ +SCHUWEB_SITEMAP_ZOO_PLUGIN_DESCRIPTION="SchuWeb Sitemap plugin for Zoo" +SCHUWEB_SITEMAP_SETTING_SHOW_CATEGORIES="Show Categories" +SCHUWEB_SITEMAP_SETTING_SHOW_CATEGORIES_DESC="Should we include links to categories into the sitemap?" +SCHUWEB_SITEMAP_SETTING_SHOW_ITEMS="Show Items" +SCHUWEB_SITEMAP_SETTING_SHOW_ITEMS_DESC="Should we include links to items into the sitemap?" +SCHUWEB_SITEMAP_SETTING_CATEGORY_PRIORITY="Category Priority" +SCHUWEB_SITEMAP_SETTING_CATEGORY_PRIORITY_DESC="Set the priority for the categories" +SCHUWEB_SITEMAP_SETTING_CATEGORY_CHANGE_FREQ="Category Change frequency" + +; Generic Extension settings strings +SCHUWEB_SITEMAP_OPTION_USE_PARENT_MENU="Use Parent Menu Settings" +SCHUWEB_SITEMAP_OPTION_NEVER="Never" +SCHUWEB_SITEMAP_OPTION_ALWAYS="Always" +SCHUWEB_SITEMAP_OPTION_XML_ONLY="In XML Sitemap Only" +SCHUWEB_SITEMAP_OPTION_HTML_ONLY="In HTML Sitemap Only" +SCHUWEB_SITEMAP_OPTION_WEEKLY="Weekly" +SCHUWEB_SITEMAP_OPTION_DAILY="Daily" +SCHUWEB_SITEMAP_OPTION_MONTHLY="Monthly" +SCHUWEB_SITEMAP_OPTION_YEARLY="Yearly" +SCHUWEB_SITEMAP_OPTION_HOURLY="Hourly" \ No newline at end of file diff --git a/update/schuweb_sitemap.xml b/update/schuweb_sitemap.xml index 61a6a7f..2bc82f5 100644 --- a/update/schuweb_sitemap.xml +++ b/update/schuweb_sitemap.xml @@ -1,5 +1,23 @@ + + SchuWeb Sitemap + SchuWeb Sitemap - Sitemap Generator for Joomla! + com_schuweb_sitemap + component + 3.3.0 + https://extensions.schultschik.com/products/schuweb-sitemap/schuweb-sitemap-3-3-0 + + https://github.com/svanschu/SchuWeb-Sitemap/releases/download/3.3.0/pkg_schuweb_sitemap_3.3.0_20210422.zip + + + stable + + Sven Schultschik + http://www.schultschik.de + + 5.6 + SchuWeb Sitemap SchuWeb Sitemap - Sitemap Generator for Joomla!