دعم الموقع

Hi, i have some problem with my script to get tmdb movie keywords.

This is my scripts that i use

if(key == "keywords"){
            var keyw = "";
            $.each( tmdbdata.keywords, function( i, item ) {
                keyw += "" + item.name + ", ";
            });
            $('input[name="keywords"]').val( keyw );
}

The result is: undefined, . whats wrong?

I use same metod to get backdrops with this code

if(key == "images"){
            var imgt = "";
            $.each( tmdbdata.images.backdrops, function( i, item ) {
                imgt += "https://image.tmdb.org/t/p/w300" + item.file_path + "\n";  
            });
            $('textarea[name="imagenes"]').val( imgt );
}

it's work properly

anyone can help?

3 ردود (على هذه الصفحة 1 من 1)

Jump to last post

Hi WongKentir,

I think I can assume you're using append_to_response so if that's case, you're probably looking for:

$.each( tmdbdata.keywords.keywords, function( i, item ) {

I think. If not, then I'll need to see an example request (full URL) you're making.

Wow, this great. thanks travis, Love your tips. it's work.

Short, sharp and to the point.

I’m no PHP/Script expert but you guys make learning so much easier. :)

Are you familiar with wordpress?

In other case, I do the same result with another code.

$.getJSON( url + input + "/keywords?" + apikey, function(tmdbdata) {
    $.each(tmdbdata, function(key, val) {
        if(key == "keywords"){
            var valKywd = "";
            $.each( tmdbdata.keywords, function( i, item ) {
            valKywd += "" + item.name + ", "; //
        });
            $('#new-tag-<?php echo get_option("country"); ?>').val( valKywd );
        }
    });
});

It works pretty good, but i don't want custom tax "country". i want default tax of tags, to auto fill up the taxonomy.

i already tried with: tag, tags, post-tags, but not work. Have any idea to solve this case?

SOLVED, thanks :)

لم تجد الفلم أو المسلسل ؟ سجل دخولك و انشئها

عام

s ركز شريط البحث
p افتح قائمة الملف الشخصي
esc اغلق النافذة المفتوحة
? افتح نافذة اختصارات لوحة المفاتيح

على كافة صفحات الوسائط

b ارجع للخلف (او للصفحة الام عند التطبيق)
e انتقل لصفحة التعديل

على كافة صفحات موسم المسلسل

(السهم الايمن) انتقل للموسم التالي
(السهم الايسر) انتقل للموسم السابق

على كافة صفحات حلقة المسلسل

(السهم الايمن) انتقل للحلقة التالية
(السهم الايسر) انتقل للحلقة السابقة

على كافة صفحات الصور

a افتح صفحة اضافة الصورة

على كافة صفحات التعديل

t افتح محدد الترجمة
ctrl+ s ارسال النموذج

على صفحات المناقشة

n انشى نقاش جديد
w تبديل حالة المتابعة
p تبديل عام / خاص
c تبديل اغلاق / فتح
a افتح الانشطة
r رد على النقاش
l انتقل لأخر رد
ctrl+ enter أرسل رسالتك
(السهم الايمن) الصفحة التالية
(السهم الايسر) الصفحة السابقة

الاعدادات

هل تريد تقييم او اضافة هذا العنصر للقائمة؟

تسجيل الدخول