wordpress gallery image sorting, need help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • druid66
    Confirmed User
    • Feb 2006
    • 994

    #1

    wordpress gallery image sorting, need help

    hey guys,
    i got this small problem which piss me incredibly.
    let's say i got images named 01amateur 02amateur 03amateur etc..

    MOTHERFUCKING "gallery" in wordpress sorts it's in completely random order (random order option is not ON ofc..) so in my 1st row i may as well have 05amateur and after it 02amateur etc..

    is there any script that i could use or plugin which would sort all my sorted badly images posts according to names?
    Pure Japan japanese babes blog
  • digitaldivas
    ..I Heart Cannibal Corpse
    • Sep 2007
    • 4328

    #2
    most 3rd party plugins, sort by date or manually...
    ...

    Comment

    • druid66
      Confirmed User
      • Feb 2006
      • 994

      #3
      ok but it's not what i'm talking about.
      if i'll have photos in standard wp gallery named 1.jpg 2.jpg 3.jpg etc.. i wan't those fucking photos to be displayed by this order not randomly.
      i don't understand why it is fucked up by wordpress??
      Pure Japan japanese babes blog

      Comment

      • Colmike9
        (>^_^)b
        • Dec 2011
        • 7230

        #4
        Yeah, that happens a lot and people just "fix" it by using another gallery plugin..
        If the randomize button is unchecked in the gallery creation, try just dragging the images around in the order you want.
        Join the BEST cam affiliate program on the internet!
        I've referred over $1.7mil in spending this past year, you should join in.
        I make a lot more money in the medical field in a lab now, fuck you guys. Don't ask me to come back, but do join Chaturbate in my sig, it still makes bank without me touching shit for years..

        Comment

        • druid66
          Confirmed User
          • Feb 2006
          • 994

          #5
          Originally posted by Colmike7
          Yeah, that happens a lot and people just "fix" it by using another gallery plugin..
          If the randomize button is unchecked in the gallery creation, try just dragging the images around in the order you want.
          tried but when i have to many photos and sometimes i have more than 15-20 photos it's lot's of additional, unneeded job (i'm i'm already doing lots of rly unneeded work on my sites..).

          i don't want to use external plugin only to have my photos sorted properly, it should not be done this way.

          any idea? any small php piece of code that once ran can sort it out in all posts?
          should be doeable easily for some1 who know wp and php.
          i'm offering free annual hardlink on my site to your (best if asian too) site just to thanks for help ;)
          Pure Japan japanese babes blog

          Comment

          • Colmike9
            (>^_^)b
            • Dec 2011
            • 7230

            #6
            Let me wake up a bit and I'll try to help.

            If you use Nextgen Gallery, you would go into nextgen-gallery/lib/ngg-db.php and change this:
            $album->sortorder = serialize( $wpdb->get_col("SELECT gid FROM $wpdb->nggallery") );

            to this:
            $album->sortorder = serialize( $wpdb->get_col("SELECT gid FROM $wpdb->nggallery ORDER BY gid DESC") );
            or:
            $album->sortorder = serialize( $wpdb->get_col("SELECT gid FROM $wpdb->nggallery ORDER BY title DESC") );

            I'm guessing it's the same problem with you where it's going by the image ID and not name, not sure why IDs are all mixed up, though.. :/
            Join the BEST cam affiliate program on the internet!
            I've referred over $1.7mil in spending this past year, you should join in.
            I make a lot more money in the medical field in a lab now, fuck you guys. Don't ask me to come back, but do join Chaturbate in my sig, it still makes bank without me touching shit for years..

            Comment

            • druid66
              Confirmed User
              • Feb 2006
              • 994

              #7
              yes it's using ID's for photos but when i'm adding photos to gallery every single photo has it's own name with growing numbers so anyway it should be sorted as it.

              i'm using CyberSeo plugin for harvesting photos from fhgs, i have also custom modified lightbox for displaying photos so if i'll use next gen gallery plugin or any other gallery plugin it will fuck up my theme (i've tried it already) that's why i'm sticking to wordpress built in gallery.

              and thanks for trying, really appreciate.
              Pure Japan japanese babes blog

              Comment

              • Colmike9
                (>^_^)b
                • Dec 2011
                • 7230

                #8
                Originally posted by druid66
                yes it's using ID's for photos but when i'm adding photos to gallery every single photo has it's own name with growing numbers so anyway it should be sorted as it.

                i'm using CyberSeo plugin for harvesting photos from fhgs, i have also custom modified lightbox for displaying photos so if i'll use next gen gallery plugin or any other gallery plugin it will fuck up my theme (i've tried it already) that's why i'm sticking to wordpress built in gallery.

                and thanks for trying, really appreciate.
                Maybe CyberSEO would know?
                Join the BEST cam affiliate program on the internet!
                I've referred over $1.7mil in spending this past year, you should join in.
                I make a lot more money in the medical field in a lab now, fuck you guys. Don't ask me to come back, but do join Chaturbate in my sig, it still makes bank without me touching shit for years..

                Comment

                • druid66
                  Confirmed User
                  • Feb 2006
                  • 994

                  #9
                  think he's checking in most WP related topics here, but seriously - it should not be hard for some1 with small php knowledge to write some executable script run manually inside wp folder which will sort out all photos in posts, guess it's only hard for me cuz i'm html only skilled

                  hmm or maybe it could be hard actually? since in every post there are ids but not photo's names? damn it's just strikes me.. could be not doeable due to its nature.
                  Pure Japan japanese babes blog

                  Comment

                  • Colmike9
                    (>^_^)b
                    • Dec 2011
                    • 7230

                    #10
                    Originally posted by druid66
                    think he's checking in most WP related topics here, but seriously - it should not be hard for some1 with small php knowledge to write some executable script run manually inside wp folder which will sort out all photos in posts, guess it's only hard for me cuz i'm html only skilled

                    hmm or maybe it could be hard actually? since in every post there are ids but not photo's names? damn it's just strikes me.. could be not doeable due to its nature.
                    Show me the php file that manages your gallery and I'll fix it, col.mike7 a't yahoo do/t com
                    Join the BEST cam affiliate program on the internet!
                    I've referred over $1.7mil in spending this past year, you should join in.
                    I make a lot more money in the medical field in a lab now, fuck you guys. Don't ask me to come back, but do join Chaturbate in my sig, it still makes bank without me touching shit for years..

                    Comment

                    • druid66
                      Confirmed User
                      • Feb 2006
                      • 994

                      #11
                      shit you got me here.. it's standard built in wordpress gallery function, don't even know which wordpress php file it's been related to
                      Pure Japan japanese babes blog

                      Comment

                      • Colmike9
                        (>^_^)b
                        • Dec 2011
                        • 7230

                        #12
                        Originally posted by druid66
                        shit you got me here.. it's standard built in wordpress gallery function, don't even know which wordpress php file it's been related to
                        It's probably media.php, then. I think I'll have a solution for you by the end of the night.
                        Join the BEST cam affiliate program on the internet!
                        I've referred over $1.7mil in spending this past year, you should join in.
                        I make a lot more money in the medical field in a lab now, fuck you guys. Don't ask me to come back, but do join Chaturbate in my sig, it still makes bank without me touching shit for years..

                        Comment

                        • druid66
                          Confirmed User
                          • Feb 2006
                          • 994

                          #13
                          thanks a lot
                          Pure Japan japanese babes blog

                          Comment

                          • fris
                            Too lazy to set a custom title
                            • Aug 2002
                            • 55679

                            #14
                            you can use the post_gallery hook to modify the output of the gallery, you could alter the default sort pattern.
                            Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                            Comment

                            • druid66
                              Confirmed User
                              • Feb 2006
                              • 994

                              #15
                              thank you Fris ill google for this hood later today
                              Pure Japan japanese babes blog

                              Comment

                              • just a punk
                                So fuckin' bored
                                • Jun 2003
                                • 32393

                                #16
                                Originally posted by druid66
                                hey guys,
                                i got this small problem which piss me incredibly.
                                let's say i got images named 01amateur 02amateur 03amateur etc..

                                MOTHERFUCKING "gallery" in wordpress sorts it's in completely random order (random order option is not ON ofc..) so in my 1st row i may as well have 05amateur and after it 02amateur etc..

                                is there any script that i could use or plugin which would sort all my sorted badly images posts according to names?
                                The Gallery Magic does it in a right way. It uses the standard WP gallery image numbering like this:

                                [gallery ids="729,732,731,720"]

                                Find more here: https://codex.wordpress.org/Gallery_Shortcode

                                The plugin works just like this:

                                Manual Mode

                                Add a new post or open the existing one and click the “Gallery Magic Shortcode” button (marked with a red square on the picture below).



                                The “Gallery Magic” popup box will appear. Enter the URL of the HTML page which does contain a gallery you want to copy, then click the “Insert Gallery Magic Shortcode” button.



                                Now simple save or update the post and Vualá, your gallery is here:



                                Bunch Import Mode

                                This mode is very useful for importing a bunch of galleries from a plain text dump (e.g. CSV). Simple copy/paste your dump, set the formatting rules, adjust the post scheduler options and click the import button.

                                Obey the Cowgod

                                Comment

                                • fris
                                  Too lazy to set a custom title
                                  • Aug 2002
                                  • 55679

                                  #17
                                  he wants to do it for already created ones.
                                  Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                                  Comment

                                  • Colmike9
                                    (>^_^)b
                                    • Dec 2011
                                    • 7230

                                    #18
                                    Originally posted by fris
                                    you can use the post_gallery hook to modify the output of the gallery, you could alter the default sort pattern.
                                    Yep.
                                    I forgot about this thread, my bad, but I think that hook is in media.php by default and is set to:
                                    'order' => 'ASC',
                                    'orderby' => 'menu_order ID',
                                    ect.
                                    Join the BEST cam affiliate program on the internet!
                                    I've referred over $1.7mil in spending this past year, you should join in.
                                    I make a lot more money in the medical field in a lab now, fuck you guys. Don't ask me to come back, but do join Chaturbate in my sig, it still makes bank without me touching shit for years..

                                    Comment

                                    • druid66
                                      Confirmed User
                                      • Feb 2006
                                      • 994

                                      #19
                                      ASC from ascending? why is it fucked up then?
                                      Pure Japan japanese babes blog

                                      Comment

                                      • fris
                                        Too lazy to set a custom title
                                        • Aug 2002
                                        • 55679

                                        #20
                                        Originally posted by druid66
                                        ASC from ascending? why is it fucked up then?
                                        you are looking to sort by filename?

                                        so abc_file, bas_file, etc, etc with 1's as well?
                                        Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                                        Comment

                                        • StinkyPink
                                          It's all goooood.
                                          • Aug 2009
                                          • 1591

                                          #21
                                          Not sure about your wordpress, but my wordpress allows me to drag and drop the pics in the order i want them... also after getting gallery code [gallery 1,2,3,4,5,6,7,8,9,10] you can change to [gallery 1,4,2,3,5,7,6,8,10,9] if you want.

                                          No?

                                          Comment

                                          • druid66
                                            Confirmed User
                                            • Feb 2006
                                            • 994

                                            #22
                                            here's ids:

                                            ids="14068,14067,14066,14065,14064,14063,14062,140 61,14060,14059,14058,14057,14056,14055,14054"

                                            numbers looks ok, but, here's gallery:

                                            Japanese gravure model Ayane Miura part 2/3 - Asian SexAsian Sex

                                            if you hover mouse over thumbs you will notice that photos starts from 029 and going down but last photo is 030 and it should be 1st photo in case of this gallery.

                                            this very gallery it is doesn't matter it just bumch of random photos but for some galleries it looking better if all are ascending (or descending) if gallery have continuous photos.

                                            so again: ids are ok, photos are fucked up.
                                            Pure Japan japanese babes blog

                                            Comment

                                            • just a punk
                                              So fuckin' bored
                                              • Jun 2003
                                              • 32393

                                              #23
                                              Deleted 8char
                                              Obey the Cowgod

                                              Comment

                                              • StinkyPink
                                                It's all goooood.
                                                • Aug 2009
                                                • 1591

                                                #24
                                                Originally posted by druid66
                                                here's ids:

                                                ids="14068,14067,14066,14065,14064,14063,14062,140 61,14060,14059,14058,14057,14056,14055,14054"

                                                numbers looks ok, but, here's gallery:

                                                Japanese gravure model Ayane Miura part 2/3 - Asian SexAsian Sex

                                                if you hover mouse over thumbs you will notice that photos starts from 029 and going down but last photo is 030 and it should be 1st photo in case of this gallery.

                                                this very gallery it is doesn't matter it just bumch of random photos but for some galleries it looking better if all are ascending (or descending) if gallery have continuous photos.

                                                so again: ids are ok, photos are fucked up.
                                                Well right after I select my pics in default gallery in wordpress, it allows me to reverse order if I want, or even drag and drop each image in whichever order I see fit before inserting my gallery. I think it is the same screen to turn random on and off or select other functions of the gallery. Are you trying to eliminate this process? btw mine are just named 01 02 03 for now, just my personal preference.

                                                Comment

                                                • druid66
                                                  Confirmed User
                                                  • Feb 2006
                                                  • 994

                                                  #25
                                                  edit 600 posts?
                                                  all id's are different?
                                                  most photos are fucked up and randomly displayed - no way i would browse 600 posts and sort out it manually, checking which photo should be in different position.

                                                  i need smth what would sort out real pic names and hopefully it will sort out ids in proper way.
                                                  Pure Japan japanese babes blog

                                                  Comment

                                                  • druid66
                                                    Confirmed User
                                                    • Feb 2006
                                                    • 994

                                                    #26
                                                    Originally posted by StinkyPink
                                                    Well right after I select my pics in default gallery in wordpress, it allows me to reverse order if I want, or even drag and drop each image in whichever order I see fit before inserting my gallery. I think it is the same screen to turn random on and off or select other functions of the gallery. Are you trying to eliminate this process? btw mine are just named 01 02 03 for now, just my personal preference.
                                                    i know i can turn on/off random - i don't have it on ofc.
                                                    i know i can manually move photos but like i've said before it's time consuming and when i have 24-30 photos it's to much work, beside i have this problem on most of the posts so it's to late and to much manual labor.
                                                    Pure Japan japanese babes blog

                                                    Comment

                                                    • fris
                                                      Too lazy to set a custom title
                                                      • Aug 2002
                                                      • 55679

                                                      #27
                                                      so how do you want them sorted? by filename alphabetically? 1-name 2-name etc?
                                                      Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                                                      Comment

                                                      • druid66
                                                        Confirmed User
                                                        • Feb 2006
                                                        • 994

                                                        #28
                                                        yes Fris alphabetically would be best. my filenames are usually numbered correctly so it should work yet final results in wordpress are always mess ffs..
                                                        Pure Japan japanese babes blog

                                                        Comment

                                                        • fris
                                                          Too lazy to set a custom title
                                                          • Aug 2002
                                                          • 55679

                                                          #29
                                                          Originally posted by druid66
                                                          yes Fris alphabetically would be best. my filenames are usually numbered correctly so it should work yet final results in wordpress are always mess ffs..
                                                          just add orderby="title"

                                                          into the gallery shortcode

                                                          Code:
                                                          [gallery orderby="title" ids="291,102,31"]
                                                          etc
                                                          Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                                                          Comment

                                                          • druid66
                                                            Confirmed User
                                                            • Feb 2006
                                                            • 994

                                                            #30
                                                            fuck me Fris you're WP God
                                                            thank you very much, WORKS!
                                                            now tell me how to add this line to all posts (if you know).
                                                            Pure Japan japanese babes blog

                                                            Comment

                                                            • fris
                                                              Too lazy to set a custom title
                                                              • Aug 2002
                                                              • 55679

                                                              #31
                                                              Originally posted by druid66
                                                              fuck me Fris you're WP God
                                                              thank you very much, WORKS!
                                                              now tell me how to add this line to all posts (if you know).
                                                              yes add this to your themes functions file

                                                              Code:
                                                              add_filter( 'shortcode_atts_gallery', 'gallery_sort_title');
                                                              
                                                              function gallery_sort_title($atts) {
                                                                      $atts['orderby'] = 'title';
                                                                      return $atts;
                                                              }
                                                              Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                                                              Comment

                                                              • JuicyBunny
                                                                So Fucking Banned
                                                                • Jun 2010
                                                                • 2145

                                                                #32
                                                                Originally posted by druid66
                                                                edit 600 posts?
                                                                all id's are different?
                                                                most photos are fucked up and randomly displayed - no way i would browse 600 posts and sort out it manually, checking which photo should be in different position.

                                                                i need smth what would sort out real pic names and hopefully it will sort out ids in proper way.
                                                                Not picking on you. Another issue is that many of the models are not who you say they are.
                                                                For example, a Maki Hojo post I checked has what looks like 3 different girls. 2 are not even close.

                                                                Need a better cataloging method for the scrapes or whatever. If that is already in place then your source has misidentified them.

                                                                Comment

                                                                • druid66
                                                                  Confirmed User
                                                                  • Feb 2006
                                                                  • 994

                                                                  #33
                                                                  Thank you Fris i owe you a promised link ;)
                                                                  Thank you all guys for trying, you were great!
                                                                  Pure Japan japanese babes blog

                                                                  Comment

                                                                  • druid66
                                                                    Confirmed User
                                                                    • Feb 2006
                                                                    • 994

                                                                    #34
                                                                    Originally posted by JuicyBunny
                                                                    Not picking on you. Another issue is that many of the models are not who you say they are.
                                                                    For example, a Maki Hojo post I checked has what looks like 3 different girls. 2 are not even close.

                                                                    Need a better cataloging method for the scrapes or whatever. If that is already in place then your source has misidentified them.
                                                                    can't find her. can you show me the post?

                                                                    for av idols/gravure idols i'm using mostly very old content from scanners groups they rarely made mistakes with models i think, those guys were real fans.

                                                                    as for tsunami-cash sites i'm using provided names.

                                                                    but mistakes could happen ofc.
                                                                    Pure Japan japanese babes blog

                                                                    Comment

                                                                    Working...