• Welcome to Simple Machines Community Forum. Please login or sign up.

Simple ImageShack (latest release: v3.1.3)

Started by Rik©, June 03, 2005, 02:50:34 PM

Previous topic - Next topic

winky100

May 28, 2010, 08:13:12 AM #700 Last Edit: May 28, 2010, 08:24:18 AM by winky100
I am using the default theme.

I am using Google Chrome Browser.

No errors in the error log.

This code is in the html for the page and it takes up space but no iframe is displayed.
<div>
                            <iframe src="http://192.168.2.103/forum2/sis/SISiframe.php" scrolling="auto" frameborder="0" width="660" height="240" allowtransparency="true"> You must have an iframe-compatable browser to view the ImageShack.us upload form.</iframe>
                        </div>

If I use firefox browser, still no  iframe and this is the code that is in the html for the page
                        <div>
                            <iframe src="http://192.168.2.103/forum2/sis/SISiframe.php" scrolling="auto" frameborder="0" width="660" height="240" allowtransparency="true"> You must have an iframe-compatable browser to view the ImageShack.us upload form.</iframe>

                        </div>


IN both cases I dont even get the error message that says I must have an iframe compatible browser.

cybertormentor

Hello Ric recently installed the Simple ImageShack 3 on my forum but I saw that he is experiencing this error as the image:



You know what might be happening?

Rik©

May 28, 2010, 12:35:32 PM #702 Last Edit: May 28, 2010, 01:10:12 PM by Rik©
@winky100:
Are iframes enabled in your browsers?
Can you acces the iframe.php directly?

@cybertormentor:
I'm not sure but it could be the permission/ownership error.
Try to chmod the sis folder and everything inside to 755.

-Rik©

cybertormentor

Quote from: Rik© on May 28, 2010, 12:35:32 PM

@cybertormentor:
I'm not sure but it could be the permission/ownership error.
Try to chmod the sis folder and everything inside to 755.

-Rik©

It worked, were the same permissions, but I encountered problems while sending any files in xml accused fails then resorted to this post
http://www.simplemachines.org/community/index.php?topic=37683.msg2622689#msg2622689

THANKS :D

winky100

The statement
  include("SISform.php");

does not seem to be working.
If I put an echo at teh start of the include file it never echo's.
An echo right before that inlucde is ok.

Rik©

May 28, 2010, 02:17:38 PM #705 Last Edit: May 28, 2010, 02:37:44 PM by Rik©
Quote from: cybertormentor on May 28, 2010, 01:28:01 PM
Quote from: Rik© on May 28, 2010, 12:35:32 PM

@cybertormentor:
I'm not sure but it could be the permission/ownership error.
Try to chmod the sis folder and everything inside to 755.

-Rik©

It worked, were the same permissions, but I encountered problems while sending any files in xml accused fails then resorted to this post
http://www.simplemachines.org/community/index.php?topic=37683.msg2622689#msg2622689

THANKS :D
Which SIS version do you use?
And also which cURL verion?

-Rik©

Rik©

May 28, 2010, 02:34:58 PM #706 Last Edit: May 28, 2010, 02:38:56 PM by Rik©
Quote from: winky100 on May 28, 2010, 02:15:05 PM
The statement
  include("SISform.php");

does not seem to be working.
If I put an echo at teh start of the include file it never echo's.
An echo right before that inlucde is ok.
Maybe if you use the complete url to SISform.php
eg
include("http://www.your.websi.te/smf/sis/SISform.php");

-Rik©

winky100

May 28, 2010, 02:40:56 PM #707 Last Edit: May 28, 2010, 02:52:28 PM by winky100
I tried the include path you said but that does not work. Still no echo from SISForm.php

The include statement is not working. I removed all the code from SISform.php. I replaced it with phpinfo(); Nothing.

When I do a search in the Sources folder I cant seem to find any other source file that uses the include statement. Am I just missing it?

Rik©

Maybe this works...
else
{
include("SISform.php");
sisForm();
}


-Rik©

winky100


winky100

May 28, 2010, 03:32:27 PM #710 Last Edit: May 28, 2010, 03:39:50 PM by winky100
I am able to include the file now, there was switch I had to set to On in the php.ini file.

However, SISform.php will still not display. I think there is a problem with the sisForm() function. If I remove the sisForm() function from the code I get an echo. If I put the sisForm() function back into the file I get no echo.

Could there be a mis-placed quote in the sisForm() function?

There appears to me to be all sorts of possible misplaced <? or quotes in that function. ther is one ?> that I cant find its matching <?php for


Rik©

You're right!

The last 3 lines
<?
}
?>

Should be
<?php
}
?>


* Rik© fixes the package

-Rik©

Rik©

Both packages have been updated.

Thanks again for pointing the error winky100.

-Rik©

winky100

Ok, I now get your mod. Thanks for the fix!


However, when I try to host a .jpg file it failed and I got this error.

Wrong file type detected for file test.jpg:application/octet-stream

However, it said that .jpg files were accepted types. Could it be the file size?

Can you tell me what might be wrong?

Thanks

winky100

Rik,

I finally got it working but I had to make changes to your code. Someone has already figured out how to fix this bug. And it looks like you had the fix implemented at one time but you then commented it out.


This is from a post by BWJM a while ago...

More to the point, how do you fix SIS v3.0.3?

In SISxmlapi.php, make the following changes:

1. Look for the following line of code:
Code: [Select]
$xmlString = uploadToImageshack($dest);
and replace it with:
Code: [Select]
$xmlString = uploadToImageshack($dest, $_FILES['fileupload']['type']);

2. Look for the following line of code:
Code: [Select]
function uploadToImageshack($filename) {
and replace it with:
Code: [Select]
function uploadToImageshack($filename, $sFileType) {

3. Look for the following line of code:
Code: [Select]
$post['fileupload']='@'.$filename;
and replace it with:
Code: [Select]
$post['fileupload']='@'.$filename.";type=".$sFileType;

The above solution has worked for me and I'm back in business now. I thought I would share the solution with you and the rest of the community here so that more people can get themselves back in business soon too.

Rik, BWJM's fix works for me. I am using the latest version of curl. Why did you remove this fix?


winky100

Once I got it to work I have to say this is a very cool mod.


Rik©

May 29, 2010, 02:24:17 AM #716 Last Edit: May 29, 2010, 02:42:53 AM by Rik©
Thanks.
That fix is for cURL 7.20.0 only, that's why i am releasing a different version with BWJM's solution.

Interesting.... looks like cURL 7.20.0 has problems with jpg/jpeg, older versions with png/bmp.
So i think i have to update SIS 3.0.5/3.1.3 again.

-Rik©

Rik©

Made a custom SISxmlapi.php which i want to test with cURL 7.20.0, but i don't have it myself.
Does any of you who has cURL 7.20.0 want to test it for me?

-Rik©

winky100

Hi Rik,

I have curl 7.20. I will test it for you.

Rik©

Quote from: winky100 on May 29, 2010, 09:26:25 AM
Hi Rik,

I have curl 7.20. I will test it for you.
Thanks.
If i remember correct you've got SMF 2.0 RC3...

Attached to this post is a modified SISxmlapi.php (works with SMF 2.0 RC3 only)
Back-up/rename the original to SISxmlapi.php~ or something and upload/replace it with the modified one.
The modified file is without BWJM's fix, it just renames the original file to filename.ext.gif (green is added)
This works with older cURL versions, and if this also works for you i don't have to make special editions of SIS for those who do have cURL 7.20.0+.

-Rik©

Advertisement: