{"id":13654543,"url":"https://github.com/joomla-extensions/weblinks","last_synced_at":"2025-04-23T09:33:34.520Z","repository":{"id":13971998,"uuid":"16672606","full_name":"joomla-extensions/weblinks","owner":"joomla-extensions","description":"This repo is meant to hold the decoupled com_weblinks component and related code.","archived":false,"fork":false,"pushed_at":"2025-04-21T21:39:15.000Z","size":1815,"stargazers_count":54,"open_issues_count":26,"forks_count":102,"subscribers_count":32,"default_branch":"4.0-dev","last_synced_at":"2025-04-21T22:32:45.304Z","etag":null,"topics":["joomla","joomla-package","php","weblink","weblinks-component"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joomla-extensions.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-02-09T18:40:10.000Z","updated_at":"2025-04-06T08:26:58.000Z","dependencies_parsed_at":"2024-08-02T03:01:28.043Z","dependency_job_id":"486fbb1b-df22-428b-b3e2-babc9b33c658","html_url":"https://github.com/joomla-extensions/weblinks","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joomla-extensions%2Fweblinks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joomla-extensions%2Fweblinks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joomla-extensions%2Fweblinks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joomla-extensions%2Fweblinks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joomla-extensions","download_url":"https://codeload.github.com/joomla-extensions/weblinks/tar.gz/refs/heads/4.0-dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250407725,"owners_count":21425552,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["joomla","joomla-package","php","weblink","weblinks-component"],"created_at":"2024-08-02T03:00:36.797Z","updated_at":"2025-04-23T09:33:34.513Z","avatar_url":"https://github.com/joomla-extensions.png","language":"PHP","funding_links":[],"categories":["Development"],"sub_categories":["Extension Development"],"readme":"# Weblinks for Joomla!\n\nBuild Status\n---------------------\n| Drone-CI |\n| ------------- |\n| [![Build Status](https://ci.joomla.org/api/badges/joomla-extensions/weblinks/status.svg?ref=refs/heads/4.0-dev)](https://ci.joomla.org/joomla-extensions/weblinks) |\n\nWeblinks for Joomla! provides a component and accompanying extensions to create a directory of weblinks.\n\n# How to test a PR\n\n## With the [Patch Tester Component](https://github.com/joomla-extensions/patchtester/releases/latest)\n\nEasily apply changes from a pull requests against this repo:\nInstall the last release of [com_weblinks](https://github.com/joomla-extensions/weblinks/releases/latest) into your Joomla.\nInstall the last release of [com_patchtester](https://github.com/joomla-extensions/patchtester/releases/latest) into your Joomla (weblinks is supported since Version 3.0.0 Alpha 2).\nLog into your site's administrator section, go to the Patch Tester Component Options (Components -\u003e Patch Tester -\u003e Options)\nSwitch the `GitHub Repository` to `Joomla Weblinks Package`. For this you have to fill the field  `GitHub Project Owner` with `joomla-extensions` and the field `GitHub Project Repository` with `weblinks`.\nClick `Save \u0026 Close` and hit the `Fetch Data` Button to the the latest pull requests\nClick `Apply Patch` to apply the proposed changes from the pull request.\nClick `Revert Patch` to revert an applied patch.\n\nYou can read more about the Patch Tester extension on the [Joomla! Documentation Wiki](https://docs.joomla.org/Component_Patchtester_for_Testers).\n\n## With Github\n\nIf you want to test a patch you can apply the patch via git.\n\nIf you cloned this repo under the name upstream - your remote is upstream – you can use the command\n\n```\ngit fetch upstream pull/PR_NUMBER/head:BRANCHNUMER\n```\n\nfor fetching the branch of the PR https://github.com/joomla-extensions/weblinks/pull/290 this would be\n\n```\ngit fetch upstream pull/290/head:move-lang-files\n```\n\nAfter that you can checkout the branch and start testing.\n\n```\ngit checkout move-lang-files\n```\n\n# For Linux / MacOS\n\n## Install\n\n### 1. Open a session and change to the document root of your local webserver.\n\n```\n$ cd /var/www/html/\n/var/www/html$\n```\n\n### 2. Clone the current repository into your webserver root folder\n\n```\n/var/www/html$ git clone git@github.com:joomla-extensions/weblinks.git\n```\n\nAre you new with github? Here you can find information about setting it up: https://help.github.com/articles/set-up-git/\nIf you get an error you can try git clone https://github.com:joomla-extensions/weblinks.git instead of git clone git@github.com:joomla-extensions/weblinks.git\n\n### 3. Change to the directory weblinks\n\n```\n/var/www/html$ cd weblinks\n/var/www/html/weblinks$\n```\n\n### 4. This files should be in your weblinks folder.\n\n```\n/var/www/html/weblinks$ ls\ncypress.config.js docs  LICENSE\tRoboFile.dist.ini  tests\ncomposer.json\t manifest.xml\tRoboFile.php\ncomposer.lock\t jorobo.dist.ini  README.md\tsrc package.json\n```\n\n### 5. Optional: Have a look into composer.json for information what software you will install via composer.\n\n```\n/var/www/html/weblinks$ cat composer.json\n```\n\nor https://github.com/joomla-extensions/weblinks/blob/master/composer.json\n\nRead more about [how to install composer](https://getcomposer.org/doc/00-intro.md) here.\n\n### 6. Optional: If you have problems using composer set a timeout.\n\n```\n/var/www/html/weblinks$export COMPOSER_PROCESS_TIMEOUT=1500;\n```\n\n### 7. Install PHP dependencies via composer\n\n```\n/var/www/html/weblinks$ composer install\n```\n\n### 8. Install Javascript dependencies via npm\n\n```\n/var/www/html/weblinks$ npm ci\n```\n\n### 9. Optional: Prepare the database\n\nIf you use MySQL or PostgreSQL as database and your user has create database privileges the Database is automatically created by the Joomla installer.\nBut the safest way is to create the database before running Joomla's web installer.\n\n```\n/var/www/html/weblinks$ mysql -u root -p\n\nmysql\u003e create database weblinks;\nQuery OK, 1 row affected (0,00 sec)\n\nmysql\u003e quit;\nBye\n```\n\n### 10. Optional: Set use owner of the project to your user.\n\n```\n/var/www/html/weblinks$ sudo chown -R username:usergroup /var/www\n```\n\n## Testing\n\nThe tests in Weblinks Extension use Cypress,\nBelow is the Test Files Structure\n\n```\ntests/cypress/\n├── integration/\n│   ├── administrator/    # Administrator panel tests (Joomla backend)\n│   ├── site/             # Frontend UI website tests\n│   └── plugins/          # Joomla extension integration tests\n├── fixtures/             # Mock data and API responses\n├── support/              \n│   ├── commands.mjs      # Custom Cypress commands\n│   └── db.mjs            # Database utilities\n└── downloads/            # Automated test file downloads\n```\n\n### 1. Copy the file cypress.config.dist.js into cypress.config.js\n\n```\n/var/www/html/weblinks$ cp cypress.config.dist.js cypress.config.js\n```\n\n### 2. Update the file cypress.config.js to your needs. At least you have to update the base url, environment credentials.\n\n```\nexport default defineConfig({\n  fixturesFolder: 'tests/cypress/fixtures',\n  videosFolder: 'tests/cypress/output/videos',\n  screenshotsFolder: 'tests/cypress/output/screenshots',\n  viewportHeight: 1000,\n  viewportWidth: 1200,\n  e2e:  {\n    setupNodeEvents(on, config) {\n      setupPlugins(on, config);\n    },\n    baseUrl: 'http://localhost/',\n    specPattern: [\n      'tests/cypress/integration/install/*.cy.{js,jsx,ts,tsx}',\n      'tests/cypress/integration/administrator/**/*.cy.{js,jsx,ts,tsx}',\n      'tests/cypress/integration/site/**/*.cy.{js,jsx,ts,tsx}',\n      'tests/cypress/integration/plugins/**/*.cy.{js,jsx,ts,tsx}',\n    ],\n    supportFile: 'tests/cypress/support/index.js',\n    scrollBehavior: 'center',\n    browser: 'firefox',\n    screenshotOnRunFailure: true,\n    video: false\n  },\n  env: {\n    sitename: 'Joomla CMS Test',\n    name: 'jane doe',\n    email: 'admin@example.com',\n    username: 'ci-admin',\n    password: 'joomla-17082005',\n    db_type: process.env.DB_TYPE || 'MySQLi',\n    db_host: process.env.DB_HOST || 'mysql',\n    db_port: process.env.DB_PORT || '',\n    db_name: process.env.DB_NAME || 'test_joomla',\n    db_user: process.env.DB_USER || 'joomla_ut',\n    db_password: process.env.DB_PASSWORD || 'joomla_ut',\n    db_prefix: process.env.DB_PREFIX || 'mysql_',\n  },\n})\n```\n\n## Running Tests\n\n#### Run headless tests\n\n```\n/var/www/html/weblinks$ npx cypress run\n```\n\n#### Open interactive runner\n\n```\n/var/www/html/weblinks$ npx cypress open\n```\n\n#### Run specific test suite\n\n```\n/var/www/html/weblinks$ npx cypress run --spec \"tests/cypress/integration/administrator/**/*\"\n```\n\n### Additional options for Cypress testing\n\nYou can control test environment dimensions to simulate different devices:\n\n```\n# CLI configuration for tablet view\n[var/www/html/weblinks$ npx cypress run --config viewportWidth=768,viewportHeight=1024\n\n# In-spec dynamic viewport change\ncy.viewport('ipad-2')  # Preconfigured tablet profile\ncy.viewport(375, 667)  # Custom phone dimensions\nBrowser Selection - Cross-Browser Testing\n```\n\nTo execute tests in different browsers for compatibility verification:\n\n```\n# Firefox (default)\n/var/www/html/weblinks$ npx cypress run --browser firefox\n\n# Chrome\n[var/www/html/weblinks$ npx cypress run --browser chrome\n```\n\nif you want to know more about the technology used for testing please check: [Checkout this repository](https://github.com/joomla-projects/joomla-cypress).\n\n## Development and Package Building\n\n### Build Package\n\n```\n/var/www/html/weblinks$ vendor/bin/robo build\n```\n\nThis command creates an installable Joomla package of the extension, outputting a .zip archive to the dist/ directory.\n\n### Development Mapping\n\n```\n/var/www/html/weblinks$ vendor/bin/robo map /path/to/joomla-cms\n```\n\nThis command create symbolic links between the extension's source files and the target Joomla CMS installation. This allows for immediate visualization of code modifications within the Joomla environment, eliminating manual extension installs. Please provide the **absolute** path to the Joomla installation's root directory when running this command.\n\n# For Windows:\n\nYou need to install:\n- Git for Windows (https://gitforwindows.org/) (includes Git Bash, recommended for commands)\n- GitHub for windows (https://windows.github.com/)\n- Composer (https://getcomposer.org/download/)\n- Node.js (https://nodejs.org/) (includes npm)\n\n- for complete list of necessary software and tips check this [wiki page](https://github.com/joomla-extensions/weblinks/wiki/Programs-needed-on-Windows-to-get-the-tests-running)\n\nNote: For commands line is better if you use the 'Git Bash' program.\n\nThe next step is only required if you don't place the weblinks folder into your web server folder. Create a symbolic link from your tests\\joomla-cms to a subfolder of your web server. For example:\n\n```bash\nmklink /J C:\\wamp\\www\\tests\\joomla-cms C:\\Users\\Name\\Documents\\GitHub\\weblinks\\tests\\joomla-cms\n```\n\nOpen the console and go in the folder of weblinks, for example:\n\n```bash\ncd C:\\wamp\\www\\weblinks\n```\n\n## Next Steps\n\nOnce the prerequisites are installed, follow the \"For Linux / MacOS\" section starting from Install. The commands (e.g., git clone, composer install, npm ci) work the same in Git Bash, with the only adjustment is replacing paths (e.g., /var/www/html/weblinks) with Windows equivalents (e.g., C:\\wamp\\www\\weblinks if using WAMP, or C:\\xampp\\htdocs\\weblinks for XAMPP)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoomla-extensions%2Fweblinks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoomla-extensions%2Fweblinks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoomla-extensions%2Fweblinks/lists"}