AdvancedContent

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked

What do you think: Use the image uploads dir or just the uploads dir for {content_image}?

image uploads dir
23
68%
uploads dir
8
24%
don't care
3
9%
 
Total votes: 34

NaN

Re: improve the content type "content" - Content(extended) -> XContent Module

Post by NaN »

Hi Jeremy,

thanks for testing this.
The new release has been a bit of a rush since i could not help out with the latest problems anymore.
The version i was working on was quite different than the last release so i decided to publish the current work so it is easier for me to fix errors etc.
So this release might be still a bit incomplete.
JeremyBASS wrote:
So I went to test out the new version.. right a way I notice something..

I had

{*
{content block="Show Login Info" block_tab='Access' type='checkbox' assign='LI' checked=false}
*}

and now it suddently popped up in the page edit area..
Use page_tab instead of block_tab to show the block in another tab than the edit area:

{*
{content block="Show Login Info" page_tab='Access' type='checkbox' assign='LI' checked=false}
*}

(not sure if this is what you mean)

JeremyBASS wrote:
Also the sort fails very big if you have the wysiwyg is truned off. 
I cannot verify this. Sorting is working for me. What browser?
(Only tested with Firefox 3.6.3 and Safari 4.0.4 on a Mac)

JeremyBASS wrote:
Also it's not saving the order..
It does save the order.
But at the moment it only affects the display in backend.
Not the frontend because as you already mentioned the order of frontend display is defined in template.
JeremyBASS wrote:
so I'm not sure if that is a bug but IMHO it's not very usfully if it doesn't save page by page
Order is saved for each page ;)
But sorting blocks will only be interesting in later versions.
At the moment it is just something useless.

JeremyBASS wrote:
since you can** just set the order in the template it's self. 
You're right. Thats why in later versions you cannot change the order of blocks that are defined in the template.
I'm just playing around with the sorting stuff at the moment.
Just ignore it ;)

But i'm planning to add a function where you can add content blocks right out of the edit page area.
This will be some special blocks that are stored for each page individually. (and not by template)
Since this blocks are not defined in template you will need to define an area in the template where these blocks will be shown.
It will be something like this:

{content block="left" type="area"}

in backend you will be able to add a block to the currently edited page and assign this block to an area that is defined in the template.
And there you will need the sorting functions.
Just be patient.

JeremyBASS wrote:
This also threw me thru a loop..

{AdvancedContent block="Show Login Info" block_tab='Access' type='checkbox' assign='LI' checked=false} << doesn't work
{AdvancedContent block="Restrict Access" block_tab='Access' type='checkbox' assign='LA' checked=false} << does work
{AdvancedContent block="Show Login Controlls" block_tab='Access' type='checkbox' assign='LC' checked=false} << does work
Hm... this is some strange behavoiur i only get if the edit page is reloaded because of changing the template or the content type.
There might be some issues in the FillParams function.

While typing this i realised that there are some more issues caused by saving the content block data in a db table.
That means if you change your template (removing blocks) they will still appear since they are still stored in the modules table and loaded as content blocks that belongs to that page.
Template blocks shouldn't be stored in db i think.
JeremyBASS

Re: improve the content type "content" - Content(extended) -> XContent Module

Post by JeremyBASS »

NaN wrote:
JeremyBASS wrote:
Also the sort fails very big if you have the wysiwyg is truned off. 
I cannot verify this. Sorting is working for me. What browser?
(Only tested with Firefox 3.6.3 and Safari 4.0.4 on a Mac)
I think you missed
JeremyBASS wrote:
  Trun it back on and it works again.. I didn't test it in anything passed IE since it's king like it or not..
IMHO if it don’t work in IE then it’s not going to work for 9 of 10 clients we hand off to so for me I’d have to continue to use the last two file system I committed in the thread here.

http://screencast.com/t/ZTRmMjFmMTQt
NaN wrote:
JeremyBASS wrote:
Also it's not saving the order..
It does save the order.
But at the moment it only affects the display in backend.
Not the frontend because as you already mentioned the order of frontend display is defined in template.
JeremyBASS wrote:
so I'm not sure if that is a bug but IMHO it's not very usfully if it doesn't save page by page
That is what I figured that is was suppose to work… so this will help clear up what I’m saying..
http://www.screencast.com/t/ZTRmMjFmMTQt
Also what I meant about the order in the template… and everything. This is what my test template started out like when all the issue.

Code: Select all

{process_pagedata}

{*  This shouldn’t show up in the page editing… but as you saw in the vid… it is.. 

{AdvancedContent block="Show Login Info" block_tab='Access' type='checkbox' assign='LI' checked=false}
{AdvancedContent block="Restrict Access" block_tab='Access' type='checkbox' assign='LA' checked=false}
{AdvancedContent block="Show Login Controlls" block_tab='Access' type='checkbox' assign='LC' checked=false}
{if $LA==1}{if $userids==''}{redirect_page page='login'}{/if}{elseif $LA!=1}{/if}




{AdvancedContent page_tab="SEO" block="Keywords" wysiwyg="false" assign="Page_Keywords"}
{AdvancedContent page_tab="SEO" block="Discriptions" wysiwyg="false" assign="Page_Discriptions"}

{AdvancedContent type='image' ImgMode='DropDown' block_tab='Head Image' dir="energyTheme" block='image1' label='Screen 1' filter="exclude:thumb_" assign='HeaderImage'}
{AdvancedContent block_tab='Head Image' block="Show Title" type='checkbox' assign='SH' checked=false}

{AdvancedContent block_tab='SideBar' block='SideBar' assign='contentSideBarjunk'}
{capture assign=contentjunk} {content}{/capture}

*}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<__html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
Etc……
So in the edit page it use to get it’s initial order based on the order of appearance in the template. So
The 'Head Image' is coming before 'Access' which before it was based on the order in the template for what the order started off like in the edit area.  That IMHO is super important to fix.

I hope that clears a bunch up there also it's really slow loaded and saving... that server is quite speedy ;)… Cheers -Jeremy
NaN

Re: improve the content type "content" - Content(extended) -> XContent Module

Post by NaN »

Ah, okay.
Thanks for the vids ( this is the best way of a bugreport :D )
I did not test with disabled WYSIWYG in the user preferences.
I thought you mean disabled by block when editing the page.

Disabled WYSIWYG editor causes trouble because i need to toggle the editor off during sorting. Otherwise editor doesn't work anymore in most browsers. It has something to do with the iFrame that holds the WYSIWYG content. When changing the DOM by sorting the blocks the iFrame content will be reloaded by some browsers. Since there is no real src attribute of the iFrame but just a javascript that populates it, it will show a blank content and the editor won't work anymore since the javascript inside the iFrame is missed now.
If there actually is no editor you will get the javascript error you've seen and sorting won't work completely.
I will fix this. Just need to check in the javascript if there actually is some TinyMCE.

