diff -Nur kdeplasma-addons-4.2.87.orig/applets/pastebin/backends/backends.h kdeplasma-addons-4.2.87/applets/pastebin/backends/backends.h
--- kdeplasma-addons-4.2.87.orig/applets/pastebin/backends/backends.h	2009-01-16 16:06:21.000000000 +0100
+++ kdeplasma-addons-4.2.87/applets/pastebin/backends/backends.h	2009-05-24 22:21:15.002736133 +0200
@@ -24,5 +24,7 @@
 #include "pastebincom.h"
 #include "imagebinca.h"
 #include "imageshack.h"
+#include "wklejorg.h"
+#include "wstaworg.h"
 
 #endif
diff -Nur kdeplasma-addons-4.2.87.orig/applets/pastebin/backends/wklejorg.cpp kdeplasma-addons-4.2.87/applets/pastebin/backends/wklejorg.cpp
--- kdeplasma-addons-4.2.87.orig/applets/pastebin/backends/wklejorg.cpp	1970-01-01 01:00:00.000000000 +0100
+++ kdeplasma-addons-4.2.87/applets/pastebin/backends/wklejorg.cpp	2009-05-24 22:59:03.722735546 +0200
@@ -0,0 +1,71 @@
+/***************************************************************************
+ *   Copyright (C) 2008 by Artur Duque de Souza <morpheuz@gmail.com>       *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA .        *
+ ***************************************************************************/
+
+#include "wklejorg.h"
+
+#include <KDebug>
+#include <QUrl>
+
+WklejORGServer::WklejORGServer(const KConfigGroup& config)
+    : PastebinServer()
+{
+    m_server = config.readEntry("wklejorg", "http://wklej.org");
+    first = true;
+}
+
+WklejORGServer::~WklejORGServer()
+{
+}
+
+void WklejORGServer::result(KIO::Job *job, const KUrl &url)
+{
+    Q_UNUSED(job);
+    
+    if (first)
+    {
+	first = false;
+	return;
+    }
+
+    if (!url.url().contains("/id/")) {
+        // we had an error
+        emit postError();
+        return;
+    }
+
+    emit postFinished(url.url());
+    first = true;
+}
+
+void WklejORGServer::post(const QString& content)
+{
+    QByteArray bytearray = "body=";
+    bytearray.append(QUrl::toPercentEncoding(content,"/"));
+    bytearray.append("&autor=&syntax=text&isprivate=");
+
+    QString url(m_server);
+
+    KIO::TransferJob *tf = KIO::http_post(KUrl(url),
+                                          bytearray,KIO::HideProgressInfo);
+
+    tf->addMetaData("content-type","Content-Type: application/x-www-form-urlencoded");
+    connect(tf, SIGNAL(redirection(KIO::Job*, const KUrl&)),
+            this, SLOT(result(KIO::Job*, const KUrl&)));
+
+}
diff -Nur kdeplasma-addons-4.2.87.orig/applets/pastebin/backends/wklejorg.h kdeplasma-addons-4.2.87/applets/pastebin/backends/wklejorg.h
--- kdeplasma-addons-4.2.87.orig/applets/pastebin/backends/wklejorg.h	1970-01-01 01:00:00.000000000 +0100
+++ kdeplasma-addons-4.2.87/applets/pastebin/backends/wklejorg.h	2009-05-24 21:33:43.246735706 +0200
@@ -0,0 +1,47 @@
+/***************************************************************************
+ *   Copyright (C) 2008 by Artur Duque de Souza <morpheuz@gmail.com>       *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA .        *
+ ***************************************************************************/
+
+#ifndef WKLEJORG_H
+#define WKLEJORG_H
+
+#include "server.h"
+
+#include <KConfigDialog>
+
+#include <kio/global.h>
+#include <kio/job.h>
+
+class WklejORGServer : public PastebinServer
+{
+    Q_OBJECT
+
+public:
+    WklejORGServer(const KConfigGroup& config);
+    virtual ~WklejORGServer();
+
+    virtual void post(const QString& content);
+
+public slots:
+    void result(KIO::Job *job, const KUrl &url);
+
+private:
+    bool first;
+};
+
+#endif
diff -Nur kdeplasma-addons-4.2.87.orig/applets/pastebin/backends/wstaworg.cpp kdeplasma-addons-4.2.87/applets/pastebin/backends/wstaworg.cpp
--- kdeplasma-addons-4.2.87.orig/applets/pastebin/backends/wstaworg.cpp	1970-01-01 01:00:00.000000000 +0100
+++ kdeplasma-addons-4.2.87/applets/pastebin/backends/wstaworg.cpp	2009-05-24 23:20:30.706736006 +0200
@@ -0,0 +1,176 @@
+/***************************************************************************
+ *   Copyright (C) 2007 by Artur Duque de Souza <morpheuz@gmail.com>       *
+ *                         Vardhman Jain <vardhman@gmail.com>              *
+ *                         Gilles Caulier <caulier.gilles@gmail.com>       *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA .        *
+ ***************************************************************************/
+
+#include "wstaworg.h"
+
+#include <QFile>
+#include <QFileInfo>
+#include <QTextStream>
+#include <QString>
+
+#include <kmimetype.h>
+#include <kurl.h>
+#include <krandom.h>
+#include <kapplication.h>
+#include <KDebug>
+
+WstawORGServer::WstawORGServer(const KConfigGroup& config)
+    : PastebinServer()
+{
+    m_server = config.readEntry("wstaworg", "http://wstaw.org");
+
+    m_boundary  = "----------";
+    m_boundary += KRandom::randomString(42 + 13).toAscii();
+}
+
+WstawORGServer::~WstawORGServer()
+{
+}
+
+void WstawORGServer::finished(KJob *job)
+{
+    Q_UNUSED(job);
+
+    if (_data.length() == 0) {
+        kDebug() << "Error!!! " << _data;
+        emit postError();
+        return;
+    }
+
+    QString url(_data);
+    QRegExp re(".*miejsce_na_link\" href=\"\">([^<]+)</a></p>.*");
+    if (!re.exactMatch(url)) {
+	kDebug() << url;
+        emit postError();
+        return;
+    }
+    QString pasteUrl = re.cap(1);
+
+    emit postFinished(pasteUrl);
+}
+
+
+void WstawORGServer::readKIOData(KIO::Job *job, const QByteArray &data)
+{
+    Q_UNUSED(job);
+
+    if (data.length() == 0) {
+        return;
+    }
+
+    _data.append(data);
+}
+
+// taken from flickr KIPI Plugin
+void WstawORGServer::finish()
+{
+    QByteArray str;
+    str += "--";
+    str += m_boundary;
+    str += "--";
+
+    m_buffer.append(str);
+}
+
+// taken from flickr KIPI Plugin
+bool WstawORGServer::addPair(const QString& name, const QString& value)
+{
+     QByteArray str;
+
+     str += "--";
+     str += m_boundary;
+     str += "\r\n";
+     str += "Content-Disposition: form-data; name=\"";
+     str += name.toAscii();
+     str += "\"";
+     str += "\r\n\r\n";
+     str += value.toUtf8();
+     str += "\r\n";
+
+     m_buffer.append(str);
+     return true;
+}
+
+// taken from flickr KIPI Plugin
+bool WstawORGServer::addFile(const QString& name,const QString& path)
+{
+    KMimeType::Ptr ptr = KMimeType::findByUrl(path);
+    QString mime = ptr->name();
+    if (mime.isEmpty()) {
+        // if we ourselves can't determine the mime of the local file,
+        // very unlikely the remote site will be able to identify it
+        return false;
+    }
+
+    QFile imageFile(path);
+    if (!imageFile.open(QIODevice::ReadOnly)) {
+        return false;
+    }
+
+    QByteArray imageData = imageFile.readAll();
+    imageFile.close();
+
+    QByteArray str;
+
+    str += "--";
+    str += m_boundary;
+    str += "\r\n";
+    str += "Content-Disposition: form-data; name=\"";
+    str += name.toAscii();
+    str += "\"; ";
+    str += "filename=\"";
+    str += QFile::encodeName(KUrl(path).fileName()).replace(".tmp", ".jpg");
+    str += "\"";
+    str += "\r\n";
+    str += "Content-Type: ";
+    str +=  mime.toAscii();
+    str += "\r\n\r\n";
+
+    m_buffer.append(str);
+
+    int oldSize = m_buffer.size();
+    m_buffer.resize(oldSize + imageData.size() + 2);
+    memcpy(m_buffer.data() + oldSize, imageData.data(), imageData.size());
+    m_buffer[m_buffer.size()-2] = '\r';
+    m_buffer[m_buffer.size()-1] = '\n';
+
+    return true;
+}
+
+
+void WstawORGServer::post(const QString& content)
+{
+    KUrl url(m_server);
+
+    addFile("obrazek", content);
+    finish();
+
+    _data.clear();
+
+    KIO::TransferJob *tf = KIO::http_post(url, m_buffer, KIO::HideProgressInfo);
+
+    tf->addMetaData("content-type","Content-Type: multipart/form-data; boundary=" + m_boundary);
+
+    connect(tf, SIGNAL(data(KIO::Job*, const QByteArray&)),
+            this, SLOT(readKIOData(KIO::Job*, const QByteArray&)));
+
+    connect(tf, SIGNAL(result(KJob *)), this, SLOT(finished(KJob *)));
+}
diff -Nur kdeplasma-addons-4.2.87.orig/applets/pastebin/backends/wstaworg.h kdeplasma-addons-4.2.87/applets/pastebin/backends/wstaworg.h
--- kdeplasma-addons-4.2.87.orig/applets/pastebin/backends/wstaworg.h	1970-01-01 01:00:00.000000000 +0100
+++ kdeplasma-addons-4.2.87/applets/pastebin/backends/wstaworg.h	2009-05-24 22:21:39.494735919 +0200
@@ -0,0 +1,58 @@
+/***************************************************************************
+ *   Copyright (C) 2007 by Thomas Georgiou <TAGeorgiou@gmail.com>          *
+ *                         Artur Duque de Souza <morpheuz@gmail.com>       *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA .        *
+ ***************************************************************************/
+
+#ifndef WSTAWORG_H
+#define WSTAWORG_H
+
+#include "server.h"
+
+#include <KConfigDialog>
+
+#include <kio/global.h>
+#include <kio/job.h>
+
+
+class WstawORGServer : public PastebinServer
+{
+    Q_OBJECT
+
+public:
+    WstawORGServer(const KConfigGroup& config);
+    virtual ~WstawORGServer();
+
+    virtual void post(const QString& content);
+
+    void finish();
+    bool addPair(const QString& name, const QString& value);
+    bool addFile(const QString& name,const QString& path);
+
+protected:
+    QByteArray m_buffer;
+    QByteArray m_boundary;
+
+public slots:
+    void finished(KJob *job);
+    void readKIOData(KIO::Job *job, const QByteArray &data);
+
+private:
+    QByteArray _data;
+};
+
+#endif
diff -Nur kdeplasma-addons-4.2.87.orig/applets/pastebin/CMakeLists.txt kdeplasma-addons-4.2.87/applets/pastebin/CMakeLists.txt
--- kdeplasma-addons-4.2.87.orig/applets/pastebin/CMakeLists.txt	2009-05-24 19:21:52.000000000 +0200
+++ kdeplasma-addons-4.2.87/applets/pastebin/CMakeLists.txt	2009-05-24 22:22:30.606735622 +0200
@@ -1,11 +1,13 @@
 project(plasma-pastebin)
 
 set(pastebin_SRCS
+  backends/wstaworg.cpp
   backends/server.cpp
   backends/pastebinca.cpp
   backends/pastebincom.cpp
   backends/imagebinca.cpp
   backends/imageshack.cpp
+  backends/wklejorg.cpp
   pastebin.cpp)
 
 kde4_add_ui_files(pastebin_SRCS pastebinConfig.ui)
