Page 3 of 3 FirstFirst 123
Results 21 to 25 of 25

Thread: Thumbnail gallery for Cartographers Choice

  1. #21
    Guild Expert Straf's Avatar
    Join Date
    Oct 2016
    Location
    Beautiful rural Norfolk, UK
    Posts
    1,894

    Default

    I have noticed that the awards link to a particular post where the winning map was uploaded but only for regular challenges. This doesn't seem to be true for the Lite Challenge though. Would it not therefore be possible to build a query that listed the post ID for all of the awards of a particular type? So for regular challenges every post ID that returns award4 as true would be in the list and then the scraper could work off that.
    I started a DeviantArt page
    https://strafwibble.deviantart.com/

  2. #22
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,193
    Blog Entries
    8

    Default

    ChickPea: Thanks for that - ill have a go at getting the new scraper up and running shortly - perhaps tomorrow eve.

    Straf: I know that somehow it would be possible to obtain a list of all the awards and check if they were a challenge winner and then go through that to the link but its a hard way around of doing it. What ChickPea is doing is adding a tag directly to all the winning posts. So we can ask the database for all posts that have that tag in them and have an attachment with it and then just show those attachments. If I were programming it with some scripting language then I could do any of these things. But with just SQL, which I am less able, its better if I can create a query that will generate the post list in one shot rather than getting a list, looking at those posts and then indexing into them via links to some other post etc. The harder part of this is not the doing of it exactly but doing it within the constraints of the forum architecture. You have to supply the correct stuff to the forum renderer via these template things so that it shows up the thumbs. You dont get an opportunity to insert a script or whatever into the flow to do anything too fancy. Well, ok I am sure its possible if your a whiz at this and know the forum architecture very well, and your prepared to rewrite a lot of stuff when we upgrate the forum version, but lacking that, then its best to just go with its flow.

  3. #23
    Guild Expert Straf's Avatar
    Join Date
    Oct 2016
    Location
    Beautiful rural Norfolk, UK
    Posts
    1,894

    Default

    You wouldn't have to obtain a list of all the awards, just the ones that are relevant to that challenge. It also depends on how the awards system is structured though. I'd personally have it so that an award's category ID is applied to a post's ID in a separate table. That's assuming that every piece of information can be obtained from a post's ID. I know the list of users who've won an award can be listed by award here.

    OK I think I've just realised that the awards are applied to users and there's a comment/reason field where the relevant post's URL can be entered. The awards aren't just applied to individual posts but for being a jolly good egg in general so a post ID wouldn't be appropriate in that respect. My apologies, I had a totally different structure in my mind.


    EDIT: And now I'm going to spend the whole day thinking about it, instead of getting on with my own work
    Last edited by Straf; 08-21-2018 at 02:07 AM.
    I started a DeviantArt page
    https://strafwibble.deviantart.com/

  4. #24
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,193
    Blog Entries
    8

    Default

    Yes thats just it. Firstly the awards are general so we would need to work out which awards. But that is not so difficult as although we can apply awards to many things we have a special gold and silver compass types for challenge winners. The real issue is that it would require that the award have the post link in it which is often the case but not guaranteed. The other issue and I think is a bigger one, is that we dont have specs for the vBulletin about the database and what fields relate to other things. We can guess many of them but its not a dead cert. Also, in the case of the awards specifically, its an add on to vBulletin which was written for the V4.x.x forum software. We could upgrade to V5 but the person who wrote the awards add on has abandoned it and there is no V5 compatible version for it so for a while were stuck with V4 unless we either a) port the awards PHP files to V5 with no specs or b) abandon all the awards (I doubt that would be popular !) or c) wait until a V5 awards add on becomes available.

    So the awards are a particularly gnarly bit of the forum code that I would not want to pin the effort of thumbnail scrapers against.

    I am going to have a go now at getting a few of ChickPeas Winner tags showing up with a new thumbnail script / link and then maybe the list of those post attachments can be expanded to cover all of the winning entries.

    Edit: OK, that seems to be working ok now... I hope !

    https://www.cartographersguild.com/f...play.php?f=109
    Last edited by Redrobes; 08-21-2018 at 08:21 PM.

  5. #25
    Administrator ChickPea's Avatar
    Join Date
    Jan 2015
    Location
    Sunny Scotland
    Posts
    6,884

    Default

    Thanks, Redrobes. It looks great! I'll get to work on the rest of the threads.
    "We are the music makers, and we are the dreamers of dreams"

Page 3 of 3 FirstFirst 123

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •