News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

SMF Media Gallery (SMG) - 2.0.5 is out! (December 2)

Started by SMGTeam, September 09, 2008, 03:14:05 PM

Previous topic - Next topic

Özgür

@Nao

i give a 777 permission to mgal_data folder. now image uploading , not error.
i try aevac 4.02 uninstall and 3.1.2 install my forum and test forum  but izlesene.com and other sites (revver.com ...) not working (and smf-media.com).
And dailymotion thumbnails not working my site. Again generic images display.
So Long

Nao 尚

Quote from: ЯocKayseri on November 20, 2008, 09:27:13 AM
@Nao

i give a 777 permission to mgal_data folder. now image uploading , not error.
As I said.

Quotei try aevac 4.02 uninstall and 3.1.2 install my forum and test forum  but izlesene.com and other sites (revver.com ...) not working (and smf-media.com).
And dailymotion thumbnails not working my site. Again generic images display.
Okay, I've had another look... You have plenty of problems. You like problems, don't you?

- You didn't apply the fix Dragooon gave 30 minutes after posting RC3. (http://www.simplemachines.org/community/index.php?topic=260821.msg1805618#msg1805618) (see also my message two posts below.)
That will only interfere with the Regenerate option, though, but if it fails rebuilding thumbnails, it's harder for me to debug... I've asked Dragooon to update the files with the fix, so it shouldn't be a problem in the future.

- Your server apparently likes neither file_get_contents() nor file() for retrieving a remote file. These instructions are supported since PHP 4.3.0 and you have version 5.2.6... The script fails on line 111 of MGallery-Embed.php:

$file = ($file = @file_get_contents($url)) ? $file : implode('', @file($url));


It fails precisely on "implode", because of "wrong arguments". Which means that @file() failed. Which, in turn, means that @file_get_contents() failed and thus returned "false", leading to the alternative way of retrieving the file.
Neither of these instructions are supposed to fail in PHP 5.x!

At this point, I can't help you more without a FTP access to your website, so that I can add debug code.
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Özgür

I send you ftp account details for you in pm.
So Long

Sudhakar Arjunan

Quote from: Nao 尚 on November 20, 2008, 02:24:28 AM
A.SK > "sp-forum"? This has nothing to do with SMG...
As for the undefined 'steps' error, I'll direct you toward Dragooon. I'm pretty much in charge of the Coppermine converter while he's in charge of the SMF Gallery one.
Hopefully, he DIDN'T forget to update the converter at the time of RC3's release, as I requested... ;)

Just in case he did, I'm attaching both converters for RC3.
Please note that I just fixed a typo (ID_COMMENt => ID_COMMENT) that may cause conversions to fail, but this is probably not for yours.


Yes i understood, What i could do now.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Nao 尚

Quote from: ЯocKayseri on November 20, 2008, 10:51:51 AM
I send you ftp account details for you in pm.
Ok, you're really doing your best to make sure this mod doesn't work, eh... ::)

After the folder permission fiasco, and the "you didn't update the mod completely" disaster, let's see how your server is configured...

- file_get_contents() is configured to fail.
- file() is configured to fail.
- curl_exec() works, so I added this to the list of possible functions to retrieve the distant thumbnail. You can see that I fixed your Youtube support.
- However, curl_exec() will fail when it gets a return value telling it to follow a redirection (e.g. that's what Dailymotion does). It would normally work, but not if safe mode is enabled. And guess what? Safe mode is enabled on your server...

So, I'm thinking, you really don't want the mod to work -- or the guy who configured your server is a real prick.

I'm still working on trying to find a fix.... >_<

PS: oh, that, and the fact that the server is configured to NEVER show any error messages...... <_< I love that one.
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Nao 尚

#1005
Rock, I believe you sent me your cpanel info by pm or something like that... I didn't need it in the end.
It took me all my afternoon, but I finally blasted the little suckers!
Now, Dailymotion thumbnails are retrieved on your server, as they should.

For anyone having the same problem -- either disable PHP safe mode (which I'd recommend anyway.......), or replace function downloadToLocal($url, $local) from MGallery-Embed.php with this code block:

// This annoying little function is needed when the frigging server really doesn't want to cooperate...
// Inspired (and hopefully improved) from http://www.php.net/manual/en/function.curl-setopt.php#71313
function smg_curl_redir_exec($ch)
{
static $curl_loops = 0;
if ($curl_loops++ >= 20)
{
$curl_loops = 0;
return false;
}
curl_setopt($ch, CURLOPT_HEADER, true);
$data = curl_exec($ch);
list($header, $data) = preg_split("/(\n\n|\r\r|\r\n\r\n)/", $data, 2);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($http_code == 301 || $http_code == 302)
{
$matches = array();
preg_match('/Location:(.*?)[\r\n]/', $header, $matches);
if ($url = @parse_url(trim(array_pop($matches))))
{
$last_url = parse_url(curl_getinfo($ch, CURLINFO_EFFECTIVE_URL));
$url['scheme'] = $url['scheme'] ? $url['scheme'] : $last_url['scheme'];
$url['host'] = $url['host'] ? $url['host'] : $last_url['host'];
$url['path'] = $url['path'] ? $url['path'] : $last_url['path'];
$new_url = $url['scheme'] . '://' . $url['host'] . $url['path'] . ($url['query'] ? '?' . $url['query'] : '');
curl_setopt($ch, CURLOPT_URL, $new_url);
return smg_curl_redir_exec($ch);
}
}
$curl_loops = 0;
return $data;
}

function smg_file_get_contents($url)
{
if (!function_exists('curl_init') || !$c = curl_init())
return false;
curl_setopt($c, CURLOPT_URL, $url);
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
$contents = curl_exec($c);
if (!$contents)
$contents = smg_curl_redir_exec($c);
curl_close($c);
return $contents ? $contents : false;
}

function downloadToLocal($url, $local)
{
$file = @file_get_contents($url);
if (!$file)
$file = @implode('', @file($url));
if (!$file)
$file = smg_file_get_contents($url);
$len = strlen($file);
$my_file = @fopen($local, 'w');
@fwrite($my_file, $file, $len);
@fclose($my_file);
unset($file);
return $len;
}


If anyone finds a bug with this code, please tell me... I'm not even sure more than 0.05% of all SMG users will have their server go through the whole curl functions, but I am as I am... I can't stand when something doesn't work.
Hopefully, it doesn't *break* video thumbnails for other users! Beta testing time, eh?

Dragooon, could you update the RC3 package with this new code? Thanks.
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Özgür

#1006
thank you so much for your help.. i can't know thanks you.. =) I can understand english but I cant speak eng. very well.So I sent information which is you want. It is working great.. I'm so happy,thanks.. but some video not working so http://asd.rockayseri.net/index.php?action=mgallery;sa=item;id=18 but some video working. ("this video" thumbnail working smf-media but norking my site.)

I'm a person who have many problems :(

if problem is safe mode off i can open it.
So Long

tumbleweed

Wanted to test out the gallery.
issues:

CPG converter only good to 1.5. Only downloads i can find is 1.5 beta RC3
Will the converter be updated for RC3?

tumble
G.C. SOLUTIONS - Hosting Quality Sites Since 2006. Experience Your Forums On A Whole New Level
Elastic Sites Stress Fast CPU/Ram Upgrades- More Info Here.
Reviews By SMF Forum Owners - Read Our Rev

Nao 尚

Quote from: tumbleweed on November 20, 2008, 04:16:28 PM
CPG converter only good to 1.5. Only downloads i can find is 1.5 beta RC3
Will the converter be updated for RC3?
Done long ago... Not my fault if Dragooon forgot to publish them ;)
I already posted them here, though...
http://www.simplemachines.org/community/index.php?topic=260821.msg1806690#msg1806690
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

tumbleweed

Quote from: Nao 尚 on November 20, 2008, 04:30:51 PM
Quote from: tumbleweed on November 20, 2008, 04:16:28 PM
CPG converter only good to 1.5. Only downloads i can find is 1.5 beta RC3
Will the converter be updated for RC3?
Done long ago... Not my fault if Dragooon forgot to publish them ;)
I already posted them here, though...
http://www.simplemachines.org/community/index.php?topic=260821.msg1806690#msg1806690

tumble

thanks.
I will let you know how it moves along.
G.C. SOLUTIONS - Hosting Quality Sites Since 2006. Experience Your Forums On A Whole New Level
Elastic Sites Stress Fast CPU/Ram Upgrades- More Info Here.
Reviews By SMF Forum Owners - Read Our Rev

Nao 尚

Quote from: ЯocKayseri on November 20, 2008, 03:26:08 PM
but some video not working so http://asd.rockayseri.net/index.php?action=mgallery;sa=item;id=18 but some video working. ("this video" thumbnail working smf-media but norking my site.)
Uh, I'll have to have another look... Got the error to show up:

gd-jpeg, libjpeg: recoverable error: Premature end of JPEG file

--> so there must be an issue while downloading the thumbnail. I'm not sure why it works on some Dailymotion videos and not on some others... (??)

------

Fixed :)

It's easy, too... Just replace

list($header, $data) = preg_split("/(\n\n|\r\r|\r\n\r\n)/", $data);

With

list($header, $data) = preg_split("/(\n\n|\r\r|\r\n\r\n)/", $data, 2);

I've committed the fix, and updated my code snippet above.
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Özgür

very thanks for everything! finally work. =) I'm so happy.
So Long

Nao 尚

I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

midiof[f]

Thx for new update !!!! best work :)
me old problem with convert file ben solved Thaaanx :)
i have beer for you
Yaarar clan Azure L2 [nofollow] Admin

Soms

QuoteWarning: recount(/MGallery-Admin.php) [function.recount]: failed to open stream: No such file or directory in /mnt/web4/21/50/51458650/htdocs/mgconverter_sgl.php on line 501

Fatal error: recount() [function.require]: Failed opening required '/MGallery-Admin.php' (include_path='.:/opt/RZphp4/includes') in /mnt/web4/21/50/51458650/htdocs/mgconverter_sgl.php on line 501

I just got this error when I was running the converter. What do I do now. Sorry if this has been asked and answered before.

Manu.G

Quote from: Nao 尚 on November 15, 2008, 11:49:50 AM
Quote from: Chamaeleon on November 15, 2008, 09:23:17 AM
I would need the code for myvideo.de

for the....MGallery-Embed.php

Thanks
Install AEVAC!

I have install AEVAC and i get this message when I try to add a video of myvideo.de or myspace.com

The embed URL was either bad or was from a non-supported site

I have tested it with SMF Media Gallery 1.5 RC 2 and RC 3 in both version I get this message!
Version SMF 2.0.8
SimplePortal 2.3.5

Dragooon

What version of AEVAC? Anything in error log?

Nao 尚

Quote from: Soms on November 21, 2008, 05:35:30 PM
QuoteWarning: recount(/MGallery-Admin.php) [function.recount]: failed to open stream: No such file or directory in /mnt/web4/21/50/51458650/htdocs/mgconverter_sgl.php on line 501

Fatal error: recount() [function.require]: Failed opening required '/MGallery-Admin.php' (include_path='.:/opt/RZphp4/includes') in /mnt/web4/21/50/51458650/htdocs/mgconverter_sgl.php on line 501

I just got this error when I was running the converter. What do I do now. Sorry if this has been asked and answered before.
Open mgconverter_sgl.php and replace line 499

global $mgalFunc, $context, $converter_url;


With:

global $mgalFunc, $context, $sourcedir;
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Nao 尚

Quote from: Manu0372 on November 21, 2008, 05:59:31 PM
The embed URL was either bad or was from a non-supported site
Reproduced on my side. I'll have a look later today.
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Chamaeleon

#1019
@ Manu0372

So viel ich weiß sprichst du auch deutsch, darum schreibe ich mal deutsch.  ;)

Hatte ja das gleiche Problem wie Du mit myvideo.de

Hab das bei mir nun direkt eingefügt.

Im AEVAC findest du die "Subs-Aevac-Sites.php", da sind die ganzen Codes der Videoseiten drin.

Diese kannst du nach Bedarf in die "MGallery-Embed.php" der Galerie einfügen.

suche // This function loads the supported video sites.
function mgal_aevac_load()
{
global $mgalSettings;

static $sites = array(

und danach einfügen

für myvideo.de also diesen Code
array(
'id' => 'myv',
'title' => 'MyVideo',
'website' => 'http://www.myvideo.de',
'type' => 'video',
'added' => '<4.0',
'plugin' => 'flash',
'embed-enabled' => true,
'embed-pattern' => 'http://(?:www\.)?myvideo\.(at|be|ch|de|nl)/(?:watch|movie)/([0-9]{1,8})',
'embed-movie' => 'http://www.myvideo.$2/movie/$3',
'embed-width' => '470',
'embed-height' => '406',
'embed-nolink' => true,
// http://www.myvideo.de/watch/2480593/O_zone_Dragosta_Din_Tei_Numa_Numa
'fix-html-pattern' => '<object style=\'width:(?:[0-9]*?)px;height:(?:[0-9]*?)px;\' type=\'application/x-shockwave-flash\' data=\'$1\'>(?:[\s]{0,3})?<param name=\'movie\' value=\'$1\' />(?:[\s]{0,3})?<param name=\'AllowFullscreen\' value=\'true\' />(?:[\s]{0,3})?</object>(?:\<br/><a href=\'$1\' title=\'(?:[^\'\<\>]*?)\'>(?:[^\<\>]*?)</a>)?',
'fix-html-url' => 'http://www.myvideo.$2/watch/$3',
),


hab das bei mir so gelöst, weil ich die Videofunktion für die normale Beiträge nicht benötige, sondern nur für die Galerie.

Ach ja, es werden keine Thumbnails heruntergeladen, das macht aber AEVAC auch nicht.
Dazu bedarf es eines weiteren Codes wie z.B. bei "youtube.com" findest du auch in der "MGallery-Embed.php" weiter oben.
Diesen Code hab ich leider auch nicht.

Gruß Chamäleon

Advertisement: