expandcollapse error when adding in Acomments
-
turpentyne
- Forum Members

- Posts: 34
- Joined: Tue Oct 08, 2013 8:29 pm
expandcollapse error when adding in Acomments
I decided to add in comments, to be used in my news section.
I uploaded the function.expandCollapseAll.php file, and installed
Acomments module.
When I drop a tag into the news detail template, I get this error:
Error: at line 702 in file .../lib/smarty/sysplugins/smarty_internal_templatecompilerbase.php:
Syntax Error in template "module_db_tpl:AComments;default_display" on line 23 "{startExpandCollapse id="name" title="$addacomment"}" unknown tag "startExpandCollapse"
Anybody run into this? I'm using cmsms version 1.11.7
thanks!
I uploaded the function.expandCollapseAll.php file, and installed
Acomments module.
When I drop a tag into the news detail template, I get this error:
Error: at line 702 in file .../lib/smarty/sysplugins/smarty_internal_templatecompilerbase.php:
Syntax Error in template "module_db_tpl:AComments;default_display" on line 23 "{startExpandCollapse id="name" title="$addacomment"}" unknown tag "startExpandCollapse"
Anybody run into this? I'm using cmsms version 1.11.7
thanks!
-
chandra
Re: expandcollapse error when adding in Acomments
It seams there's something wrong with plugin call. Try to use thisturpentyne wrote: Syntax Error in template "module_db_tpl:AComments;default_display" on line 23 "{startExpandCollapse id="name" title="$addacomment"}" unknown tag "startExpandCollapse"
Code: Select all
{startExpandCollapse id='name' title='addacomment'}-
turpentyne
- Forum Members

- Posts: 34
- Joined: Tue Oct 08, 2013 8:29 pm
Re: expandcollapse error when adding in Acomments
I get this error with that tag in my news detail template:
Syntax Error in template "module_db_tpl:News;detailSample" on line 172 "{startExpandCollapse id='name' title='addacomment'}" unknown tag "startExpandCollapse"
I'm assuming I'm missing something here. Just don't know what.
Syntax Error in template "module_db_tpl:News;detailSample" on line 172 "{startExpandCollapse id='name' title='addacomment'}" unknown tag "startExpandCollapse"
I'm assuming I'm missing something here. Just don't know what.
-
chandra
Re: expandcollapse error when adding in Acomments
You said in your first post the file name is function.expandCollapseAll.php. That means the correct command to call the plugin must be {expandCollapseAll ...}
-
turpentyne
- Forum Members

