Page 2 of 2

Re: Multi-Tag Search Extension

Posted: Tue Jul 12, 2011 2:11 pm
by Merun
I totally have no idea what users have access to nowadays, since in 2007 I was already a tagger xD

Re: Multi-Tag Search Extension

Posted: Tue Jul 12, 2011 2:19 pm
by Alcuinus
Tensa wrote:Taking it literally, Admins, Mods and Taggers for all images.
But I don't know about normal members for their uploaded images. Started doing it like that after I became a tagger.
Ah, so then that's probably it..... I don't think trying to hack the site is a good idea so it will probably remain a broken part of the script until I can guess where the problem is; but ah well, it's a first script anyhow. hopefully I can in the future make useful scripts for the site that don't break existing features. :wink:

Re: Multi-Tag Search Extension

Posted: Tue Jul 12, 2011 3:47 pm
by Tensa
A subscription script would be awesome XD (tags, sources~) Although that can be done by searching.

Re: Multi-Tag Search Extension

Posted: Wed Jul 13, 2011 2:12 am
by Gicchan
Tensa wrote:A subscription script would be awesome XD (tags, sources~) Although that can be done by searching.
^ This, I do really want. XD Though a subscription script would make me feel lazy to search for images through pages. :P

Re: Multi-Tag Search Extension

Posted: Wed Jul 13, 2011 3:48 am
by Evangeline Mcdowell
Tensa wrote:Taking it literally, Admins, Mods and Taggers for all images.
But I don't know about normal members for their uploaded images. Started doing it like that after I became a tagger.
Normal members do not have the quicktag feature, even for their uploaded images.

Re: Multi-Tag Search Extension

Posted: Wed Jul 13, 2011 4:36 am
by Merun
People can use their browser bookmark to save searches, which should come close to a subscription.

Re: Multi-Tag Search Extension

Posted: Wed Jul 13, 2011 7:55 am
by Alcuinus
Merun wrote:People can use their browser bookmark to save searches, which should come close to a subscription.
True, but usually subscriptions give you a number of new ones... it would be an awesome extension and you could even use FF's HTML5 local storage to keep track of them, but I haven't done much ajax. It is an awesome idea though.

Re: Multi-Tag Search Extension

Posted: Wed Jul 13, 2011 1:21 pm
by Merun
No need to use AJAX and I'm not sure but i think there is already some kind of local storage in Greasemonkey. Just keep the first result assuming that it's anti chronologically ordered. Then if it's no longer the first, then it means there are new one. Problem is that there is no notification but I don't think any amount of Greasemonkey scripting would solve this xD.

Re: Multi-Tag Search Extension

Posted: Wed Jul 13, 2011 1:37 pm
by Alcuinus
Merun wrote:No need to use AJAX and I'm not sure but i think there is already some kind of local storage in Greasemonkey. Just keep the first result assuming that it's anti chronologically ordered. Then if it's no longer the first, then it means there are new one. Problem is that there is no notification but I don't think any amount of Greasemonkey scripting would solve this xD.
That's the thing. there's no notification of new images sent out, so that would have to be built. One way to do it is to fetch the page with ajax (GET http://e-shuushuu.net/?=tagnumber+tagnumber) and have the top result stored with local storage (works like cookies but has more room and is easier to work with). Then when the user loads the homepage, execute the same ajax and compare the result. That's how you could tell if there are new ones. Counting those new entries to give a result like

Subscriptions
smile (2 new)
blush (5 new)
dress


wouldn't be too hard after you got that part down, but I've never really worked with ajax. Anyone know if you can GET a whole HTML page and navigate it with document.getElement type calls?

EDIT: OSRSLY! I just did it O_O ... this is awesome... and easier than I thought.

Re: Multi-Tag Search Extension

Posted: Wed Jul 13, 2011 2:24 pm
by Merun
Well, I don't think the admin will be happy to have a script hitting the database for that xD. And I had in mind that you still had to load the page, but yeah, AJAX is needed if you don't. You could even enable the script for any webpage so that it would always check, but see my first sentence lol.

Re: Multi-Tag Search Extension

Posted: Wed Jul 13, 2011 2:34 pm
by Alcuinus
Merun wrote:Well, I don't think the admin will be happy to have a script hitting the database for that xD. And I had in mind that you still had to load the page, but yeah, AJAX is needed if you don't. You could even enable the script for any webpage so that it would always check, but see my first sentence lol.
Good point.... don't want a denial of service thing going. O_O;; Definitely it's a better idea to have it just check if there are any new images. Then, when you actually visit the page that the search is for, it will add a little sticker to posts that you have not seen yet. this way there is only one automatic hit per subscription........ rather than.... hundreds........ yeah that idea was a bomb. Another thing I could do (If I really wanted to do something crazy) is have the script load the page for each subscription and when the user clicks on the link have it just replace the html on the page. That would mean only 1 hit instead of 2... btw, who is the admin?

Re: Multi-Tag Search Extension

Posted: Wed Jul 13, 2011 3:29 pm
by Merun
Crazy idea while hitting less the database seems quite crazy with RAM usage, and considering how Firefox use it xD.


The admin is anonymous_object.

Re: Multi-Tag Search Extension

Posted: Fri Jul 15, 2011 5:09 pm
by Alcuinus
UPDATE: ... not for the subscriptions thing. XD I have found the error that was most likely causing a problem with the links. The source has been updated.

Re: Multi-Tag Search Extension

Posted: Fri Jul 15, 2011 8:34 pm
by A.Dantes
jQuery, although more than a little outdated, is already included on every page on the website. The top half of that script can be removed as a result.

There is a lot of repetition in selecting elements in the script. Performance wise, it would be better if you saved things like $('.tag') to a variable and just referenced that in the code. jQuery is scanning the entire DOM four times as much it needs to because of that.

Re: Multi-Tag Search Extension

Posted: Fri Jul 15, 2011 10:11 pm
by Alcuinus
A.Dantes wrote:jQuery, although more than a little outdated, is already included on every page on the website. The top half of that script can be removed as a result.

There is a lot of repetition in selecting elements in the script. Performance wise, it would be better if you saved things like $('.tag') to a variable and just referenced that in the code. jQuery is scanning the entire DOM four times as much it needs to because of that.
You examined my source code!
I'm honored. :D

You are correct. It could be much improved in that area. I'm rather lazy in the development process and I don't optimize my code until (in some cases) months after the bulk of it's done.

I also noticed that each page has jquery on it, but for some reason, greasemonkey wanted to isolate itself from that and I couldn't seem to just run JQuery without doing that weird business with the $ = unsafeWindow.jQuery; call. So I ended up just using someone else's code to get the JQuery in there. I only recently discovered that that was the call it needed. Now I just need to optimize the code.... a lot :P

Are you by any chance one of the developers here, Dantes?