1
robotgod2000
Help using css with php

Hi,

I've got a custom php block that links to a non-xoops application, passing the XOOPS user id and password to this other application. It works great, BUT I can't seem to get the php code to take in formatting from my .css. I'd like this left custom block to match my left user menu.

This is the code.

global $xoopsUser;
function 
Encrypt($string$key="xxxxxx") {
    
$result '';
    for(
$i=1$i<=strlen($string); $i++) {
        
$char substr($string$i-11);
        
$keychar substr($key, ($i strlen($key))-11);
        
$char chr(ord($char)+ord($keychar));
        
$result.=$char;
    }
    return 
$result;
}
echo 
".Encrypt($xoopsUser->getVar('uname'))."&password=".Encrypt($xoopsUser->getVar('pass'))."&ref=".Encrypt($_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'])."'>My Timesheet";


Note this part of it isn't taking:

echo "


What am I missing? Is there a global I need to include?

Thx

2
rowdie
Re: Help using css with php
  • 2005/1/10 16:52

  • rowdie

  • Just can't stay away

  • Posts: 846

  • Since: 2004/7/21


The css style in the default theme is
td#mainmenu a.menuTop

You're missing the table td html tags...

solution: either put your output in a table, or change the class

3
studioC
Re: Help using css with php
  • 2005/1/10 17:21

  • studioC

  • Friend of XOOPS

  • Posts: 922

  • Since: 2003/12/7


hi,

i'm not familiar within php but ..
Quote:
echo "


shouldn't that be:

echo ""


michael

4
robotgod2000
Re: Help using css with php

Thanks for the tip. I added a new class to my .css for "a" tags:

a#phpusermenu a {
    
background#F6F8FA;
    
font-weightnormal;
    
padding0px 0px 0px 30px;
    
border-right1px solid #D9E3EB;
    
border-bottom1px solid #D9E3EB;
    
border-left1px solid #D9E3EB;
    
border-top1px solid #D9E3EB;
    
width120px;
    
color#666666;
}
a#phpusermenu a:hover {
    
background-color#FFFFFF;
    
text-decorationnone;
    
border1px solid #8CA9C1;
    
color#799BB7;
}

a#phpusermenu a.highlight {padding-left: 30px;background-color: #fcc; border-right: 1px solid #666666; border-bottom: 1px solid #ADACAD; border-left: 1px solid silver;text-decoration: none;}


Shouldn't this work? It doesn't.
echo ".Encrypt($xoopsUser->getVar('uname'))."&password=".Encrypt($xoopsUser->getVar('pass'))."&ref=".Encrypt($_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'])."'>           My Timesheet";


Thx.

5
robotgod2000
Re: Help using css with php

I think the single quotes are optional there. Anyway I tried with single quotes and got the same, non-formatted result.

Thx.

6
rowdie
Re: Help using css with php
  • 2005/1/10 17:39

  • rowdie

  • Just can't stay away

  • Posts: 846

  • Since: 2004/7/21



7
robotgod2000
Re: Help using css with php


Login

Who's Online

389 user(s) are online (85 user(s) are browsing Support Forums)


Members: 0


Guests: 389


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Aug 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits