Duplicates in made by

Guild listing of known recipes

Moderator: ds

Duplicates in made by

Postby microbone » Fri Jul 14, 2006 2:22 pm

Hey there

i have a problem with my roster....
in the made by section
if i select tailoring or maybe leatherworking I have a lot of dupes in the list!

can any1 help with a how to fix this plz?

every help is appreciated......and thnx :blackeye:
User avatar
microbone
WR.net Apprentice
WR.net Apprentice
 
Posts: 26
Joined: Thu Jul 13, 2006 12:00 am

Duplicates in made by

Postby zanix » Fri Jul 14, 2006 2:49 pm

Make sure everyone is uploading their data with the newest version of CharacterProfiler
http://www.wowroster.net/index.php?name ... tails&id=5

And some items have different item_ids, even though they are the same item so they will always show as a separate item
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5543
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Duplicates in made by

Postby velpoman » Tue Aug 15, 2006 12:14 am

How do you re-initialize the Recipe/Made By addon? Only enchanting seems to be affected.

--J
velpoman
WR.net Apprentice
WR.net Apprentice
 
Posts: 6
Joined: Sat Jul 15, 2006 7:11 am

Re: Duplicates in made by

Postby the_happy_cannibal » Fri Aug 18, 2006 8:53 pm

EDIT: Damn code blocks . . . sorry for breaking your page layout . .

I don't come to these boards very often, but I ran into this same problem with enchanting, so I started poking about here to try and find a fix for it. I didn't see anything that worked for me so I went in to the code.

Here is what I did to fix it, I hope it is helpful to others.

In the roster/lib/recipes.php file add a function:

Code: Select all
function recipe_get_all_alt( $skill_name, $search, $sort )
{
   global $wowdb;

   if (isset($server))
   {
      $server = $wowdb->escape( $server );
   }

   $query= "SELECT distinct recipe_name, recipe_type, skill_name, reagents, recipe_texture, recipe_tooltip, level, min(difficulty) difficulty FROM `".ROSTER_RECIPESTABLE."` where `skill_name` = '$skill_name' GROUP BY recipe_name, recipe_type, skill_name, reagents, recipe_texture, level";
   //$query= "SELECT distinct recipe_tooltip, recipe_name, recipe_type, item_color, skill_name, reagents, recipe_texture, level, 1 difficulty FROM `".ROSTER_RECIPESTABLE."` WHERE `skill_name` = '$skill_name' ".($search==''?'':" AND (recipe_tooltip LIKE '%".$search."%' OR recipe_name LIKE '%".$search."%')");

   switch ($sort)
   {
      case 'item':
         $query .= " ORDER BY `difficulty` DESC , recipe_type ASC , recipe_name ASC";
         break;

      case 'name':
         $query .= " ORDER BY  recipe_name ASC ,  recipe_type ASC , `level` DESC , `difficulty` DESC";
         break;

      case 'type':
         $query .= " ORDER BY  recipe_type ASC , `level` DESC , recipe_name ASC , `difficulty` DESC";
         break;

      case 'reagents':
         $query .= " ORDER BY  `reagents` ASC , recipe_name ASC , recipe_type ASC , `difficulty` DESC";
         break;

      case 'level':
         $query .= " ORDER BY `level` DESC , recipe_name ASC , recipe_type ASC , `difficulty` DESC";
         break;

      default:
         $query .= " ORDER BY `difficulty` DESC , recipe_type ASC , recipe_name ASC";
         break;
   }

   $result = $wowdb->query( $query );
//   echo '--'.$query.'--';
   $recipes = array();
   while( $data = $wowdb->fetch_assoc( $result ) ) {
      $recipe = new recipe( $data );
      $recipes[] = $recipe;
   }
   return $recipes;
}


To keep it clean just paste my code right above the final "?>" in the original page.

In the roster/addons/recipe/RecipeList.php file make the following change:

Find the following line of code:

Code: Select all
$recipes = recipe_get_all( $_REQUEST["proffilter"],($_REQUEST["filterbox"]?$_REQUEST["filterbox"]:''), ($_REQUEST["sort"]?$_REQUEST["sort"]:'type') );


Change it to:

Code: Select all
$recipes = recipe_get_all_alt( $_REQUEST["proffilter"],($_REQUEST["filterbox"]?$_REQUEST["filterbox"]:''), ($_REQUEST["sort"]?$_REQUEST["sort"]:'type') );


What we have done is create a function that uses an older version of the recipe SQL select and added the tooltip info to it. Then we changed the call in the addon to use our new function.
the_happy_cannibal
WR.net Apprentice
WR.net Apprentice
 
Posts: 1
Joined: Fri Aug 18, 2006 6:45 pm

Duplicates in made by

Postby Smitty » Thu Sep 14, 2006 10:13 pm

Thank you for that fix canibal!! That was sure annoying to look at, even if it was minor :D
Smitty
WR.net Apprentice
WR.net Apprentice
 
Posts: 9
Joined: Wed Jul 26, 2006 8:10 pm

Duplicates in made by

Postby gonçalo » Thu Sep 14, 2006 11:18 pm

hello, i just try this.(i am french and use fr localisation)
that résolve dupes but ...
But they add another probleme.
all items are whites quality .
gonçalo
WR.net Apprentice
WR.net Apprentice
 
Posts: 8
Joined: Tue Sep 12, 2006 9:59 pm

Re: Duplicates in made by

Postby Olki » Sat Sep 16, 2006 9:59 pm

Hello,

I had the same problem with my database, so I kind of followed your idea Cannibal and also solved Gonçalo's problem.

But I am lazy and I only modified roster/lib/recipes.php, so I don't have to go and modify additional files:

Comment out line 166 (put two slashes in front of it)

On line 167 paste the following code:
Code: Select all
$query= "SELECT distinct recipe_name, recipe_type, skill_name, reagents, item_color, recipe_texture, recipe_tooltip, level, min(difficulty) difficulty FROM `".ROSTER_RECIPESTABLE."` where `skill_name` = '$skill_name' GROUP BY recipe_name, recipe_type, skill_name, reagents, recipe_texture, level";

(i've added the item_color field which was missing from your original mod). Many thanks for the mod Cannibal, it solved it without any problem :thumright:
Olki
WR.net Apprentice
WR.net Apprentice
 
Posts: 10
Joined: Sat Sep 09, 2006 5:47 am

Duplicates in made by

Postby gonçalo » Sun Sep 17, 2006 12:20 pm

//$query= "SELECT distinct recipe_name, recipe_type, skill_name, reagents, recipe_texture, level, min(difficulty) difficulty FROM `".ROSTER_RECIPESTABLE."` where `skill_name` = '$skill_name' GROUP BY recipe_name, recipe_type, skill_name, reagents, recipe_texture, level";
//$query= "SELECT distinct recipe_tooltip, recipe_name, recipe_type, item_color, skill_name, reagents, recipe_texture, level, 1 difficulty FROM `".ROSTER_RECIPESTABLE."` WHERE `skill_name` = '$skill_name' ".($search==''?'':" AND (recipe_tooltip LIKE '%".$search."%' OR recipe_name LIKE '%".$search."%')");
$query= "SELECT distinct recipe_name, recipe_type, skill_name, reagents, item_color, recipe_texture, recipe_tooltip, level, min(difficulty) difficulty FROM `".ROSTER_RECIPESTABLE."` where `skill_name` = '$skill_name' GROUP BY recipe_name, recipe_type, skill_name, reagents, recipe_texture, level";


Thanx for à proposition ...
That works :thumright: .
Last edited by gonçalo on Sun Sep 17, 2006 12:23 pm, edited 1 time in total.
gonçalo
WR.net Apprentice
WR.net Apprentice
 
Posts: 8
Joined: Tue Sep 12, 2006 9:59 pm

Duplicates in made by

Postby microbone » Sun Sep 17, 2006 5:40 pm

yup nice fix....thnx a lot m8
User avatar
microbone
WR.net Apprentice
WR.net Apprentice
 
Posts: 26
Joined: Thu Jul 13, 2006 12:00 am

Re: Duplicates in made by

Postby sturmy » Fri Oct 27, 2006 2:10 pm

I'm upping this one with roster 1.7.1.

I carried over the change (which DID work to eliminate duplicates except those linked to cooldown of tradeskills such as transmute) with 1.7.1, but alas I get duplicates again.

It seems that the duplicates are because SOME of my guildmate uploads add a newline / blank character at the end of the recipe tooltip, whereas others do not, resulting in different tooltips, thus in 2 separate items in the list.

Any clue as to how I can right-trim the tooltip during the query so that the duplicates disappear (again)?

On the same query-line, you'll notice that the lib/recipe.php file contains commented-out queries relating to implementing search (for that addon or other purposes). I haven't tried to un-comment the lines, therefore I cannot know if this would "fix" the other problem related to search.

IMHO, were within an inch of fixing two visual annoyances with just one code line in lib/recipes.php

My 2 € cents on this topic!
sturmy
WR.net Expert
WR.net Expert
 
Posts: 160
Joined: Wed Aug 16, 2006 9:07 pm

Duplicates in made by

Postby Olki » Sat Nov 04, 2006 8:22 pm

To solve the duplication problem in 1.7.1
In roster/lib/recipes.php

I have commented out line 121

Then added on line 122:
Code: Select all
   $query= "SELECT distinct recipe_tooltip, recipe_name, recipe_type, item_color, skill_name, reagents, recipe_texture, level, 1 difficulty FROM `".ROSTER_RECIPESTABLE."` WHERE `skill_name` = '$skill_name' ".($search==''?'':" AND (recipe_tooltip LIKE '%".$search."%' OR recipe_name LIKE '%".$search."%')")." GROUP BY recipe_name, recipe_type, skill_name, reagents, recipe_texture, level";


I hope this helps
Olki
WR.net Apprentice
WR.net Apprentice
 
Posts: 10
Joined: Sat Sep 09, 2006 5:47 am

Duplicates in made by

Postby sturmy » Sun Nov 05, 2006 1:21 am

This brings back the search function. Thanks!

I still have duplicates due to blank characters in the tooltips as expressed above. I'll wait a bit until all have uploaded their profiles, it might be character-profiler related...
sturmy
WR.net Expert
WR.net Expert
 
Posts: 160
Joined: Wed Aug 16, 2006 9:07 pm


Return to Made By

Who is online

Users browsing this forum: No registered users and 0 guests

cron