Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 08-16-2015, 06:16 AM   #1
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
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
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-16-2015, 08:34 AM   #2
digitaldivas
..I Heart Cannibal Corpse
 
digitaldivas's Avatar
 
Industry Role:
Join Date: Sep 2007
Location: California
Posts: 4,328
most 3rd party plugins, sort by date or manually...
__________________
...
digitaldivas is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-16-2015, 09:48 AM   #3
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
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
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-16-2015, 09:52 AM   #4
Colmike9
(>^_^)b
 
Colmike9's Avatar
 
Industry Role:
Join Date: Dec 2011
Posts: 7,223
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..
Colmike9 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-16-2015, 10:02 AM   #5
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
Quote:
Originally Posted by Colmike7 View Post
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
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-16-2015, 12:21 PM   #6
Colmike9
(>^_^)b
 
Colmike9's Avatar
 
Industry Role:
Join Date: Dec 2011
Posts: 7,223
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..
Colmike9 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-16-2015, 12:51 PM   #7
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
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
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-16-2015, 12:54 PM   #8
Colmike9
(>^_^)b
 
Colmike9's Avatar
 
Industry Role:
Join Date: Dec 2011
Posts: 7,223
Quote:
Originally Posted by druid66 View Post
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..
Colmike9 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-16-2015, 12:59 PM   #9
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
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
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-16-2015, 01:01 PM   #10
Colmike9
(>^_^)b
 
Colmike9's Avatar
 
Industry Role:
Join Date: Dec 2011
Posts: 7,223
Quote:
Originally Posted by druid66 View Post
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..
Colmike9 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-16-2015, 01:04 PM   #11
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
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
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-16-2015, 01:14 PM   #12
Colmike9
(>^_^)b
 
Colmike9's Avatar
 
Industry Role:
Join Date: Dec 2011
Posts: 7,223
Quote:
Originally Posted by druid66 View Post
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..
Colmike9 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-16-2015, 02:21 PM   #13
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
thanks a lot
__________________
Pure Japan japanese babes blog
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-18-2015, 03:53 AM   #14
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,359
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.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-18-2015, 05:37 AM   #15
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
thank you Fris ill google for this hood later today
__________________
Pure Japan japanese babes blog
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-18-2015, 05:55 AM   #16
just a punk
So fuckin' bored
 
just a punk's Avatar
 
Industry Role:
Join Date: Jun 2003
Posts: 32,384
Quote:
Originally Posted by druid66 View Post
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
just a punk is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-18-2015, 08:00 AM   #17
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,359
he wants to do it for already created ones.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-18-2015, 08:13 AM   #18
Colmike9
(>^_^)b
 
Colmike9's Avatar
 
Industry Role:
Join Date: Dec 2011
Posts: 7,223
Quote:
Originally Posted by fris View Post
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..
Colmike9 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-18-2015, 12:35 PM   #19
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
ASC from ascending? why is it fucked up then?
__________________
Pure Japan japanese babes blog
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-19-2015, 09:54 AM   #20
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,359
Quote:
Originally Posted by druid66 View Post
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.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-19-2015, 10:00 AM   #21
StinkyPink
It's all goooood.
 
Industry Role:
Join Date: Aug 2009
Location: The Hoe Stroll
Posts: 1,591
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?
StinkyPink is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-20-2015, 05:28 AM   #22
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
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
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-20-2015, 06:18 AM   #23
just a punk
So fuckin' bored
 
just a punk's Avatar
 
Industry Role:
Join Date: Jun 2003
Posts: 32,384
Deleted 8char
__________________
Obey the Cowgod
just a punk is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-20-2015, 06:25 AM   #24
StinkyPink
It's all goooood.
 
Industry Role:
Join Date: Aug 2009
Location: The Hoe Stroll
Posts: 1,591
Quote:
Originally Posted by druid66 View Post
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.
StinkyPink is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-20-2015, 06:25 AM   #25
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
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
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-20-2015, 06:29 AM   #26
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
Quote:
Originally Posted by StinkyPink View Post
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
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-20-2015, 06:47 AM   #27
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,359
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.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-20-2015, 08:46 AM   #28
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
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
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-20-2015, 11:29 AM   #29
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,359
Quote:
Originally Posted by druid66 View Post
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.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-20-2015, 02:25 PM   #30
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
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
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-20-2015, 08:18 PM   #31
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,359
Quote:
Originally Posted by druid66 View Post
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.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-21-2015, 02:29 AM   #32
JuicyBunny
So Fucking Banned
 
Industry Role:
Join Date: Jun 2010
Location: Tokyo Red Light District
Posts: 2,145
Quote:
Originally Posted by druid66 View Post
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.
JuicyBunny is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-21-2015, 03:20 AM   #33
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
Thank you Fris i owe you a promised link ;)
Thank you all guys for trying, you were great!
__________________
Pure Japan japanese babes blog
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-21-2015, 03:24 AM   #34
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
Quote:
Originally Posted by JuicyBunny View Post
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
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks

Tags
random, 02amateur, wordpress, images, gallery, 05amateur, posts, names, badly, sorted, plugin, sort, script, row, option, piss, incredibly, guys, sorting, image, hey, completely, ofc, sorts, named



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.