Title Attribute and Menu Label with qTranslate All in One SEO Pack Feature Requests Forum

The support forums have a new home! Please visit All in One SEO Pack's new residence at Semper Plugins to purchase a support plan.

Please consider registering
guest

Log In

Lost password?
Advanced Search:

— Forum Scope —



— Match —



— Forum Options —




Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
Title Attribute and Menu Label with qTranslate
September 7, 2009
6:11 am
karlsan
New Member
Forum Posts: 9
Member Since:
June 16, 2009
Offline

Hello,

We're running a site with qTranslate and just installed AIOSP. We've used it before once in a while on single language sites and it's a great help – thanks!

What I wanted to check, was if it's possible to change the Title Attribute and Menu Label fields in the admin, so they accept short code? It would be great to have different SEO boxes for the different languages, sure, but that seems like quite a pipe dream so instead we're using short codes for the different languages, like this:

[:se]Swedish title[:en]English title

This works just fine for Title, Description and Keywords, but for some reason not Title Atrribute and Menu Label. The qTranslate author has a page about making a plugin work with his, which is essentially about using filters or Gettext. I looked at the AIOSP code but couldn't figure out what to change. Since it works for title, description and keywords, perhaps it would be easy to add for title attribute and menu label too? That would be great!!

Thanks, Karl

September 7, 2009
6:55 am
karlsan
New Member
Forum Posts: 9
Member Since:
June 16, 2009
Offline

A quick follow-up:

I'd been working with PAGES when making the comment above. Having just made a couple of POSTS, I spotted that they only have the first three boxes (Title, Description and Keywords), so I guess these three get processed in a way that Title Attribute and Menu Label don't.

If anyone has any info on where this can be changed, I would appreciate it!

September 7, 2009
1:04 pm
angeleyes
New Member
Forum Posts: 4
Member Since:
September 7, 2009
Offline

How do you use the qtranslate plugin?

September 7, 2009
1:04 pm
angeleyes
New Member
Forum Posts: 4
Member Since:
September 7, 2009
Offline

 .

September 8, 2009
6:55 am
karlsan
New Member
Forum Posts: 9
Member Since:
June 16, 2009
Offline

@angeleyes,

Pretty straight-forwardly – have two languages installed and qTranslate checks which content to display. Since there is no tab for different languages when it comes to adding AIOSP data for a post/page, I'm using short codes for adding it – [:se] and [:en]. As mentioned, this work OK for the fields on POSTS, but not for the Title Attribute and Menu Label which only appear on PAGES. So I guess these aren't filtered the same way and was wondering how one can get them added to the mix as well.

September 29, 2009
7:33 am
karlsan
New Member
Forum Posts: 9
Member Since:
June 16, 2009
Offline

OK, I had another look at this and think I figured it out. In all_in_one_seo_pack.php on lines #677 and 679, the $title_attrib and $menulabel variables are output. What I did was add __() around the variables, like this for #677:

$filtered = '<li class="page_item page-item-'.$postID.$matches[2].'"><a href="'.$matches[3].'" title="'.__($title_attrib).'">'.__($menulabel).'</a>';

and this for #679:

$filtered = '<li class="page_item page-item-'.$postID.$matches[2].'"><a href="'.$matches[3].'">'.__($menulabel).'</a>';

That works for me, now it filters out the correct language when using language shortcodes, even for menu label and title attribute.

Since this is posted in the "future request" part of the forum, it would be great to have a quick word from the programmers as to whether this can be added to an upcoming version or not.

Thanks!

September 29, 2009
7:44 am
WordPress Professional
Admin
Forum Posts: 442
Member Since:
October 14, 2008
Offline

You must be a subscriber to view administrator posts. Click here to purchase a support subscription.

For what shall it profit a man if he shall gain the whole world and lose his own soul
September 29, 2009
8:16 am
karlsan
New Member
Forum Posts: 9
Member Since:
June 16, 2009
Offline

Thanks a lot and thanks again for a great plugin! Have a nice day.

Forum Timezone: America/New_York

Most Users Ever Online: 205

Currently Online:
65 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

romiojuliat: 102

yaoming987: 50

jintuy: 50

miki1986: 33

newshow: 28

karen1234: 27

Member Stats:

Guest Posters: 0

Members: 6356

Moderators: 3

Admins: 4

Forum Stats:

Groups: 5

Forums: 23

Topics: 1546

Posts: 3450

Newest Members: carofern@cisco.com, pronto, jessie, pbaylies, ninaeast, freda

Moderators: davecashmore (2), aaron (5), tempadmin (0)

Administrators: WordPress Professional (442), hallsofmontezuma (202), onefinejay (10), stevemortiboy (4)