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
mds
Client


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

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

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
Only registered users can see links on this board!
Get registered or login to the forums!


**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 Back to top

As phpNuke uses only one database, I suggest you move everything into the phpNuke database and use the Nuke database layer functions.
View user's profile Send private message Visit poster's website
fkelly
Moderator


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

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

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
Client


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

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

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 ..
View user's profile Send private message
fkelly
Moderator


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

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

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:

Only registered users can see links on this board!
Get registered or login to the forums!


There is quite a bit in there about module construction.
View user's profile Send private message Visit poster's website
mds
Client


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

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

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:

Only registered users can see links on this board!
Get registered or login to the forums!


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..
View user's profile Send private message
mds
Client


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

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

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 to the forums!


$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
View user's profile Send private message
evaders99
Former Moderator in Good Standing


Joined: Apr 30, 2004
Posts: 3221

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

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
View user's profile Send private message Visit poster's website
mds
Client


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

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

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....
View user's profile Send private message
mds
Client


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

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

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
Only registered users can see links on this board!
Get registered or login to the forums!


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
View user's profile Send private message
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-2011 by Raven

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 Modified by the RavenNuke™ Team ::

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

zerosum