PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
XenoMorpH
Hangin' Around


Joined: Jan 23, 2004
Posts: 37
Location: Netherlands

PostPosted: Sun Jul 16, 2006 8:57 am Reply with quote Back to top

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 SmileSmile
View user's profile Send private message Visit poster's website
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 4620

PostPosted: Sun Jul 16, 2006 9:35 am Reply with quote Back to top

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?
View user's profile Send private message
XenoMorpH
Hangin' Around


Joined: Jan 23, 2004
Posts: 37
Location: Netherlands

PostPosted: Sun Jul 16, 2006 10:07 am Reply with quote Back to top

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...
View user's profile Send private message Visit poster's website
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 4620

PostPosted: Sun Jul 16, 2006 11:54 am Reply with quote Back to top

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.
View user's profile Send private message
neggard
Hangin' Around


Joined: Jan 20, 2006
Posts: 40
Location: Seden

PostPosted: Tue Jul 18, 2006 4:04 pm Reply with quote Back to top

This solve my pictureproblem, thanks.
View user's profile Send private message MSN Messenger
netgoodies
Regular
Regular


Joined: Sep 26, 2005
Posts: 63
Location: Oxfordshire. United Kingdom.

PostPosted: Wed Nov 29, 2006 9:04 pm Reply with quote Back to top

Hi

I did not notice this sticky topic when I posted
Only registered users can see links on this board!
Get registered or login to the forums!
. Embarassed

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
View user's profile Send private message Visit poster's website
sirxazor
New Member
New Member


Joined: Dec 21, 2006
Posts: 12

PostPosted: Wed Dec 27, 2006 10:16 pm Reply with quote Back to top

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
View user's profile Send private message
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 4553
Location: Poland

PostPosted: Thu Dec 28, 2006 12:22 am Reply with quote Back to top

Which version of phpnuke are you using?
View user's profile Send private message Send e-mail Visit poster's website
sirxazor
New Member
New Member


Joined: Dec 21, 2006
Posts: 12

PostPosted: Thu Dec 28, 2006 1:21 am Reply with quote Back to top

I am currently using phpnuke 7.9
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7236
Location: Arizona

PostPosted: Thu Dec 28, 2006 8:28 am Reply with quote Back to top

Please pick a thread to continue this discussion on. Your other one is here:
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum