Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • oonyx Friend
    #968838

    Hi,

    I edited the article override "movie.php" with more extra fields, so we only have to enter a id number, for a specific download button to appear on the article view. (same for a webshop button, where we only have to enter the item id number)

    But for some reason the code, while correct, is displayed as text and not the button it should be.
    I thought that maybe something was wrong with the component, but when I added the same code directly into the article text, it did work.

    Here’s the code I added to movie.php:

    if($jcontent_buy) echo '<dd>{product '.$jcontent_buy.'|cart}</dd>';
          if($jcontent_demo) echo '<dd>{osdownloads download_button '.$jcontent_demo.' "Download Demo"}</dd>';

    With the code above, the first line works. The buy button is correctly displayed.
    The second line, for the download button doesn’t. But is displayed as text.

    Please see the screenshot, to see how it appears when the article is open.
    On the screenshot, you can also see that the scriptcode does work when entered in the article directly.

    Thanks 🙂


    1. screen1
    oonyx Friend
    #969482

    Anyone any idea what could cause the script plugin to not work?

    Saguaros Moderator
    #970119

    Hi

    Is that the correct code to embed on the PHP layout file?

    You can try to add it into default com_content and switch default template to a standard template of Joomla and see how it goes.

    oonyx Friend
    #970327

    Hi,

    Not sure what you mean by "correct code" It’s the code that comes with the template itself. Adjusted a bit to instead of simply showing an extra content field as a line of text, to put the data of the content field into a regular article plugin shortcode.

    If you mean the plugin shortcode, I’m sure that it’s {osdownloads cssclass ID "Button text"} So the code {osdownloads download_button ‘.$jcontent_demo.’ "Download Demo"} becomes {osdownloads download_button 41 "Download Demo"}

    The problem is that it only displays the correct code but not runs it as a plugin. On the screenshot I provided earlier, you can see the same plugin code, written directly into the article, and it does work.

    It does work when entered directly into an article. But not on the left sidebar of the "movies" article type pages.

    Saguaros Moderator
    #970869

    Thought that generated code is used inside article or custom HTML module only, not used for PHP file. To make a deeper test on this, you can switch default template to a standard template of Joomla like Beez and add your own code to PHP file of article layout page: ROOT/templates/beez3/html/com_content/article/default.php

    and see whether it works or not. If not, pls contact provider of osdownloads extension for further instruction.

Viewing 5 posts - 1 through 5 (of 5 total)

This topic contains 4 replies, has 2 voices, and was last updated by  Saguaros 8 years, 2 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum