CFI: где формируется импорт?

More
4 years 6 months ago - 4 years 6 months ago #8429 by damarkuzz
Здравствуйте, пытаюсь расширить функционал CFI.
Требуется возможность импорта фотографии.

Разобрался, как её экспортировать, нужно отредактировать код в файле cfi.php:
foreach ($articles as $article) {
			$outItem = [];
            $outItem[] = $article->id;
            $outItem[] = $article->catid;
            $outItem[] = $childrenFull[$article->catid]->path;
            $outItem[] = str_replace(["\n", "\r"], '', $article->title);
            $outItem[] = str_replace(["\n", "\r"], '', $article->language);
            $outItem[] = str_replace(["\n", "\r"], '', $article->introtext);
            $outItem[] = str_replace(["\n", "\r"], '', $article->fulltext);
			$images = json_decode($article->images, JSON_OBJECT_AS_ARRAY);
			$outItem[] = $images['image_intro'];

По логике, необходимо $images обратно кодировать в JSON, но куда и в каком файле?
И какой командой это выполнить? $images = json_encode($article->images, JSON_OBJECT_AS_ARRAY);?

Благодарю администрацию за замечательный форму и расширения!
Last edit: 4 years 6 months ago by damarkuzz.

Please Log in or Create an account to join the conversation.

More
4 years 6 months ago #8433 by JoomLine
Здравствуйте. Дело в том, что мы расширение делали для импорта в поля Joomla. Объекты самого материала заполняются по минимуму.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum

Last from the forum

    • voip phone
    • One day, a monkey drove his car near a lake. Sudden, he saw a tiger under a tree. The tiger saw him, too. The tiger ran very fast at the monkey. The monkey was very afraid and he and his car fell into the lake. The monkey couldn't swim and he shouted. A rabbit came and he jumped into the lake. The abbit swam to the monkey but did not help him. Both of them shouted forhelp. Luckily, a giraffe came along. He was very tall. He helped the rabbit and the monkey.  
    • In Component / JL Mail
    • bloggingaboutanythingonline
    • One day, a monkey drove his car near a lake. Sudden, he saw a tiger under a tree. The tiger saw him, too. The tiger ran very fast at the monkey. The monkey was very afraid and he and his car fell into the lake. The monkey couldn't swim and he shouted. A rabbit came and he jumped into the lake. The abbit swam to the monkey but did not help him. Both of them shouted forhelp. Luckily, a giraffe came along. He was very tall. He helped the rabbit and the monkey.  
    • In Component / JL Mail
    • bloggingaboutanythingweb
    • One day, a monkey drove his car near a lake. Sudden, he saw a tiger under a tree. The tiger saw him, too. The tiger ran very fast at the monkey. The monkey was very afraid and he and his car fell into the lake. The monkey couldn't swim and he shouted. A rabbit came and he jumped into the lake. The abbit swam to the monkey but did not help him. Both of them shouted forhelp. Luckily, a giraffe came along. He was very tall. He helped the rabbit and the monkey.  
    • In Component / JL TV
© 2010- JoomLine
The Joomla!® name is used under a limited license from Open Source Matters in the United States and other countries. joomline.net is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.

email: This email address is being protected from spambots. You need JavaScript enabled to view it.