pabloselin
Forum Replies Created
-
Forum: Plugins
In reply to: [Custom Post Type Permalinks] Pagination not working for taxonomy archives.Yes, I haven’t figured out what is happening with this. I hope the developer reads this. Meanwhile I’ll stick to use the old style taxonomy links…
If I find a fix I’ll post it here…
Forum: Plugins
In reply to: [Simple Twitter Connect] Unable to comment using STCYyyes, it seems the problem is the evil twitter api.
mixette, I’m sorry, it seems that I lost that function. From what I remember the function was some javascript in the wordpress edit screen that grabbed the different translated titles from the input fields and put them in the slug fields, because the widget transformed the titles automatically to web-safe once you updated the post.
Here are the functions for Qtranslate.
The widget is just the select language function:
returns nothing, generates HTML lanuage selection code for the current page. $style can be either image, text, both or dropdown.
qtrans_generateLanguageSelectCode(string $style, string $id)
Forum: Plugins
In reply to: [Social] [Plugin: Social] Use own Facebook App ID?Yes, it would be nice at least to show some info about the website your authorizing from and some branding also in the connection window.
I think this is important because not every facebook user is clear about which website is he authorizing the connection.
@grumo64, sadly I haven’t been able to fix that problem yet, I know that I have to filter somehow the tinyMCE insertion but I haven’t researched too much yet. Probably I will have to deal with that problem later so if I manage to find a solution I will post it here… but don’t expect it too soon.
my bad, I forgot to put an extra parenthesis
it’s like this:
<?php _e(get_post_meta($post->ID, 'Description', true)); ?>
oh, if you use the plugin qtranslate extension and you need to output the correct language you just have to echo the field with _e instead of echo like this
_e(get_post_meta($post->ID, 'Description', true);
If you want to create different fields for different languages then you can combine the variable of the current language with the name of the field like this:
$currlang = qtrans_getLanguage(); echo get_post_meta($post->ID, 'Description_'.$currlang, true);
Given that you have custom fields called like ‘Description_en’, or ‘Description_de’
you can put it at the end of functions.php or in an included file, notice that this thing is made for 4 languages so you can add/remove the fields for each language…
Hey Kaspar, I’m hard at work with Qtranslate and a website I’m making so I created some functions for custom alt and title in all of the media fields, I also managed to hack the image output so I can retrieve the alt and title when I call post thumbnail and stufff.
You can see my code that adds extra fields for different things in the media upload window and also in the media edition section. I have tried it and it works nice. You can put the language tags you want.
Maybe if I have the time I can change it later and turn it into a plugin, but since you are in a hurry you can put this stuff in functions.php and see what happens.
here is the code, hope it’s some use to you.
Nice that it worked for you too, here is the function in pastebin (sorry about the not reading of forum rules.
Hi baga, i figured it out.
You have to replace the function that qtranslate uses for generating the alternate links with another that gets the right ones. I put this code in the qtranslate-slug.php and managed to make the alternate language links work.
In the function qTranslateSlug_remove_qtrans_filters() you have to add this line:
remove_filter('wp_head', 'qtrans_header');
And then you have to add this function in another place:
[Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]
I tested it and it works OK.
You can handle some automatic generation via jQuery, because the input fields in the metabox gets automatically converted when you save you just have to manage to put the title in each slug box.
Check my lousy function that I made to achieve this result, it’s far from complete but it makes the work in a four language site:
[Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]
yyyyyes
I don’t think this issue is solved yet, my patch only saves the slugs in the database but the permalinks aren’t working for custom post types yet or it is not clear for me how to make them work.