WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
Attributes -> as language dectector (5 posts)

  1. customedia
    Member
    Posted 2 years ago #

    Hello, I would like to be able to have attributes that will let the users know if the event in in english or in Japanese and depending on the language an image would be used to replace it. I.E. If the attribute selected during the event creation is english, then a small icon would appear on the fron page [E], if its in Japanese [J]

    http://www.custom-media.com/Iba/
    Here's my placeholder:

    <ul class="listTheEvents">
    <li class="upcomingTitleSidebar">#j #M #y</li>
    <li>#_CATEGORYLINK</li><li><a href="#_EVENTURL">#_NAME »</a></li>
    <li>#_ATT{language}</li>
    <li>#_ATT{FieldLabel}</li>
    </ul>

    Thank you

    http://wordpress.org/extend/plugins/events-manager/

  2. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 2 years ago #

    you'd have to code that yourself somehow, or use some creative workarounds, e.g. you could use an image and just add the #_ATT placeholder to the image file name e.g.

    <img src="/images/flags/#_ATT{Language}.jpg" alt="#_ATT{Language}" />

  3. customedia
    Member
    Posted 2 years ago #

    Thx, Marcus! I fixed it by adding a new folder with the images required. I have another question do you know a way to shorten down the the name? (like limiting it to certain number of characters

    <ul class="listTheEvents">
    <li class="upcomingTitleSidebar">#j #M #y</li>
    <li>#_CATEGORYLINK</li><li><a href="#_EVENTURL">#_NAME »</a></li>
    <li><img src="wp-content/flags/#_ATT{Language}.png" width="12" height="11" alt="#_ATT{Language}"/></li>
    </ul>

    Output

    16 Sep 11
    BCP-DR-IT Security
    IT Solutions for BCP and Back-Up Sites (test) » (#_NAME, is too long would like to make it shorter)
    [J]

    You can check on the actual site to see how it looks like, and again I want to thank you for your support!

    http://www.custom-media.com/Iba/

  4. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 2 years ago #

    you can shorten the description by using the more tag (like with normal wp posts) and use the #_EXCERPT placeholder

    otherwise, to shorten anything else, you need to override the placeholder, as in http://wp-events-plugin.com/tutorials/modifying-placeholder-default-information/

  5. customedia
    Member
    Posted 2 years ago #

    ok I will try this out!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic