Page 1 of 1

Problem with news pictures

Posted: 08 Jul 2013, 08:31
by abertrande
Hello
I am a french photographer and I use power pack...I'm very happy by your work
but..
I have a problem with "news photos"
When I upload new picture I chose the option "save in news" but when I clic to the button "rss or news pictures" I have nothing that appears
what is the problem
I see the picture when i'm connected to Powerpack
thank for your help
Arnaud
http://www.abertrande.com

Re: Problem with news pictures

Posted: 08 Jul 2013, 11:47
by abertrande
abertrande wrote:Hello
I am a french photographer and I use power pack...I'm very happy by your work
but..
I have a problem with "news photos"
When I upload new picture I chose the option "save in news" but when I clic to the button "rss or news pictures" I have nothing that appears
what is the problem
I see the picture when i'm connected to Powerpack
thank for your help
Arnaud
http://www.abertrande.com
I think I found but I'm not sure .. I think upload a photo without spaces between words, no accents,
There may be another solution?

Re: Problem with news pictures

Posted: 09 Jul 2013, 08:57
by abertrande
abertrande wrote:
abertrande wrote:Hello
I am a french photographer and I use power pack...I'm very happy by your work
but..
I have a problem with "news photos"
When I upload new picture I chose the option "save in news" but when I clic to the button "rss or news pictures" I have nothing that appears
what is the problem
I see the picture when i'm connected to Powerpack
thank for your help
Arnaud
http://www.abertrande.com
I think I found but I'm not sure .. I think upload a photo without spaces between words, no accents,
There may be another solution?

How to do for to upload the picture with the title original without line between words as here :http://phillip.com.pl/#/start/

Re: Problem with news pictures

Posted: 16 Jul 2013, 23:16
by Artur
Sorry for late reply.

Yes, the blank spaces in file name may affect the news module.

As for the image title, there's 2 ways to change it to your own:

1. Login to your powerpack app (yoursite.com/extras/powerPack/) ticking the "remember me" checkbox. Then refresh your flash site, open the news module, click on the thumbnail which you want to modify and simply change the title of it in popup window. Then save it.

2. You can make it automatic. If you want change the thumbnail title automatically after you change image title in your imagevue admin panel, then you have to edit file:
iv-admin/controllers/FileController.php
Locate this line of code:
Code
if ($file->save()) {
And right after that add this code:
Code
$new_title = urlencode($newdata['title']);
$encodedImg = urlencode($file->name);
$xmlFile = "../extras/userFiles/news.xml";
$new_dom = new DOMDocument('1.0', 'UTF-8');
$new_dom->load($xmlFile);
$Filespath = new DOMXpath($new_dom);
$fileitems = $Filespath->query("/all_news/*/image[@image_name='$encodedImg']");
foreach ($fileitems as $fileitem){
	if ($fileitems->length >= 1) {
		$fileitem->setAttribute('image_title', $new_title);
	}
}
$new_dom->save($xmlFile);
This will update title in your news module images each time when you update the title for image in imagevue admin panel ;)

Re: Problem with news pictures

Posted: 17 Jul 2013, 02:46
by abertrande
Hi
Thank you very much for your answer
But it's doesn't work
I have a different error message
I made ​​a mistake ?
have you an idea ?
Thank

Re: Problem with news pictures

Posted: 17 Jul 2013, 02:58
by Artur
Please read carefully the code that I wrote in previous post and compare it to your code. It is wrong :) .

Look at the code marked red color:
Image

Re: Problem with news pictures

Posted: 17 Jul 2013, 04:11
by abertrande
I removed the space :)
It's ok now
than a lot

Re: Problem with news pictures

Posted: 17 Jul 2013, 04:18
by Artur
I assume it was a google translate? :lol:

Re: Problem with news pictures

Posted: 17 Jul 2013, 04:29
by abertrande
Yes..sorry my English language is bad ;)