PDA

View Full Version : Terms of Service Violation


livingingc
01-24-2009, 06:18 PM
I was testing the pet output and its saying "Terms of service violation" on myspace. Apparantly, the code isnt allowed there. Is there a way around this?

BMR777
01-24-2009, 06:34 PM
I was testing the pet output and its saying "Terms of service violation" on myspace. Apparantly, the code isnt allowed there. Is there a way around this?


You could try adding the following code to a .htaccess file in your public_html folder (Change pets to the location of your installation):

RewriteEngine On
RewriteBase /pets/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^pets/get/([0-9]+).gif$ /pets/get.php?id=$1 [L]

Then you would have to edit the bbcode generator in manage.php so that the new URLs for the images are reflected. The code above will hopefully trick MySpace into seeing the dynamic images as static ones, thus hopefully solving the problem.

For more info see: http://www.arvyre.com/forum/viewtopic.php?f=6&t=238

Brandon

livingingc
01-24-2009, 07:15 PM
ohh k. what do i change the code to? whats the new url? im also donating 10


I was testing the pet output and its saying "Terms of service violation" on myspace. Apparantly, the code isnt allowed there. Is there a way around this?


You could try adding the following code to a .htaccess file in your public_html folder (Change pets to the location of your installation):

RewriteEngine On
RewriteBase /pets/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^pets/get/([0-9]+).gif$ /pets/get.php?id=$1 [L]

Then you would have to edit the bbcode generator in manage.php so that the new URLs for the images are reflected. The code above will hopefully trick MySpace into seeing the dynamic images as static ones, thus hopefully solving the problem.

For more info see: http://www.arvyre.com/forum/viewtopic.php?f=6&t=238

Brandon
[hr]
i figured it out, i forgot to change the path at the rewriterule part at the bottom. Wow. imm glad thats fixed.

BMR777
01-24-2009, 07:43 PM
Ok, in the file manage.php find:

<img src=\"http://www.".$dname."".$spath."/get.php?id=".$cid."\">

I think you will need to change to:

<img src=\"http://www.".$dname."".$spath."/get/".$id.".gif\">

That is assuming you installed the .htaccess file correctly, then that should work. Also, change .gif to the extension of your image files if different.

Brandon

livingingc
01-24-2009, 07:57 PM
Alright, thanks. It works fine now.

BMR777
01-24-2009, 07:58 PM
Glad it is working. :)

If you have any other issues please let me know. :)

Brandon

livingingc
01-24-2009, 08:03 PM
this new version sounds like its going to have alot of new things... it looks like im going to have to re-do all of the text changes ive done in the php scripts. :( but im excited to get the new features so its ok. do you have list of what to expect so far?

BMR777
01-24-2009, 08:06 PM
this new version sounds like its going to have alot of new things... it looks like im going to have to re-do all of the text changes ive done in the php scripts. :( but im excited to get the new features so its ok. do you have list of what to expect so far?


Johnathon is the lead developer on the next release as he has taken over the Adoptables Script development for me. He has made public a list of new features in this thread (http://www.rusnakweb.com/forum/showthread.php?tid=375&pid=3074#pid3074).

BMR777

agnyz
01-26-2009, 11:31 AM
i haven't got this mod to work yet, but don't have the time to work on it right now.

I did want to poing out that you will also want to change the script on the adopt.php or new people will be getting the old code when they first adopt.

agnyz
01-26-2009, 01:35 PM
in this part of the code.

RewriteEngine On
RewriteBase /pets/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^pets/get/([0-9]+).gif$ /pets/get.php?id=$1 [L]

does the .gif$ need to be changed to .jpg$ if using jpgs?

I assume it does but you know what they say about assuming.[hr]
Ok I just don't get it.

This is a simple mod and should be easy to do but I just can't make it work.

I checked livingingc program and i can see it does work. Btw livingingc you do need to change the adopt.php page when i firts adopted it is giving me the old code.

when i add this <img src="http://www.".$dname."".$spath."/get/".$id.".jpg\">

I get this
Parse error: syntax error, unexpected T_STRING in /home/agnyz/public_html/pettest/manage.php on line 118

so i tested it using a copy of the script that i didn't alter any and i still get the same error message.

When I first installed this program I noticed the same thing with myspace and came up with the same mod back then but was getting that error message so I used a work around just to show a static logo image for the site on myspace.

When I seen this post I thought perhaps it was the .htaccess file that was making it not work, but that isn't the case.

The short of it is, when I apply this mod I get the above mentioned error message.

Could it be something with my hosting?[hr]
i should add that I am getting this error when I click on the link to get the codes for the html.

BMR777
01-26-2009, 04:04 PM
Post the code surrounding the edit as well so I can take a look. It's possible that somehow a quote or something is missing and that is causing the error.

agnyz
01-27-2009, 10:28 AM
$article_title = "Codes for ".$name."";
$article_date = date('Y-m-d');
$article_content = "You can use the codes below to show off your adoptable and get others to level them up. If you have a website, use the HTML code to put your creature on your website. If you want to link to your creature in forums, use the BBCODE.<br><br>";
$article_content = $article_content."<b>HTML:</b><br><textarea name=\"textarea\" cols=\"50\" rows=\"4\"><img src="http://www.".$dname."".$spath."/get/".$id.".jpg\"><br>Creature Name: ".$name."<br>
<a href=\"http://www.".$dname."".$spath."/levelup.php?id=".$cid."\">Level this creature up! Click Here!</a><br></textarea>";

$article_content = $article_content."<b><br><br>BBCODE:</b><br><textarea name=\"textarea\" cols=\"50\" rows=\"4\">http://www.".$dname."".$spath."/get.php?id=".$cid."
Creature Name: ".$name."
Level this creature up! Click Here! (http://www.".$dname."".$spath."/levelup.php?id=".$cid.")</textarea><br>";

}

the script works fine until I add this <img src="http://www.".$dname."".$spath."/get/".$id.".jpg\">

as soon as i switch this I get the error message

BMR777
01-27-2009, 04:47 PM
Here's the issue:

<img src="http://www.".$dname."".$spath."/get/".$id.".jpg\"> is wrong. Told you you forgot something. :)

Should be:

<img src=\"http://www.".$dname."".$spath."/get/".$id.".jpg\">

You forgot the backslash before the quote before http, and PHP didn't like that. :)

Try the above and see if it works. :)

EDIT: I see what happened. Stupid MyBB when I post using PHP tags on the code strips out the slash before the http and the quote in front. So, that's a bit odd then. :)

agnyz
01-27-2009, 09:17 PM
Here's the issue:

<img src="http://www.".$dname."".$spath."/get/".$id.".jpg\"> is wrong. Told you you forgot something. :)

Should be:

<img src=\"http://www.".$dname."".$spath."/get/".$id.".jpg\">

You forgot the backslash before the quote before http, and PHP didn't like that. :)

Try the above and see if it works. :)

EDIT: I see what happened. Stupid MyBB when I post using PHP tags on the code strips out the slash before the http and the quote in front. So, that's a bit odd then. :)


thanks for clearing that up, it works great of course.

I knew I couldn't have forgotten anything because I copy and pasted.

Thanks for the support you give.

Have to say out of all the support sites I have used this one is the best.[hr]
small problem with this fix.

it works fine on the manage.php but on the adopt.php once they have adopted a pet and get the code the link shows up without the user id number. it just shows up as adoptables/get/.jpg">

BMR777
01-28-2009, 04:34 PM
On the code you use for adopt.php use $cid instead of $id and that should work. :)

