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

User avatar
robsta
Forum Members
Forum Members
Posts: 131
Joined: Thu Oct 20, 2005 11:39 pm
Location: Wellington

add content giving blank page ->Content(extended) -> XContent Module

Post by robsta »

Hi

Two glitches I'm getting - after updating to cmsms 1.7.1 and moving to the XContent Module

When retrieving values from a module into a multiple_select, the items and values aren't splitting out into separate option tags. I just get one option tag with all values and labels ---

here's my tag

Code: Select all

{content block_tab="By Offering" block="By Offering" label="<strong>Choose Offering </strong> (command click to select more than one)" style="width:270px;" assign="ByOffering" type="select_multiple" values=":::news browsecattemplate=catOfferingValues action=browsecat detailpage=home:::" items=":::news browsecattemplate=catOffering action=browsecat detailpage=home:::" smarty="true"}
here's the news module browsecat template (separate ones for values and labels)

Code: Select all

{foreach from=$cats item=node name=foo}
{if $node.hierarchy > 9 && $node.hierarchy <10}{$node.news_category_id}{if $smarty.foreach.foo.last}{else},{/if}{/if}{/foreach}

Code: Select all

{foreach from=$cats item=node name=foo}
{if $node.hierarchy > 9 && $node.hierarchy <10}{$node.news_category_name}{if $smarty.foreach.foo.last}{else},{/if}{/if}{/foreach}
and here's the result

Image


And the other one is that if I add new content and make it Content (Extensible) the admin breaks and displays a blank page after the main menu... I get this as an error

Code: Select all

Fatal error: Call to undefined method Content2::_setPropertyValue() in /var/users/a/d/admin/dev.designworks.co.nz/htdocs/designworks-2010/modules/XContent/contenttype.Content2.php on line 242
but if I edit existing content it's fine...

Any ideas?
Last edited by robsta on Sun May 02, 2010 5:20 am, edited 1 time in total.
NaN

Re: add content giving blank page ->Content(extended) -> XContent Module

Post by NaN »

robsta wrote:
When retrieving values from a module into a multiple_select, the items and values aren't splitting out into separate option tags. I just get one option tag with all values and labels ---
The delimiter changed from comma to pipe ( | ).
So just change your news template and replace the commas by a pipe or add the param delimiter="," to your content block.

robsta wrote:
And the other one is that if I add new content and make it Content (Extensible) the admin breaks and displays a blank page after the main menu... I get this as an error

Code: Select all


Fatal error: Call to undefined method Content2::_setPropertyValue() in /var/users/a/d/admin/dev.designworks.co.nz/htdocs/designworks-2010/modules/XContent/contenttype.Content2.php on line 242
View the bugreports for solution: http://dev.cmsmadesimple.org/bug/view/4853
User avatar
robsta
Forum Members
Forum Members
Posts: 131
Joined: Thu Oct 20, 2005 11:39 pm
Location: Wellington

Re: add content giving blank page ->Content(extended) -> XContent Module

Post by robsta »

robsta wrote:

Code: Select all

Fatal error: Call to undefined method Content2::_setPropertyValue() in /var/users/a/d/admin/dev.designworks.co.nz/htdocs/designworks-2010/modules/XContent/contenttype.Content2.php on line 242
NaN wrote: View the bugreports for solution: http://dev.cmsmadesimple.org/bug/view/4853
Thanks - I've made the fix and it works great
NaN wrote: The delimiter changed from comma to pipe ( | ).
So just change your news template and replace the commas by a pipe or add the param delimiter="," to your content block.
This one is still doing the same thing... with both delimiter=","  or changing the ( , ) to a pipe  ( | ) in the browsecat... adding in a space between content and the pipe didn't help either....

any thoughts... here's a screen grab of the panels I've got setup...

Image

I'm on a mac - is their any keyboard encoding issues that might be tripping this up?
NaN

Re: add content giving blank page ->Content(extended) -> XContent Module

Post by NaN »

robsta wrote:
I'm on a mac - is their any keyboard encoding issues that might be tripping this up?
I'm also on a Mac so i don't believe this is a character issue.

After taking a closer look to the code i found the issue.
Smarty processing is done on each single item after the items are already split into an array.
But it also needs to be processed before splitting.
Thanks for report. I will release the next version as soon as possible.
Meanwhile you might want to test the attached file.
It already contains the fixes mentioned in the bugreports.

(remove the .txt and place it into the modules folder)
Attachments

[The extension txt has been deactivated and can no longer be displayed.]

Last edited by NaN on Sun May 02, 2010 10:34 pm, edited 1 time in total.
User avatar
robsta
Forum Members
Forum Members
Posts: 131
Joined: Thu Oct 20, 2005 11:39 pm
Location: Wellington

[solved] add content giving blank page ->Content(extended) -> XContent Module

Post by robsta »

NaN wrote:
I'm also on a Mac so i don't believe this is a character issue.

After taking a closer look to the code i found the issue.
Smarty processing is done on each single item after the items are already split into an array.
But it also needs to be processed before splitting.
Thanks for report. I will release the next version as soon as possible.
Meanwhile you might want to test the attached file.
It already contains the fixes mentioned in the bugreports.

(remove the .txt and place it into the modules folder)
Works Brilliantly - thanks so much :)
Foaly*
Translator
Translator
Posts: 150
Joined: Sun Mar 29, 2009 3:32 pm
Location: London

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

Post by Foaly* »

I'm not sure how long the server takes to get the dimensions of an image, but if images included with your tag would have image dimensions it would decrease load time due to less repaints. Could anybody test that?
uniqu3

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

Post by uniqu3 »

Hi,

great idea about "AdvancedContent" or xContent and i have just played around a bit with it with the updated file you attached here NaN.

I dont know if i did something wrong or is it a bug but see attached picture what happens if i add

Code: Select all

{content block_tab="Image" type="image" mode="filepicker" block="image1"}
to my template.
Attachments
bug_or_me.PNG
NaN

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

Post by NaN »

uniqu3 wrote:
I dont know if i did something wrong or is it a bug but see attached picture what happens if i add
Thanks for report.
Rename XContent/templates/filepicker.tpl to XContent/templates/filePicker.tpl.
I'm not sure when and why i changed this.

EDIT:
After tracking back the last changes i noticed that i've never changed something on the filename. In the source i was always calling the template with filePicker but the file always was named filepicker.
I did not realize this error since the filensystem of my testmachine is case intensitive.
Last edited by NaN on Fri May 14, 2010 1:14 pm, edited 1 time in total.
uniqu3

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

Post by uniqu3 »

It looks like there is some bug with filepicker.
Choosing an image with filepicker outputs nothing after saving the page, using it with dropdown i get image displayed.
NaN

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

Post by NaN »

Foaly* wrote: I'm not sure how long the server takes to get the dimensions of an image, but if images included with your tag would have image dimensions it would decrease load time due to less repaints. Could anybody test that?
Sorry, i don't understand.
Image dimensions in the tag has nothing to do with the server.
It is for the browser only.

So if you use

Code: Select all


{content type="image" block="some image" width="100px" height="200px"}

it will just print out

Code: Select all


<img src="path/to/image" width="100px" height="200px" />

The server never reads the the image dimensions.

The tag itself might be a bit slower than the default one (due to the inheritance stuff of certain properties) but i don't believe that the image dimensions have any infulence on the loading time.
NaN

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

Post by NaN »

uniqu3 wrote: It looks like there is some bug with filepicker.
Choosing an image with filepicker outputs nothing after saving the page, using it with dropdown i get image displayed.
Does this only happen to images or also to files?
What browser are you using?
uniqu3

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

Post by uniqu3 »

I tried it only with images, using Chrome and FF for Admin on WIN7 and on CMSMS 1.7 with xContent 3 BETA and your edit file from here.

I actually assumed that {content type="image" block="test" mode="filepicker"} would create but with file picker it is just empty and with dropdown it displays only url of image as text.

I call it just like in examples
    {content}
    {content type="image" block="test"}

Edit: example of my test

In my template:

Code: Select all

{content type="text" block="default"}<br />
    With Dropdown: {content type="image" block="test1"}<br />
    With filepicker: {content type="image" block="test2" mode="filepicker"}<br />
    With img tag wrapped around xContent tag: <img src="{content type="image" block="test3"}" /><br />
Outcome:
http://demo.i-arts.eu/index.php
Last edited by uniqu3 on Fri May 14, 2010 1:50 pm, edited 1 time in total.
Foaly*
Translator
Translator
Posts: 150
Joined: Sun Mar 29, 2009 3:32 pm
Location: London

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

Post by Foaly* »

According to Google's "Page Speed" Tool you should add image dimensions to all tags to increase load speed (high priority). That affects also to the ranking. More information: http://code.google.com/intl/de-DE/speed ... Dimensions

As the images selected by the admin might not always have the same dimensions it could be helpful to get them via PHP. But I'm not sure about the proportion between the time while getting the dimensions and gain load speed.
NaN wrote: Sorry, i don't understand.
Image dimensions in the tag has nothing to do with the server.
It is for the browser only.

So if you use

Code: Select all


{content type="image" block="some image" width="100px" height="200px"}

it will just print out

Code: Select all


<img src="path/to/image" width="100px" height="200px" />

The server never reads the the image dimensions.

The tag itself might be a bit slower than the default one (due to the inheritance stuff of certain properties) but i don't believe that the image dimensions have any infulence on the loading time.
Last edited by Foaly* on Fri May 14, 2010 1:54 pm, edited 1 time in total.
NaN

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

Post by NaN »

Foaly* wrote: According to Google's "Page Speed" Tool you should add image dimensions to all tags to increase load speed (high priority). That affects also to the ranking. More information: http://code.google.com/intl/de-DE/speed ... Dimensions
Ah okay. Now i got it.
So it is about adding the dimensions by default, isn't it?
I believe it won't take much time to get the image dimensions, but it will use more memory.
Hm, i will think about it.
uniqu3 wrote: I tried it only with images, using Chrome and FF for Admin on WIN7 and on CMSMS 1.7 with xContent 3 BETA and your edit file from here.

I actually assumed that {content type="image" block="test" mode="filepicker"} would create but with file picker it is just empty and with dropdown it displays only url of image as text.
Well there indeed has been some issues with filepicker and other functions wich i'm too lazy to track back and provide some patches but they're already fixed in SVN.
I will release the new version right now instead so we're all up to date :)

Remember that the modules name is now AdvancedContent. So if you use the module plugin to display the content you need to adapt your template.

Install the new module and uninstall and remove the XContent Module.
Last edited by NaN on Fri May 14, 2010 6:03 pm, edited 1 time in total.
JeremyBASS

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

Post by JeremyBASS »

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.. That is not so good..  Also the sort fails very big if you have the wysiwyg is truned off.  But I like the idea...  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.. Also it's not saving the order.. 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 since you can** just set the order in the template it's self.  **That also seems to have be losted.  Setting the order in the template is important IMHO.  at the least for the tab order.. atm I can't order anything it seems.

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

Just some things off the top.. Hope this helps get some bugs worked out..  I'll test deeper later... Cheers -Jeremy
Locked

Return to “Modules/Add-Ons”