Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter marineb30

    (@marineb30)

    Thanks for your answer,
    Actually, I just activated Ajax-load-more plugin but did nothing more with it.

    I put this shortcode for my rtmedia gallery to display all the images : do_shortcode('[rtmedia_gallery global="true"]') (it is put in my php template page).

    The problem is that I don’t know what to do with Ajax-load-more plugin to make it work on my gallery.
    Should I add a special shortcode dedicated to Ajax-load-more or some code in my php files, to make it work on my gallery, and where?
    Thanks

    Thread Starter marineb30

    (@marineb30)

    Hello David,
    Thank you so much for your improvements on the new development version, it is perfect, the searchbar works very well now.

    I also have two last questions, in case it is possible :

    I have also created like a menu containing a list (with ul and li) of taxonomies (hierarchical taxonomies) under the searchbar. (One taxonomy for example is called “location” and contains states as parents terms and cities as children terms).
    Is there a way to combine two types of search?
    For instance, if we type “Paris” in the searchbar it displays the corresponding media using the solution you gave me; and if we click in the menu on “Paris” or “London” term it would remove the former search made from the searchbar and it would display the results for the taxonomy term chosen in the menu.

    And the other question : if we type in the searchbar “Paris”, thanks to your solution, it looks for the posts whose post_type is “description” and that contain this word, and displays all the rtmedia media whose attachment id is the same as the “description” post_title.

    When these results are displayed, is there a way to display dropdowns of taxonomies contained in the resulting “description” posts (I have two taxonomies:”type_of_activity” and “price_range”) so that users can filter the obtained results more precisely ?
    One example is, if a user types “Paris” and if it displays 10 photos, that we can filter again these photos in selecting the “Restaurants” terms in the “type_of_activity” taxonomy.

    Thank you very much for you time and help

    Thread Starter marineb30

    (@marineb30)

    Thank you, I downloaded the new MLA development version, but in the documentation tab, when I click on “example plugins” to download the updated example plugin, a blank page is displayed instead of the plugins. (And some other tabs like “Views” for instance, do the same).
    Thanks

    Thread Starter marineb30

    (@marineb30)

    Thanks, I have tried step by step, and each step works fine appart from one : rtmedia=gallery.
    If I remove it, the images are displayed but not in the rtmedia gallery style, and if I add it, it displays that no media are found.

    But if I try the following code for example, it works :
    [mla_gallery rtmedia=gallery post_parent=all posts_per_page=100 buddypress_urls=link]

    Thank you

    Thread Starter marineb30

    (@marineb30)

    Hello David,

    Thank you very much for all your work on this topic.
    I have installed the development version and the updated MLA BuddyPress & rtMedia Example plugin, and used the search form and gallery code you wrote, but it seems that it doesn’t work, no result is found.

    I have checked in my database the titles of my “description” posts and the ids of the medias from rtmedia. I have also tried changing the titles from media_id to attachment id, but it still doesn’t work.
    Sorry to bother you again with this issue.

    Thank you

    Thread Starter marineb30

    (@marineb30)

    Hello,
    Thank you for the query on the title, it works perfect.
    And thanks a lot for experimenting about the Description post type.

    Thread Starter marineb30

    (@marineb30)

    Hello David,

    First thank you because you have helped me a lot a few months ago on my website. Since my long delay, I have made modifications to try to make it more simple, and I have new questions.

    People can upload media with rtmedia, and I display the global rtmedia gallery using :
    [mla_gallery rtmedia=gallery post_parent=all posts_per_page=100 buddypress_urls=link]

    Do you know if it is possible to display media with a query on their title?
    For example, I would like to display only media containing “mainImage” in the title, in the gallery. I don’t know if it is possible by modifying the shortcode, something like that :
    [mla_gallery rtmedia=gallery post_parent=all posts_per_page=100 <strong>media_title="mainImage"</strong> buddypress_urls=link]

    Or if it is not possible with the title in particular, perhaps is it possible to show the gallery of medias containing “mainImage” in their whole post?

    Also, I have created a custom post type, called “Description” . Each “Description” post contains text and taxonomies. The title of each “Description” post ($post_title) is a number corresponding to a rtmedia id.

    With a MLA searchbar, I would like, when a user writes for example “Paris France” in the search bar, that it searchs all the “Description” posts containing these 2 words ; and that it displays in a gallery the rtmedia medias whose media_id is the title of the description posts.

    For instance, if three “Description” posts contain the words “Paris” and “France”, we retrieve their titles ($post_title) : (420, 500 and 600 for example) and then we display a gallery with the medias whose media_id are 420,500 and 600.

    Thanks a lot for your time,

    Marine

    Thread Starter marineb30

    (@marineb30)

    Hi David,
    Thank you very much for your answer. I tested the solution, it works if we enter either a city or a country, but it seems that it doesn’t work if we enter both in the searchbar. (Also, with the updated mla version, I used rtmedia=gallery but the gallery doesn’t display like rtmedia).

    I have worked again on my website, but I am facing a big issue. Actually, my custom fields problem seems much more difficult than what I thought.

    I use rtmedia uploader to allow people to upload videos and photos, and to add custom fields with their medias. For a video upload for instance, people can add custom fields which are : select dropdowns for ‘city’ and ‘activity’ fields, and an input text for a description.
    They can add several lines (thanks to an increment on custom fields). Each line contains a city, an activity, and a description field.

    For example, a user could add for its video :

    (City field)  (Activity field)    (Description field)
    Paris          Eiffel Tower        We visited te eiffel tower and it was nice
    Versailles     Castle              The Versailles Castle is situated near Paris
    Marseille      Harbor              Dinner in front of Marseille Harbor

    After the video upload, these custom fields are then displayed near the video lightbox.

    I don’t know if there is a way to handle it in the searchbar.
    For instance, if a user enters “Paris”, it would display the media. If it enters ‘Paris and Eiffel Tower’ also, but if it enters ‘Paris’ and ‘Harbor’ the media should not be displayed in the gallery.

    I would also like to add a menu to the main gallery page, to filter medias by cities and/or activities. It would work the same way as the searchbar.

    I am quite lost if I should use taxonomies instead of custom fields ‘city’ and ‘activity’ fields, because there are several cities and several activities for each media, and if my issue is feasible or not.

    Thanks again for all your help

    • This reply was modified 9 years, 5 months ago by marineb30.
    • This reply was modified 9 years, 5 months ago by marineb30.
    Thread Starter marineb30

    (@marineb30)

    Hi David,

    Thank you very much for your answer.
    I have changed my code so that my ‘city’ meta-key is now stored in my database in ‘wp_postmeta’.
    After this change, the code that you wrote with a combination of keyword search and city search works well.
    I still have a question :
    If I add another meta-key called ‘country’ for example, is it possible to gather all the search bars in only one search bar?

    I would like that the user can type either a city, a country, or a word contained in the image title or in the description, to display the images which contain these words.
    It doesn’t matter to know if the word written is a city or a county or a word from the description, it would be a global search on all these fields.

    Thank you,
    Marine

    Thread Starter marineb30

    (@marineb30)

    Hi,
    Thanks a lot for all your help.
    Yes, I added “echo do_shortcode” because I used to put the code in the model template file of the page.

    I copied the code that adds a separate city field from the searchbox (directly in the page).
    The searchbox works fine (but it displays results only when the city box is empty) but the city box doesn’t work, it doesn’t find anything.

    I have seen in my SQL database that my ‘city’ meta-key is located in the ‘wp_rt_rtm_media_meta’ table. Perhaps that it is linked to my problem…?

    Thanks again,
    Marine

    Thread Starter marineb30

    (@marineb30)

    Thank you so much David, it works very well now with the development version and the updated example plugin !

    Here is the code added to the search page :

    <form id="photo-search-form" action="." method="post">
    <input size=50 id="mla-search-box" name="search-string" type="text" value="" placeholder="Enter your search words here...." autofocus/><input id="submit" name="submit" type="submit" value="Search" />
    </form>
    
    <hr>
    <?php
    echo do_shortcode('[mla_gallery rtmedia=gallery post_parent=all posts_per_page=100 s="{+template:({+request:search-string+}|a-bad-term)+}" buddypress_urls="link" mla_nolink_text="Enter search terms above and hit Search!" mla_caption="{+author+} - <strong>{+title+}</strong>" mla_output="paginate_links,prev_next" mla_link_href="{+page_url+}?search-string={+request:search-string+}]');

    I have another question: is it possible to search images also by a custom field ?

    Actually, I have created a field called $city in the rtmedia uploader, and after the image upload, this city, writen by the user, is displayed near the description area in the image lightbox.

    (I did it with the following code :
    https://gist.github.com/mangesh/66116130398b8a136458cbf7cc3d736b )

    I would like that when we write a city name in the MLA search box, it could display the images containing that city.

    Thank you very much

Viewing 11 replies - 1 through 11 (of 11 total)