Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom Fields (and I18N)
Maybe I'm misunderstanding the creation date field. I thought it would store the date the site was first created. But every time I change something on a site the creation date also changes and it stays in sync with the pubDate xml value.

If both fields contains the same value why would there even be the creation date?

Even if I change something on a site, I would need the first creation date to be kept for later use.

Is there a way to achieve this?

PS: Thanks for your plugins, without them moving from Joomla to GetSimple CMS would be impossible for me. Smile
Reply
(2013-06-26, 07:13:10)ds10 Wrote: Maybe I'm misunderstanding the creation date field. I thought it would store the date the site was first created. But every time I change something on a site the creation date also changes and it stays in sync with the pubDate xml value.

This should not happen, please try, maybe another plugin causes this problem. Try switching off the other plugins, change a page and see if it still happens.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
I switched all plugins off, with exception off I18N Custom Fields and still both date fields are updated and containing the same value. If I also disable I18N Custom Fields and change something on a site the creDate is removed from the xml file after activation of the plugin and changing the site again it appears again. Off course the date is then the same as the pubDate because the creDate was lost on saving. Maybe this leads to the problem, somehow the plugin might think it should use the pubDate for creation of creDate because every time seems to be the first time to create that vaule.
Reply
I've setup a completely new GetSimple CMS website for testing. I then installed I18N Custom Fields plugin and checked if the creDate changes and it didn't. I then added a custom field in the settings and from that point on the creDate changes with the pubDate. After deleting of the custom field the creDate again didn't change for site editing. So it seems that if there is a custom field available creDate changes with pubDate and if no custom field is setup creDate stays the same even if the site is edited.
Reply
(2013-06-26, 21:49:36)ds10 Wrote: I've setup a completely new GetSimple CMS website for testing. I then installed I18N Custom Fields plugin and checked if the creDate changes and it didn't. I then added a custom field in the settings and from that point on the creDate changes with the pubDate. After deleting of the custom field the creDate again didn't change for site editing. So it seems that if there is a custom field available creDate changes with pubDate and if no custom field is setup creDate stays the same even if the site is edited.

Thank you for this excellent bug report!
The problem should be fixed in

I18N Custom Fields version 1.9.1:
  • fixed above bug causing the creation date to be overwritten
  • added a function return_custom_field_options('name-of-field') to get an array of options for a list field.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
Great, that was a high speed bug fix. Works flawless now, thanks. Smile
Reply
Hi all,

Just installed GS 3.2.2 but it looks like the "custom fields" plugin doesn't work no more.

No pop-up to select a file (type = image)
Saved text is not saved (type = text field)

Anyone else has this problem, or is it just me?
Reply
Fu, scared, it works for me
Reply
(2013-08-13, 19:47:49)Donuts Wrote: Hi all,

Just installed GS 3.2.2 but it looks like the "custom fields" plugin doesn't work no more.

No pop-up to select a file (type = image)
Saved text is not saved (type = text field)

Anyone else has this problem, or is it just me?

Oeps, I've made a mistake. Works just fine!
I mixed up the "Name" and "Label" fields.

My apologies.
Reply
Thanks for the plugin mvlcek!

Any chance of adding a multi-select option in addition to the dropdown?

standard ctrl+click is fine, but it would also be brilliant if it could use this jquery chooser:
http://harvesthq.github.io/chosen/

-Rob A>
Reply
Hi mvlcek,

I really like your plugins and the custom field one is particularly useful.

I was just wondering if there was a way to apply a custom field across a whole site/template so that it doesn't have to be filled in on every page.

For example, I am putting a twitter link in the header of my template. I would like for the admin to be able to set this without having to code anything, so a custom field is a great way to achieve this. However I would like them to just have to set it once as it is going to be the same on every page.

Is this possible?

Thanks,

David
Reply
Hey there,

maybe this was already asked before but: is there any way to get a custom field based on the page slug?
I need to duplicate a page, defining to get the content from page1 into page2, but the same does not work for the custom field I'm addionally calling.
Any suggestions? Or just mabye any way to get a second variable added to get_custom_field() ?

Thanks in advance!
Reply
Hi,

thx for the great module!

Is there any way to get a field from a different page?
Like get_custom_field($name, Page-SlugXY)

Greets!
Reply
(2013-10-01, 01:12:07)pow Wrote: Is there any way to get a field from a different page?
Like get_custom_field($name, Page-SlugXY)

No, there isn't (mainly to keep it fast and simple).
What do you want to achieve?
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
Running just the Custom Fields plugin on GetSimple 3.2.3, I have defined 2 custom fields as such:

[Image: 9ONz2Ks.png]

The page in question has values for these fields:

[Image: u3srcBy.png]

The data gets written to the xml file in question:

Code:
<achtergrond><![CDATA[http://localhost/simonsays/data/uploads/space-1.jpg]]></achtergrond>
<extra_text><![CDATA[testing testing testing]]></extra_text>

In the template I've set it to output the fields as such (as a test):
Code:
<?php if (return_custom_field('extra_text')) { ?>
   <p><?php get_custom_field('extra_text'); ?></p>
<?php } ?>

<img src="<?php get_custom_field('achtergrond'); ?>" alt="just a placeholder for now" />

However on output I get no data returned. The paragraph tags aren't shown (because the if statement returns nothing) and I get an empty image holder.

What am I doing wrong here?
Reply
(2013-12-04, 00:22:24)notafish Wrote: Running just the Custom Fields plugin on GetSimple 3.2.3, I have defined 2 custom fields as such:

[Image: 9ONz2Ks.png]

The page in question has values for these fields:

[Image: u3srcBy.png]

The data gets written to the xml file in question:

Code:
<achtergrond><![CDATA[http://localhost/simonsays/data/uploads/space-1.jpg]]></achtergrond>
<extra_text><![CDATA[testing testing testing]]></extra_text>

In the template I've set it to output the fields as such (as a test):
Code:
<?php if (return_custom_field('extra_text')) { ?>
   <p><?php get_custom_field('extra_text'); ?></p>
<?php } ?>

<img src="<?php get_custom_field('achtergrond'); ?>" alt="just a placeholder for now" />

However on output I get no data returned. The paragraph tags aren't shown (because the if statement returns nothing) and I get an empty image holder.

What am I doing wrong here?


I hope I get the question right...
Try:

PHP Code:
<?php if (return_custom_field('xxx') != "") { ?>
Reply
(2013-12-04, 01:26:17)pow Wrote: I hope I get the question right...
Try:

PHP Code:
<?php if (return_custom_field('xxx') != "") { ?>

Thanks for the reply pow, but the thing is, the php doesn't output anything to HTML, even though the data exists in the XML (the backend propagates the custom fields with the corresponding data.

So right now as a test-setup I have it output like this:

Code:
<section>
       <h2><?php getPageField($pag,'title'); ?></h2>
       <?php getPageContent($pag); ?>
      
       <?php if (return_custom_field('extra_text')) { ?>
           <p><?php get_custom_field('extra_text'); ?></p>
       <?php } ?>

       <img src="<?php get_custom_field('achtergrond'); ?>" alt="image" />
</section>

The HTML output however looks like this:

Code:
<section>
   <h2>Some Title</h2>
   <p>Text from the editor</p>
  
    <img src alt="image" >
</section>

So it doesn't render the <p> for 'extra_text' at all because it can't seem to locate the custom_field($name) part of it... even though they check out.
Reply
(2013-12-04, 02:12:32)notafish Wrote: So right now as a test-setup I have it output like this:

Code:
<section>
       <h2><?php getPageField($pag,'title'); ?></h2>
       <?php getPageContent($pag); ?>
      
       <?php if (return_custom_field('extra_text')) { ?>
           <p><?php get_custom_field('extra_text'); ?></p>
       <?php } ?>

       <img src="<?php get_custom_field('achtergrond'); ?>" alt="image" />
</section>

Why are you using getPageContent instead of get_page_content. I hope, you don't try to include the content of another page and assume get_custom_field to magically get the field of this page instead of the current page!?
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
i think.. the next update plugin or in future update.. it will be awesome when will be setup of custom field... and:
screen:
https://dl.dropboxusercontent.com/u/4998...l/idea.jpg

setup: visible only in the submenu like have a menu "krzysiek" or "menupruwa" (in name of menu.. one... multiple choice by drop-down box)
setup: visible on ALL PAGES
or:
setup: visible on pages: 0,1 (all pages that are a subpages from 0 level menu to level menu 1)
multiple choice: ::krzysiek::menupruwa,0,1 (all pages that are name like: krzysiek or (and) menupruwa, and then from menu 0 level to menu 1 level.
look at screen:
https://dl.dropboxusercontent.com/u/4998...l/idea.jpg

This is just an example the development of this wonderful plugin...
user plugin: scroll to top
Reply
xxdev, you should try the I18N Special Pages plugin.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
that's right, I'm sorry, thank you for imputation solutions mvlcek
user plugin: scroll to top
Reply
How can I create a global/sitewide custom field?

Eg: Site name, owner e-mail, color-scheme {light, dark} etc, to be used on header or any multi-page part of the site
Reply
Am I missing something or is it not possible to upload an image with the image field?

It seems the user has to leave the post being created to switch to the files tab, upload an image there, then go back to the pages tab to select it there....
Reply
(2014-07-15, 08:11:56)danielg Wrote: Am I missing something or is it not possible to upload an image with the image field?

It seems the user has to leave the post being created to switch to the files tab, upload an image there, then go back to the pages tab to select it there....

You are correct, the file browser native to GetSimple lacks a file upload option.
Modern UI Admin for GetSimple
Watch the demo. Install this plugin. Use this CSS. Enjoy.
Reply
(2013-10-01, 01:24:30)mvlcek Wrote:
(2013-10-01, 01:12:07)pow Wrote: Is there any way to get a field from a different page?
Like get_custom_field($name, Page-SlugXY)

No, there isn't (mainly to keep it fast and simple).
What do you want to achieve?

Since the data for the custom field is stored with the page, you can access using getPageContent($Slug, $Content) where slug is the slug and content is any field stored in the XML file. I think this is a frowned upon practice for a few reasons, but it does work.
Reply




Users browsing this thread: 2 Guest(s)