- Posts: 34
- Joined: Tue Oct 08, 2013 8:29 pm
Re: expandcollapse error when adding in Acomments
I'm not understanding something, or I didn't explain well enough. I added the "Acomments" module (http://dev.cmsmadesimple.org/projects/acomments).
In its instructions, it said to upload the expandCollapseAll function - not to do anything with it. In fact, I think I read somewhere that, unless it's an older version of cmsms, nothing else needs to be done except to call the Acomments tag
The instructions for the Acomments module listed this as an example, to use in the News module:
{cms_module module='AComments' modulename='News' pageid=$entry->id}
That's what I put on the page that gave an error. When I put your suggestion, I still get an error.
In its instructions, it said to upload the expandCollapseAll function - not to do anything with it. In fact, I think I read somewhere that, unless it's an older version of cmsms, nothing else needs to be done except to call the Acomments tag
The instructions for the Acomments module listed this as an example, to use in the News module:
{cms_module module='AComments' modulename='News' pageid=$entry->id}
That's what I put on the page that gave an error. When I put your suggestion, I still get an error.
-
chandra
Re: expandcollapse error when adding in Acomments
Please post used Templates for News and AComments module.
-
turpentyne
- Forum Members

- Posts: 34
- Joined: Tue Oct 08, 2013 8:29 pm
Re: expandcollapse error when adding in Acomments
Here's the news template:
Code: Select all
<div itemscope itemtype="http://schema.org/Article" >
<div style="width:200px;float:right;padding-top:22px;">
<span style="font-size:.7em;">Search articles</span><br/>
{search}
</div>
{if isset($entry->canonical)}
{assign var='canonical' value=$entry->canonical}
{/if}
{if $entry->postdate}
<div id="NewsPostDetailDate" itemprop="datePublished" content="{$entry->postdate|cms_date_format}">
{$entry->postdate|cms_date_format}
</div>
{/if}
<h3 id="NewsPostDetailTitle" itemprop="name">{$entry->title|cms_escape:htmlall}</h3>
<hr id="NewsPostDetailHorizRule" />
{if $entry->summary}
<div id="NewsPostDetailSummary" itemprop="description">
<strong>
{eval var=$entry->summary}
</strong>
</div>
{/if}
{if $entry->category}
<div id="NewsPostDetailCategory" itemprop="articleSection">
{$category_label} {$entry->category}
</div>
{/if}
{if $entry->author}
<div id="NewsPostDetailAuthor">
{$author_label}
</div>
{/if}
<div class="Newspic1" style="width:44%;">
<div id="NewsPostDetailContent" itemprop="articleBody" style="width:100%;">
{if isset($entry->fields)}
{foreach from=$entry->fields item='field'}
<div class="NewsDetailField" style="width:100%;">
{if $field->type == 'file'}
{* this template assumes that every file uploaded is an image of some sort, because News doesn't distinguish *}
<img style="width:100%;" itemprop="image" src="{$entry->file_location}/{$field->value}"/>
{else}
{$field->name}: {eval var=$field->value}
{/if}
</div>
{/foreach}
{/if}
</div>
{if $entry->extra}
<div id="NewsPostDetailExtra">
{$extra_label} {$entry->extra}
</div>
{/if}
{assign var='alt_title' value=$entry->title}
<br/></div>
<div class="Newspic1">
<div class="NewsDetailField">
<!-- {if $field->type == 'file'}
{* this template assumes that every file uploaded is an image of some sort, because News doesn't distinguish *}
<img style="width:100% !important;" src="{$entry->file_location}/{$field->displayvalue}"/>
{else}
{$field->name}: {eval var=$field->displayvalue}
{/if} -->
</div>
</div>
{eval var=$entry->content}
</div>
<!-- twitter code -->
<div style="float:left;padding-right:0px;position:relative;top:0px;"><a href="https://twitter.com/share" class="twitter-share-button" data-size="medium" data-via="sitename" data-hashtags="asdf">Tweet</a>
<__script__>{literal}!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');{/literal}</__script></div>
<!-- Google + code -->
<!-- Place this tag where you want the +1 button to render. -->
<div style="float:left;">
<div class="g-plusone" data-size="medium"></div>
</div>
<!-- Place this tag after the last +1 button tag. -->
<__script__ type="text/javascript">{literal}
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/platform.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();{/literal}
</__script>
<div style="float:left;">
{FacebookLikeButton layout="button_count"}
</div>
<div style="float:left;">
<span style="position:relative;top:-7px;font-size:.8em;">{print showbutton=true script=true} <!--Print article--> <span>
</div>
{if $return_url != ""}
<div id="NewsPostDetailReturnLink" style="position:relative;top:20px;float:right;">{$return_url}{if $category_name != ''} - {$category_link}{/if}</div>
{/if}
{cms_module module='AComments' modulename='News' pageid=$entry->id}
-
chandra
Re: expandcollapse error when adding in Acomments
Can't see the wrong plugin call - add AComments template please.
Re: expandcollapse error when adding in Acomments
Where did you upload it to?turpentyne wrote:
I uploaded the function.expandCollapseAll.php file, and installed
Acomments module.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
-
turpentyne
- Forum Members

- Posts: 34
- Joined: Tue Oct 08, 2013 8:29 pm
Re: expandcollapse error when adding in Acomments
it's uploaded into the plugins folder
-
turpentyne
- Forum Members

- Posts: 34
- Joined: Tue Oct 08, 2013 8:29 pm
Re: expandcollapse error when adding in Acomments
Chandra, forgive me. I don't know what template you're wanting to see.
The only other one I can find in relation to this, is the comments templete, here:
The only other one I can find in relation to this, is the comments templete, here:
Code: Select all
<div id="comments">
{if $items}
<ul>
{/if}
{foreach from=$items item=entry}
<li class="{$entry->cssclass}">{if $entry->comment_title}<strong>{$entry->comment_title}</strong><br />{/if}
{if $entry->comment_author}
{if $entry->author_website}<a href="{$entry->author_website}" target="_blank">{$entry->comment_author}</a> -
{else}{$entry->comment_author} -
{/if}
{else if $entry->author_website}<a href="{$entry->author_website}" target="_blank">{$entry->author_website}</a> -
{/if}
{$entry->date}<br />
{$entry->comment_data}
</li>
{/foreach}
{if $items}
</ul>
{/if}
{if FALSE == $errormessage}
{startExpandCollapse id="name" title="$addacomment"}
{else}
{$errormessage}
{/if}
<h3>{$addacomment}</h3>
{$startform}
{*<form id="{$id}moduleform_1" method="post" action="{$returnurl}" class="cms_form">*}
{$image}
<table>
<tr>
<td>{$titletxt}:</td>
<td>{$inputtitle}</td>
</tr>
<tr>
<td>{$yournametxt}(*):</td>
<td>{$inputyourname}</td>
</tr>
<tr>
<td>{$emailtxt}:</td>
<td>{$inputemail}</td>
</tr>
<tr>
<td>{$notifytxt}:</td>
<td>{$inputnotify}</td>
</tr>
<tr>
<td>{$websitetxt}:</td>
<td>{$inputwebsite}</td>
</tr>
<tr>
<td>{$commenttxt}(*):</td>
<td>{$inputcomment}</td>
</tr>
{if $spamprotect}
<tr>
<td>{$entercodetxt}:</td>
<td>{$spamprotectimage}<br />{$inputentercode}</td>
</tr>
{/if}
<tr>
<td> </td>
<td>{$submit} {$cancel}</td>
</tr>
</table>
{*</form>*}
{$endform}
{if FALSE == $errormessage}
{stopExpandCollapse}
{/if}
{if $trackback == 1}
<span class="trackback"><a href="{$trackbackurl}" rel="nofollow">Trackback-URL</a></span>
<!--
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:trackback="{$trackbackurl}">
<rdf:Description
rdf:about="{$redirecturl}"
dc:title="{$pagetitle}"
dc:identifier="{$redirecturl}"
trackback:ping="{$trackbackurl}" />
</rdf:RDF>
-->
{/if}
</div>
-
calguy1000
- Support Guru

- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: expandcollapse error when adding in Acomments
The expand/collapse plugins were removed from the CMSMS core due to copyright problems.
Besides, with jquery it's trivial to work without them.
See the jquery UI accordion plugin.
Besides, with jquery it's trivial to work without them.
See the jquery UI accordion plugin.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: expandcollapse error when adding in Acomments
You are trying to use something that is marked as stale, not updated in 21 months, so most likely it wont work, as mentioned above try using jQuery...


