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
jane1965
New Member
New Member


Joined: Jun 28, 2009
Posts: 10

PostPosted: Fri Jul 10, 2009 5:37 am Reply with quote

I am wanting to create a feedback system for individual site advisors whereby the feedback for each advisor will be available for the site users to read. I looked at the feedback module but it appears that just sends a message and does nothing else from what I could make out. I took a look at the Reviews module and came to the conclusion that I could make copies of the module and database for each advisor and add a link to their pages, but I'm not quite sure what code etc., I would need to change to ensure that the copied module matches the copied database as each copy would be renamed to match the advisors name and no longer be called Review. I hope this makes sense, I'd really appreciate any help with this or even suggestions of any other way I could achieve a feedback system.

Thank you Smile
 
View user's profile Send private message
jane1965
PostPosted: Fri Jul 10, 2009 9:42 am Reply with quote

I have copied the Review module and the database, and renamed both the copied module and database but I'm finding that when I send a review through the copied module, both databases (original and copied) collect the info submitted and its the same if I submit info through the original module too. How can I make them be completely separate databases?

Thanks in advance for any help with this Smile
 
montego
Site Admin


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

PostPosted: Sat Jul 11, 2009 4:12 pm Reply with quote

jane1965, I think you are really wanting to say "completely separate tables" instead of "databases". You must find every instance of the old table names within the copied code and give them the new names of your tables.

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
jane1965
PostPosted: Mon Jul 13, 2009 2:23 am Reply with quote

Thanks for your reply Montego, that is probably what I mean to say Smile I'm still learning when it comes to databases so would just like to double check what you mean - I assume the tables are $id, $title etc., and that I would have to rename them all in the database as well as change them all in the files too?
 
jane1965
PostPosted: Mon Jul 13, 2009 5:20 am Reply with quote

After taking a look at the database I see that what I called databases are in fact called Tables, so I think I misunderstood what you meant by Tables so please ignore my previous message Smile
 
jane1965
PostPosted: Mon Jul 13, 2009 8:44 am Reply with quote

I attempted to change all the table names in the files but neither the original or the copied databases are receiving the reviews that are sent so I must be doing something very wrong. I've also come to the conclusion that maybe that wasn't a good way to achieve a feedback system as I would need to copy and change the files for each new advisor.

I don't know much about arrays, but the Review module sorts the reviews alphabetically, so I am thinking that maybe I could change the array so that it sorts by name instead of letters but even though I have looked up arrays on the web, I'm none the wiser how to change this. I tried deleting the alphabet and added names instead, but when I sent a reviews, it added the same review to 2 out of the 3 names that existed, and basically I just want it to add the review to a specific advisor not any others. Please could someone tell me what I need to change on this code below in order to get it sorting by names and will also add the review to that name only.

Thank you for any help with this Smile


function alpha() {
global $module_name;
$alphabet = array ('A','B','C','D','E','F','G','H','I','J','K','L','M',
'N','O','P','Q','R','S','T','U','V','W','X','Y','Z','1','2','3','4','5','6','7','8','9','0');
$num = count($alphabet) - 1;
echo '<center>[ ';
$counter = 0;
while (list(, $ltr) = each($alphabet)) {
echo '<a href="modules.php?name=' . $module_name . '&amp;rop=' . $ltr . '">' . $ltr . '</a>';
if ($counter == round($num/2)) {
echo ' ]' . "\n" . '<br />' . "\n" . '[ ';
} elseif ($counter != $num) {
echo '&nbsp;|&nbsp;' . "\n";
}
$counter++;
}
echo ' ]</center><br /><br />' . "\n";
echo '<center>[ <a href="modules.php?name=' . $module_name . '&amp;rop=write_review">' . _WRITEREVIEW . '</a> ]</center><br /><br />' . "\n\n";
}
function display_score($score) {
$image = '<img src="images/blue.gif" alt="" />';
$halfimage = '<img src="images/bluehalf.gif" alt="" />';
$full = '<img src="images/star.gif" alt="" />';
echo $score . '&nbsp;&nbsp;';
if ($score == 10) {
for ($i = 0;$i < 5;$i++) {
echo $full;
}
} else if ($score%2) {
$score -= 1;
$score /= 2;
for ($i = 0;$i < $score;$i++) {
echo $image;
}
echo $halfimage;
} else {
$score /= 2;
for ($i = 0;$i < $score;$i++) {
echo $image;
}
}
}
 
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6792
Location: Ha Noi, Viet Nam

PostPosted: Tue Jul 14, 2009 5:05 pm Reply with quote

Why not just use the forums and give each advisor his own forum?
You would also have more control over who could read/write/edit/delete the content.
 
View user's profile Send private message Send e-mail
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 ©