Jump to content

Community

Meddysong

+Clients
  • Posts

    2,006
  • Joined

  • Last visited

  • Days Won

    3

Meddysong last won the day on June 7 2020

Meddysong had the most liked content!

2 Followers

About Meddysong

  • Birthday 12/16/1978

Profile Information

  • Gender
    Male

Recent Profile Visitors

7,471 profile views
  1. It can't be done automatically but Lindy has very kindly done exactly this for me once as a courtesy. You're a polite, helpful man and a regular contributor here, so I imagine he'd extend the same grace to you too if you submitted a ticket with the request for his attention.
  2. Wow, what a spectacularly good memory! Yes, I tweak content to so that English text is shown in Pages if English is selected but Esperanto when the user changes language. There are a couple of different techniques. The one I've used most often is to add some code within the article itself: <h1 class="longer-text"><span>{{if member.language()->id === 1 }}We’re a charity which has the aim of providing education to people in and about Esperanto.{{else}}Ni estas bonfara asocio, kiu celas eduki homojn en Britio, kiuj volas lerni Esperanton.{{endif}}</span></h1> English is the language with the id 1, so if the member is using English, then the text in the if-clause shows; otherwise, they see the else-clause. Another approach is to use blocks, giving them names with a language marker differentiating them, so block_en and block_eo. That would come in handy for longer pieces of code because you're not forever writing out if-conditions. I can't remember where I've used this but looking through some old blocks, it seems that I have a particular block which creates a variable with the value "en" or "eo" depending on what the current language is: {{\IPS\Settings::i()->lingvo = substr(\IPS\Member::loggedIn()->language()->short, 0, 2);}} (The variable gets its value from the first two letters of my language packs: en_GB and eo_XX.) I presume I must've used that block on a page and then at relevant points added a line within an article to call the relevant block: {block="block_{$lingvo}"} or something like that. My site is such a mess, though, that I can't track down anywhere using that approach. It might be that it didn't work, I suppose. My first approach definitely does work, and a similar one to this second one does with Pages databases too: <p>{{if substr(\IPS\Member::loggedIn()->language()->short, 0, 2)=="eo"}}{$record->customFieldDisplayByKey('people_bio_eo', 'display')|raw}{{else}}{$record->_content|raw}{{endif}}</p> This was all very experimental a few years ago, though. Now I just stick to the first approach, even though it means dozens of if-clauses. It's a headache at the time but if you're not going to change the content, then it's survivable.
  3. Yes, but you need to know what the tags are, which makes things a bit challenging. {member_name} doesn't mean anything in this software, which is why it's not working for you. If you want to display a member's name, then you need: {expression="\IPS\Member::loggedIn()->name"} or its shorthand version: {expression="member.name"} I'm afraid I don't know where you can find a list of these expressions. My technique is to look for similar expressions in the templates and then experiment.
  4. I think he's suggesting that the site isn't actually offline but it will appear to be for an affected user. Whilst everyone else is using the site, the unlucky user will occasionally see an offline screen as though the site were genuinely unavailable. It would be offline for him only at that particular time.
  5. Or I suppose you could expect people to track down your blog instead of providing a link to it ... Try .ipsBadge.ipsBadge_style1.ipsPos_right.cBlogCategoryCount { display: none; } in your custom.css.
  6. Most of us can't because we don't have the Blog app. If you post a link to your blog, it should be easy for people to check for you.
  7. There are two approaches which I think you could take: 1) Purchase the Pages app and make that the default app for the suite. Replicate your HTML page there. Your forums will be found at site.com/forums. 2) Move your installation of Invision Community from site.com to site.com/forums. That leaves site.com free for whatever you want to put there. Bear in mind that if you purchase further apps, they'll also be at site.com/forums, so you'll get site.com/forums/gallery, etc, rather than site.com/gallery if you take this approach.
  8. Have you tried clearing the cache? That's the usual solution when this happens. (Support > Something isn't working correctly.)
  9. That's normal: There's a margin-left on the block so that the text doesn't sit underneath the club icon. But the consequence is that when the width is narrow, sometimes the text sits with a margin even though the club icon is not in the space.
  10. I'm disappointed that there was no deadline presented, jair101's request about what it was went unanswered, and now applications aren't being accepted. I suspect that I'm not the only person who would've worked on putting together a CV over the holidays instead of starting it this past weekend had it been made clear that applications would be closing today. A notification of some kind (announcement, comment, edit within the article...) that there was one day remaining to get applications in would've been helpful compared to just closing applications. Perhaps you might consider welcoming applications again for a period of, say, two days to give those other people who were taking the same break over the holidays that IPS staff were a chance to apply too. Had we left it too late knowing what the deadline was, then that would be on us, of course, but a total lack of notice does seem unfair, and might have cost IPS some worthwhile candidates. Opening them up again for a short, named period at least means that a failure to submit is clearly the fault of the applicant rather than partially of the firm for not stating it not only in the first place but also when asked subsequently by an interested party.
  11. No, it's outside of Invision Community. A locale is a file stored on your server and accessed by the software.
  12. Lovely: that's sorted out how to set out the joins. Thank you for that. For anybody who is looking to do the same, you preprend the JOIN aliases to the field word_custom in the SELECT part to disambiguate: SELECT p_id AS ID, titleEn.word_custom AS Title, descEn.word_custom AS Description, p_group AS Category, categories.pg_id, categories.pg_parent, catName.word_custom AS Category, parentCat.word_custom AS 'Category Parent', p_stock AS Stock, p_store AS 'On Sale', GBP AS Price, p_discounts AS Discounts, titleEo.word_custom AS Titolo, descEo.word_custom AS Priskribo, from_unixtime(p_date_added, '%Y-%d-%m') AS Added, from_unixtime(p_date_updated, '%Y-%d-%m') AS Updated FROM nexus_packages as np LEFT JOIN core_sys_lang_words AS titleEn ON titleEn.lang_id=1 AND titleEn.word_key=CONCAT('nexus_package_', np.p_id) LEFT JOIN core_sys_lang_words AS descEn ON descEn.lang_id=1 AND descEn.word_key=CONCAT('nexus_package_', np.p_id, '_desc') LEFT JOIN core_sys_lang_words AS titleEo ON titleEo.lang_id=2 AND titleEo.word_key=CONCAT('nexus_package_', np.p_id) LEFT JOIN core_sys_lang_words AS descEo ON descEo.lang_id=2 AND descEo.word_key=CONCAT('nexus_package_', np.p_id, '_desc') LEFT JOIN nexus_package_base_prices AS prices ON prices.id = np.p_id LEFT JOIN nexus_package_groups AS categories ON categories.pg_id = np.p_group LEFT JOIN core_sys_lang_words AS catName ON catName.lang_id=1 AND catName.word_key=CONCAT('nexus_pgroup_', categories.pg_id) LEFT JOIN core_sys_lang_words AS parentCat ON parentCat.lang_id=1 AND parentCat.word_key=CONCAT('nexus_pgroup_', categories.pg_parent) ORDER BY p_store DESC In other words, if your alias is 'title', then your SELECT line will feature 'title.word_custom'.
  13. I don't know whether there's a way to build conditional logic into the string. It's possible with numbers but the relevant template files know that a logic check is coming and are written differently accordingly. You do have the option here of changing the order of elements, so you could have: %2$s antwortete auf %1$s von/des %3$s in if that sounds fairly natural. That just passes a problem on, though, I think because you'd need to choose between articles depending on the gender of topic/blog post/file etc of whatever %1$s is going to be in a situation. You're probably best served to keep the ordering and accept that sometimes it's not grammatically perfect. There are plenty of people who (wrongly) believe that apostrophe-s doesn't follow 's' in English but who have to get used to seeing James's etc online. This sort of conundrum is why.
  14. I'm trying to create a query which will display the items we have for sale, the descriptions, the stock count, and so on. One of the challenges I have is that the site has two languages, so if I want the name of a product, I have to look in core_sys_lang_words: SELECT p_id AS ID, word_custom AS Title, word_custom AS Description, p_group AS Category, p_stock AS Stock, p_store AS 'In Store', GBP AS Price, p_discounts AS Discounts, from_unixtime(p_date_added, '%Y-%d-%m') AS Added, from_unixtime(p_date_updated, '%Y-%d-%m') AS Updated FROM nexus_packages as np LEFT JOIN core_sys_lang_words as lang ON lang.lang_id=1 AND lang.word_key=CONCAT('nexus_package_', np.p_id) LEFT JOIN nexus_package_base_prices as prices ON prices.id = np.p_id ORDER BY p_store DESC The crucial part there is: LEFT JOIN core_sys_lang_words as lang ON lang.lang_id=1 AND lang.word_key=CONCAT('nexus_package_', np.p_id) For the product with the p_id 1, that looks up the row with the value nexus_package_1 in the field word_key, returning the value for word_custom: Here's where I am stuck: 1) I'd also like to select the description, which is in the field word_custom where the word_key is nexus_package_X_desc. 2) I'd ideally like to select the title and description where lang_id = 2 too. 3) I'd also like to select the category name, which will involve looking up word_custom for 'nexus_pgroup_X'. The problem I'm experiencing is in the SELECT line, since in each case it involves the field word_custom, which will naturally repeat the same value every time I mention it. How can I do the equivalent of word_custom AS Description, word_custom AS 'Title (language 2)', word_custom AS 'Category (language 1), word_custom AS 'Category (language 2), etc?
×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy