Fork me on GitHub

Quick Question About Dizkus Block  Bottom

Go to page [-1] 1 - 2:

  • Hello again,

    I changed my mind. I'd like to add the Dizkus block to my site (to get people to actually use it). I've upgraded to Zikula 1.2.8 (I tried to upgrade to 1.3.0 but my host isn't running the required version of PHP yet, but it's coming). When I try to add a Dizkus block, the whole site apparently goes down. I get the following error in Firefox

    "The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression."

    As soon as I disable or delete the block, it's fine.
    Template file is "dizkus_centerblock_display.html" and Parameters are "maxposts=5"
    "Hide category view when there is only one category" is checked, as is mail2forum and rss2forum.
    Any suggestions would be appreciated.

    --
    Christopher Pelletier
    NorthumberlandView.ca
    A View Like No Other
  • So a quick update on my quick question. I changed the template file from "dizkus_centerblock_display.html" to "dizkus_centerblock_display2.html" and I no longer get the error.

    Unfortunately, my original problem remains. Nothing is showing up in the Dizkus block on the site. I'd like it to show up like it does on the left side of this page. I have tried several variations on the Parameters including "maxposts=5", "maxposts=5,viewcat_id=1" and "maxposts=5,forum_id=1". Still nothing.

    Anyone have any suggestions?

    --
    Christopher Pelletier
    NorthumberlandView.ca
    A View Like No Other
  • Bump... Anyone? icon_confused

    --
    Christopher Pelletier
    NorthumberlandView.ca
    A View Like No Other
  • Rename the template to the original filename.
    Disable gzip output compression at the main settings page to see the real template error instead of the confusing compression-related message.

    --
    Guite | ModuleStudio
  • Thanks Guite. I disabled compression, changed the template name and and here's the error that I got.

    Code

    system error

    An unidentified problem occurred (classified as an error). The following message was returned:

    An unidentified problem occurred (classified as an error). The following message was returned:

    Smarty error: [in dizkus_centerblock_display.html line 15]: syntax error: invalid attribute name: '=' (Smarty_Compiler.class.php, line 1550)

    Go back to previous page

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, cgiadmin@yourhostingaccount.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.


    Any thoughts?

    --
    Christopher Pelletier
    NorthumberlandView.ca
    A View Like No Other
  • Bump... Anyone? I'm running 1.2.8 and changed to "dizkus_centerblock_display3.html". At least now it says "No Posts"

    Edit: Hot Diggity Damn! I got it! I selected "No External Source" under the External Source area of the Edit Forum Tree section. Now they're showing up. Huzzah and thank you all for your help! icon_biggrin



    Edited by eledril on Dec 12, 2011 - 09:49 PM.

    --
    Christopher Pelletier
    NorthumberlandView.ca
    A View Like No Other
  • Code

    Smarty error: [in dizkus_centerblock_display.html line 15]: syntax error: invalid attribute name: '=' (Smarty_Compiler.class.php, line 1550)

    Go back to previous page


    This is the key. You have an error in your template dizkus_centerblock_display.html on line 15. Can you post that code and the code around it?
  • Here's the complete code for dizkus_centerblock_display.html

    Code

    <!--[*  $Id: dizkus_centerblock_display.html 1217 2010-01-06 16:19:15Z Landseer $  *]-->
    <!--[pnpageaddvar name="stylesheet" value="modules/Dizkus/pnstyle/style.css"]-->

    <!--[* use show_m2f=true as parameter for readlastposts to show mail2forum postings, there are hidden per default *]-->
    <!--[readlastposts maxposts=$maxposts forum_id=$forum_id]-->
    <!--[if $lastpostcount > 0]-->
    <p class="dzk_centerblockheader">
        <strong><!--[$lastpostcount]-->&nbsp;<!--[gt text="Recent postings:" domain="module_dizkus"]--></strong>
    </p>

    <table class="z-datatable">
        <tbody>
            <!--[foreach item=lastpost from=$lastposts]-->
            <tr class="<!--[cycle values='z-odd,z-even']-->">
                <td><a href="<!--[pnmodurl modname=Dizkus type=user func=func=viewforum forum=$lastpost.forum_id]-->"><!--[$lastpost.forum_name]--></a></td>
                <td><a href="<!--[$lastpost.last_post_url_anchor]-->"><!--[$lastpost.topic_title]--></a></td>
                <td><!--[$lastpost.posted_unixtime|pndate_format:'datetimebrief':'':true]--></td>
                <td><!--[$lastpost.poster_name|userprofilelink]--></td>
            </tr>
            <!--[/foreach]-->
        </tbody>
    </table>

    <!--[else]-->
    <p class="z-center"><!--[gt text="No posts" domain="module_dizkus"]--></p>
    <!--[/if]-->
    <p class="z-center">
        <a style="font-size: 0.8em;" href="<!--[pnmodurl modname=Dizkus func=main]-->" title="<!--[gt text="Go to forum" domain="module_dizkus"]-->"><!--[gt text="Go to forum" domain="module_dizkus"]--></a>
    </p>


    --
    Christopher Pelletier
    NorthumberlandView.ca
    A View Like No Other
  • Found it. This is line 15

    Code

    <!--[foreach item=lastpost from=$lastposts]-->


    The syntax of this line is wrong. So how did I know? What I did was look at line 15 and think, hmm that seems wrong. I then went to the Smarty manual
    http://www.smarty.ne…unction.foreach.tpl
    And looked at the syntax for foreach, sure enough, its wrong. The syntax should be

    Code

    <!--[foreach $lastposts as $lastpost]-->

    Just changing that line in the code should make it work.
  • I tried that but I got an error on line 13 this time.

    --
    Christopher Pelletier
    NorthumberlandView.ca
    A View Like No Other
  • Let's keep at it. What is the error this time. Also post your code again.
  • Here's the Error

    System error

    An unidentified problem occurred (classified as an error). The following message was returned:

    An unidentified problem occurred (classified as an error). The following message was returned:

    Smarty error: [in dizkus_centerblock_display.html line 13]: syntax error: invalid attribute name: '$lastposts' (Smarty_Compiler.class.php, line 1550)

    Go back to previous page

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, cgiadmin@yourhostingaccount.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    Here's the Code

    Code

    <!--[*  $Id: dizkus_centerblock_display.html 1217 2010-01-06 16:19:15Z Landseer $  *]-->
    <!--[pnpageaddvar name="stylesheet" value="modules/Dizkus/pnstyle/style.css"]-->

    <!--[* use show_m2f=true as parameter for readlastposts to show mail2forum postings, there are hidden per default *]-->
    <!--[readlastposts maxposts=$maxposts forum_id=$forum_id]-->
    <!--[if $lastpostcount > 0]-->
    <p class="dzk_centerblockheader">
        <strong><!--[$lastpostcount]-->&nbsp;<!--[gt text="Latest Posts:" domain="module_dizkus"]--></strong>
    </p>

    <table class="z-datatable">
        <tbody>
            <!--[foreach $lastposts as $lastpost]-->
            <tr class="<!--[cycle values='z-odd,z-even']-->">
                <td><a href="<!--[pnmodurl modname=Dizkus type=user func=func=viewforum forum=$lastpost.forum_id]-->"><!--[$lastpost.forum_name]--></a></td>
                <td><a href="<!--[$lastpost.last_post_url_anchor]-->"><!--[$lastpost.topic_title]--></a></td>
                <td><!--[$lastpost.posted_unixtime|pndate_format:'datetimebrief':'':true]--></td>
                <td><!--[$lastpost.poster_name|userprofilelink]--></td>
            </tr>
            <!--[/foreach]-->
        </tbody>
    </table>
    <p class="z-center">
        <a style="font-size: 0.8em;" href="<!--[pnmodurl modname=Dizkus func=main]-->" title="<!--[gt text="Go to forum" domain="module_dizkus"]-->"><!--[gt text="Go to forum" domain="module_dizkus"]--></a>
    </p>
    <!--[else]-->
    <p class="z-center"><!--[gt text="No posts" domain="module_dizkus"]--></p>
    <!--[/if]-->


    --
    Christopher Pelletier
    NorthumberlandView.ca
    A View Like No Other
  • What this error is saying is that for some reason, it is not seeing $lastposts. This tells me that for whatever reason $lastposts is either not an array or is not being added to the page by pnRender. Let me check the Dizkus code.

    So I spent some time setting up dizkus and testing this code out. It works just fine on my set up here. And that is without changing the code I told you to change. This is very curious. OK next thing to try. If you are comfortable editing PHP code, do the following. Open up dizkus_centerblock_display.html and at the end of it put the following

Go to page [-1] 1 - 2:

This list is based on users active over the last 60 minutes.