X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   funkycategories (https://forum.x-cart.com/showthread.php?t=9668)

august 05-09-2005 08:33 AM

Try this:

Quote:

<SCRIPT type="text/javascript" language="JavaScript 1.2">

function browser_identificator() {
var x, browser, version, screen_x, screen_y;
var isPlugins = '';
version = "0";
isDOM = document.getElementById?true:false;
isJava = navigator.javaEnabled();
isStrict = document.compatMode=='CSS1Compat';
if(window.opera && isDOM) {
browser = "Opera";
version = "5";
if(window.print)
version = "6";
if((navigator.userAgent.indexOf("Opera 7") >= 0 || navigator.userAgent.indexOf("Opera/7") >= 0))
version= "7";

}
if(!(window.opera && isDOM) && document.all && document.all.item) {
browser = 'MSIE';
version = navigator.userAgent.replace(/^.*MSIE.(\d+).*$/, "$1");
}
if(navigator.appName=="Netscape" && !isDOM) {
browser = 'NN';
version = navigator.userAgent.replace(/^.*Mozilla.(\d+).*$/, "$1");
if(version != '')
version = "4";
}
if(navigator.appName=="Netscape" && isDOM) {
if(navigator.userAgent.indexOf("Safari") >= 0) {
browser = 'Safari';
version = navigator.userAgent.replace(/^.*Safari.(\d+).*$/, "$1");
} else {
browser = 'Mozilla';
version = navigator.userAgent.replace(/^.*Mozilla.(\d+).*$/, "$1");
}
}
for(x = 0; x < navigator.plugins.length; x++)
isPlugins += (isPlugins == ''?"":"|")+navigator.plugins[x].name.replace(/\s/g, "+").replace(/&/, " ");
isPlatform = navigator.platform;
isCookie = ((browser == 'NN' && version == '4')?(document.cookie != ''):navigator.cookieEnabled);
screen_x = screen.width;
screen_y = screen.height;
return (isDOM?"Y":"N")+(isStrict?"Y":"N")+(isJava?"Y":"N" )+"|"+browser+"|"+version+"|"+isPlatform+"|"+(isCo okie?"Y":"N")+"|"+screen_x+"|"+screen_y+"|"+isPlug ins;
}

</SCRIPT>


If not, try this:
http://www.apptools.com/phptools/browser/source.php

dazybabes 05-10-2005 07:49 AM

I'm sorry August but I'm only a novice at this, where abouts does that coding need to go? and what about that source.php??

thanks

august 05-10-2005 08:46 PM

I'm still learning too, I think the best place will be home.tpl in skin/customer/
You have to use {literal} and {/literal} at the start and at the end of the script for it to work in x-cart. Good luck!

dazybabes 05-11-2005 12:14 AM

Ok well doesn't seem to help so far?

What about that source.php that you gave me the link for?

where should that go?? Any ideas?

Thanks for your help anyway!

tamicampos 04-03-2008 11:25 AM

Re: funkycategories
 
I know Funky Categories is old but I would like to use it. I followed the directions perfectly and cut and past the code. It looks like this:

www.kookoomonkey.com

I had rounded boxes in my skin1/css file and it didn't work so I took it out but it only changes the other menus. Do I need to take out Fancy Categories?
Please help.

Yurij 04-04-2008 03:02 AM

Re: funkycategories
 
Quote:

Originally Posted by tamicampos
I know Funky Categories is old but I would like to use it. I followed the directions perfectly and cut and past the code. It looks like this:

www.kookoomonkey.com

I had rounded boxes in my skin1/css file and it didn't work so I took it out but it only changes the other menus. Do I need to take out Fancy Categories?
Please help.


Change template "skin1/customer/funkycategories.tpl"

PHP Code:

{literal
<
script language="JavaScript1.2"
function 
changeLoc(address){ 
  
window.location.href address


function 
onOver(td){ 
  if(
document.getElementById||(document.all && !(document.getElementById))){ 
    
td.style.backgroundColor="#009966"
    
td.style.cursor="hand"
  } 


function 
onOut(td){ 
  if(
document.getElementById||(document.all && !(document.getElementById))){ 
    
td.style.backgroundColor="#006633"
  } 

</
script
{/
literal

<
table width="100%" border="0" cellpadding="0" cellspacing="0"
  <
tr
    <
td class="funkycatsep"></td
  </
tr
</
table

{if 
$config.General.root_categories eq "Y"
<
table width="100%" border="0" cellpadding="0" cellspacing="0"
{foreach 
item=one from=$categories key=ind}
  <
tr
    <
td width="1" class="funkycatsep"><img src="{$ImagesDir}/spacer.gif"></td
    <
td class="funkycat" onMouseOver="onOver(this);" onMouseOut="onOut(this);" onClick="changeLoc('home.php?cat={$one.categoryid}');"><font color="#FFFF00">&raquo;</font>{$one.category}</td>
    <
td width="1" class="funkycatsep"><img src="{$ImagesDir}/spacer.gif"></td
  </
tr
  <
tr
    <
td colspan="3" class="funkycatsep"></td
  </
tr
{/foreach} 
</
table

{else} 

<
table width="100%" border="0" cellpadding="0" cellspacing="0"
{foreach 
item=one from=$subcategories key=ind}
  <
tr
    <
td width="1" class="funkycatsep"><img src="{$ImagesDir}/spacer.gif"></td
    <
td class="funkycat" onMouseOver="onOver(this);" onMouseOut="onOut(this);" onClick="changeLoc('home.php?cat={$one.categoryid}');"><font color="#FFFF00">&raquo;</font>{$one.category}</td>
    <
td width="1" class="funkycatsep"><img src="{$ImagesDir}/spacer.gif"></td
  </
tr
  <
tr
    <
td colspan="3" class="funkycatsep"></td
  </
tr
{/foreach} 
</
table>
{/if} 


tamicampos 04-04-2008 05:28 AM

Re: funkycategories
 
Thank you very much.

seaCOAST 04-04-2008 09:51 AM

Re: funkycategories
 
Hey funky...is this supposed to work on 4.1.9? I installed it, but it didn't quite work right.

Thanks!

Yurij 04-07-2008 05:47 AM

Re: funkycategories
 
What problems arose? I tested for gold 4.1.9,
for "IE + FF" - works fine.

To install the mod, it is necessary to carry out all four steps set out in the first post of this topic. Just use the my template for step N1.

Scotty85 05-01-2008 04:15 PM

Re: funkycategories
 
Guess this isn't really needed at all with the new FancyCats.


All times are GMT -8. The time now is 06:18 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.