• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 267 posts ]  Go to page 1, 2, 3, 4, 5 ... 18  Next

What do you think: Use the image uploads dir or just the uploads dir for {content_image}?
image uploads dir 68%  68%  [ 21 ]
uploads dir 26%  26%  [ 8 ]
don't care 6%  6%  [ 2 ]
Total votes : 31
Author Message
 Post subject: AdvancedContent
PostPosted: Sat Apr 18, 2009 2:55 pm 
Hi,

i'm trying to improve the functionality of the content type "content".
I added some more params and changed some functions in the source.
All content items will be handled like content blocks.
(there is no default content anymore)

Additionally you can define what type the content block will be.
E.g. a checkbox, dropdown, mutliple select list, image...

You can also define in what tab the content block will be displayed.
So you can add some specific options.
You can also add an own tab where you can put in all the additional content blocks.
And last not least you can create tabs inside the tabs to group the content blocks in so called "block tabs".

I tested it with cmsms 1.5.2 and 1.5.4.
Works fine.

When working on that content type i realized, that the function GetPropertyValue() returns true if the property does not exist in the database.
That means when changing the content type of an existing page from content to my content type i get the value 1 of each additional content block.

Is this a bug?


Last edited by NaN on Wed Aug 11, 2010 6:05 pm, edited 1 time in total.

Top
  
 
 Post subject: Re: improve the content type "content"
PostPosted: Sat Apr 18, 2009 3:23 pm 
Offline
Power Poster
Power Poster

Joined: Mon Jun 12, 2006 9:02 pm
Posts: 1903
Not to throw a wet blanket on your mods (which sound very interesting, BTW), but I'm guessing the response from the dev team will be "since you've modified the source, and we have no idea what you did, we can't tell you if this is a bug or not".

Hopefully I'm wrong... :)


Top
 Profile  
 
 Post subject: Re: improve the content type "content"
PostPosted: Sat Apr 18, 2009 3:55 pm 
Offline
Support Guru
Support Guru
User avatar

Joined: Mon Jul 04, 2005 5:12 pm
Posts: 4821
Location: Ferrara, Italy
jmcgin51 wrote:
Hopefully I'm wrong... :)


wrong  :)
I have not yet seen (for lack of time) and so I don't know if same level but calguy1000 has implemented a something like this in 1.6

Alby

_________________
CMSMS Support Team
Italian Admin and Moderator

Plugins: Geolocate hostip, Multiple random image, Image rotator (beta), Content Pagination
Modules: ForumMadeSimple (Howto), TranslationManager
Multilingual: MLE is not CMSMS


Top
 Profile  
 
 Post subject: Re: improve the content type "content"
PostPosted: Sat Apr 18, 2009 3:59 pm 
I didn't modify anything in the core.
I just created an own content type which is an adaption of the original one.

The content with my content type will be called like this:

Code:
{content block="test" type="checkbox" label="klicke me" page_tab="options" ... }


So in the tab "options" an additional checkbox will be show.
By default this checkbox is not checked.
This works if the page is added.
But when you edit a page i need to use the function  GetPropertyValue() to set this checkbox checked or not.
If that page has been stored with the original content type (without that checkbox) and is now changed to my adapted content type this checkbox suddenly is checked.
Even if there is no property stored in the database.

That means  
Code:
$this->GetPropertyValue('test');
will return true for that checkbox even if it has never been saved before.
I can avoid this using vars of type string "true"/"false" instead of boolean vars.
But it seems strange to me.

If someone is interested you can try the attached file.
(remove the .mpg after download and unzip it.
copy the file content2.inc.php into lib/classes/contenttypes.
copy the file function.content2.php into your plugin directory (by default "plugins") )

There is no english documentation available in the plugin help for now but i will translate it if there is interest.

Edit (07.08.2009):
I did it again for CMSms 1.6.3.
I also added a feature to select if the page is public or for frontendusers only.
In opitons tab there is a List where you can select groups of the frontendusers module that may access this content.
If a visitor is not logged in or not in the selected group the login form will be shown.
(only works if feusers is installed and the content2 plugin is used)

