| Author |
Message |
XenoMorpH Hangin' Around

Joined: Jan 23, 2004 Posts: 37 Location: Netherlands
|
Posted:
Sun Jul 16, 2006 8:57 am |
|
I found the solution for the missing CNB admin icon and security-code.
I'm using the CNB 4.4.2 on a php4.x site and on a site which uses php5.x.
On the 4.x site the CNB Your_Account security code and admin icon work just fine, but on the 5.x they don't.....
So I did some research and made some small code changes to let it work on a 5.x machine.
File: modules/Your_Account/index.php
In the case "gfxadminimage" look for:
| Code: |
ImagePNG($image, '', 75);
|
Change to:
| Code: | //ImagePNG($image, '', 75);
ImagePNG($image); |
In the case "gfx" look for:
| Code: |
include("themes/$ThemeSel/theme.php");
|
Change to:
| Code: |
//include("themes/$ThemeSel/theme.php");
|
Look for:
| Code: | ImagePNG($image, '', 75);
|
Change to:
| Code: | //ImagePNG($image, '', 75);
ImagePNG($image); |
This would solve the problems...
I don't quite know why in php5.x | Code: | | ImagePNG($image, '', 75); | can't be used. BTW, the inclusion of theme.php wasn't really needed, cuz the theme.php and vars ($textcolor1) are already loaded plus it results in the error where the securitycode image won't show.....
I have tested this on a 4.x and a 5.x machine...it wirks on both
I hope this will be added to the new CNB5.0.0   |
|
|
|
 |
kguske Site Admin

Joined: Jun 04, 2004 Posts: 4620
|
Posted:
Sun Jul 16, 2006 9:35 am |
|
Interesting... I'm not sure PHP5 support is on the list, but it's helpful to know what you found. I'm especially curious about commenting out the theme.php include - what problem did that resolve? |
|
|
|
 |
XenoMorpH Hangin' Around

Joined: Jan 23, 2004 Posts: 37 Location: Netherlands
|
Posted:
Sun Jul 16, 2006 10:07 am |
|
Problem was that the security image would not show (the famous red cross). $textcolor1 should have been read from this file, but since theme.php is already loaded, the $textcolor1 also is...
After I disabled the include part for the file....it worked... |
|
|
|
 |
kguske Site Admin

Joined: Jun 04, 2004 Posts: 4620
|
Posted:
Sun Jul 16, 2006 11:54 am |
|
Hmmm... I wonder why they did not use include_once. That would also work. I'll check the beta copy of 5.0 to see if it's still a problem. I did not notice this, but am not testing on php 5. |
|
|
|
 |
neggard Hangin' Around

Joined: Jan 20, 2006 Posts: 40 Location: Seden
|
Posted:
Tue Jul 18, 2006 4:04 pm |
|
This solve my pictureproblem, thanks. |
|
|
|
 |
netgoodies Regular


Joined: Sep 26, 2005 Posts: 63 Location: Oxfordshire. United Kingdom.
|
Posted:
Wed Nov 29, 2006 9:04 pm |
|
Hi
I did not notice this sticky topic when I posted .
Anyway if found that
| Code: | | ImagePNG($image, '', 75); |
The 75 in the above code should be changed to 9.
The reason for this is since PHP v5.1 the GD function imagepng() accepts compression argument. The compression argument must be from 0 to 9.
And yes commenting out the theme.php needs to be done because if left in it creates a "Cannot redeclare themeheader()" error. This applies if | Code: | | if (file_exists("themes/$ThemeSel/images/code_bg.png")) | is true.
Regards
Martyn |
|
|
|
 |
sirxazor New Member


Joined: Dec 21, 2006 Posts: 12
|
Posted:
Wed Dec 27, 2006 10:16 pm |
|
This doesn't work, I tried it and it didn't work.
can someone please give other ways to fix this? thank you.
MY INFO:
PHP version: 4.4.4
mySQL version: 4.1.18-log
Image Lib(s)
gd
GD Support enabled
GD Version 2.0 or higher
FreeType Support enabled
FreeType Linkage with freetype
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled |
|
|
|
 |
Guardian2003 Site Admin

Joined: Aug 28, 2003 Posts: 4553 Location: Poland
|
Posted:
Thu Dec 28, 2006 12:22 am |
|
Which version of phpnuke are you using? |
|
|
|
 |
sirxazor New Member


Joined: Dec 21, 2006 Posts: 12
|
Posted:
Thu Dec 28, 2006 1:21 am |
|
I am currently using phpnuke 7.9 |
|
|
|
 |
montego Site Admin

Joined: Aug 29, 2004 Posts: 7236 Location: Arizona
|
Posted:
Thu Dec 28, 2006 8:28 am |
|
Please pick a thread to continue this discussion on. Your other one is here:
|
|
|
|
 |
|
|
|
|