Plugin Directory

Changeset 3268542


Ignore:
Timestamp:
04/08/2025 09:23:27 AM (12 months ago)
Author:
planet9
Message:

Updated to version 2.15 with draggable toolbar, GPT-4o, and improved prompts

Location:
planet-9
Files:
68 added
6 edited

Legend:

Unmodified
Added
Removed
  • planet-9/trunk/assets/css/style.css

    r3266465 r3268542  
    6666  text-align: center;
    6767  width: 400px;
     68  height: 50px;
    6869  bottom: 20px;
    6970  right: 20px;
     
    7980  justify-content: center;
    8081  align-items: center;
    81   gap: 3px; }
     82  gap: 3px;
     83  cursor: grab;
     84  user-select: none;
     85  -webkit-user-drag: none; }
     86  #ai-buttons-panel:hover {
     87    cursor: grab; }
    8288  @media screen and (max-width: 850px) {
    8389    #ai-buttons-panel {
     
    98104    border-radius: 50%;
    99105    /* Ronde knoppen */
    100     font-size: 18px; }
     106    font-size: 18px;
     107    cursor: pointer; }
    101108    #ai-buttons-panel .button:last-of-type {
    102109      border-radius: 0px 50% 50% 0px;
  • planet-9/trunk/assets/css/style.scss

    r3266465 r3268542  
    9494     text-align: center;
    9595     width: 400px;
     96    height: 50px;
    9697        bottom: 20px;
    9798        right: 20px;
     
    108109    align-items: center;
    109110    gap: 3px;
     111    cursor: grab;
     112    user-select: none;
     113  -webkit-user-drag: none;
     114   
     115    &:hover {
     116        cursor: grab;
     117    }
    110118
    111119        @media screen and (max-width: 850px) {
     
    130138         border-radius: 50%; /* Ronde knoppen */
    131139         font-size: 18px;
     140          cursor: pointer;
    132141
    133142         &:last-of-type {
  • planet-9/trunk/assets/js/scripts.js

    r3266465 r3268542  
    165165
    166166
     167//make bar draggable
     168
     169document.addEventListener('DOMContentLoaded', function () {
     170  const panel = document.getElementById('ai-buttons-panel');
     171  if (!panel) return;
     172
     173  let isDragging = false;
     174  let offsetX = 0;
     175  let offsetY = 0;
     176
     177  // Maak een overlay element (wordt pas later toegevoegd aan DOM)
     178  const dragOverlay = document.createElement('div');
     179  dragOverlay.style.position = 'fixed';
     180  dragOverlay.style.top = '0';
     181  dragOverlay.style.left = '0';
     182  dragOverlay.style.width = '100vw';
     183  dragOverlay.style.height = '100vh';
     184  dragOverlay.style.zIndex = '9998'; // net onder de panel zelf
     185  dragOverlay.style.cursor = 'move';
     186  dragOverlay.style.background = 'transparent';
     187  dragOverlay.style.userSelect = 'none';
     188
     189  const onMouseMove = (e) => {
     190    if (!isDragging) return;
     191    e.preventDefault();
     192    panel.style.left = `${e.clientX - offsetX}px`;
     193    panel.style.top = `${e.clientY - offsetY}px`;
     194  };
     195
     196  const onMouseUp = () => {
     197    if (!isDragging) return;
     198    isDragging = false;
     199
     200    document.body.removeChild(dragOverlay);
     201    document.removeEventListener('mousemove', onMouseMove);
     202    document.removeEventListener('mouseup', onMouseUp);
     203  };
     204
     205  panel.addEventListener('mousedown', (e) => {
     206    if (e.button !== 0) return;
     207    if (e.target.tagName === 'BUTTON' || e.target.closest('button')) return;
     208
     209    e.preventDefault();
     210
     211    const rect = panel.getBoundingClientRect();
     212    offsetX = e.clientX - rect.left;
     213    offsetY = e.clientY - rect.top;
     214    isDragging = true;
     215
     216    document.body.appendChild(dragOverlay);
     217    document.addEventListener('mousemove', onMouseMove);
     218    document.addEventListener('mouseup', onMouseUp);
     219  });
     220});
     221
     222
    167223
    168224
  • planet-9/trunk/includes/ai.php

    r3266465 r3268542  
    118118  $field_prompts = [
    119119    'title' => [
    120       'generate' => "Schrijf een pakkende titel in het $site_language op basis van de volgende beschikbare input:\n\n$content\n\nZorg ervoor dat:\n- De titel geen HTML-tags bevat.\n- Geen aanhalingstekens (' of \") worden gebruikt, tenzij het een direct citaat is.\n- De titel kort en krachtig is (maximaal 10 woorden).\n- Gebruik geen speciale tekens zoals ** of andere markeringen.",
     120      'generate' => "Schrijf een pakkende titel in het $site_language op basis van de volgende beschikbare input:\n\n$content\n\nZorg ervoor dat:\n- De titel geen HTML-tags bevat.\n- Geen aanhalingstekens (' of \") worden gebruikt.\n- De titel kort en krachtig is (maximaal 10 woorden).\n- Gebruik geen speciale tekens zoals ** of andere markeringen.",
    121121      'write' => "Schrijf een pakkende titel in het $site_language die duidelijk, kort en relevant is op basis van de volgende input:\n\n$content\n\n$relevant_content",
    122122      'improve' => "Verbeter de volgende titel qua grammatica en spelling:\n\n$content. Behoud de huidige taal",
     
    134134       
    135135    'attachment_alt' => [
    136       'generate' => "schrijf een korte mop",
    137       'write' => "schrijf een korte mop",
     136      'generate' => "Schrijf een alt beschrijving voor de volgende afbeelding: $image_prompt",
     137      'write' => "Schrijf een alt beschrijving voor deze afbeelding: $image_prompt, op basis van de volgende info: $content",
    138138      'improve' => "Verbeter de volgende alt-beschrijving qua grammatica en spelling:\n\n$content. behoud de huidige taal",
    139139      'structure' => "Geen actie vereist. Structurering is niet van toepassing op alt-beschrijvingen.",
     
    149149    ],
    150150    'rich_text' => [
    151       'generate' => "Schrijf een uitgebreide tekst in het $site_language op basis van de volgende input die beschikbaar is op de pagina:\n\n$content\n\nBehoud en gebruik correcte HTML-opmaak zoals <h2>, <h3>, <p>, <ul>, <li> en andere. Houd rekening met:\n\n$relevant_content",
    152       'write' => "Schrijf een goed gestructureerde tekst in het $site_language op basis van de volgende input. Behoud en gebruik correcte HTML-opmaak zoals <h2>, <h3>, <p>, <ul>, <li> en andere.:\n\n$content\n\n Zorg dat je zeker rekening houd met:/n$relevant_content \n\n.",
     151      'generate' => "Schrijf een goed gestructureerde tekst in het $site_language op basis van de volgende input die beschikbaar is op de pagina:\n\n$content\n\nBehoud en gebruik correcte HTML-opmaak zoals <h2>, <h3>, <p>, <ul>, <li> en andere, uitgezonderd <h1>. Houd rekening met:\n\n$relevant_content",
     152      'write' => "Schrijf een goed gestructureerde tekst in het $site_language op basis van de volgende input:\n\n$content\n\n Behoud en gebruik correcte HTML-opmaak zoals <h2>, <h3>, <p>, <ul>, <li> en andere. Zorg dat je zeker rekening houd met:/n$relevant_content \n\n.",
    153153      'improve' => "Verbeter de volgende tekst qua grammatica en spelling. Behoud alle HTML-tags zoals <h2>, <h3>, <p>, <ul>, <li> en andere:\n\n$content\n\n Behoud de huidige taal.",
    154154      'structure' => "Structureer de volgende tekst en voeg passende HTML-tags toe voor koppen en lijsten:\n\n$content",
     
    179179
    180180    'body' => json_encode( [
    181       'model' => 'gpt-3.5-turbo',
     181      'model' => 'gpt-4o',
    182182      'messages' => [
    183183        [ 'role' => 'system', 'content' => $system_prompt ],
  • planet-9/trunk/planet-9.php

    r3266465 r3268542  
    44Plugin URI: https://planet9.be/
    55Description: Boost your content creation with a powerful AI-driven toolbar. Teller streamlines writing and editing, while Linus delivers seamless translations—both powered by cutting-edge artificial intelligence.
    6 Version: 2.14
     6Version: 2.15
    77Author: Planet ⑨
    88Author URI: https://planet9.be
  • planet-9/trunk/readme.txt

    r3266465 r3268542  
    22Contributors: planet9
    33Donate link: https://planet9.be/
    4 Tags: ai, copywriting, translation, ai agent, content generation
     4Tags: ai, copywriting, translation, content creation, openai
    55Requires at least: 5.0
    66Tested up to: 6.7
    7 Stable tag: 2.14
     7Stable tag: 2.15
    88Requires PHP: 7.4
    99License: GPLv3.0
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.html
    1111
    12 AI-powered writing and translation directly in your WordPress site, via a smart context-aware toolbar.
     12AI-powered writing and translation directly inside WordPress, via a smart, context-aware floating toolbar.
    1313
    1414== Description ==
    1515
    16 Planet ⑨ is an innovative AI plugin for WordPress that supports content writing and translation without interrupting your workflow.
     16Planet ⑨ is an AI assistant plugin for WordPress that enhances your content creation and translation workflow with a smart, lightweight toolbar.
    1717
    18 The plugin adds a smart **floating toolbar** to the bottom-right of your screen, giving you instant access to powerful AI functionality. Currently, the following assistants are available:
     18When you focus on a compatible text field, the floating toolbar activates in the bottom-right of your screen, giving you instant access to advanced AI features powered by OpenAI. The plugin integrates seamlessly with most themes and plugins.
    1919
    20 - **Teller**: AI copywriting assistant 
    21 - **Linus**: AI translation assistant
     20Available AI assistants:
    2221
    23 More assistants and features are coming soon.
     22- **Teller** - AI-powered copywriting assistant
     23- **Linus** - AI translation assistant
    2424
    25 An OpenAI API key is required to use the plugin. The plugin is fully privacy-friendly and does not store or track any data.
     25More assistants are in development (e.g. image generation, code writing).
    2626
    27 **Features (v2.14):**
     27To use the plugin, you need an OpenAI API key. No data is stored or tracked — the plugin only sends content securely to OpenAI’s API for processing.
    2828
    29 * Smart floating toolbar, active only in editable text fields
    30 * Generate content based on your input or pre-filled content
    31 * Improve grammar and spelling without changing the meaning
    32 * Auto-structure content (headings, lists, spacing)
    33 * Translate text into other languages with a dropdown selector
    34 * Compatible with most themes and plugins
     29**Current features (v2.15):**
    3530
    36 **Upcoming roadmap:**
     31- Smart floating toolbar (active only in editable text fields)
     32- AI content generation based on your input or surrounding content
     33- Spelling and grammar improvement
     34- Automatic content structuring (headings, spacing, bullet points)
     35- Translation into multiple languages via dropdown selector
     36- Supports the GPT-4o model (fast, affordable, and highly capable)
     37- Toolbar is now draggable
     38- Fully privacy-friendly: no tracking, no local storage
    3739
    38 * More assistants: image generation, code generation, etc.
    39 * Integration with page builders (Gutenberg, Elementor)
    40 * UX improvements
    41 * Field compatibility improvements
     40**Roadmap highlights:**
    4241
     42- Additional AI assistants (image generation, SEO, code, etc.)
     43- Integration with Gutenberg, Elementor, and other page builders
     44- Toolbar customization options
     45- Improved compatibility with third-party fields
    4346
    44 == External services ==
     47== Installation ==
    4548
    46 This plugin connects to the OpenAI API to provide AI-powered writing, editing, and translation features.
     491. Upload the plugin to the `/wp-content/plugins/` directory or install it via the WordPress plugin dashboard.
     502. Activate the plugin through the 'Plugins' menu in WordPress.
     513. Go to `Settings > Planet ⑨` and enter your OpenAI API key.
     524. The floating toolbar will now appear when you interact with supported text fields.
    4753
    48 Whenever a user activates one of the assistants (such as Teller or Linus), the selected or entered content is sent to the OpenAI service for processing. The plugin does **not** store or track any of this content locally or remotely.
     54== External Services ==
    4955
    50 To use the plugin, you need to enter your own OpenAI API key in the plugin settings. You can manage your usage and billing directly through your OpenAI account.
     56This plugin uses the OpenAI API to generate content, improve grammar, structure text, and translate selected content.
    5157
    52 This service is provided by OpenAI. Please review their [Terms of Use](https://openai.com/policies/terms-of-use) and [Privacy Policy](https://openai.com/policies/privacy-policy) for more information.
     58Content is only sent to OpenAI when a user actively uses an AI assistant. No data is stored or tracked by the plugin.
     59
     60For usage terms and privacy policies, refer to:
     61- https://openai.com/policies/terms-of-use
     62- https://openai.com/policies/privacy-policy
    5363
    5464== Frequently Asked Questions ==
    5565
    56 = About the beta =
     66= What does the plugin do? =
    5767
    58 In this beta version, the following assistants are available:
    59 
    60 - **Teller** – AI copywriter 
    61 - **Linus** – AI translator
    62 
    63 For now, both are integrated into a single toolbar. In future versions, you will be able to customize which assistants are active and how the toolbar appears.
     68Planet ⑨ adds a floating toolbar to your WordPress admin area that activates in supported text fields. From this toolbar, you can generate, improve, structure, or translate content using AI.
    6469
    6570= How does the toolbar work? =
    6671
    67 Once the plugin is installed, a toolbar will appear fixed in the bottom-right corner of your screen. It will only activate when you click inside a text field that is compatible with the plugin.
     72Once the plugin is installed, a floating toolbar will appear in the bottom-right corner of your screen. It activates only when you click inside a compatible text field.
    6873
    69 **Important**: You must enter your **OpenAI API key** in the plugin settings before the AI tools will function.
     74The toolbar gives you direct access to AI tools. Each icon represents a different action:
    7075
    71 - **Pencil icon**: Write your own prompt first in the field, e.g. "Write a paragraph about...". The AI will generate content based on it.
    72 - **Star icon**: The AI generates content automatically based on other filled-in fields (great for titles, excerpts, etc.).
    73 - **ABC icon**: Improves spelling and grammar without changing the actual meaning.
    74 - **Structure icon**: Adds formatting and structure (such as headings and lists), without changing the content.
    75 - **Language selector**: Translates the selected content to your chosen language.
     76- **Pencil icon** – Write your own prompt in the field (e.g., "Write a paragraph about..."). The AI will generate content based on your input.
     77- **Star icon** – Automatically generates content based on other filled-in fields on the page (ideal for titles, excerpts, etc.).
     78- **ABC icon** – Improves spelling and grammar without altering the original meaning.
     79- **Structure icon** – Enhances formatting and structure (e.g., headings, lists, spacing) without changing your message.
     80- **Language selector** – Instantly translates selected content into your chosen language.
     81
     82You can click to apply the action to your current field.
     83
     84= Which AI models are supported? =
     85
     86Planet ⑨ uses OpenAI’s GPT models. By default, it uses GPT-4o.
     87
     88= Is my content safe? =
     89
     90Yes. The plugin does not track, store, or share your content. It only sends data temporarily to OpenAI for processing, and only when you trigger an action.
     91
     92= What are "assistants"? =
     93
     94Planet ⑨ introduces AI agents (or "assistants") that each focus on a specific task:
     95
     96- **Teller** – Copywriting and content creation
     97- **Linus** – Translation
     98
     99Future versions will include additional assistants for SEO, media, code, and more.
     100
     101= What if the toolbar doesn't activate? =
     102
     103The toolbar is only active in compatible editable fields. If you're using a custom page builder, it may not yet be fully supported. We are working on broader compatibility.
    76104
    77105== Screenshots ==
    78106
    79 1. Plugin toolbar active in a standard WordPress content field.
    80 2. Plugin settings page with OpenAI API key input and system prompt for Teller.
    81 3. Plugin settings page with target language options for Linus.
     1071. Floating AI toolbar visible in a classic WordPress editor field
     1082. Settings panel with OpenAI API key input and prompt customization for Teller, the AI copywriter
     1093. Language selector settings for Linus, the AI translator
    82110
    83111== Changelog ==
     112
     113= 2.15 =
     114* Toolbar is now draggable
     115* Switched to GPT-4o as default model
     116* Improved prompt quality for better AI results
     117
    84118
    85119= 2.14 =
     
    87121* Added Teller (AI copywriter)
    88122* Added Linus (AI translator)
    89 * Smart toolbar detection for editable text fields
    90 * Spelling and grammar correction feature
    91 * Content structuring feature
    92 * Translation feature with dropdown
     123* Smart toolbar activation for text fields
     124* Spelling and grammar improvement
     125* Content structuring and formatting
     126* Language translation with dropdown
    93127* OpenAI API integration
    94128
    95129== Upgrade Notice ==
    96130
    97 = 2.14 =
    98 First public release. Includes AI-powered copywriting, translation, grammar correction, and formatting. OpenAI API key required.
     131= 2.15 =
     132Includes draggable toolbar, GPT-4o support, and better prompts. Update recommended for improved usability and performance.
    99133
    100134== A brief Markdown Example ==
    101135
    102 **Included assistants:**
     136**Available AI assistants:**
    103137
    104 * Teller – copywriting
    105 * Linus – translation
     138* Teller – Content generation and rewriting
     139* Linus – Multilingual translation
    106140
    107 **Key functions:**
     141**Key Features:**
    108142
    109 1. Automatically activates on compatible text fields
    110 2. Smart, context-aware AI responses
    111 3. No data tracking or storage
     1431. Context-aware floating toolbar
     1442. AI generation, correction, and translation
     1453. Works with your own OpenAI API key
     1464. No tracking or local data storage
    112147
    113 > Create and improve content with AI, right where you're working.
     148> Create, translate, and improve content with AI—without leaving WordPress.
    114149
    115 Visit [Planet ⑨](https://planet9.be) for more information.
     150Visit [planet9.be](https://planet9.be) for documentation, updates, and support.
Note: See TracChangeset for help on using the changeset viewer.