Here is a list of the params:

  * (optional) block
          adds an additional content block (same like default)

            Example:
            {content2 block=\"Second Content Block\"}

    * (optional) wysiwyg (true/false)
          toggle wysiwyg editor on/of (same like default)

    * (optional) oneline (true/false)
          shows only a text input in one line (same like default)

    * (optional) value
          a predefined content

    * (optional) type (text,image,checkbox,dropdown,select_multiple)
          here you can define what type of input the added content block will be

    * (optional) page_tab
          here you can define in what tab the content block will be shown (you could add a checkbox to the options tab)

    * (optional) block_tab
          here you can create tabs inside of tabs to summarize some content blocks

    * (optional) label
          the label of the content block

    * (optional) assign
          assigns the content to a variable instead of printing it out

            Example:
            {content assign=pagecontent} {table_of_contents thepagecontent="$pagecontent"}


Params of Blocktype "checkbox":

    * (optional) checked (true/false)
          checks/unchecks the checkbox by default when editing a page

Params of Blocktype "dropdown"/"select_multiple":

    * (optional) items
          Value(s) of the field (separated by a comma)

    * (optional) selected
          preselected value(s) (separated by a comma)

Params of Blocktype "image": see content_image tag help


Attachments:
[The extension mpg has been deactivated and can no longer be displayed.]
[The extension mpg has been deactivated and can no longer be displayed.]


Last edited by NaN on Fri Aug 07, 2009 2:56 pm, edited 1 time in total.
Top
  
 
 Post subject: Re: improve the content type "content"
PostPosted: Sat Apr 18, 2009 4:00 pm 
alby wrote:
I have not yet seen (for lack of time) and so I don't know if same level but calguy1000 has implemented a something like this in 1.6


Damn!
I'm too late again ;)


Top
  
 
 Post subject: Re: improve the content type "content"
PostPosted: Sat Apr 18, 2009 4:16 pm 
Offline
Support Guru
Support Guru
User avatar

Joined: Mon Jul 04, 2005 5:12 pm
Posts: 4821
Location: Ferrara, Italy
NaN wrote:
I'm too late again ;)


Nan, change is a low level (all ContentType not Content only) but as I said I'm not sure why I have not looked yet.
It's better that I leave info to calguy1000 or to RonnyK because did some testing or you can enter in irc

Alby

_________________
CMSMS Support Team
Italian Admin and Moderator

Plugins: Geolocate hostip, Multiple random image, Image rotator (beta), Content Pagination
Modules: ForumMadeSimple (Howto), TranslationManager
Multilingual: MLE is not CMSMS


Top
 Profile  
 
 Post subject: Re: improve the content type "content"
PostPosted: Sat Apr 18, 2009 9:35 pm 
Offline
Power Poster
Power Poster

Joined: Mon Jun 12, 2006 9:02 pm
Posts: 1903
alby wrote:
jmcgin51 wrote:
Hopefully I'm wrong... :)


wrong  :)
I have not yet seen (for lack of time) and so I don't know if same level but calguy1000 has implemented a something like this in 1.6

Alby


Good!!  Thanks!! :-)

@NaN - I thought you modified the core because of this line in your post:
Quote:
I added some more params and changed some functions in the source.


Will be interesting to see 1.6...


Top
 Profile  
 
 Post subject: Re: improve the content type "content"
