• Hello, so far your plugin has been great, thank-you for creating it.

    What I have used it for is to show specific content (a chat room) at several times throughout the week. I’m currently using 6 different rules to make this happen.

    Unfortunately, I think this may be causing a resource problem, in that the content I am trying to display dynamically changes based on users visiting the page, and I think that even though the content is hidden, it is still being dynamically ‘changed’.

    What I want to try is to have just one rule that would work to show the content. The problem I’m running into is that I want to show the content on different times throughout the week, and it seems that each Timed Content rule is built so that it only allows for one time.

    The work-around that I’ve come up with is to use a rule to show the content for all the various times I may need it, and then wrap another rule(s) around it that would hide it on the days that I don’t want to show it.

    As a simplistic example, let’s say I want the content to be seen on Tuesday, 4:00-5:00 PM, and on Thursday from 2:00-3:00 PM and 4:00-5:00 PM.

    My ‘work-around’ would be to create a (1) rule that shows the content on Tuesday and Thursday from 2:00-5:00 PM, and then create two more rules. (2) hide content on Tuesday from 2:00-4:00, and (3) hide content on Thursday from 3:00-4:00. Unfortunately, it seems that your plugin does not accept timed-content shortcode wrapped in another timed-content shortcode. Would this be easy to change?

    Alternatively, is there a way to create one rule that would be able to show the content on different times throughout a week, and repeat on a weekly basis? I’ve tried experimenting with the short-code manually (not using the TC Rule builder), but no success yet.

    Thank-you for all your help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Arno Welzel

    (@awelzel)

    So at the moment you have something like this:

    [timed-content-rule id="1"] Chat room [/timed-content-rule]
    [timed-content-rule id="2"] Chat room [/timed-content-rule]
    [timed-content-rule id="3"] Chat room [/timed-content-rule]

    And your problem is, that putting the chat room in multiple times causes problems on the server as it initializes the chat multiple times as well even though it is not visible?

    First of all: No – wrapping is not possible due to way how shortcodes are handled by WordPress. In short: nesting shortcodes with the same name is not possible. See the Word Press Codex for a technical explanation.

    What kind of chat room to you use? Is it a seperate service embedded using an iframe? Because if that is the case then there should not be any problem at all, since then the chat will only be active at all if the browser displays the iframe contents and not before.

    But if it is really neccessary to embed the chat only once, that what you really want is a new feature – selecting multiple rules for a shortcode, for example:

    [timed-content-rule id="1,2,3"] Chat room [/timed-content-rule]

    To use the rules 1, 2 and 3 for the shortcode.

    This would be a new feature for a future update.

    Thread Starter thedko

    (@thedko)

    Hi Arno, the chat room I’m using is wordpress plug-in based, so it’s not an embed iframe. I’ve gone back to the plugin developers to ask if there’s something I can modify so that the chats are unique, rather than synced.

    I don’t have a huge technical background, so thanks for the clarification that nesting is not doable at this time.

    Something like:

    [timed-content-rule id="1,2,3"] Chat room [/timed-content-rule]

    Would work well, yes. Thanks for considering it for a future update.

    In the short term, is it possible to do something like the following?

    [timed-content-server show="Tuesday 16:00:00 -0600" hide="Tuesday 17:00:00 -0600" show="Thursday 14:00:00 -0600" hide="Thursday 15:00:00 -0600" show="Thursday 16:00:00 -0600" hide="Thursday 17:00:00 -0600"]Show me on Tuesday 4:00 PM Central Standard Time, then hide me an hour later. Show me on Thursday at 2:00. Hide me an hour later. Show me on Thursday at 4:00 PM. Hide me an hour later. [/timed-content-server]

    I don’t know if the shortcode can ‘understand’ multiple shows/hides?

    • This reply was modified 8 years, 3 months ago by thedko.
    Plugin Author Arno Welzel

    (@awelzel)

    Sorry no, parameters can only be used once per shortcode.

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

The topic ‘Inserting TC Shortcode within TC Shortcode’ is closed to new replies.