GD2 graph with PHPNuke globals and DB info

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   GD2 graph with PHPNuke globals and DB info
Colossus610
CZ Super Newbie
Colossus610 has been a member for over 19 year's 19 Year Member
usa.gif illinois.gif
Gender: Male
Website:
Status: Offline
Joined: Feb 24, 2005
0.01 posts per day
Posts: 35
Points: 1,667
AIM Address Yahoo Messenger MSN Messenger ICQ Number
I have looked all over the place for info on this for about 4 months now......no luck.

I am running PHPNuke on PHP5 with the GD2 libraries installed and functioning,
I would like to create a graph of more than 50 years worth of info from a while loop from the Nuke db using Nuke globals and variables,
($bgcolor1, "$result = $db->" etc etc)
all I can seem to find is info pertaining to accessing a db using the vanilla PHP/MySQL syntax
(mysql_connect("localhost", "user", "password");
mysql_query("USE database")icon_wink.gif etc etc

Anyone have any near forgotten bookmarks or favorite sites that may have info on this subject?



Back to top Reply with quote
#2   re: GD2 graph with PHPNuke globals and DB info
Colossus610
CZ Super Newbie
Colossus610 has been a member for over 19 year's 19 Year Member
usa.gif illinois.gif
Gender: Male
Website:
Status: Offline
Joined: Feb 24, 2005
0.01 posts per day
Posts: 35
Points: 1,667
AIM Address Yahoo Messenger MSN Messenger ICQ Number
Belay that request, I seem to have found a method that works for me...funny that there isnt more info on PHP/GD2 graphing in Nuke floatin around.......



Back to top Reply with quote
#3   re: GD2 graph with PHPNuke globals and DB info
Colossus610
CZ Super Newbie
Colossus610 has been a member for over 19 year's 19 Year Member
usa.gif illinois.gif
Gender: Male
Website:
Status: Offline
Joined: Feb 24, 2005
0.01 posts per day
Posts: 35
Points: 1,667
AIM Address Yahoo Messenger MSN Messenger ICQ Number
I don't even remember what I thougt I found that solved my original request.....

I still haven't figured out how to create a gd line graph using info from db with nuke gobals and variable....I do not have the option or desire to use any url based data passing.....

AlI've fouond are scripts that use the non-nuke db access and or require seperate pages, I'd like to have a scriptthat handles the graphing that I can pass variables to and embed the final image into a normal nuke module.

I have been all over the gfx_chk feature of Nuke, but that passes the data thru the <img src="url here" almost as a get.
I'm trying to do almost like an include type thing.. maybe I'm retarded....I can do all of the other stuff. I've even created a few modules of my own(and not just Iframe modules or the module creator) but this whole gd stuff is frustrating me.


does anyone have any idea as to how I can do this? Any sites or scripts anyone know of that I can learn from?



Back to top Reply with quote
#4   
x-caliber
CZ Newbie
x-caliber has been a member for over 19 year's 19 Year Member
usa.gif ohio.gif
Status: Offline
Joined: Aug 21, 2004
0.00 posts per day
Posts: 25
Points: 1,558
   
Here's a sample from a project I was working on a while back

First use the global statement, call the DB and DIR. Further down you can see the querry thats using the globals that were called.

function imagemerge(){
global $module_name, $nldateformat, $cookiename, $db, $directory, $leaguename, $rtmail, $prefix, $user_prefix, $user, $cookie, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $maxjoin, $refreshtime;

$result = ($db->sql_query("SELECT * FROM ".$prefix."_ladderpos WHERE active = '1'"));
while(list($block_id, $active) = $db->sql_fetchrow($result)){



Back to top Reply with quote
#5   re: GD2 graph with PHPNuke globals and DB info
x-caliber
CZ Newbie
x-caliber has been a member for over 19 year's 19 Year Member
usa.gif ohio.gif
Status: Offline
Joined: Aug 21, 2004
0.00 posts per day
Posts: 25
Points: 1,558
   
You need to call the prefix also.

Another handy tip with GD and Nuke, is to make sure that you do not leave extra line returns after the ?> at the end of the file. If there are any (especially in the functions folder) your GD image will not appear.



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
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 cannot attach files in this forum
You cannot download files in this forum