Introducing Quicktags (qT 2.1 and higher)

Having Problems? Need Help? Post here!

Introducing Quicktags (qT 2.1 and higher)

Postby Qian Qin » Thu Jan 08, 2009 7:42 pm

Typing XML language tags is quite annoying and takes up quite some time (and need a lot of space) and because there are a lot of fields supported by qT but don't have a nice editor, I introduce Quicktags to you. They look like this:
Code: Select all
[:en]

The differences between them and the normal language tags are:
  • [important] Quicktags are for manual additions, normal tags (<!--:en--><!--:-->) will be used automatically by the plugin to ensure no-tag-visibility if Plugins fails for some reason. You should stick with normal tags whenever possible!
  • [bad] Quicktags will be visible once qT is disabled (breaks layouts, look weird)
  • [good] Quicktags don't need to be closed
  • [good] Quicktags are shorter and will leave more space for the more important content in limited fields
  • [good] Quicktags don't get removed by Wordpress cleaning functions, so they will work at more places (widget title!)
  • [good] Quicktags are faster to type. :P

Here is an example of a complete multilingual string using Quicktags:
Code: Select all
[:en]English[:de]Deutsch
Qian Qin
Site Admin
 
Posts: 899
Joined: Thu Jun 19, 2008 12:14 pm
Location: Germany

Re: Introducing Quicktags (qT 2.1 and higher)

Postby miqrogroove » Sat Jan 24, 2009 5:14 am

Sticky Thread plz ;)
miqrogroove
 
Posts: 74
Joined: Sun Jul 20, 2008 4:18 am

Re: Introducing Quicktags (qT 2.1 and higher)

Postby miqrogroove » Sun Jan 25, 2009 3:16 am

I'm not sure if this is a bug, but qT doesn't seem to tolerate empty quicktags. I have to add a space at least.

For example, this doesn't work correctly:
Code: Select all
[:en][:de][:sv][:zh]text


This does work correctly:
Code: Select all
[:en] [:de] [:sv] [:zh]text
miqrogroove
 
Posts: 74
Joined: Sun Jul 20, 2008 4:18 am

Re: Introducing Quicktags (qT 2.1 and higher)

Postby Qian Qin » Mon Jan 26, 2009 9:36 pm

empty quicktags will be simply ignored.
Code: Select all
[:en][:de][:sv][:zh]text

should be handled just like
Code: Select all
[:zh]text
Qian Qin
Site Admin
 
Posts: 899
Joined: Thu Jun 19, 2008 12:14 pm
Location: Germany

Re: Introducing Quicktags (qT 2.1 and higher)

Postby StephaneGallay » Wed Feb 25, 2009 9:50 am

Hello!

I've been working on a test, Wordpress-based site and tried to use Quicktags to translate blog title, as per your suggestion, but I can't get it to work properly. Adding Quicktags to the title, I get all four languages + quicktags appearing at the same time.

Code: Select all
<div id="title">
<h1>
[:en]The Lutheran World Federation
[:de]Lutherischer Weltbund
[:fr]Fédération luthérienne mondiale
[:es]Federacíon luterana mundial<br />
&ndash; A Communion of Churches </h1>
</div>


Would it be possible to have some example of code using Quicktags?
Stéphane Gallay -- Production Coordinator - Design, Web and Publications
The Lutheran World Federation -- www.lutheranworld.org
StephaneGallay
 
Posts: 6
Joined: Wed Feb 25, 2009 9:44 am

Re: Introducing Quicktags (qT 2.1 and higher)

Postby Qian Qin » Wed Feb 25, 2009 11:21 pm

qT does not parse HTML, so you will have to put the text through qT:

Code: Select all
<?php _e('[:en]The Lutheran World Federation
[:de]Lutherischer Weltbund
[:fr]Fédération luthérienne mondiale
[:es]Federacíon luterana mundial'); ?>
Qian Qin
Site Admin
 
Posts: 899
Joined: Thu Jun 19, 2008 12:14 pm
Location: Germany

Re: Introducing Quicktags (qT 2.1 and higher)

Postby Wyn James » Sat Mar 07, 2009 7:56 pm

I'm well down the road to modifying the Simple:Press forum plugin to work multilingually in conjunction with qTranslate. One outstanding issue is that post titles, forum names and descriptions will only accept full tags, whereas the post message areas will only accept quicktags. Why is this? It would be good if at least one of these tags work in both situations - then it might be feasible to create custom buttons to apply specific language tags to highlighted content. However, I don't want to have two buttons for every language (one to add quicktags to post content and the other to add full tags to post and forum titles).
Wyn James
 
Posts: 8
Joined: Thu Sep 25, 2008 1:25 pm

Re: Introducing Quicktags (qT 2.1 and higher)

Postby Qian Qin » Sun Mar 08, 2009 11:46 pm

qT has two modes:
- it can either support both at the same time (full and quick)
- or only full

So adding full tags should always work. if it somehow seems not to work, it is probably because the < > get transformed to html entities.
Qian Qin
Site Admin
 
Posts: 899
Joined: Thu Jun 19, 2008 12:14 pm
Location: Germany

Re: Introducing Quicktags (qT 2.1 and higher)

Postby alarch » Mon Mar 09, 2009 7:40 pm

Thanks a lot - you were exactly right. I have discovered that one workable solution (which I've tested to ensure that it works) for this scenario is to use the html_entity_decode() function to ensure that the "<" and ">" are converted back.
alarch
 
Posts: 11
Joined: Mon Mar 02, 2009 12:56 pm

Re: Introducing Quicktags (qT 2.1 and higher)

Postby StephaneGallay » Tue Mar 17, 2009 10:07 am

Thanks! I actually managed to work around that one in a different way, but your answer helped me for another issue. :D
Stéphane Gallay -- Production Coordinator - Design, Web and Publications
The Lutheran World Federation -- www.lutheranworld.org
StephaneGallay
 
Posts: 6
Joined: Wed Feb 25, 2009 9:44 am

Next

Return to qTranslate Support Forum

Who is online

Users browsing this forum: No registered users and 2 guests

cron