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" - Content2 -> XContent -> AdvancedContent

Post by NaN »

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 ...
Last edited by NaN on Fri Jun 04, 2010 12:27 pm, edited 1 time in total.
NaN

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

Post by NaN »

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)
User avatar
NikNak
Forum Members
Forum Members
Posts: 183
Joined: Fri Oct 02, 2009 2:28 pm

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

Post by NikNak »

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
NaN

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

Post by NaN »

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)
justin16l
New Member
New Member
Posts: 5
Joined: Mon Jun 14, 2010 7:48 pm

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

Post by justin16l »

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.
Last edited by justin16l on Mon Jun 14, 2010 8:15 pm, edited 1 time in total.
NaN

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

Post by NaN »

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.
justin16l
New Member
New Member
Posts: 5
Joined: Mon Jun 14, 2010 7:48 pm

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

Post by justin16l »

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
NaN

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

Post by NaN »

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.
Last edited by NaN on Tue Jun 15, 2010 12:26 am, 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" - Content2 -> XContent -> AdvancedContent

Post by Foaly* »

What's about MLE compatibility?
NaN

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

Post by NaN »

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.
NaN

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

Post by NaN »

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)
jack4ya
Power Poster
Power Poster
Posts: 294
Joined: Thu Oct 19, 2006 10:07 am

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

Post by jack4ya »

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
Last edited by jack4ya on Mon Jun 21, 2010 2:53 pm, edited 1 time in total.
NaN

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

Post by NaN »

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.
Last edited by NaN on Mon Jun 21, 2010 4:29 pm, edited 1 time in total.
jack4ya
Power Poster
Power Poster
Posts: 294
Joined: Thu Oct 19, 2006 10:07 am

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

Post by jack4ya »

NaN wrote:
Hello Jack,

first of all thanks for your feedback.
Always !
How did you call the content block in your template?
{AdvancedContent type="image" block="image1" mode="filepicker" filter="exclude:thumb_" upload="false" width="200" height="400"}
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.
Clear and it works as you state it. Allthough I tought I gad read up properly, I guess I missed it.

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.
jack4ya
Power Poster
Power Poster
Posts: 294
Joined: Thu Oct 19, 2006 10:07 am

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

Post by jack4ya »

- 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
Last edited by jack4ya on Mon Jun 21, 2010 5:49 pm, edited 1 time in total.
Locked

Return to “Modules/Add-Ons”