That leads to the next problem: At the moment the jQuery sorting stuff is only working with TinyMCE :(

JeremyBASS wrote:

Code: Select all


{process_pagedata}

{*  This shouldn’t show up in the page editing… but as you saw in the vid… it is.. 

[...]

*}

Why should this not appear in the page editing?
Just because you wrapped it in smarty comments?
Smarty comments have no effect to the backend since there is no smarty engine used to parse the template.
There is only a regexp that searches for {content ... } or {AdvancedContent ... }
But this is exactly how the default content type behaves.
I'm not sure if i got you right. So could you please explain a bit more detailed?

JeremyBASS wrote:
So in the edit page it use to get it’s initial order based on the order of appearance in the template. So
The 'Head Image' is coming before 'Access' which before it was based on the order in the template for what the order started off like in the edit area.  That IMHO is super important to fix.
I just don't get it, sorry.
The only reason why in your video the "Head Image" is coming before "Access" (although it is exactly the other way in your template) is that you 've changed the template after creating the page.
And there indeed is some work to do.
The event function (TemplateEditPost) was just not ready yet.
But it may fix it.

JeremyBASS wrote:
also it's really slow loaded and saving... that server is quite speedy ;)… Cheers -Jeremy
Bad to hear that :(
I thought it would use less ressources in this release.
But i was only about reducing the memory usage in frontend.
Maybe i also need to do some optimizing for backend ...

Btw. how many content blocks do you have in your template?
Maybe it is because the module stores the content blocks params in a separate db table when saving the content.
This may slow down saving and loading process.
Last edited by NaN on Sat May 15, 2010 5:59 pm, edited 1 time in total.
JeremyBASS

Re: improve the content type "content" - Content(extended) -> XContent Module

Post by JeremyBASS »

NaN wrote: That leads to the next problem: At the moment the jQuery sorting stuff is only working with TinyMCE :(
Yeah I figured on that.. IMHO, that should be out till it’s stable ..
NaN wrote:
JeremyBASS wrote:

Code: Select all


{process_pagedata}

{*  This shouldn’t show up in the page editing… but as you saw in the vid… it is.. 

[...]

*}

Why should this not appear in the page editing?
Just because you wrapped it in smarty comments?
Smarty comments have no effect to the backend since there is no smarty engine used to parse the template.
There is only a regexp that searches for {content ... } or {AdvancedContent ... }
But this is exactly how the default content type behaves.
I'm not sure if i got you right. So could you please explain a bit more detailed?

Sure.. the last single file there we were working back and forth on here.. I think in my post.. try that again.. You could comment out the tags.. which is very handy when you need to trun it off and on … which I have had reasons to do.
NaN wrote:
JeremyBASS wrote:
So in the edit page it use to get it’s initial order based on the order of appearance in the template. So
The 'Head Image' is coming before 'Access' which before it was based on the order in the template for what the order started off like in the edit area.  That IMHO is super important to fix.
I just don't get it, sorry.
The only reason why in your video the "Head Image" is coming before "Access" (although it is exactly the other way in your template) is that you 've changed the template after creating the page.
And there indeed is some work to do.
The event function (TemplateEditPost) was just not ready yet.
But it may fix it.
So when you try the single older version, you’ll notice that after a page is made you can reorder.. that is important as sometime clients ask to move thing after they see they first idea and now what to change their mind.
NaN wrote:
JeremyBASS wrote:
also it's really slow loaded and saving... that server is quite speedy ;)… Cheers -Jeremy
Bad to hear that :(
I thought it would use less ressources in this release.
But i was only about reducing the memory usage in frontend.
Maybe i also need to do some optimizing for backend ...
Btw. how many content blocks do you have in your template?
Maybe it is because the module stores the content blocks params in a separate db table when saving the content.
This may slow down saving and loading process.
So again verses the single files, the load time was next to nothing.. very snappy with like 10-15 option tags in there.. same template with the changes to the tags only as needed.. that is supper slow.. It also was bad to hear to me :( … TBH I can’t use any of these version atm … I did think about trying to jump back in as we talked but I’m am still back logged.. I really really still want to do the dynamic block like what is in FB with the title and content pair that the uses can add (you can see it on the form side..) ..
Sorry I can’t be of more help atm.. but I wil come back if still wanted.. Cheers -Jeremy
NaN

Re: improve the content type "content" - Content(extended) -> XContent Module

Post by NaN »

JeremyBASS wrote:
Sure.. the last single file there we were working back and forth on here.. I think in my post.. try that again.. You could comment out the tags.. which is very handy when you need to trun it off and on … which I have had reasons to do.
Are you sure?
I looked in all files here and none of them are able to handle smarty comments since the regexp pattern to get the content blocks does always only check for something like {content ... }. So none is able to ignore {* {content ... } *} in backend.
Could you show me the regexp you're using for that?
I just can't figure it out by myself.

JeremyBASS wrote:
So when you try the single older version, you’ll notice that after a page is made you can reorder.. that is important as sometime clients ask to move thing after they see they first idea and now what to change their mind.
Yes, this won't work at the moment because the order is stored in the database.
And when editing the template and reorder something the database won't be updated. And since in the backend the blocks will be ordered by what is stored in the database changing the template after saving a page won't have any effect to the backend.
This is indeed weird so i'll remove the ordering stuff until i have a solution for that.
I think the solution will be that content blocks that are defined in template just cannot be reordered and their params won't be saved in database.
(Maybe this will speed some things up)
NaN

Re: improve the content type "content" - Content(extended) -> XContent Module

Post by NaN »

0.3.1 is out.
I just removed the reorder stuff and the db stuff.
So it may behave as expected now.

Could not see any difference in performance but i'm testing on a local machine so this is not relevant.
Maybe the perfomance issue is because it is running as module now instead of a single file?
Dunno if there is a significant difference between handling core content types and module content types.
User avatar
robsta
Forum Members
Forum Members
Posts: 131
Joined: Thu Oct 20, 2005 11:39 pm
Location: Wellington

Re: improve the content type "content" - Content(extended) -> XContent Module

Post by robsta »

Just released a site that's removed the need for using news – it treats everything as linkable content using the XContent module... ultimate tagging and ultimate back end control... Thanks NaN, JeremyBass and everyone else..

http://www.designworks.co.nz

will be taking the step towards Advanced Content in the next few weeks

R
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am
Location: London

Re: improve the content type "content" - Content(extended) -> XContent Module

Post by applejack »

Using Ajax to display the news the way you have is not a good idea for SEO and I think for usability.

Re Content Extended module I am about to start using this on a big site so Nan I hope that the documentation is up to date and sufficiently descriptive as if there is one major complaint I have about CMSMS is the poor and inaccurate documentation at times.

Website Design & Production
http://www.applejack.co.uk
phillindsay
New Member
New Member
Posts: 5
Joined: Fri May 14, 2010 11:58 am
Location: London, UK

Re: improve the content type "content" - Content(extended) -> XContent Module

Post by phillindsay »

Hi,

We've been using the XContent and now Advanced Content module and are loving it - primarily we are using it so our clients can manage the sidepanels on their websites. We create a tab in the admin called "Sidepanels" and allow them to select from a range of global content blocks what they want on each page (if they select none, we have a default set of blocks setup).

Our first implementation of this can be seen in the internal pages on this website:
http://www.hotspotsmovement.com
In particular the client has created her first custom panel on the Solutions page:
http://www.hotspotsmovement.com/solutions.html

If anyone has questions about how we are using the module, feel free to ask away  ;) Or if you want to see the code we have put into our templates let me know and I'll post it up. We are constantly finding new ways with CMSMS to design & build sites and then hand them over to the client so they can get the most out of them (rather than coming back to us every day with amends!!)

Thanks again for another superb module
nockenfell
Power Poster
Power Poster
Posts: 751
Joined: Fri Sep 12, 2008 2:34 pm
Location: Schweiz / Switzerland

Re: improve the content type "content" - Content(extended) -> XContent Module

Post by nockenfell »

phillindsay wrote: If anyone has questions about how we are using the module, feel free to ask away  ;) Or if you want to see the code we have put into our templates let me know and I'll post it up. We are constantly finding new ways with CMSMS to design & build sites and then hand them over to the client so they can get the most out of them (rather than coming back to us every day with amends!!)
I am interested
[this message is written with 100% recycled bits]
User avatar
will83
Forum Members
Forum Members
Posts: 88
Joined: Sat Aug 02, 2008 6:23 pm

Re: improve the content type "content" - Content2 -> XContent -> AdvancedContent

Post by will83 »

Hi everybody!

I've created a module with the excellent CTLModuleMaker (I name it newgcb).
I use two templates to output the data for the excellent AdvancedContent :-) with "multiselect" field

Code: Select all

{AdvancedContent block="my_new_gcbs" type="select_multiple" smarty="true" items=":::cms_module module='newgcb' listtemplate='items':::" values=":::cms_module module='newgcb' listtemplate='values':::" label="Select your GCBs here" assign="gcbs"}
Detail of templates :

For aliases values :

Code: Select all

{foreach from=$itemlist item="item" name="myalias"}{if $smarty.foreach.myalias.last}{$item->alias}{else}{$item->alias}|{/if}{/foreach}
For item names :

Code: Select all

{foreach from=$itemlist item="item" name="mytitle"}{if $smarty.foreach.mytitle.last}{$item->titre}{else}{$item->titre}|{/if}{/foreach}

If i paste thoses two tags in the template, the output is ok, i obtain something like this :

Code: Select all

value1|value2
item1|item2
When I edit a page, it's ok, my multiple select field contain all of my "newgcbs" created in the CTLmodule.

Code: Select all

<input type="hidden" value="" "name="my_new_gcbs" /> 
<select name="my_new_gcbs[]"   multiple="multiple" >
<option value="value1">item1</option>
<option value="value2">item2</option>
</select>
But when I try to submit my modifications, i'm redirected to a white page, and my modifications aren't stored in database.

Replacing my dynamic values of "items" & "values" by statics values (with smarty="0") the page is saved normally.

Is there a problem with using smarty?

Thank you for you attention and your work on this module!
NaN

Re: improve the content type "content" - Content2 -> XContent -> AdvancedContent

Post by NaN »

will83 wrote:
Is there a problem with using smarty?
Yes there is.
It is because smarty is processed when getting the content blocks. (when template is parsed)
But it should be done when print them out on screen.

It is some kind of context issue.
The template is also parsed when the page is being saved.
To process the smarty stuff the module API function ProcessTemplateFromData() will be used.
But in some cases (e.g. when saving the page) you cannot access certain module functions from the content obj class since you're not in module context at this time.
Hard to explain.

But it will be fixed in next release.
(It is currently fixed in SVN)
Last edited by NaN on Fri May 21, 2010 12:19 am, edited 1 time in total.
JeremyBASS

Re: improve the content type "content" - Content2 -> XContent -> AdvancedContent

Post by JeremyBASS »

bet your glad I added the smarty stuff :D lol .. sorry have to poke fun or why else would we want to do this :) when you thinking the next version is coming.. I was going to test again this weekend I think.. -J
NaN

Re: improve the content type "content" - Content2 -> XContent -> AdvancedContent

Post by NaN »

Yeah, fun at work is always a good motivation :D
But this time it is my fault (again ;) ).
Because in the single file (Content2.inc.php) you already put this into a function that is only used when displaying the content blocks in backend.
In the module i did some work on the functions that gets and that displays the content blocks. And somehow the smarty stuff was just placed in the wrong function.
Since the getContentBlocks function is sometimes called several times the smarty stuff will also be done several times. What could cause performance issues and fatal php errors when loading or saving the page or just changing the template or content type.
So smarty processing is just not needed when loading or saving the data. It is only needed when displaying them. And the display function will only be called one time.

