It would have been nice if there was a slug field on the admin side. After some digging and testing I noticed that if an album or gallery title is changed from the admin side, the album slug will not get the new value nor will the gallery folder name. The gallery slug will be reset to the new title though. The other gallery field that doesn't get updated is the 'Name'.
I figured a workaround for the problem would be to create the album / gallery using Latin characters and then change them to the Arabic title that I want display. products\photocrati_nextgen\modules\ngglegacy\lib\ngg-db.phpTo have that work I need to make sure the slug of the gallery doesn't get updated or always takes the value of the name field.
Searching through NextGen code for "UPDATE $wpdb->nggallery" I found it in 4 files but only 3 had the slug reset:
\products\photocrati_nextgen\modules\ngglegacy\admin\ajax.php
\products\photocrati_nextgen\modules\ngglegacy\admin\manage.php
\products\photocrati_nextgen\modules\ngglegacy\lib\ngg-db.php
before the update statement you would see something like:
$slug = nggdb::get_unique_slug( sanitize_title( $title ), 'gallery' );
That needs to be changed to use the $name field or commented out if the name field is not available.
Note: The get_unique_slug function ensures uniqueness of the slug across all data types.
Warning: This is only a workaround and might be overriden by new updates installed for the plugin.
Example:
becomes:
No comments:
Post a Comment