GetSimple Support Forum
New Plugin - CustomFields - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13)
+--- Thread: New Plugin - CustomFields (/showthread.php?tid=359)

Pages: 1 2 3


New Plugin - CustomFields - sauldraws - 2010-06-05

Hmm I've double checked that I'm using the latest release of both GS and the customfield plugin but when I define a dropdown the select doesn't have any options

using this xml

<channel>
<item>
<desc>pagetype</desc>
<label>Cluster Type</label>
<type>dropdown</type>
one
two
three
</item>
</channel>


New Plugin - CustomFields - cumbe - 2010-06-05

Hi sauldraws,
you must put the dropdown so:
Code:
<item>
    <desc>pagetype</desc>
    <label>Cluster Type</label>
    <type>dropdown</type>
        <option>one</option>
        <option>two</option>
        <option>three</option>
</item>



New Plugin - CustomFields - n00dles101 - 2010-06-05

Yes sorry , the syntax formatter on my site is removing the <option> tags for some reason.

Mike. .


New Plugin - CustomFields - cumbe - 2010-06-05

I think a better way to record the data, is as follows:

Code:
function saveTagValues(){
    global $tags;
    global $note;
    global $xml;

    while (list($key, $val) = each($tags)) {
        if(isset($_POST['post-'.strtolower($key)])) {
            $note = $xml->addChild(strtolower($key));
            $note->addCData(htmlentities($_POST['post-'.strtolower($key)], ENT_QUOTES, 'UTF-8'));
        }
    }
}

Is it more compatible with special characters, of this way?, or how should this be?

Regards.


New Plugin - CustomFields - sauldraws - 2010-06-06

n00dles101 Wrote:Yes sorry , the syntax formatter on my site is removing the <option> tags for some reason.

Mike. .


Awesome - thanks so much...


New Plugin - CustomFields - yojoe - 2010-07-05

K, below is mine solution to add editable window with ckeditor to customfield plugin.

1. copy and paste below code to customfields.php in createTagInputs() function.
I recommend to add it in line 131 or 136
Code:
// draw a textarea window
            case "textarea":
                echo "<td colspan='2'>";
                echo "<script type=\"text/javascript\" src=\"../admin/template/js/ckeditor/ckeditor.js\"></script>".PHP_EOL;
                echo "<b>".$tags[$key]['label'].":</b><br />".PHP_EOL;
                echo "<textarea id=\"post-".strtolower($key)."\" name=\"post-".strtolower($key)."\" >";
                echo stripslashes($data_edit->$key);
                echo "</textarea></td>".PHP_EOL;

                echo "<script type=\"text/javascript\">
                CKEDITOR.replace( 'post-".strtolower($key)."',{
                skin : 'getsimple',
                forcePasteAsPlainText : true,
                entities : true,
                uiColor : '#ECECEC',
                toolbar : [['Bold', 'Italic', 'Underline', 'NumberedList', 'BulletedList', 'JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','Outdent','Indent', 'TextColor','Link', 'Unlink', 'Image'] , '/', ['Format', 'FontSize','RemoveFormat', 'Source']]
        });
            </script>";
            break;

You can add your own buttons to toolbar if you need them.

2. add to data/other/customfields.xml new item with textarea type
example
Code:
<item>
<desc>textareacontent</desc>
<label>Editable content</label>
<type>textarea</type>
</item>

3. edit /admin/edit.php
in line 245 delete: class="set-example-text"
delete line 281: <script type="text/javascript" src="template/js/ckeditor/ckeditor.js"></script>
You have to do this, otherwise both ckeditor instances will interfere with each other and won't work correctly.

4. edit admin/template/js/ckeditor/config.js and add 2 directives:
Code:
config.removePlugins = 'elementspath';
config.resize_enabled = false;

note: above options disable showing currently edited element inside ckeditor.

5. call the textarea content as described by Mike in installation notes
Code:
getCustomField('textareacontent');



known "bugs":
- customfield's ckeditor seems not to use getsimple skin, so it doesn't look like getsimple's ckeditor instance. I have no more willingness to mess with it. If there's a simple way to make it use getsimple's skin, I'll gladly see a hint Wink
- simple image gallery won't work inside content added using this plugin. It's a matter of SIG plugin, not customfields.


have fun


New Plugin - CustomFields - arthpix - 2010-08-01

Hi everybody, this is my first post.

First, I have to thank Chris for this wonderfull CMS. I am totally amazed for it's simplicity and performance. I am preparing a test project in localhost and works like a charm.

Then comes the great Mike's job with this CustomFields Plugin wich comes soo handy.

Only one thing would be great, to add. A third type of tag: checkboxes.

Let's say we managed to make a news section and want the site owner to simply mark several predefined categories for the news he posts. Right now is not that simple, the owner could mispell those names as he writes them on a textarea.

In example

Code:
<item>
  <desc>newsCategories</desc>
  <label>Valid Categories</label>
  <type>checkbox</type>
  <option>General</option>
  <option>Technology</option>
  <option>Entertainment</option>
  </option>Sports</option>
  <option>........</option>
</item>

So site's owner just need to select one or more checkboxes to assign the page to them.

I'm not that good to php, but will try to figure out how to do that to help. But you, Mike, are far more skilled and maybe could have the time to add this feature?


New Plugin - CustomFields - n00dles101 - 2010-08-01

new version will be released very soon with added checkboxes, radio buttons, textareas and datepicker fields.

watch this space...

Mike.


New Plugin - CustomFields - arthpix - 2010-08-01

n00dles101 Wrote:new version will be released very soon with added checkboxes, radio buttons, textareas and datepicker fields.

watch this space...

Mike.
Awesome Mike, thank you for so quick response... you da man!


New Plugin - CustomFields - rino - 2010-08-12

Hi, i have installed and not work. Custom field is saved but getCustomField not work and not return any value from xml page.
I don't understand why...

Regards


New Plugin - CustomFields - sal - 2010-09-01

Oh sweet, a new CustomFields is in the works. I just came to say I needed to add stripslashes() in a few places in customfields.php so that double quotes etc. would be OK to use.


New Plugin - CustomFields - oceanBlues - 2010-09-16

hi there i was wondering if the links for download of this plugin in broken couse it it`s working than either i`m to tired or to stupid to download it.


New Plugin - CustomFields - n00dles101 - 2010-09-16

Yup, your right, url was incorrect, I changed my site recently....

Thks for that..would never have noticed...

M


New Plugin - CustomFields - simplesharps - 2010-09-23

Another textarea - is this part of the next version?


New Plugin - CustomFields - n00dles101 - 2010-09-24

Yes,it will be there. On vacation at the mo
Should have it finished by the end of the month...


New Plugin - CustomFields - El-Cherubin - 2010-11-17

hello,

your plugin works with the 2.03 version?


New Plugin - CustomFields - n00dles101 - 2010-11-17

Yes current version works fine with 2.0x

I'm rewriting the plugin at the moment.
Should be released very soon....


New Plugin - CustomFields - trugoy - 2011-02-25

hi there, I'm using your plugin and I have a little problem, when putting this ' in the field, in the rendered page we get \' as a result... any ideas on how to solve this? thanks!


New Plugin - CustomFields - El-Cherubin - 2011-02-26

n00dles101 Wrote:Yes current version works fine with 2.0x

I'm rewriting the plugin at the moment.
Should be released very soon....

Hello,

do you have release your latest version of your plugin?


New Plugin - CustomFields - n00dles101 - 2011-02-26

Hi,

Work and family have kept me too busy for the last little while.

I will release what I have done over the next week or so.

Mike


New Plugin - CustomFields - trugoy - 2011-02-26

hi mike, no ideas about my problem with ' turning into /' ?


New Plugin - CustomFields - Origin - 2011-03-08

I love this idea for a plugin - it adds some key functionality I've needed in GS for ages.

However... where's the Download link? I've been all over the plugin page and there's no download source, just how to use it.

Thanks!


New Plugin - CustomFields - n00dles101 - 2011-03-08

hi origin,

having some problem with my site since I got hacked a couple of weeks ago.

latest version is always available on Extend.

http://get-simple.info/extend/plugin/customfields/22/

Mike.


New Plugin - CustomFields - Origin - 2011-03-08

Very good. Thanks so much Mike!

-
Derek


New Plugin - CustomFields - Origin - 2011-03-08

I just wanted to come back on and say, Mike, this plugin is awesome.

Many, many thanks for giving me the functionality to keep using GetSimple for more projects. I'm in your debt.