Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
mds
Client



Joined: Dec 24, 2004
Posts: 194
Location: Michigan

PostPosted: Wed Dec 20, 2006 7:37 pm Reply with quote

I'm trying to do this on my own but really have NO idea what i am doing .

i have a working page on my test site but when i ftp it to the website it dont work because of the DB connection difference...I got it to work on the test site which is on my laptop using dreamweaver..here is a link to what works on the test site http://nocfa.org/index01.txt

**what i have tried**
ive tried deleting for obvious reasons the connection stuff at the top of the file
('Connections/test.php') and that whole block

tried changing things around to use something like thisbut edited to what i thought would work and no go....$result = $db->sql_query("SELECT id, id_cat, question, answer FROM ".$prefix."_faqanswer WHERE id_cat='$id_cat'");
while ($row = $db->sql_fetchrow($result)) {

ive tried using the php.net manual and mysql manual and i just cant get it
like i said i really have no clue Sad

This is for my Fire Dept. and i do the website stuff as part of my "volunteering" or donation back to the Dept. part and i would really like to get this working and be able to learn/understand how to , to be able to do more like this.....as i want to make an admin side to this as well so the info can be updated easily enough without having to do it directly in the DB.......

Thank You in advance with any help you can offer / do
 
View user's profile Send private message
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Wed Dec 20, 2006 10:42 pm Reply with quote

As phpNuke uses only one database, I suggest you move everything into the phpNuke database and use the Nuke database layer functions.

_________________
- Star Wars Rebellion Network -

Need help? Nuke Patched Core, Coding Services, Webmaster Services 
View user's profile Send private message Visit poster's website
fkelly
Former Moderator in Good Standing



Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Thu Dec 21, 2006 11:47 am Reply with quote

Have you installed PHPnuke even? I can't tell for sure from your posting. If so, what version. Did you run the installation SQL steps from Ravennuke?

As Evaders states, Nuke will make the connection to the database for you but you have to put the necessary connection information in a file called config.php first. You can't even do an installation without doing this.

It almost looks like you are trying to write your own module. That's something that can be done but first things first, try to get a working installation of standard Nuke first and we can go from there.
 
View user's profile Send private message Visit poster's website
mds







PostPosted: Thu Dec 21, 2006 12:20 pm Reply with quote

sorry i was tired as all get out when i wrote this..

version number shows 7.6 but i am pretty sure its RavenNuke76 v2.02.02 Distro just the table wasnt updated...

i am trying to do this as a module which i want to be able to update and add via admin panel

i have created the table allready in the same DB as the rest of the site

the site has been and running for about 2yrs now its here nocfa.org

evaders99
lol i have no idea what your talking bout lol ...i am trying but i know i am in over my head.......tho i will have a look for it tonight when i get back home from work.....hi ooo off to paint more cars i go.........

and thanks for the replies and sugestions ..
 
fkelly







PostPosted: Thu Dec 21, 2006 3:55 pm Reply with quote

Telling you how to create a module that has an administrative component goes well beyond what can be accomplished in a Forum. Or at least by me Smile

You might want to check out Chris Karakas' how to manual at:

http://www.karakas-online.de/EN-Book/

There is quite a bit in there about module construction.
 
mds







PostPosted: Thu Dec 21, 2006 6:17 pm Reply with quote

fkelly wrote:
Telling you how to create a module that has an administrative component goes well beyond what can be accomplished in a Forum. Or at least by me Smile

You might want to check out Chris Karakas' how to manual at:

http://www.karakas-online.de/EN-Book/

There is quite a bit in there about module construction.



i have tried that as well ....well the nuke manual here that tells about creating a module....guess i'll have to try again from scratch ...right now i would just like to get the info to display ......hmmm i didnt know bout Chris's manual...looking now..
 
mds







PostPosted: Thu Dec 21, 2006 8:05 pm Reply with quote

ok i think i am finally getting somewhere........following chris's how to ..to the T...i am finally getting the info displayed......my question is in this string from here [ Only registered users can see links on this board! Get registered or login! ]

$resultpersons = sql_query("SELECT idperson, nameperson FROM "$prefix."_topolino", $dbi);
for ($m=0; $m < sql_num_rows($resultpersons, $dbi); $m++){
list($idperson, $nameperson) = sql_fetch_row($resultpersons, $dbi);
echo "$idperson - $nameperson < br >";
}

where or what does the $resultpersons come from ? i see in all modulesname/index.php somewhere has a $result"name" what does this represent or how does 1 come up with this "name"

now where can i go to figure out how to display my info in the table i created ?
Thanks
 
evaders99







PostPosted: Thu Dec 21, 2006 10:28 pm Reply with quote

First, move your tables into the phpNuke database. Delete all the connections code, all we need is the query code

Instead of
mysql_query -- use $db->sql_query
mysql_fetch_assoc -- use $db->sql_fetchrow
mysql_num_rows -- use $db->sql_numrows

Finally, I would remove all the junk DOCTYPE, HTML, HEAD, BODY tags. They aren't necessary as phpNuke will generate them
 
mds







PostPosted: Fri Dec 22, 2006 5:59 pm Reply with quote

evaders99 wrote:
First, move your tables into the phpNuke database. Delete all the connections code, all we need is the query code

Instead of
mysql_query -- use $db->sql_query
mysql_fetch_assoc -- use $db->sql_fetchrow
mysql_num_rows -- use $db->sql_numrows

Finally, I would remove all the junk DOCTYPE, HTML, HEAD, BODY tags. They aren't necessary as phpNuke will generate them


yup i had allready had the tables where they needed to be and the info in them.. last night i was able to get it to be displayed ...i just need to get to be displayed in the table layout of that file...i updated that txt file and show you what i have this far and the layout of how i would like to have it displayed....
 
mds







PostPosted: Sun Dec 24, 2006 11:28 am Reply with quote

ok so i got a somewhat working module now ...it atleast displays the info i want in the table like i wanted......but......now theres a theme issue that mess's up the way it is displayed (the 1 i noticed with was mtecnic xmas theme).....is this an actual theme issue or is there something missing in my file to correct this ???

working file.txt is here www.nocfa.org/personnelDefault.txt

have a look and tell me how i did for doing it for the first time....it's an edited version of the nsngroups/public/GRDefault........

ahhhh xmas eve and off to do some more editing of that file.......

MERRY CHRISTMAS EVERYBODY
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

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 ©