PostPosted: Fri Aug 07, 2009 2:59 pm 
I updated my changes to work with CMSms 1.6+ and added some features (see post #3)


Top
  
 
 Post subject: Re: improve the content type "content"
PostPosted: Thu Oct 29, 2009 10:39 am 
Offline
New Member

Joined: Fri Dec 21, 2007 10:32 am
Posts: 4
Very interesting!!
Did you released this improvement?
Thanks


Top
 Profile  
 
 Post subject: Re: improve the content type "content"
PostPosted: Thu Oct 29, 2009 11:35 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Thu Jun 01, 2006 6:20 am
Posts: 376
Location: Padova
Is a real pity that the content does not have these default options. Whereas I do not understand why they are useful

_________________
SempreMobile - aggiornamenti dal mondo Tablet e Smartphone
Stampa Grande Formato Print Materia


Top
 Profile  
 
 Post subject: Re: improve the content type "content"
PostPosted: Fri Oct 30, 2009 5:17 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Wed Jan 02, 2008 11:39 pm
Posts: 2154
Location: Lewiston-Idaho
Gosh... super super super... I wish I found this sooner... this is just about perfect... I need  to controll ove the way the inputs show up... but other wise.. damn this is great... Let me know if you wish for me to put up the changes I needed in the input display controlls....


Cheers
Jeremy

_________________
Sorry. Too little support in projects, too little reason to not deprioritize. May-be if more attention is needed.
Follow me on Twitter | Follow me on FaceBook


Top
 Profile  
 
 Post subject: Re: improve the content type "content"
PostPosted: Sat Oct 31, 2009 3:41 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Wed Jan 02, 2008 11:39 pm
Posts: 2154
Location: Lewiston-Idaho
Here are the changes I needed and the files to go with it... I add to params to this...
'style'
'filter' (this is for Blocktype "image")

* (optional) style
          set an inline style to the inputs of all the block types

* (optional) filter (action:Prefix)
          exclude or include files with the set perfix


Usage is as such:

style='width:350px;font: 700 14px Arial, Helvetica, sans-serif;color: #333;'

filter="exclude:thumb_"
filter="include:thumb_"


So just some small changes but the exclude and include... well that has been long needed in the content_image tag

Cheers
Jeremy


NOTE:tested on CMSMS 1.6.6

Also I think a validtaion param would be good to add to... but I didn't need it so someone else can add it in... :D


Attachments:
function.content2.php.txt [13.57 KiB]
Downloaded 232 times
Content2.inc.php.txt [36.56 KiB]
Downloaded 220 times

_________________
Sorry. Too little support in projects, too little reason to not deprioritize. May-be if more attention is needed.
Follow me on Twitter | Follow me on FaceBook


Last edited by JeremyBASS on Sat Oct 31, 2009 3:44 am, edited 1 time in total.
Top
 Profile  
 
 Post subject: Re: improve the content type "content"
PostPosted: Mon Nov 02, 2009 9:11 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Wed Jan 02, 2008 11:39 pm
Posts: 2154
Location: Lewiston-Idaho
It should be noted that if you have any param on the {content} tag it's self there will be an error..  ;D

_________________
Sorry. Too little support in projects, too little reason to not deprioritize. May-be if more attention is needed.
Follow me on Twitter | Follow me on FaceBook


Top
 Profile  
 
 Post subject: Re: improve the content type "content"
PostPosted: Tue Nov 03, 2009 11:51 pm 
What kind of error?
The default {content} plugin only clears params that belongs to the default plugin.
It passes all additional params to modules that are displayed inline.
Since if these modules are also clearing their params properly you may get a message like "warning unknown param..." for each param that does not belong to the module.
So using the default {content} plugin with the modified contenttype may be no good idea.
If you add params to the modified contenttype you also need to clear these params in the modified plugin if a module will be displayed inline.


Last edited by NaN on Tue Nov 03, 2009 11:52 pm, edited 1 time in total.

Top
  
 
 Post subject: Re: improve the content type "content"
PostPosted: Wed Nov 04, 2009 2:24 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Wed Jan 02, 2008 11:39 pm
Posts: 2154
Location: Lewiston-Idaho
block_tab add to the main  {content} ends in  fatal error... I'm not going to be able to replrace it to post at this time... but you can test by adding the  block_tab param... sorry I was a little vage there,,,

_________________
Sorry. Too little support in projects, too little reason to not deprioritize. May-be if more attention is needed.
Follow me on Twitter | Follow me on FaceBook


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 267 posts ]  Go to page 1, 2, 3, 4, 5 ... 18  Next

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Arvixe - A CMSMS Partner