CzFeedback Mod to allow multiple versions at once,need help

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   CzFeedback Mod to allow multiple versions at once,need help
harknell
CZ Newbie
harknell has been a member for over 18 year's 18 Year Member
Gender: Male
Status: Offline
Joined: Sep 19, 2005
0.00 posts per day
Posts: 18
Points: 653
   
I love the setup of the czfeedback 2.0 module and I'd like to use it to do multiple versions on the same website with different branding for different types of feedback. I am generally good at doing mods for Phpnuke, so I know usualloy what needs to be altered to get this to work. I'm using the 7.8.31 version of phpnuke by Pc-Nuke systems, which comes with the feedback module preinstalled.

What I want to know is this:

What exactly needs to be changed to allow different named versions of the module to run independently? I have it most of the way, but am hitting one glitch that I'm not sure how to deal with. Here's what I've done:

1) Copied the feedback module and renamed the module within the module folder to a new name "office_supplies".
2)went in and copied the following files in ther Admin folders: case/case.office_supplies.php, links/links.office_supplies.php, modules/office_supplies.php
3)went into all of the files and altered any references to the Mysql database such that they are now referring to seperate database tables replicating feedback_config and feedback_depts.

When I load it up it shows what's in the database for my new module, but when I go to the config area and try to update with new information and click submit it goes to the regular feedback module and does not write my changes to the new tables in the database. In addition, when I click the departments link to add or changes departments it goes to this location: intranetdev/admin.php?op=depts, which does noit apear to be within the module itself and referes to the regular feedback module. I double checked everything and can't find a reference that I missed that specifically mentions either the old feedback module location or old table database. I think I don't quite understand how the module interacts with the admin.php file, so I'm missing something in how it writes to the database or where it references which module it's refering to.

Is it possible to give a rundown on what files would need to be altered and a quick list of what within them would need to be rewritten? I don't expect a full list of changfes, just what within would be necessary to change....and especially if anything outside of the module needs to be altered.

Thank you



Back to top Reply with quote
#2   re: CzFeedback Mod to allow multiple versions at once,need h
harknell
CZ Newbie
harknell has been a member for over 18 year's 18 Year Member
Gender: Male
Status: Offline
Joined: Sep 19, 2005
0.00 posts per day
Posts: 18
Points: 653
   
Ok, I actually figured my basic question out. I managed to alter the code to get what I wanted to happen.

However, this is a bit more advanced:

Has anyone tried to alter this code to do what it does (send out the feedback by email), but then add a database table to keep a copy of the request for future reference? I'm talking dead simple here, I don't even care if it's saved in different section in the new table, it could just be a string of all of the of the data as one entry.

I'm ok on PHP and Mysql, but I was wondering now if anyone had some pointers as to where I should put some code in to write to the database this info, which file and location would be best.



Back to top Reply with quote
#3   
mjhufford
CZ Active Member
 Codezwiz Site Donator
mjhufford has been a member for over 19 year's 19 Year Member
usa.gif arkansas.gif
Occupation: IT Industry
Age: 46
Gender: Male
Fav. Sports Team: Da Bears.
Website:
Status: Offline
Joined: Jul 01, 2004
0.04 posts per day
Posts: 288
Points: 15,094
  MSN Messenger 
Well, you'll need to create a table first with respective fields to what is in the feedback module. Then you'll have to tweak to the code of the feedback module to insert the data into that table when it sends the email. I can help you with the INSERT statement if you want. But go create your table first and let me know what all the fields are labeled in your table.




_________________
"The pursuit of easy things makes men weak."
-David O. McKay
Back to top Reply with quote
#4   re: CzFeedback Mod to allow multiple versions at once,need h
harknell
CZ Newbie
harknell has been a member for over 18 year's 18 Year Member
Gender: Male
Status: Offline
Joined: Sep 19, 2005
0.00 posts per day
Posts: 18
Points: 653
   
Ok, here's how I believe things should be set in the database:

I created 6 fields in the database table feedbackoffice_filed

"count" int(11) which is the countup index set as primary with auto_increment
"requestor" which is set to varchar(40) to hold the username submitting feedback
"emailadd" set to varchar(40) for thier email address
"itemnum" varchar(24) for the item number they are referring to in their feedback
"itemdesc" varchar(255) for the text description of their feedback
"datesub" datetime for when the submission happened

I believe this is set properly. All I think I need to do now is figure out where to put the write to database statement and exactly how to write that up.

It looks like the variables in the module are:
$fname is the requestor
$email is their submitted email address
$subject is the item number
$message is the description

so at this point I'd guess I just need to see where and how to insert this into the database table I created.



Back to top Reply with quote
#5   
mjhufford
CZ Active Member
 Codezwiz Site Donator
mjhufford has been a member for over 19 year's 19 Year Member
usa.gif arkansas.gif
Occupation: IT Industry
Age: 46
Gender: Male
Fav. Sports Team: Da Bears.
Website:
Status: Offline
Joined: Jul 01, 2004
0.04 posts per day
Posts: 288
Points: 15,094
  MSN Messenger 
Do some googling on PHP MySQL basics...




_________________
"The pursuit of easy things makes men weak."
-David O. McKay
Back to top Reply with quote
#6   
Telli
Site Admin
Telli has been a member for over 20 year's 20 Year Member
Occupation: Self Employed
Age: 45
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.06 posts per day
Posts: 8089
Points: 494,430
   
Your insert query would look something like this for that table:


$result = $db->sql_query("INSERT INTO {$prefix}_feedbackoffice_filed VALUES (NULL, '$fname', '$email', '$subject', '$message', now())");
if (!$result) {
     die("Problem inserting into $prefix_feedbackoffice_filed");
}


What is your datetime default set to?



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#7   re: CzFeedback Mod to allow multiple versions at once,need h
harknell
CZ Newbie
harknell has been a member for over 18 year's 18 Year Member
Gender: Male
Status: Offline
Joined: Sep 19, 2005
0.00 posts per day
Posts: 18
Points: 653
   
Thank you for the code help. I wrote something similar to what you wrote, but without the error grab (I'm naughty and will add that in now).

The information is actually just for storage purposes so I didn't bother setting the Time field to the datetime setting, it's just a varchar field. I just want to have a log of all of the requests, and might never actually do much with it outside of a possible check if there's a dispute (which is actually unlikely....I'm actually going overboard and documenting stuff that isn't required.)



Back to top Reply with quote
#8   
mjhufford
CZ Active Member
 Codezwiz Site Donator
mjhufford has been a member for over 19 year's 19 Year Member
usa.gif arkansas.gif
Occupation: IT Industry
Age: 46
Gender: Male
Fav. Sports Team: Da Bears.
Website:
Status: Offline
Joined: Jul 01, 2004
0.04 posts per day
Posts: 288
Points: 15,094
  MSN Messenger 
The error garb can come in handy. That way you don't spend hours checking variables and other code when the problem is in a SQL statement. Good luck!




_________________
"The pursuit of easy things makes men weak."
-David O. McKay
Back to top Reply with quote
#9   re: CzFeedback Mod to allow multiple versions at once,need h
harknell
CZ Newbie
harknell has been a member for over 18 year's 18 Year Member
Gender: Male
Status: Offline
Joined: Sep 19, 2005
0.00 posts per day
Posts: 18
Points: 653
   
I got it all working now. Thanks for all of the help guys.

Now I'm on to working out a "view saved feedback" function for the admin menu. That's not as hard now that I know how this all works.



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