expandcollapse error when adding in Acomments

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
turpentyne
Forum Members
Forum Members
Posts: 34
Joined: Tue Oct 08, 2013 8:29 pm

expandcollapse error when adding in Acomments

Post by turpentyne »

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!
chandra

Re: expandcollapse error when adding in Acomments

Post by chandra »

turpentyne wrote: Syntax Error in template "module_db_tpl:AComments;default_display" on line 23 "{startExpandCollapse id="name" title="$addacomment"}" unknown tag "startExpandCollapse"
It seams there's something wrong with plugin call. Try to use this

Code: Select all

{startExpandCollapse id='name' title='addacomment'}
turpentyne
Forum Members
Forum Members
Posts: 34
Joined: Tue Oct 08, 2013 8:29 pm

Re: expandcollapse error when adding in Acomments

Post by turpentyne »

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.
chandra

Re: expandcollapse error when adding in Acomments

Post by chandra »

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
Forum Members
Posts: 34
Joined: Tue Oct 08, 2013 8:29 pm

Re: expandcollapse error when adding in Acomments

Post by turpentyne »

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.
chandra

Re: expandcollapse error when adding in Acomments

Post by chandra »

Please post used Templates for News and AComments module.
turpentyne
Forum Members
Forum Members
Posts: 34
Joined: Tue Oct 08, 2013 8:29 pm

Re: expandcollapse error when adding in Acomments

Post by turpentyne »

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}:&nbsp;{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}:&nbsp;{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;">
&nbsp; <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

Post by chandra »

Can't see the wrong plugin call - add AComments template please.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1978
Joined: Mon Jan 29, 2007 4:47 pm

Re: expandcollapse error when adding in Acomments

Post by Jo Morg »

turpentyne wrote:
I uploaded the function.expandCollapseAll.php file, and installed
Acomments module.
Where did you upload it to?
"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!
turpentyne
Forum Members
Forum Members
Posts: 34
Joined: Tue Oct 08, 2013 8:29 pm

Re: expandcollapse error when adding in Acomments

Post by turpentyne »

it's uploaded into the plugins folder
turpentyne
Forum Members
Forum Members
Posts: 34
Joined: Tue Oct 08, 2013 8:29 pm

Re: expandcollapse error when adding in Acomments

Post by turpentyne »

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:

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>&nbsp;</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
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: expandcollapse error when adding in Acomments

Post by calguy1000 »

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.
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.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: expandcollapse error when adding in Acomments

Post by Dr.CSS »

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...
Post Reply

Return to “Modules/Add-Ons”