Brandon

agnyz
01-28-2009, 10:08 PM
worked like a charm!

thanks again.

agnyz
01-31-2009, 09:30 AM
Hiya people.

Just wanted to give anyone using this change to the .htaccess file to make the adoptable program work on Myspace a warning in case you run into what i did last night.

We are working on a new game for our site and we bought four domain names for the game. We have the game on a sub-domain on the agnyz site, no reason to pay for more hosting when it isn't needed.

Last might I was using our hosting control panel to redirect the new domain names to the sub-domain were the game is located.

Then we lost the whole site. There were internal 500 errors for everything we ran off the site.

It took us about 10 minutes to figure out that the control panel added commands to the .htaccess file and the adotable code we added to it was confusing things and knocking the whole site off line.

It was easy to fix and now the new names and the adoptable programs are working.

Anyway, just wanted to give you guys a warning that if you have made the changes in the .htaccess to make this work on myspace and you use your hosting control panel to make global changes you might run into the same thing.

Perhaps this post will help you find the problem quickly if it does.

Seapyramid
02-03-2009, 02:24 PM
The change to the .htaccess file did just cause 500 errors on my site & it is a domain, not a myspace, not sure how to fix it so that this would be usable. Any ideas would be appreciated.

Thank you,
Sea

BMR777
02-03-2009, 03:42 PM
The change to the .htaccess file did just cause 500 errors on my site & it is a domain, not a myspace, not sure how to fix it so that this would be usable. Any ideas would be appreciated.

Thank you,
Sea


That's odd that it would throw 500 errors. Did you change /pets/ to the path to the adoptables script?

Also, do you have other content in the .htaccess file that would possibly conflict with the code? If you have other content in the file, please paste the whole file's contents here. :)

Thanks,
BMR777

Seapyramid
02-03-2009, 08:16 PM
The change to the .htaccess file did just cause 500 errors on my site & it is a domain, not a myspace, not sure how to fix it so that this would be usable. Any ideas would be appreciated.

Thank you,
Sea


That's odd that it would throw 500 errors. Did you change /pets/ to the path to the adoptables script?

Also, do you have other content in the .htaccess file that would possibly conflict with the code? If you have other content in the file, please paste the whole file's contents here. :)

Thanks,
BMR777


Ok.. confused I guess:) This is what happens with blondes. I had changed the /pets/ to the path that my images were stored. What path should it be going to.. the adoptables script as a whole was installed in my root.

Thanks,
Sea

BMR777
02-04-2009, 04:32 PM
The path should be to the adoptables script. So, try just putting a slash / for the path and see if that works.

If you still get 500 errors let me know.

Brandon

Seapyramid
02-04-2009, 04:59 PM
No more 500 errors but I am still getting Sorry, dynamic pages in the tags are not allowed when I try to add to certain forum sigs.

I have RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/get/([0-9]+).gif$ /get.php?id=$1 [L] in the .htaccess The pets script is installed in my root.

The output I am getting for the BBC code is [img]http://www.mysticgrove.net/get/61.gif" (http://www.mysticgrove.net/levelup.php?id=61)

Not sure what I'm doing wrong, sorry for making something simple so difficult.

Thank you,
Sea

BMR777
02-04-2009, 05:05 PM
Well, I'm checking on your server and the redirect isn't working properly, which is part of the issue. Unfortunately this might not work on all servers. I'm not sure why the redirect doesn't work server-side though. :(

If the actual redirect were to work then the bbcode generator would need to be edited so it works properly with the new redirects.

I think though Johnathon is working on a better fix for the next release. This fix I didn't make, I just found it somewhere, but the new release out soon should fix this. :)

Seapyramid
02-04-2009, 05:21 PM
Excellent :)

Thank You,
Sea