dejudicibus
Forum Replies Created
-
Forum: Plugins
In reply to: [New User Approve] GDPR Compliance of New User ApproveOK, so it looks like that ONCE the WordPress platform will be GDPR compliant, also your plug-in will be, since you use what WP already stores. Is my understanding correct?
Forum: Developing with WordPress
In reply to: __() & _e() do not support LANG attributeSOLVED! I added this function to functions.php
if( ! function_exists('load_specific_textdomain') ){ function load_specific_textdomain( $textdomain = 'default', $locale = null ) { if ( null === $locale ) { $locale = is_admin() ? get_user_locale() : get_locale(); } // Unload previously loaded strings so we can switch translations. unload_textdomain( $textdomain ); $return = load_textdomain( $textdomain, WP_LANG_DIR . "/$locale.mo" ); if ( ( is_multisite() || ( defined( 'WP_INSTALLING_NETWORK' ) && WP_INSTALLING_NETWORK ) ) && ! file_exists( WP_LANG_DIR . "/admin-$locale.mo" ) ) { load_textdomain( $textdomain, WP_LANG_DIR . "/ms-$locale.mo" ); return $return; } if ( is_admin() || wp_installing() || ( defined( 'WP_REPAIRING' ) && WP_REPAIRING ) ) { load_textdomain( $textdomain, WP_LANG_DIR . "/admin-$locale.mo" ); } if ( is_network_admin() || ( defined( 'WP_INSTALLING_NETWORK' ) && WP_INSTALLING_NETWORK ) ) load_textdomain( $textdomain, WP_LANG_DIR . "/admin-network-$locale.mo" ); return $return; } }
then I used the following block of code:
// $lang is the language you wish to temporarily load // $domain is the text domain // if $lang is null, use the current locale if ($lang != null) { $clang = is_admin() ? get_user_locale() : get_locale(); load_specific_textdomain($domain, $lang); } // Place here the code containing __($string_to_be_translated, $domain) if ($lang != null) { load_specific_textdomain($domain, $clang); }
Forum: Developing with WordPress
In reply to: __() & _e() do not support LANG attributeI know how to use i18n in WordPress. The problem is not the file, but the fact that in a site of a specific language, I have pages in other languages. So, in those pages, the same plug-in should use another language file. The problem is that I do not know how to FORCE the language in a specific page.
- This reply was modified 6 years, 12 months ago by dejudicibus.
OK fixed… now I understand
I am not sure to understand. Look at this page: there are two albums: LEGGENDO METROPOLITANO and THASSALAKI. The default thumbnails for images are 160×240 because most of my images use portrait layout, but for those specific albums all images use landscape layout. So I specified
thumbnail_width="240" thumbnail_height="160"
for those two albums. In fact, as you see, the album cover is 240×160 as expected but if you click on a gallery, the thumbnails are still 160×240. They should be 240×160. How can I do that?I have several albums and galleries. Some use a thumbnail size, other use another size. So I can’t use settings: I have to use shortcode parameter.
Forum: Developing with WordPress
In reply to: Trucating tables in excerptok, thank you. MY theme is not commercial at all, by the way. It’s a personal theme. ??
It DOES work. Thank you.
Is there anywhere a place where we can find more info on NG structures, methods and data?What do you mean by re-address? Here is my code:
$gallery_images = nggTags::find_images_for_tags('cover') ; if ( !empty($gallery_images) ) { foreach($gallery_images as $key => $image) { $gid = $image->galleryid ; $imageURL = $image->imageURL; $thumbURL = $image->thumbURL; $altText = $image->alttext; // Use that stuff... } }
In the past, all variables had a value, but now only $gid and $altText have one. $imageURL and $thumbURL are empty! That happened after the update to the latest plugin version.
OK, it looks like it works but the NggImage returned is not what expected. Here is a dump of the first object returned by
$gallery_images = nggTags::find_images_for_tags('cover') ;
that is
object(stdClass)#525 (16) { ["pid"]=> int(23) ["image_slug"]=> string(13) "canadian-deer" ["post_id"]=> int(0) ["galleryid"]=> int(23) ["filename"]=> string(12) "ani_deer.jpg" ["description"]=> string(0) "" ["alttext"]=> string(13) "Canadian deer" ["imagedate"]=> string(19) "2014-01-26 19:08:05" ["exclude"]=> int(0) ["sortorder"]=> int(0) ["meta_data"]=> array(17) { ["aperture"]=> bool(false) ["credit"]=> bool(false) ["camera"]=> bool(false) ["caption"]=> bool(false) ["created_timestamp"]=> bool(false) ["copyright"]=> bool(false) ["focal_length"]=> bool(false) ["iso"]=> bool(false) ["shutter_speed"]=> bool(false) ["flash"]=> bool(false) ["title"]=> bool(false) ["keywords"]=> bool(false) ["width"]=> int(1020) ["height"]=> int(720) ["saved"]=> bool(true) ["ngg0dyn-120x120x100-00f0w010c011r110f110r010t010"]=> array(4) { ["width"]=> int(120) ["height"]=> int(120) ["filename"]=> string(75) "ani_deer.jpg-nggid0223-ngg0dyn-120x120x100-00f0w010c011r110f110r010t010.jpg" ["generated"]=> string(21) "0.40257100 1428934918" } ["ngg0dyn-200x200x90-00f0w010c010r110f110r010t03jpg"]=> array(4) { ["width"]=> int(200) ["height"]=> int(141) ["filename"]=> string(72) "ani_deer-nggid0223-ngg0dyn-200x200x90-00f0w010c010r110f110r010t03jpg.jpg" ["generated"]=> string(21) "0.55280400 1410086529" } } ["extras_post_id"]=> int(3910) ["updated_at"]=> int(1428934918) ["pricelist_id"]=> int(0) ["id_field"]=> string(3) "pid" ["__defaults_set"]=> bool(true) }
As you can see, the following fields are missing:
** imageURL URL Path to the image ** thumbURL URL Path to the thumbnail ** imagePath Server Path to the image ** thumbPath Server Path to the thumbnail ** href A href link code ** thumbPrefix FolderPrefix to the thumbnail ** thumbFolder Foldername to the thumbnail
Forum: Plugins
In reply to: [bbp style pack] Not existent reply in Latest activity widgetDone. There is no reply at all. It’s empty.
Forum: Plugins
In reply to: [bbp style pack] Not existent reply in Latest activity widgetWell, thank you for promptness and responsiveness. bbPress is really a nice piece of code.
Forum: Plugins
In reply to: [bbp style pack] Not existent reply in Latest activity widgetWell, I am really a beginner in bbPress, so I am not sure what a super sticky it. The post was published by me and I am the keymaster of forum, in case that could be helpful.
Forum: Plugins
In reply to: [bbp style pack] Not existent reply in Latest activity widgetLook at this page, sidebar on right side. The first entry is the post, the second one is a reply that does not exists.
Forum: Plugins
In reply to: [Media Library Assistant] MLA does not use custom sizesWell, I regenerated all thumbnails after creating the new sizes. The problem was created by a class in original theme style. Not your fault. Fixed. Thank you for support.