Sometimes there might be a reason why Jeremy does things in that way and there is no need to do it my way instead :D
(just to realize that i have to revert it back to Jeremys way again - remember the smarty delimiter stuff? ;) )

Next release will be next week or so. (after someone tested the SVN stuff? ;) )
It will just contain bugfixes. Nothing really new. I only (re)added the expand/collapse button for content blocks. Display status of a content block will be saved in the userprefs. So each user can toggle the blocks as he likes it to for each page - similar to the expand/collapse stuff in the list content table.

Just a note: since AdvancedContent 0.3 i removed the most html output from the php source and put this in a template.
(At the moment this is only for the content blocks; Template can be found in AdvancedContent/templates/contenttype.tpl)
That means if you want to change something in the way the blocks are displayed you can just use the module_custom folder to override the used template with your own one without hacking the module ;)
(I just mention that because i was told that e.g. the fieldsets and expand/collapse stuff are disturbing if the block is just a checkbox)
Last edited by NaN on Fri May 21, 2010 2:00 pm, edited 1 time in total.
NaN

Re: improve the content type "content" - Content2 -> XContent -> AdvancedContent

Post by NaN »

For all those who have no SVN the latest release candidate can be downloaded here:
AdvancedContent v.0.3.2

Changelog:

- fixed bug where changing back to default content type or changing template caused fatal errors
- fixed a bug with smarty processing when saving a page
- fixed a bug with preview tab
- re-added expand/collapse button to toggle content blocks in backend
- added params "editor_groups" and "editor_users" to specify certain users/groups that are allowed to edit certain blocks
- removed params selected/checked of blocktype dropwdown/select_multiple/checkbox; use param "default" instead
Last edited by NaN on Tue Jun 01, 2010 9:32 pm, edited 1 time in total.
Locked

Return to “Modules/Add-Ons”