TinyPortal

Development => Support => Topic started by: alan s on May 09, 2006, 05:02:20 PM

Title: Cant Add Certain Code Into Block?
Post by: alan s on May 09, 2006, 05:02:20 PM
I tryed to add the "bookmark us " code into a html/javascript block , using this code
<center>
<Script>
function ssbookmark(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}
</script>
<a href="javascript:ssbookmark('TheTeenZone.Net', 'http://www.theteenzone.net')"><b>Bookmark TheTeenZone</b></a>
<br><br>
<SCRIPT LANGUAGE="JavaScript">


</script></center>


But I Get The Error

Forbidden
You don't have permission to access /forums/index.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


and yet its just that code , i've tryed other codes and they work perfectly  , any ideas anyone?
Title: Re: Cant Add Certain Code Into Block?
Post by: elpvn on May 09, 2006, 05:07:30 PM
Try CHMOD forum folder to 755 permission  ;D
Title: Re: Cant Add Certain Code Into Block?
Post by: alan s on May 09, 2006, 05:08:40 PM
its already at 777
Title: Re: Cant Add Certain Code Into Block?
Post by: G6Cad on May 09, 2006, 05:13:56 PM
Add this to the very top of the code

global $scripturl;
Title: Re: Cant Add Certain Code Into Block?
Post by: alan s on May 09, 2006, 05:26:16 PM
nope still the same after adding that code G6
Title: Re: Cant Add Certain Code Into Block?
Post by: G6Cad on May 09, 2006, 05:38:16 PM
If you have your portal in another folder than the root, try to add the path to that instead of to the root when thats where you get permission denied

Eg <a href="javascript:ssbookmark('TheTeenZone.Net', 'http://www.theteenzone.net/smf/')"><b>Bookmark TheTeenZone</b></a>
Title: Re: Cant Add Certain Code Into Block?
Post by: alan s on May 09, 2006, 05:47:55 PM
nope for some reason its this bit of the code that makes the error message appear

<Script>
function ssbookmark(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}
</script>
Title: Re: Cant Add Certain Code Into Block?
Post by: alan s on May 09, 2006, 08:50:03 PM
Could my host have something that stops javascript from being activated on the server?
Title: Re: Cant Add Certain Code Into Block?
Post by: G6Cad on May 09, 2006, 08:56:25 PM
I think you might have to ask your host that question
Title: Re: Cant Add Certain Code Into Block?
Post by: rbh on May 10, 2006, 02:54:04 AM
here is the book mark script i use with no problems. it is very close to what you have but some minor differences. you can try it and see.

<Script>
// Bookmark Script IE & Firefox
// No Need To Change Below
function tpbookmark(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}
</script>
<center><a href="javascript:tpbookmark('SITE NAME HERE', 'SITE URL')">CLICK HERE TO BOOKMARK[/url]</center>