Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP
Author Message
jane1965
New Member
New Member



Joined: Jun 28, 2009
Posts: 10

PostPosted: Tue Jul 14, 2009 2:44 am Reply with quote

I am trying to create a feedback system for an advisory site, whereby each advisor will receive individual feedback. I decided that I might be able to modify the Reviews module on Ravennuke to achieve it. The module currently sorts alphabetically, but I want it to receive the review and sort by each advisors name, I did try deleting the alphabet and numbers and then adding names instead, but when I sent reviews through the site, it added them to 2 out of the 3 names and not just the one it was meant for. I need to know how to re-write the array in the code shown below so that the system will receive the review and sort it by each advisors name. Thank you for any help with this Smile


Code:


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";}
 
View user's profile Send private message
floppydrivez
Involved
Involved



Joined: Feb 26, 2006
Posts: 340
Location: Jackson, Mississippi

PostPosted: Tue Jul 14, 2009 3:14 am Reply with quote

So your saying instead of the alphabet being clickable, you want it to be the names of the advisor?

If so, identify how each advisor is identified in the database. Then make your array or list from the database. You can pretty much sort them how you want then.

_________________
Phpnuke Downloads, Clan Themes, Mack Hankins 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
jane1965







PostPosted: Tue Jul 14, 2009 10:22 am Reply with quote

Thanks for your reply, but I don't have much experience with databases so I don't really know how to do what you suggested Smile
 
Guardian2003
Site Admin



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

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

This is a duplicate post. Please only post the question in one forum, otherwise it causes confusion.
 
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 -> PHP

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 ©