diff -Nur kdeplasma-addons-4.2.87.orig/applets/pastebin/pastebinConfig.ui kdeplasma-addons-4.2.87/applets/pastebin/pastebinConfig.ui
--- kdeplasma-addons-4.2.87.orig/applets/pastebin/pastebinConfig.ui	2009-04-28 15:46:46.000000000 +0200
+++ kdeplasma-addons-4.2.87/applets/pastebin/pastebinConfig.ui	2009-05-24 22:24:34.934736054 +0200
@@ -33,6 +33,11 @@
        <string>Pastebin.com</string>
       </property>
      </item>
+     <item>
+      <property name="text">
+       <string>Wklej.org</string>
+      </property>
+     </item>
     </widget>
    </item>
    <item row="1" column="0">
@@ -54,6 +59,11 @@
        <string>Imageshack.us</string>
       </property>
      </item>
+     <item>
+      <property name="text">
+       <string>Wstaw.org</string>
+      </property>
+     </item>
     </widget>
    </item>
    <item row="2" column="0">
diff -Nur kdeplasma-addons-4.2.87.orig/applets/pastebin/pastebin.cpp kdeplasma-addons-4.2.87/applets/pastebin/pastebin.cpp
--- kdeplasma-addons-4.2.87.orig/applets/pastebin/pastebin.cpp	2009-05-14 19:26:59.000000000 +0200
+++ kdeplasma-addons-4.2.87/applets/pastebin/pastebin.cpp	2009-05-24 22:23:33.834735671 +0200
@@ -86,6 +86,10 @@
     case Pastebin::IMAGESHACK:
         m_imageServer = static_cast<ImageshackServer*>(new ImageshackServer(config()));
         break;
+
+    case Pastebin::WSTAWORG:
+        m_imageServer = static_cast<WstawORGServer*>(new WstawORGServer(config()));
+        break;
     }
 
     m_imageBackend = backend;
@@ -108,6 +112,10 @@
     case Pastebin::PASTEBINCOM:
         m_textServer = static_cast<PastebinCOMServer*>(new PastebinCOMServer(config()));
         break;
+
+    case Pastebin::WKLEJORG:
+        m_textServer = static_cast<WklejORGServer*>(new WklejORGServer(config()));
+        break;
     }
 
     m_textBackend = backend;
diff -Nur kdeplasma-addons-4.2.87.orig/applets/pastebin/pastebin.h kdeplasma-addons-4.2.87/applets/pastebin/pastebin.h
--- kdeplasma-addons-4.2.87.orig/applets/pastebin/pastebin.h	2009-04-05 22:00:39.000000000 +0200
+++ kdeplasma-addons-4.2.87/applets/pastebin/pastebin.h	2009-05-24 22:22:53.250736753 +0200
@@ -54,8 +54,8 @@
                         const QRect &contents);
     void constraintsEvent(Plasma::Constraints constraints);
 
-    enum textServers { PASTEBINCA, PASTEBINCOM };
-    enum imageServers { IMAGEBINCA, IMAGESHACK };
+    enum textServers { PASTEBINCA, PASTEBINCOM, WKLEJORG };
+    enum imageServers { IMAGEBINCA, IMAGESHACK, WSTAWORG };
 
     enum InteractionState { /* What is the user doing, used for visual feedback on user actions */
         Off = 0,            /* Not set */
