Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> CNB Your Account
Author Message
XenoMorpH
Hangin' Around



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

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

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: 6432

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

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...
nukeSEO - nukeFEED - nukePIE - nukeSPAM - nukeWYSIWYG
 
View user's profile Send private message
XenoMorpH







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

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







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

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

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

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

Hi

I did not notice this sticky topic when I posted here. 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

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: 6799
Location: Ha Noi, Viet Nam

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

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







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

I am currently using phpnuke 7.9
 
montego
Site Admin



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

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

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! ]

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
lucena
New Member
New Member



Joined: Jul 31, 2009
Posts: 4

PostPosted: Tue Aug 10, 2010 9:50 am Reply with quote

It works even after it was about two years ago, af .... Shocked
Very good, just change the code in the GFX file imagepng ($ image,'', 9);

After this is done only smile heheh Laughing Laughing Laughing


Last edited by lucena on Tue Aug 10, 2010 10:33 am; edited 1 time in total 
View user's profile Send private message
Guardian2003







PostPosted: Tue Aug 10, 2010 9:57 am Reply with quote

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.
 
lucena







PostPosted: Tue Aug 10, 2010 10:34 am Reply with quote

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
 
kguske







PostPosted: Tue Aug 10, 2010 10:52 am Reply with quote

Both of your comments are useful. Thank you.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> CNB Your Account

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©