Page 1 of 1
expandcollapse error when adding in Acomments
Posted: Tue Dec 10, 2013 11:17 pm
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!
Re: expandcollapse error when adding in Acomments
Posted: Wed Dec 11, 2013 3:01 am
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'}
Re: expandcollapse error when adding in Acomments
Posted: Wed Dec 11, 2013 6:22 am
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.
Re: expandcollapse error when adding in Acomments
Posted: Wed Dec 11, 2013 7:03 am
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 ...}
Re: expandcollapse error when adding in Acomments
Posted: Wed Dec 11, 2013 8:52 am
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.
Re: expandcollapse error when adding in Acomments
Posted: Wed Dec 11, 2013 9:46 am
by chandra
Please post used Templates for News and AComments module.
Re: expandcollapse error when adding in Acomments
Posted: Wed Dec 11, 2013 4:07 pm
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}: {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}
Re: expandcollapse error when adding in Acomments
Posted: Wed Dec 11, 2013 5:24 pm
by chandra
Can't see the wrong plugin call - add AComments template please.
Re: expandcollapse error when adding in Acomments
Posted: Wed Dec 11, 2013 5:38 pm
by Jo Morg
turpentyne wrote:
I uploaded the function.expandCollapseAll.php file, and installed
Acomments module.
Where did you upload it to?
Re: expandcollapse error when adding in Acomments
Posted: Wed Dec 11, 2013 5:49 pm
by turpentyne
it's uploaded into the plugins folder
Re: expandcollapse error when adding in Acomments
Posted: Wed Dec 11, 2013 6:32 pm
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> </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>
Re: expandcollapse error when adding in Acomments
Posted: Wed Dec 11, 2013 6:33 pm
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.
Re: expandcollapse error when adding in Acomments
Posted: Mon Dec 30, 2013 7:31 pm
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...