Members: 16,996
Threads: 38,846
Posts: 159,391
Online: 44

Newest Member: Kl_broka@rediffmail.com


Odoo.tv - Outdoor Television


Sedo - Domains kaufen und verkaufen das Projekt mambers.com steht zum Verkauf Besucherstatistiken von mambers.com etracker® Web-Controlling statt Logfile-Analyse

Go Back   Mambers.com > Mambo 4.5.1 > Mambo 4.5.1 'How Do I' Questions

Reply
 
LinkBack Thread Tools Display Modes
Old 12.03.2005, 21:27   #1 (permalink)
Junior Mamber
 
nickm's Avatar
 
Join Date: Feb 2005
Posts: 43
nickm is on a distinguished road
Lightbulb AkoBrowserPrefs doesn't work in Firefox... (Ongoing post of hacked fixes)

I found that the AkoBrowserPrefs module didn't work in Firefox. For me, that wasn't acceptable, so I did some hacking of the module and am starting to make some progress.

For example, here's what I did to make the "Bookmark Website" link work:

1) Create a JS file using the js below, call the file bookmark.js and place it in your /includes/js folder:

Code:
<script>

function bookmarksite(title, url){
	if (document.all)
	window.external.AddFavorite(url, title);
	else if (window.sidebar)
	window.sidebar.addPanel(title, url, "")
}

</script>
2) Go into /modules and open up mod_akobrowserprefs.php. Add the following line somewhere toward the top:
Code:
# Pull in javascript page
   include($mosConfig_absolute_path.'/includes/js/bookmark.js');
3) Go down to this line:

Code:
# Show normal (old style) 'Add to favourites' link
  if ($akobpshowfavs) {
    if ($akobpimages)   echo "<img src=\"".$GLOBALS['mosConfig_live_site']."/modules/mod_akobrowserprefs/abp_favs.png\" align=\"absmiddle\" hspace=\"3\" vspace=\"3\">";
    echo "<a href=\"javascript:;\" onClick=\"window.external.addFavorite('".$mosConfig_live_site."', '".$mosConfig_sitename."')\">"._AKOBP_BMWS."</a><br />";
  }
and change it to:

Code:
# Show normal (old style) 'Add to favourites' link
  if ($akobpshowfavs) {
    if ($akobpimages)   echo "<img src=\"".$GLOBALS['mosConfig_live_site']."/modules/mod_akobrowserprefs/abp_favs.png\" align=\"absmiddle\" hspace=\"3\" vspace=\"3\">";
    echo "<a href=\"javascript:bookmarksite('".$mosConfig_sitename."', '".$mosConfig_live_site."')\">"._AKOBP_BMWS."</a><br />";
  }
And save...

That worked for my "Bookmark Website" link. I'm still working on the other ones to make them work and will post as I find the solutions.
nickm is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 14.03.2005, 00:21   #2 (permalink)
Junior Mamber
 
nickm's Avatar
 
Join Date: Feb 2005
Posts: 43
nickm is on a distinguished road
Lightbulb Re: AkoBrowserPrefs doesn't work in Firefox... (Ongoing post of hacked fixes)

Okay, another hack. From my research, it appears that FireFox and Netscape (?) do not allow the changing of the browser homepage via a script.

So, here's the best I could do to make the "Make Homepage" link work...

In the javascript page I mention above, add this just above the </script> tag. Make sure to change the YourSite tags to your own URL:

Code:
function makeHomepage() {
	if  (navigator.userAgent.indexOf("MSIE")!=-1) {	
		document.write('<a href="javascript:;" onClick="this.style.behavior=\'url(#default#homepage)\';this.setHomePage(\'http://www.YourSiteDomain.com\')">Make Homepage</a>'); 
		}  
	else {  
		document.write('<a href="javascript:;" onClick="alert(\'Sorry! This function will not work with non-IE browsers. To make YOURSITENAME your homepage just drag the URL from your URL box to your HOME icon.\')">Make Homepage</a>');
	 }
 }
Then, in the mod_akobrowserprefs.php file, change the line show makehompage code to this:

Code:
# Show 'Make Homepage' link
  if ($akobpshowhome) {
    if ($akobpimages)   echo "<img src=\"".$GLOBALS['mosConfig_live_site']."/modules/mod_akobrowserprefs/abp_home.png\" align=\"absmiddle\" hspace=\"3\" vspace=\"3\">";
    echo "<script type=\"text/javascript\">javascript:makeHomepage();</script>       <br />";
  }
I've tested it in IE6, Firefox 1.1 and NS 7.1.
nickm is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
AkoBrowserPrefs Doesn't Work in Firefox... nickm Component 'How Do I' Questions 6 14.04.2005 06:52
akobrowserprefs do not work in firefox??? theconsul Module Development 1 05.03.2005 19:57
Mosthumb dont work in IE but in Firefox like a charm kachete Mambo 4.5.1 Bugs 0 19.01.2005 17:10
can htmlarea2 or fckeditor work in Firefox 1? leduytien Mambo 4.5 Installation and Upgrades 0 25.10.2004 07:22


All times are GMT +2. The time now is 15:19.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
A vBSkinworks Design
© Copyright 2004-2008 by Arthur Konze Webdesign.