Page 2 of 6

PostPosted: Mon Aug 20, 2007 1:29 pm
by Selin
This script is not working fully anymore. Can someone fix it?

On the game finder menu you had the option to save your frequently used searchs, i.e. you could save a search "active, TOP 250", name it, and you automatically got all active games of tournament TOP 250 in 1 click by choosing that specific saved search.
Now it's partially working; the options to enter a partial match/ or a tournament name in saved searchs don't work. If you don't use partial match/or tournament fields, a saved search with all other options is working, e.g. a saved search with options "waiting, flat rate, standard...." does work.

I'm not sure, if I could explain it correctly. Is it clear?

Script Problem explained

PostPosted: Tue Aug 21, 2007 10:03 pm
by Aerial Attack
The saved searches no longer work for "tournament" games.

This is because previously there was only a text box to do partial matches against game titles.

Now that there is a drop-down box (holding the tournament names), the script needs to be able to remember the dropdownbox.selectedvalue (NOT .selectedId ?)

Hope that explains it a little better.

EDIT: I took a look at both the Game Finder page source and the saved searches script. The script is only checking all of the input fields (text, checkbox, etc.). Meanwhile, the dropdown box is actually a select field. This means that updating will require a bit more than just 2 or 3 new lines of code to adjust. My javascript is REALLY rusty - so, I couldn't quite make it work [plus, I have no place to host the updated code].

Re: Script Problem explained

PostPosted: Wed Aug 22, 2007 11:01 am
by Selin
Aerial Attack wrote:The saved searches no longer work for "tournament" games.

This is because previously there was only a text box to do partial matches against game titles.

Now that there is a drop-down box (holding the tournament names), the script needs to be able to remember the dropdownbox.selectedvalue (NOT .selectedId ?)

Hope that explains it a little better.


That's an explanation, not a solution :)

.

Potential Solution?

PostPosted: Thu Aug 30, 2007 2:13 am
by Aerial Attack
NOTE: I have not tested this code in any way shape or form.

I have added a few lines to the LoadSearch and SaveSearch event handlers. These have been commented out, but you may comment them back in for testing purposes/usage.

// The Save Button Handler
var saveButtonHandler = function saveButtonHandler()
{
var name= prompt("Please Name this search (reusing a name will overwrite it)",loadedName);
if (name!="" && name != null)
{
var searchDetails=new Object();
var allP = document.getElementById('middleColumn').getElementsByTagName("input");
// var count = 0;
// var tourney = document.getElementById('middleColumn').getElementsByTagName("select");
for( i in allP )
{
if(allP[i].type=="checkbox")
{
searchDetails[allP[i].id] = allP[i].checked;
}
if(allP[i].type=="text")
{
searchDetails[allP[i].id] = allP[i].value;
}
// count++;
}
// searchDetails[count] = tourney.selectedIndex;
myOptions[name] = searchDetails;
serialize("SEARCHES", myOptions);
showSearchs();
}
}

// The Load Button Handler
var loadButtonHandler = function loadButtonHandler(searchDetails,s,bRun)
{
loadedName = s;
var allP = document.getElementById('middleColumn').getElementsByTagName("input");
// var count = 0;
for( i in allP )
{
if(allP[i].type=="checkbox")
{
if ( typeof(searchDetails[allP[i].id]) != "undefined" )
{
allP[i].checked = searchDetails[allP[i].id] ;
}
else
{
// We dont have this checkbox in the saved search
// So treat it as "False" and add it to the saved search
allP[i].checked = false;
searchDetails[allP[i].id] = false;
myOptions[s] = searchDetails;
serialize("SEARCHES", myOptions);
}
}
if(allP[i].type=="text")
{
if( typeof(searchDetails[allP[i].id]) != "undefined" )
{
allP[i].value = searchDetails[allP[i].id];
}
else
{
// We dont have this textbox in the saved search
// So treat it as "" and add it to the saved search
allP[i].value = "";
searchDetails[allP[i].id] = "";
myOptions[s] = searchDetails;
serialize("SEARCHES", myOptions);
}
}
// count++;
}
// var tourneyId = document.getElementById('middleColumn').getElementsByTagName("select");
// tourneyId.selectedIndex = searchDetails[count];
if (bRun)
{
searchButton.click();
}
}

Re: New Greasemonky Script - Saved Searchs

PostPosted: Wed Nov 07, 2007 2:08 am
by Han Solo
Saved Searches Script by stocksr
Adds a "Bookmark this search" button to the Game Finder
http://www.conquerclub.com/forum/viewtopic.php?t=18815

other people have the same problem : after loading the last Firefox update 2 days ago, this script has stopped working.

any solution ? this is a very helpful tool.

Thx,
Han Solo

ps : Posted in the Bugs Forums 2 days ago, but got no reaction.

Re: New Greasemonky Script - Saved Searchs

PostPosted: Wed Nov 07, 2007 3:25 am
by Selin
Han Solo wrote:Saved Searches Script by stocksr
Adds a "Bookmark this search" button to the Game Finder
http://www.conquerclub.com/forum/viewtopic.php?t=18815

other people have the same problem : after loading the last Firefox update 2 days ago, this script has stopped working.

any solution ? this is a very helpful tool.

Thx,
Han Solo

ps : Posted in the Bugs Forums 2 days ago, but got no reaction.


I have the same problem :(

In fact, it was very useful.

.

PostPosted: Wed Nov 07, 2007 10:06 am
by Aerial Attack
Hey all,

I don't know what I did, but I spent some time on the situation and it works for me - I make no guarantees about anything (NOTE: I added the functionality to save Tournament Name too - no more scrolling through tourney drop down). The update to player.php instead of playerspace.php to match lack's changes fixes the old Saved Searches, if you don't trust this code.

EDIT: I have created an account on userscripts.org

Here is the Saved Searches link

PostPosted: Wed Nov 07, 2007 10:14 am
by Frop
Actually you can just use the current script. Right click on the monkey icon -> Manage User Scripts and select 'Conquer Club - Saved Searches'. Change the Included Pages to 'http://www.conquerclub.com/player.php?mode=find*'.

PostPosted: Wed Nov 07, 2007 10:18 am
by Aerial Attack
Okay - I'm not sure how/if I updated mine to have the correct included page. But mine does allow you to use the tournament drop down now in your saved searches (wasn't previously an option).

EDIT: Okay - should be working now. I've updated the above post with the appropriate included page section.

PostPosted: Wed Nov 07, 2007 11:42 am
by Han Solo
thanks a lot guys :-):-):-)

Saved Searches

PostPosted: Mon Nov 12, 2007 9:56 am
by thespider
Is this working with the 2.0.0.9 Firefox?

Re: Saved Searches

PostPosted: Tue Nov 13, 2007 11:47 am
by Aerial Attack
thespider wrote:Is this working with the 2.0.0.9 Firefox?

I assume so. That's the version of Firefox I'm running.

PostPosted: Tue Nov 13, 2007 5:07 pm
by MarVal
It doesn't work for me. Every time I login on CC and I go to the Game Finder page and click on my saved search, I load evrytime another torunament and not the one I've saved?

Can you tell me what I'm doing wrong?

I put in: http://www.conquerclub.com/player.php?mode=find*
I work with Firefox 2.0.0.9
And greasemonkey is on.

I hope you can help me with this.

Grtz
MarVal

PostPosted: Tue Nov 13, 2007 7:20 pm
by Aerial Attack
I think I know what's going on.

I'm using Selected Index which should not be affected by alphabetical ordering, but it might be. Therefore, every time they add a new tournament above yours it won't work. I'll have to verify my assumption (and change the code).

EDIT: I have changed the code and uploaded it to the userscripts.org page. All I need now is to have a tournament added or removed and I can finish testing.

- Aerial Attack

PostPosted: Wed Nov 14, 2007 4:00 pm
by Aerial Attack
New Version 2.12 is available. This handles the situation where a tournament (alphabetically before yours) is added or removed. Also alerts you if a tournament has been removed.

PostPosted: Wed Nov 14, 2007 5:56 pm
by MarVal
I'll download and install the new version. But it doesn't seem to work.
Instead of the old one were I can click on the "Bookmark" button, I see on the new version no button at all. Only the search one.

Grtz
MarVal

PostPosted: Wed Nov 14, 2007 6:22 pm
by Aerial Attack
Stupid Typos - fixed.

PostPosted: Thu Nov 15, 2007 4:21 pm
by MarVal
Yes, it works.

And thanks for your quick replies and fix =D>

Grtz
MarVal

PostPosted: Mon Nov 19, 2007 1:50 pm
by Aerial Attack
New Version uploaded.

This allows you to save Game Creation settings as well as Game Finding settings. Enjoy.

It also checks to see if you have supplied a password for tournament games (as they require one).

EDIT: Due to feedback, I have crippled the Game Creation settings saver. It only works for Tournament Game Settings for Tournament Organizers. I will let you know if/when I am allowed to re-enable this feature for general use.

PostPosted: Tue Nov 20, 2007 11:03 am
by Aerial Attack
I have added a new script that allows you to confirm if you want to drop a game. See signature link

PostPosted: Tue Nov 20, 2007 11:10 am
by gimil
works perfectly :)

PostPosted: Mon Nov 26, 2007 6:09 pm
by remydog
Aerial Attack wrote:New Version uploaded.

This allows you to save Game Creation settings as well as Game Finding settings. Enjoy.

It also checks to see if you have supplied a password for tournament games (as they require one).

EDIT: Due to feedback, I have crippled the Game Creation settings saver. It only works for Tournament Game Settings for Tournament Organizers. I will let you know if/when I am allowed to re-enable this feature for general use.


Dang! I just came looking for this very thing. Curious why they oppose it?

PostPosted: Tue Nov 27, 2007 3:18 am
by MarVal
Yeah, its working fine! Thanks again.

Grtz
MarVal

PostPosted: Thu Nov 29, 2007 2:55 am
by Aerial Attack
I actually have a new version in the coding/testing phase. All it really does is combine the Confirm Drop Down script - but this includes it for Game Finder (Private and Tournament Games you create) as well as Awaiting Games. The only issue is that certain special characters (in a tourney name) cause the hyper-link to go bad when you drop a game. Once I get that resolved I'll post the update.

I just realized why a Tourney Organizer would want to save Game Presets (and why I included it). In some tournaments people have different home settings - you save each person's home settings as a link (page down instead of finding and clicking each check box AND remembering the settings).

PostPosted: Thu Nov 29, 2007 10:23 pm
by PsyDev
The script actually wasn't working for me.

I tried to find out what was wrong by going to greasemonkey options in Firefox. I looked at the page that it applied to and it said:
http://www.conquerclub.com/playerspace.php?page=find*

It should have been:
http://www.conquerclub.com/player.php?mode=find

Works now.