Author |
Message |
XenoMorpH
Hangin' Around
![](modules/Forums/images/avatars/gallery/blank.gif)
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 ![Smile](modules/Forums/images/smiles/icon_smile.gif) ![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
kguske
Site Admin
![](modules/Forums/images/avatars/41f0b40a419280935f3a0.gif)
Joined: Jun 04, 2004
Posts: 6437
|
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? |
_________________ I search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
XenoMorpH
![](modules/Forums/images/avatars/gallery/blank.gif)
|
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... |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
kguske
![](modules/Forums/images/avatars/gallery/blank.gif)
|
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
neggard
Hangin' Around
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Jan 20, 2006
Posts: 40
Location: Seden
|
Posted:
Tue Jul 18, 2006 4:04 pm |
|
This solve my pictureproblem, thanks. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
netgoodies
Regular
![Regular Regular](modules/Forums/images/ranks/2stars.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
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 Only registered users can see links on this board! Get registered or login!.
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 |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
sirxazor
New Member
![New Member New Member](modules/Forums/images/ranks/1star.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
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 |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
Site Admin
![](modules/Forums/images/avatars/125904890252d880f79f312.png)
Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Thu Dec 28, 2006 12:22 am |
|
Which version of phpnuke are you using? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
sirxazor
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Dec 28, 2006 1:21 am |
|
I am currently using phpnuke 7.9 |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
Site Admin
![](modules/Forums/images/avatars/0c0adf824792d6d341ef4.gif)
Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Thu Dec 28, 2006 8:28 am |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
lucena
New Member
![New Member New Member](modules/Forums/images/ranks/1star.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Jul 31, 2009
Posts: 4
|
Posted:
Tue Aug 10, 2010 9:50 am |
|
It works even after it was about two years ago, af ....
Very good, just change the code in the GFX file imagepng ($ image,'', 9);
After this is done only smile heheh ![Laughing](modules/Forums/images/smiles/icon_lol.gif) |
Last edited by lucena on Tue Aug 10, 2010 10:33 am; edited 1 time in total |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Aug 10, 2010 9:57 am |
|
This topic is over 4 years old and the other topic (duplicate post) was over 2 years old.
CNBYA is no longer being supported or developed by anyone as far as I am aware. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
lucena
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Aug 10, 2010 10:34 am |
|
Guardian2003 wrote: | This topic is over 4 years old and the other topic (duplicate post) was over 2 years old.
CNBYA is no longer being supported or developed by anyone as far as I am aware. |
Yes but many people still use it, and everything that is Utel information ... ![Wink](modules/Forums/images/smiles/icon_wink.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
kguske
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Aug 10, 2010 10:52 am |
|
Both of your comments are useful. Thank you. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|