Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom Fields (and I18N)
ChriS Wrote:
mvlcek Wrote:
filupn Wrote:Thanks for this great plugin! Could you add a textarea as an input type? I'm using the "Long Text" field type now, but I'd like to be able to enter text on multiple lines. I can't use the WYSIWYG type because the editor adds HTML that I don't want.

I'll add it to the TODOs for the next version.
I have the same problem with WYSIWYG (CKEditor 3.6.2 in GS 3.1) changing some code lines I like to edit in the backend. Would also like to see a "Text Area" field type in Custom Fields (1.8.1 in use). Thx.

If you don't want to use custom fields for all pages, you can use the I18N Special Pages plugin, which already offers this possibility.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
mvlcek Wrote:If you don't want to use custom fields for all pages, you can use the I18N Special Pages plugin, which already offers this possibility.
Thank you for the hint. Will try to check this plugin. I'm still a newbie and have much to discover and learn... ;-)
Advanced HTML5 & CSS3 coder. Simple JS & PHP hacker (not enough for new function coding). Build one webpage with GS (late 2012). Focusing on Theme customizing/Template files. Experience with WP.
Reply
Hi!
There is a possibility to edit date when page/post was create? And - maybe - last update? I have to move existing site also with news (8 year history).

I try to add custom field "creDate" but system sad that it is imposibble.

S.
Reply
schizoid Wrote:There is a possibility to edit date when page/post was create? And - maybe - last update? I have to move existing site also with news (8 year history).

I try to add custom field "creDate" but system sad that it is imposibble.

I think the easiest way would be to directly edit the date in the XML files.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
I edited page and saved changes. GS changes pubDate and creDate. Why?
GS 3.1
CustomFields 1.8.1
Reply
Nobody Wrote:I edited page and saved changes. GS changes pubDate and creDate. Why?
GS 3.1
CustomFields 1.8.1
Only windows systems store file creation and edit date. Linux systems store file's last access date, and file's last edit time.
Addons: blue business theme, Online Visitors, Notepad
Reply
yojoe Wrote:
Nobody Wrote:I edited page and saved changes. GS changes pubDate and creDate. Why?
GS 3.1
CustomFields 1.8.1
Only windows systems store file creation and edit date. Linux systems store file's last access date, and file's last edit time.
I talk about fields in page file (XML <pubDate></pubDate> and <creDate></creDate>).
From info about Custom Field plugin: "The plugin automatically maintains a field creDate containing the creation date of the page, as GetSimple is sadly missing this."
<creDate> field contains date of first save of the page (date of creation).
<pubDate> field contains date of last save of the page.
But when I edit and save page, date of this save is stored in field <pubDate> (that's ok) and <creDate> (it's not correct behavior).
My question: it's error in plugin or it's some kind of my error.
Reply
Nobody Wrote:From info about Custom Field plugin: "The plugin automatically maintains a field creDate containing the creation date of the page, as GetSimple is sadly missing this."
<creDate> field contains date of first save of the page (date of creation).
<pubDate> field contains date of last save of the page.
But when I edit and save page, date of this save is stored in field <pubDate> (that's ok) and <creDate> (it's not correct behavior).
My question: it's error in plugin or it's some kind of my error.

No, this is not correct behavior - I'll check the plugin.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
I'm using GS3.1 and Costum Fields 1.8.1

Having a white window (no error in "debug mode") with both filebrowser and pagebrowser... after some search I found that the login-check of the filebrowser.php dies because $loggedin fails.

Setting sitewide cookie with GSCOOKIEISSITEWIDE wouldn't change the situation at all...
Reply
theNo Wrote:I'm using GS3.1 and Costum Fields 1.8.1

Having a white window (no error in "debug mode") with both filebrowser and pagebrowser... after some search I found that the login-check of the filebrowser.php dies because $loggedin fails.

Setting sitewide cookie with GSCOOKIEISSITEWIDE wouldn't change the situation at all...

Make sure the website base URL in the admin settings matches your actual URL.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
mvlcek Wrote:Make sure the website base URL in the admin settings matches your actual URL.

Do you mean the Wbesite URL ("Website Basis URL")? This is set to the domain name with http.//www.***.de/

So I tried it without the www. then the plugin works perfect. But I need to point to the www.***.de

Edit:
Was loggin as admin via http://***.de/admin/ in the settings it was with the www. ... when logging in via www.***.de/admin/ everything works find. (there should be a possible clean workaround for this problem)
Reply
theNo Wrote:
mvlcek Wrote:Make sure the website base URL in the admin settings matches your actual URL.

Do you mean the Wbesite URL ("Website Basis URL")? This is set to the domain name with http.//www.***.de/

So I tried it without the www. then the plugin works perfect. But I need to point to the www.***.de

Edit:
Was loggin as admin via http://***.de/admin/ in the settings it was with the www. ... when logging in via www.***.de/admin/ everything works find. (there should be a possible clean workaround for this problem)

You need to login with the same URL (+ admin) that is specified in the website base URL setting. Then everything should work fine.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
mvlcek Wrote:You need to login with the same URL (+ admin) that is specified in the website base URL setting. Then everything should work fine.

it does. I'm thinking, if it was possible to return an error message instead of a white window (at least in debug mode)
Reply
I am using custom_fields to create external links in the menu. Is there a way to specify that these links should open in New Window instead of the same page?
Reply
andyash Wrote:I am using custom_fields to create external links in the menu. Is there a way to specify that these links should open in New Window instead of the same page?

You might be able to achive this with I18N Navigation custom rendering.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
mvlcek Wrote:
Nobody Wrote:From info about Custom Field plugin: "The plugin automatically maintains a field creDate containing the creation date of the page, as GetSimple is sadly missing this."
<creDate> field contains date of first save of the page (date of creation).
<pubDate> field contains date of last save of the page.
But when I edit and save page, date of this save is stored in field <pubDate> (that's ok) and <creDate> (it's not correct behavior).
My question: it's error in plugin or it's some kind of my error.

No, this is not correct behavior - I'll check the plugin.

Something new in this topic?
Reply
mvlcek Wrote:
andyash Wrote:I am using custom_fields to create external links in the menu. Is there a way to specify that these links should open in New Window instead of the same page?

You might be able to achive this with I18N Navigation custom rendering.
I thought I'd give this a try and use the following for the anchor:

Code:
<a href="<?php echo htmlspecialchars($item->link); ?>" target="_<?php if($item->link!=='') { echo 'blank'; } else {echo 'self'; } ?>">
This however doesn't work because the 'link' refers to the function of the navigation rendering, not the custom/special field 'link'. So does this mean that users would need to use a different name for their external link fields and use that for the above IF statement?
Reply
Angryboy Wrote:I thought I'd give this a try and use the following for the anchor:

Code:
<a href="<?php echo htmlspecialchars($item->link); ?>" target="_<?php if($item->link!=='') { echo 'blank'; } else {echo 'self'; } ?>">
This however doesn't work because the 'link' refers to the function of the navigation rendering, not the custom/special field 'link'. So does this mean that users would need to use a different name for their external link fields and use that for the above IF statement?

I just tried it myself and it works for me - $item->link contains the link that I18N would use itself, i.e. the content of the field link, if it is not empty.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
But (for me at least) it makes all links open in a new window (not just the external ones) because if the field 'link' is empty, the field takes the value of the actual link of the page. So in theory the field is always filled; as my IF statement depends on 'link' being either empty or full, the statement serves no real purpose.
Reply
Angryboy Wrote:But (for me at least) it makes all links open in a new window (not just the external ones) because if the field 'link' is empty, the field takes the value of the actual link of the page. So in theory the field is always filled; as my IF statement depends on 'link' being either empty or full, the statement serves no real purpose.

Now I understand your problem. Try a condition like this:
Code:
global $SITEURL;
... echo substr($item->link,0,strlen($SITEURL)) == $SITEURL ? '_self' : '_blank'; ...
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
mvlcek Wrote:global $SITEURL;
... echo substr($item->link,0,strlen($SITEURL)) == $SITEURL ? '_self' : '_blank'; ...
mvlcek Wrote:<a href="<?php echo htmlspecialchars($item->link); ?>" target="_<?php if($item->link!=='') { echo 'blank'; } else {echo 'self'; } ?>">

How and where do I put these two to achieve my target?
Reply
I am unable to add images in the customfields wysiwyg editor. I have to input the image link in the URL field manually. Selecting from the editor still shows the URL field as blank.
Reply
Is it possible to pre-fill custom fields, if needed by means of a specific template?

I have defined 2 custom image fields to enable the client to have different header photo's on every page. However when creating a news page (using i18n search and special pages plugins) the client would need to select the header photo's too every time. It would be much preferable of course if those photo's can be pre-filled on those pages. Is this in any way possible or do I need to solve it by using a seperate template that doesn't call the 2 customs fields but rather has the photo's included in the template?
Reply
Did you try to set the "DEFAULT VALUE" using whole <img...> code for those custom fields ?
Addons: blue business theme, Online Visitors, Notepad
Reply
Good point. Forgot about the default value!

For creating new pages it is ideal, the client will just have to change the photo's when needed for a specific page and on the rest the default photo's will show. So will definitely use this. Thanks!

By the way, the whole <img...> wasn't needed, just the url basically.

However, for the news pages I would prefer to use different photo's, if possible. So let me rephrase my question:

It is in any way possible to fill the default values of the 2 custom image fields I am using with different values on certain pages (in this case my news pages)?
Reply




Users browsing this thread: 5 Guest(s)