AdvancedContent
Re: improve the content type "content" - Content2 -> XContent -> AdvancedContent
The Multidomain module is event driven.
It has a table where content ids (or aliases) and domains will be stored.
Before the page is being sent to browser it compares the current domain with the stored one that belongs to that page and redirects to the stored domain sending header 301 (moved permanently).
Here is a thread about the MutliDomain module: http://forum.cmsmadesimple.org/index.ph ... 220.0.html
The problem is that the MenuManager will create always links that leads to the "main" domain (where the cms was installed).
So i thought it would be a good idea having the (sub)domain as a content property to create the right links in the menu template.
So redirecting will only occure if you enter the wrong domain directly into the browsers address bar.
But i had another idea i told the author of the module. So all you need might be a content block with param block="multidomain" and a new param module="true". This content block could be a dropdown with a list of all available domains that has been created by the Multidomain module or just a text input where the user may enter the domain.
So when content is edited and the event ContentEditPost is called the Multidomain module just needs to check for a content property called "multidomain" and if the property "module" is set to true. And if so then it can do whatever is needed to assign the value of the property "multidomain" to the content to be able to redirect if needed.
By the way i think this is a nice idea how all modules could hook in to do page related things.
Whenever there is a content property named exactly like the modules name and if property "module" is true do whatever is needed with the value.
Edit:
I've just read the announcements of CMSms 1.8.
It seems to be that something similar will be integrated there using a new plugin {content_module}.
Maybe similar functions of the AdvancedContent module will be integrated in the core step by step.
Let's see what the devs say about that ...
It has a table where content ids (or aliases) and domains will be stored.
Before the page is being sent to browser it compares the current domain with the stored one that belongs to that page and redirects to the stored domain sending header 301 (moved permanently).
Here is a thread about the MutliDomain module: http://forum.cmsmadesimple.org/index.ph ... 220.0.html
The problem is that the MenuManager will create always links that leads to the "main" domain (where the cms was installed).
So i thought it would be a good idea having the (sub)domain as a content property to create the right links in the menu template.
So redirecting will only occure if you enter the wrong domain directly into the browsers address bar.
But i had another idea i told the author of the module. So all you need might be a content block with param block="multidomain" and a new param module="true". This content block could be a dropdown with a list of all available domains that has been created by the Multidomain module or just a text input where the user may enter the domain.
So when content is edited and the event ContentEditPost is called the Multidomain module just needs to check for a content property called "multidomain" and if the property "module" is set to true. And if so then it can do whatever is needed to assign the value of the property "multidomain" to the content to be able to redirect if needed.
By the way i think this is a nice idea how all modules could hook in to do page related things.
Whenever there is a content property named exactly like the modules name and if property "module" is true do whatever is needed with the value.
Edit:
I've just read the announcements of CMSms 1.8.
It seems to be that something similar will be integrated there using a new plugin {content_module}.
Maybe similar functions of the AdvancedContent module will be integrated in the core step by step.
Let's see what the devs say about that ...
Last edited by NaN on Fri Jun 04, 2010 12:27 pm, edited 1 time in total.
Re: improve the content type "content" - Content2 -> XContent -> AdvancedContent
Version 0.3.3 is out now.
Bugfixes:
- unsubmitted content got lost when switching between contenttypes
- alias was not always converted properly
Improvements:
- added start/end date in options tab; content that starts next week wil be set to inactive automatically; if page is rendered next week it will be set to active;
- removed timepicker; replaced it by a simple dropdown (let me know if you really need the seconds in the time dropdown - i don't need them so this is why they are not shown)
- compatibility with {content_image} (still needs some testing)
Bugfixes:
- unsubmitted content got lost when switching between contenttypes
- alias was not always converted properly
Improvements:
- added start/end date in options tab; content that starts next week wil be set to inactive automatically; if page is rendered next week it will be set to active;
- removed timepicker; replaced it by a simple dropdown (let me know if you really need the seconds in the time dropdown - i don't need them so this is why they are not shown)
- compatibility with {content_image} (still needs some testing)
Re: improve the content type "content" - Content2 -> XContent -> AdvancedContent
Cheers NaN for fixing those buglets
I mentioned image uploading a while back in the thread, and you mentioned it was on the to do list. Have you had any thoughts as to how you may implement this? Any chance of including resizing an image on input? ie to prevent storing original 12megapixel images etc.
Thanks again
Nik
I mentioned image uploading a while back in the thread, and you mentioned it was on the to do list. Have you had any thoughts as to how you may implement this? Any chance of including resizing an image on input? ie to prevent storing original 12megapixel images etc.
Thanks again
Nik
Re: improve the content type "content" - Content2 -> XContent -> AdvancedContent
Hi NikNak,
yes i planned to integrate file uploading and image resizing.
But at the moment i'm ot really sure how this all will be done.
Wether the FileManager and the ImageManager will be used or if i create own functions.
I thought about jQuery and AJAX. So if you upload a file the filedropdown or the filebrowser will be updated immediately wihtout reloading the page.
But therefore i need to rewrite some code of the filepicker, create some nice javascript functions and do some research how the FileManager and the ImageManager works.
When using the filebrowser image upload will work like in the TinyMCE filepicker.
I just need to add some preferences and some permission stuff.
Cannot tell you when it will be ready.
But for sure in the next release.
Just be patient.
(By the way check the bugtracker for the latest bugfix)
yes i planned to integrate file uploading and image resizing.
But at the moment i'm ot really sure how this all will be done.
Wether the FileManager and the ImageManager will be used or if i create own functions.
I thought about jQuery and AJAX. So if you upload a file the filedropdown or the filebrowser will be updated immediately wihtout reloading the page.
But therefore i need to rewrite some code of the filepicker, create some nice javascript functions and do some research how the FileManager and the ImageManager works.
When using the filebrowser image upload will work like in the TinyMCE filepicker.
I just need to add some preferences and some permission stuff.
Cannot tell you when it will be ready.
But for sure in the next release.
Just be patient.
(By the way check the bugtracker for the latest bugfix)
Re: improve the content type "content" - Content2 -> XContent -> AdvancedContent
This looks real promising, so I'd like to test it out. Unfortunately, I'm getting the following error when I go to my Extensions->Modules page after the install:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /bla/bla/location on line 216
I just extracted the archive, and uploaded the AdvancedContent dir into /modules/. I'm still somewhat of a rookie with taking CMSMS beyond the initial install, so I'm not sure if I'm missing a silly crucial step. Any ideas?
Edit: I'm using the MLE fork, and after some reading, I just now realized that compatibility between MLE and a regular install is not guaranteed. Wonder if that's it.
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /bla/bla/location on line 216
I just extracted the archive, and uploaded the AdvancedContent dir into /modules/. I'm still somewhat of a rookie with taking CMSMS beyond the initial install, so I'm not sure if I'm missing a silly crucial step. Any ideas?
Edit: I'm using the MLE fork, and after some reading, I just now realized that compatibility between MLE and a regular install is not guaranteed. Wonder if that's it.
Last edited by justin16l on Mon Jun 14, 2010 8:15 pm, edited 1 time in total.
Re: improve the content type "content" - Content2 -> XContent -> AdvancedContent
Sorry but i need some more info than just "bla/bla/" 
Because this is the most relevant part.
Without knowing why and in wich file the error occured i cannot do anything since until now you seem to be the only one with that particular problem.
I've never used the MLE fork and therefore i cannot tell you if MLE is causing this error. But as i know "Syntax Error" would be a "global" one. That means if i did any such errors it would also affect the default CMSms release.
It sounds to me that something is missing. Sometimes data get lost when uploading via FTP. So did you just try to upload it again?
What PHP version do you use and what MLE version?
AdvancedContent is created to run at least with CMSms 1.6.7 and PHP 5.2.12.
I did not test lower versions or MLE.

Because this is the most relevant part.
Without knowing why and in wich file the error occured i cannot do anything since until now you seem to be the only one with that particular problem.
I've never used the MLE fork and therefore i cannot tell you if MLE is causing this error. But as i know "Syntax Error" would be a "global" one. That means if i did any such errors it would also affect the default CMSms release.
It sounds to me that something is missing. Sometimes data get lost when uploading via FTP. So did you just try to upload it again?
What PHP version do you use and what MLE version?
AdvancedContent is created to run at least with CMSms 1.6.7 and PHP 5.2.12.
I did not test lower versions or MLE.
Re: improve the content type "content" - Content2 -> XContent -> AdvancedContent
My apologies, I wrote that without really thinking
, I appreciate the patience.
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /nfs/c05/h03/mnt/46627/domains/superdupersecretdomain.com/html/dev/modules/AdvancedContent/AdvancedContent.module.php on line 216
CMSMS MLE version 1.6.7
AND....most likely the reason for my problem:
PHP version 4.4.8 (due to horrid hosting which I can't change)
Looks like I might be out of luck since I'm stuck on php 4

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /nfs/c05/h03/mnt/46627/domains/superdupersecretdomain.com/html/dev/modules/AdvancedContent/AdvancedContent.module.php on line 216
CMSMS MLE version 1.6.7
AND....most likely the reason for my problem:
PHP version 4.4.8 (due to horrid hosting which I can't change)
Looks like I might be out of luck since I'm stuck on php 4
Re: improve the content type "content" - Content2 -> XContent -> AdvancedContent
Okay i think i know where the problem is.
I was playing with some OOP features that are only available in PHP5+ (private/public/protected vars and functions).
But actually this is not really needed so i will remove them in next release (is already done in SVN).
Maybe this will solve the problem.
Next release will be next week i guess.
So stay tuned
Regards.
I was playing with some OOP features that are only available in PHP5+ (private/public/protected vars and functions).
But actually this is not really needed so i will remove them in next release (is already done in SVN).
Maybe this will solve the problem.
Next release will be next week i guess.
So stay tuned

Regards.
Last edited by NaN on Tue Jun 15, 2010 12:26 am, edited 1 time in total.
Re: improve the content type "content" - Content2 -> XContent -> AdvancedContent
What's about MLE compatibility?
Re: improve the content type "content" - Content2 -> XContent -> AdvancedContent
Sorry i cannot give an answer yet.
Since i tried to run PHP 4 on my local machine (what did not want to connect to my database - so i removed it) my apache won't start anymore.
So i'm not able to do any further tests at the moment.
It would be nice if some of you guys could give any feedback if it runs with PHP 4 and/or MLE.
Since i tried to run PHP 4 on my local machine (what did not want to connect to my database - so i removed it) my apache won't start anymore.
So i'm not able to do any further tests at the moment.
It would be nice if some of you guys could give any feedback if it runs with PHP 4 and/or MLE.
Re: improve the content type "content" - Content2 -> XContent -> AdvancedContent
Version 0.3.4 is out now.
Changelog...
Bugfixes:
- #5045: When switching from Content -> Advanced Content lots of PHP errors
- #5056: page_tabs not working for users without permission "Manage All Content"
- #5073: incorrect display of files when opening filepicker
- fixed minor bug where the option "allow_none" of content blocks of type image/file was not shown when a block has been added to a template after the page was already created
Improvements:
- added filemanagement and upload functions to content blocks of type image/file
- added breadcumbs to filepicker
- admins may browse the entire dir tree in filepicker file browser regardless of template params
- added mime type checking to get file type
- added rawurlencode in src attribs to display images with weird filenames.
miscellaneous:
- removed OOP stuff (private/public/protected) to gain more compatibility with PHP4 (hopefully; needs some testing)
- changed ajax functions to return xml values
- removed usage of ImageManager once and for all. (caused only trouble)
Changelog...
Bugfixes:
- #5045: When switching from Content -> Advanced Content lots of PHP errors
- #5056: page_tabs not working for users without permission "Manage All Content"
- #5073: incorrect display of files when opening filepicker
- fixed minor bug where the option "allow_none" of content blocks of type image/file was not shown when a block has been added to a template after the page was already created
Improvements:
- added filemanagement and upload functions to content blocks of type image/file
- added breadcumbs to filepicker
- admins may browse the entire dir tree in filepicker file browser regardless of template params
- added mime type checking to get file type
- added rawurlencode in src attribs to display images with weird filenames.
miscellaneous:
- removed OOP stuff (private/public/protected) to gain more compatibility with PHP4 (hopefully; needs some testing)
- changed ajax functions to return xml values
- removed usage of ImageManager once and for all. (caused only trouble)
Re: improve the content type "content" - Content2 -> XContent -> AdvancedContent
Discovered this briliant module way too late.
I have some glitches, probably due to my lack of knowledge...
1)
Showing the thumbnails (the image of) in the filepicker view seems a bit ...er... not working. I can sse the filenames, but I expected to have the actual thumb also... so I can select the image by image, not by name.
I've tried to alter the settings (Filepicker style) and/or the "Show thumbnails" checkobox and so on
The thumbs are there, as I can see them in the default tiny file/image picker.
Wait... waaaait.. I see something -> http://dev.cmsmadesimple.org/bug/view/5073 but it says solved.
*dives into it* Nope... no juice.
2)
It's outputting the url of the image even if I add the param urlonly="false"
Which is not an issue at all, it's just not what I expected.
Where did i go wrong? ;D
I have some glitches, probably due to my lack of knowledge...
1)
Showing the thumbnails (the image of) in the filepicker view seems a bit ...er... not working. I can sse the filenames, but I expected to have the actual thumb also... so I can select the image by image, not by name.
I've tried to alter the settings (Filepicker style) and/or the "Show thumbnails" checkobox and so on
The thumbs are there, as I can see them in the default tiny file/image picker.
Wait... waaaait.. I see something -> http://dev.cmsmadesimple.org/bug/view/5073 but it says solved.
*dives into it* Nope... no juice.
2)
It's outputting the url of the image even if I add the param urlonly="false"
Which is not an issue at all, it's just not what I expected.
Where did i go wrong? ;D
Last edited by jack4ya on Mon Jun 21, 2010 2:53 pm, edited 1 time in total.
Re: improve the content type "content" - Content2 -> XContent -> AdvancedContent
Hello Jack,
first of all thanks for your feedback.
How did you call the content block in your template?
1) Sorry I cannot confirm that. It works well for me. I recently just removed all thumbnails, reinstalled the module, went to Extensions->AdvancedContent, set "Filepicker Style" to "Thumbnails and Names" ("Thumbnails only" does not work yet and will have the same effect like "Thumbnails and Names"), also checked "Create thumbnails" (since removed them), edited a page and voillá! thumbnails are created on the fly and displayed in the filepicker.
The checkbox "Show Thumbnails" is only for displaying thumnails as files. (By default they are not displayed)
2) To use the image functionality use {content_image} or {AdvancedContent type="image"}
{content type="image"} wil just do what the {content} tag is build for: Print out what is stored. And this is just an url.
first of all thanks for your feedback.
How did you call the content block in your template?
1) Sorry I cannot confirm that. It works well for me. I recently just removed all thumbnails, reinstalled the module, went to Extensions->AdvancedContent, set "Filepicker Style" to "Thumbnails and Names" ("Thumbnails only" does not work yet and will have the same effect like "Thumbnails and Names"), also checked "Create thumbnails" (since removed them), edited a page and voillá! thumbnails are created on the fly and displayed in the filepicker.
The checkbox "Show Thumbnails" is only for displaying thumnails as files. (By default they are not displayed)
2) To use the image functionality use {content_image} or {AdvancedContent type="image"}
{content type="image"} wil just do what the {content} tag is build for: Print out what is stored. And this is just an url.
Last edited by NaN on Mon Jun 21, 2010 4:29 pm, edited 1 time in total.
Re: improve the content type "content" - Content2 -> XContent -> AdvancedContent
Clear and it works as you state it. Allthough I tought I gad read up properly, I guess I missed it.NaN wrote:
Hello Jack,
first of all thanks for your feedback.How did you call the content block in your template?Always !1) Sorry I cannot confirm that. It works well for me. I recently just removed all thumbnails, reinstalled the module, went to Extensions->AdvancedContent, set "Filepicker Style" to "Thumbnails and Names" ("Thumbnails only" does not work yet and will have the same effect like "Thumbnails and Names"), also checked "Create thumbnails" (since removed them), edited a page and voillá! thumbnails are created on the fly and displayed in the filepicker.{AdvancedContent type="image" block="image1" mode="filepicker" filter="exclude:thumb_" upload="false" width="200" height="400"}
The checkbox "Show Thumbnails" is only for displaying thumnails as files. (By default they are not displayed)
2) To use the image functionality use {content_image} or {AdvancedContent type="image"}
{content type="image"} wil just do what the {content} tag is build for: Print out what is stored. And this is just an url.
Which leaves the image/thumb issue.
I'll try to deduct the options... I'll be back.
Another idea (ow sweet lord...) "Allow on-the-fly resizing of uploaded images" would it be a good or bad idea to have that as param? But I guess aspect ratio and crop would give multiple headaches...
Hmmm bad idea I think. *note to myself: look into connecting it to the SuperSizer tag thingie*
Last edited by jack4ya on Mon Jun 21, 2010 5:32 pm, edited 1 time in total.
Re: improve the content type "content" - Content2 -> XContent -> AdvancedContent
- thumb is nicely generated on upload, not displayed in picker
- icon /modules/FileManager/icons/themes/default/extensions/32px/jpg.png
or /modules/FileManager/icons/themes/default/extensions/32px/gif.png is shown
- more will follow
- icon /modules/FileManager/icons/themes/default/extensions/32px/jpg.png
or /modules/FileManager/icons/themes/default/extensions/32px/gif.png is shown
- more will follow
Last edited by jack4ya on Mon Jun 21, 2010 5:49 pm, edited 1 time in total.