• Resolved facter

    (@facter)


    Hi.

    I recently changed themes and upgraded my website. I started doing posts using the following short code as it fit in much better with the site design

    [nggallery id=2 display_type=photocrati-nextgen_pro_masonry]

    this works great, and displays the gallery correctly in mosaic, which is what I want. However, for the past five years I had used

    [nggallery id=41]

    My question is – how do I set a default gallery display type so that the above shortcode automatically displays Mosiac instead of the style it does by default now?

    I am unable to find any option to make Mosaic the default style of gallery to display. What this means, is that I have *hundreds* of galleries using the old shortcode, that do not display my galleries in Nextgen pro Mosiac layout.

    So,how exactly do I change the default gallery display? I dont want to have to go into hundreds of posts and have to change all the code manually. Being able to set a default gallery style seems a no brainer to me, but I either cant find it and it doesnt exist, or I am completely blind as to how to actually set this.

    Thanks

    https://www.ads-software.com/plugins/nextgen-gallery/

Viewing 9 replies - 16 through 24 (of 24 total)
  • The syntax of the query is perfectly fine, else MySQL would say something like “You have an error in your SQL syntax blaahh”.

    If your search now returns results, then the query should work fine as well. Double-check if you made any typos. Also worth checking if there are any leading or trailining spaces in the shortcode bit of the query.

    UPDATE wp_posts SET post_content = REPLACE(post_content, '[nggallery id=15]', '[nggallery id=15 display_type=photocrati-nextgen_pro_masonry]') WHERE post_content LIKE '[nggallery id=15]';
    I ran the query above across a test database and it worked just fine.

    Plugin Contributor photocrati

    (@photocrati)

    @totohabschned – Thanks for all of your efforts in helping @facter make these modifications to their database (it’s not generally something we provide in our basic scope of support).

    – Cais.

    Thread Starter facter

    (@facter)

    Hey mate.

    No matter what I’m trying it isn’t working… Ig you look eight posts back, you’ll see the exact queries I’ve been using in the code block (5 days ago)

    Can you see anything at all in those four lines that may be askew? Those four are directly out if the excel file (which were really placated to 300 records using the concatenate excel code) and I’m cutting and pasting those into the Sql query box on phpmyadmin.

    And again, thankyou so much for your help, it really is driving me crazy.

    @cais just saying… All this really is a lot of trouble for something that you should really just be able to set as an basic option to have a default gallery style ??

    Plugin Contributor photocrati

    (@photocrati)

    @facter – I can definitely understand your view of this as a “basic option” but unfortunately our current code base and plugin base functionality does not make this the case. It is something we are looking at but it is also not something we expect to implement in the near future.

    – Cais.

    @facter:
    Codewise there seems nothing wrong, the query(ies) look just fine and i would expect them to work flawless. I double-checked for spaces (leading and trailing), there were none.

    Went to the test database again and executed the complete query you posted…worked like a charm. There’s gotta be something you are doing wrong, but it’s hard to troubleshoot this without seeing the database.

    Here’s what i did:

    open cPanel
    open phpMyAdmin
    Select database
    Click the SQL button in the top nav of phpMyAdmin
    Paste the query
    Click Go

    And that’s it. MySQL then returned the number of the affected rows and i manually checked the table and everything was replaced fine. What happens if you copy them from Excel to some text editor like Notepad first, and then copy them from Notepad to phpMyAdmin?

    Other than that i am at a loss why it isn’t working for you and would need to look at the database.

    @photocrati:
    I know it’s kinda not exactly in the scope of support for the free version but i’d be damned if i don’t get facter to run those queries successfully ??

    Oooops, killed the formatting muhahahah ??

    Thread Starter facter

    (@facter)

    Hey Toto, again, thankyou very much for this help mate, it is really appreciated.

    Okay, so, that is pretty much exactly what I have been doing – nothing more complicated than that. I also tried to go into the table, select all rows and run the query that way.

    Here are some images from the db

    I checked for any extra spaces or lines at the end, I also put it into notepad to get rid of any potential formatting there might have been also ..

    I seriously think theres something wrong with phpmyadmin here … going to trey and contact bluehost again and ask about it.

    The queries look just fine to me.

    If you open the wp_posts table in phpMyAdmin and look for a post containing a shortcode to a gallery, does it contain the old shortcode [nggallery id=X] still?

    Just making sure that the shortcodes haven’t been replaced already and MySQL returns zero becaus the term to replace just isn’t found in the database anymore?

    Plugin Contributor photocrati

    (@photocrati)

    @totohabschned – No worries at all, we really do appreciate you taking the time to work through this!! It is greatly appreciated!

    – Cais.

Viewing 9 replies - 16 through 24 (of 24 total)
  • The topic ‘Set different gallery style to default?’ is closed to new replies.