News 2.0 & cms_selflink

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
pinthenet

News 2.0 & cms_selflink

Post by pinthenet »

The cms_selflink tag doesn't seem to get recognised in a News summary (or detail?). I thought this used to work (but can't prove it). Do tags work at all in News content?
Is there an alternative solution other than inserting a normal link with the editor - the cms_selflink is a simple solution for general users.

Thanks
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: News 2.0 & cms_selflink

Post by Ted »

It probably does not work properly in 0.10.x.  It SHOULD work in the 0.11 betas, but I haven't confirmed that.
pinthenet

Re: News 2.0 & cms_selflink

Post by pinthenet »

Still get the same result in 11beta4....

I also notice that in 10 & 11 I  have to hit submit twice when editing a news (or event) item - the first time it just redisplays the edit page
pinthenet

Re: News 2.0 & cms_selflink (& Calendar)

Post by pinthenet »

Just found the same problem in the Calendar 0.7alpha2 module
pinthenet

Re: News 2.0 & cms_selflink

Post by pinthenet »

Double Submit problem resolved - thanks Patricia
pinthenet

Re: News 2.0 & cms_selflink

Post by pinthenet »

But I can't get plugins to work in News (& events & calendar) with 0.11beta5. I've tried on 2 test sites now and I've also copied the tag I use to a normal page and it works.

Am I doing something wrong?
pinthenet

Re: News 2.0 & cms_selflink

Post by pinthenet »

Well, it's a month later and I'm on to 0.11.1 and I still can't use plugins or modules from News (or Events).

Does anyone have a tip?

John
westis

Re: News 2.0 & cms_selflink

Post by westis »

Hi pinthenet,

You should be able to use tags if you put eval in the template tags for summary and content, like this:

Code: Select all

{eval var=$entry->summary} 
{eval var=$entry->content} 
pinthenet

Re: News 2.0 & cms_selflink

Post by pinthenet »

I'll try but I get the impression that the tags are not even recognized - eg {cms_selflink page='page'} appears in the final page - it's not as though I'm getting partial output and no variables
John
pinthenet

Re: News 2.0 & cms_selflink

Post by pinthenet »

Still no luck I'm afraid... eg I put {cms_selflink page='1'} (or any other cmsms directive) in the News detail or summary and in the generated page I get {cms_selflink page='1'}. If I copy/past to a 'normal' page all works fine.

I've checked the html - no extra quotes etc

In fact it doesn't matter what I try (eg {the story of my life}), the curly brackets are treated as normal page content.

I can get round it for cms_selflink by creating a normal href (not so good for less experienced users), or by using FCKeditorX's special functions, but I also need to be able to include modules - eg a gallery. At the moment I have to create an intermediate page to do this.
Could it be that a module cannot call/include other modules?

I assume others have been able to do this successfully....?

Help?

John
pinthenet

Re: News 2.0 & cms_selflink

Post by pinthenet »

This is becoming a one-sided discussion I'm afraid, but when I read the 0.11.2 changelog:

* Fixed bug with News module to allow tags in the content to be parsed properly by smarty

I thought my problem was solved

Unfortunately it wasn't.....

Anyone?

John
User avatar
petert
Power Poster
Power Poster
Posts: 282
Joined: Wed Feb 09, 2005 9:30 pm

Re: News 2.0 & cms_selflink

Post by petert »

pinthenet wrote: This is becoming a one-sided discussion I'm afraid, but when I read the 0.11.2 changelog:
* Fixed bug with News module to allow tags in the content to be parsed properly by smarty
I thought my problem was solved
Same here, no tags are parsed in the news-content.
I also get replies that it all is fixed. I run the latest svn version and it just doesn't work.
The svn version I am using now is so bad it won't display pages (I reported that already as a bug).
Let's hope that the proper 0.11.2 release http://forum.cmsmadesimple.org/index.ph ... l#msg13917 works
Mambo sucks, that's why I am here.
Now they call it Joomla, but it still sucks!

CMSMS rules!
westis

Re: News 2.0 & cms_selflink

Post by westis »

In 0.11.2 this works just fine for me, after a fresh install. If you upgrade to 0.11.2 from 0.11.1 it should work if you just add {eval var= in the summary and content tags in the news templates, as I wrote above.

If not, try pasting these full templates as Summary Template and Detail Template respectively.

Summary Template:

Code: Select all

<!-- Start News Display Template -->
{foreach from=$items item=entry}

<div class="NewsSummaryLink">
	{$entry->titlelink}
</div>

<div class="NewsSummaryCategory">
	{$entry->category}
</div>

{if $entry->formatpostdate}
	<div class="NewsSummaryPostdate">
		{$entry->formatpostdate}
	</div>
{/if}

{if $entry->summary}
	<div class="NewsSummarySummary">
		{eval var=$entry->summary}
	</div>

	<div class="NewsSummaryMorelink">
		[{$entry->morelink}]
	</div>

{else if $entry->content}

	<div class="NewsSummaryContent">
		{eval var=$entry->content}
	</div>
{/if}

{/foreach}
<!-- End News Display Template -->

Detail Template:

Code: Select all

<h3 id="NewsPostDetailTitle">{$entry->title}</h3>

<hr id="NewsPostDetailHorizRule">

{if $entry->category}
	<div id="NewsPostDetailCategory">
		{$entry->category}
	</div>
{/if}

{if $entry->postdate}
	<div id="NewsPostDetailDate">
		Posted: {$entry->postdate|date_format}
	</div>
{/if}

{if $entry->summary}
	<div id="NewsPostDetailSummary">
		<strong>
			{eval var=$entry->summary}
		</strong>
	</div>
{/if}

<div id="NewsPostDetailContent">
	{eval var=$entry->content}
</div>

<div>
	{$entry->printlink}
</div>
User avatar
petert
Power Poster
Power Poster
Posts: 282
Joined: Wed Feb 09, 2005 9:30 pm

Re: News 2.0 & cms_selflink

Post by petert »

westis wrote: In 0.11.2 this works just fine for me, after a fresh install. If you upgrade to 0.11.2 from 0.11.1 it should work if you just add {eval var= in the summary and content tags in the news templates, as I wrote above.
Hmmm, that doesn't sound like it is fixed. Sounds more like a hack.
westis wrote: If not, try pasting these full templates as Summary Template and Detail Template respectively.

I copied both those templates in my svn version 2385 and still no luck. The page gets parsed up until the {eval statement, processing of the page is stopped after that...
Mambo sucks, that's why I am here.
Now they call it Joomla, but it still sucks!

CMSMS rules!
pinthenet

Re: News 2.0 & cms_selflink

Post by pinthenet »

OK partial success! I realised I was misunderstanding the sequence so tried the eval trick again and it works in 11.1 & 11.2, but it still doesn't work with 11.2 without the eval.

Question - if I do a fresh install will CMSMS recognise an existing DB? Otherwise I assume I have to recreate everything.

John
Locked

Return to “CMSMS Core”