Skip to content

Conversation

@adnanelamghari
Copy link
Contributor

No description provided.

@adnanelamghari adnanelamghari force-pushed the add-export-images-info branch from 5f5091f to f04f4c9 Compare July 17, 2019 09:20
protected function addImagesURL(& $data)
{
if ($data['Tuto Details']['Main_Picture']) {
$data['Tuto Details']['Main_Picture'] = WikifabExploreResultFormatter::getImageUrl($data['Tuto Details']['Main_Picture']);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ne modifie pas le champ Main_picture, créé plutot "Main_Picture_url"

et ici tu utilise WikifabExploreResultFormatter::getImageUrl à moitié : soit tu utilise la génération d'image de mediawiki, pour eviter de crééer un dépendanc avec Explore, soit tu utilise completement la méthode, en passant aussi les annotation, ce qui serai plus pertinent ici, car cetet fonction permet de gérer les image annoté, mais tu ne le fait pas.
(il suffit de passer en second parametre $data['Tuto Details']['Main_Picture_annotations'] )

foreach ($data['Tuto Step'] as $key => $val) {
$iteration = 0;
while (true) {
$pictureNumber = $iteration < 10 ? 'Step_Picture_0' . $iteration : 'Step_Picture_' . $iteration;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$pictureNumber = sprintf( 'Step_Picture_%2d', $iteration ) ;


protected $fieldsToParse = [];

protected $addImageInfo;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tu pourrai mettre un valeur par defaut (false)

if ($wgRequest->getCheck( 'imagesInfo' ) ) {
$addImagesInfo = true;
}
$this->export_controller->setAddImagesInfo($addImagesInfo);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

si tu a bien mit une valeur par default, il suffit de faire ca :
if ($wgRequest->getCheck( 'imagesInfo' ) ) {
$this->export_controller->setAddImagesInfo(true);
}

@adnanelamghari adnanelamghari force-pushed the add-export-images-info branch 4 times, most recently from 1cee61e to bb6f17f Compare July 24, 2019 12:00
@adnanelamghari adnanelamghari force-pushed the add-export-images-info branch from d4f8cff to c300895 Compare July 24, 2019 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants