Kontakt

Danwebs Webdesign
Vodroffsvej 57D
1900 Frederiksberg

Tlf.
+45 40 95 53 94

E-mail

Categories

Tags

C sharp Facebook google translate google translator PHP roles Wordpress

Comments

Hey Björn, yeah the formatting isn't optimal t...
ah, sorry about that, I misread your code - you're...
By Björn Rixman to Wordpress: get users by role
Hi, I'm looking into doing the same thing myself, ...
By Björn Rixman to Wordpress: get users by role

Wordpress – qTranslate and Mailpress fix

Providing an ugly quick-fix to the qTranslate/Mailpress incompatability issue. But a fix none the less..

Written by Daniel, January 20, 2010

I had a problem with qTranslate and Mailpress not cooperating, and thought I’d share my quick-fix. qTranslate would wrap both title and content in it’s own syntax, and it would mess up the CMS tinymce editor.

There didn’t seem to be any solution to this at all, so I had to hack one out myself. What I quickly came up with was to comment out the wordpress function the_editor in Mailpress, and replace it with HTML.

Edit file: mailpress/mp-admin/includes/write.php, and find the following function call (around line 220-225):

the_editor((isset($draft->html)) ? $draft->html : '', 'content', 'title', apply_filters('MailPress_upload_media', false), 5);

And replace it with this:

<div id='editorcontainer'>
<textarea class="theEditor" name="content" style="color:#000;width:760px;height:200px;"><?php echo $draft->html; ?></textarea>
</div>

It’s extremely ugly, and the wysiwyg editor will not work, but hey.. It’s sending proper newsletters at least, and if you know enough to change this, you’ll probably know enough HTML to add your own markup to the newsletter.

I might create a prettier solution when I get more time, and/or need the function again.

2 Comments »

  1. I agree with you that it is awful, but it works!. I’ve seen people on the forums asking exactly how to stop qtranslate working with mailpress as a way to solve their problems. And you got it. Excellent! many thanks. When did you publish it? there is no clue… I’ll let the others know.

    Comment by ubirajara — February 9, 2010 @ 5:29 pm

  2. Hi Ubirajara! Thanks for your kind words, I’m glad you found it usefull.
    I recently redesigned this site, so there’s still a few things missing.. The date has been added (I wrote this on the 20th of Jan.)

    Comment by Daniel — February 9, 2010 @ 6:15 pm

Leave a comment

X
1 2 3 4

Secretlittlethings.com

19. Feb., 2010

Secretlittlethings.com er en blog for Mette Østergaard, hvor hun blogger om (og til tider sælger) hendes hobbyting, strik, syning o.l. Derudover blogger hun om sig selv, sine katte og hendes liv.

Elpaso-linedancers.dk

03. Aug., 2009

El-paso lindancers er en Linedance klub på sydsjælland. Siden er bygget med "custom" CMS hvor de kan styre indhold på siden.

RVTotal.dk

05. Dec., 2010

RV Total er Nordsjællands førende indenfor alt i skov-, park- og haveudstyr. Siden er bygget med wordpress i backend, og designet oh hostet af Danwebs.

Citizen21.dk

21. Okt. 2010

Citizen21 er en organisation med en utrolig værdig sag, der promoverer aktiv medborgerskab for borgeren i det 21. århundrede. Siden er bygget med wordpress i backend, og designet og hostet af Danwebs.

Web- Design

Jeg kan tilbyde webdesign på højt niveau, selvfølgelig specifikt designet til dig og dit firma. Min personlige designstil er blevet karakteriseret som ren, finurlig og moderne. Stilen der bliver lagt i mine specifikke designs afhænger selvfølgelig stærkt af hvilken type side jeg arbejder på og hvilken stemning der forsøges skabt.

Én ting jeg ihvertfald ikke dur til er at skrive sælgende tekst til nettet. Derfor lader jeg denne side samt mine referencer tale for sig selv!