Create and link custom field 'Author' to CB user profile

More
7 years 8 months ago #73609 by ggppdk
Hello

it is working now
i edit the field

1. viewing access to public instead of "super user"

2. viewing "value" instead of "label"
 thus you get correct the  ID in the URL ... www.miniatoys.net/fr/component/comprofil...ile/553-someusername

3. To make it simpler / automatic to save the author when ,
in the
Editing TAB 
then Form field TAB

set to hide the prompt "Please select"
thus the value (current author) is auto selected and you can just click save

Anyway the above will soon be redundant , will add link ability to our "Profile field" ...


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
7 years 8 months ago - 7 years 8 months ago #73610 by ggppdk
Hello

a bad thing about the solution in the FAQ is that
- you need to create field when building of your website , because now you have to re-edit and re-save (once) all items ...

Also rare issue
- if you use a DB tool to massively change author ID of many item then you will need to resave too ... or manually update the field our field values table


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!
Last edit: 7 years 8 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
7 years 8 months ago - 7 years 8 months ago #73611 by alog
Hello,
Thanks for getting back to me. I tried the above and I still have the same issue to solve : every other fields values are still selectable (in blue) and CB author’s profile opens when i click on it. Only « Author profile » field should point to CB profile.  is there a mistake in one of the values?

« set to hide the prompt "Please select" 
thus the value (current author) is auto selected and you can just click save »thanks for the tip but how to display login id (or author’s alias) instead of author’s name?

and  Is it possible to use language strings for value suffix?   
Last edit: 7 years 8 months ago by alog.

Please Log in or Create an account to join the conversation.

More
7 years 8 months ago #73614 by ggppdk
Hello

when you see such behavour that a link is extending too long ... it usually means it was not closed ...

In our FAQ article was bad in that ... the closing HTML TAG:
</a>
is missing

I have added to our FAQ article and i have updated / tested in your website
i have changed again the author field again to public,
you can recheck


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
7 years 8 months ago - 7 years 8 months ago #73620 by alog
Hello,
many thanks it works great !  
but yes i have to re-save all items :(
I'm revisiting the translation issue for value suffix on frontend, i'd like to resolve it but language strings don't seem to work ? 
Last edit: 7 years 8 months ago by alog.

Please Log in or Create an account to join the conversation.

More
7 years 8 months ago #73637 by micker
did you actived language string option in display tab ?

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
7 years 8 months ago - 7 years 8 months ago #73638 by ggppdk
Hello

BETTER solution
- no need to edit / re-save items
- you can easily use translations
- you can easily customize it in the future


You can just
1. Create a new field of type 'text' and name it "Author profile 2"
2. Create 1 custom layout for the 'text' field type and name it 'value_author_profile.php'
3. Add in it
Code:
<?php echo '   <a href="index.php?option=com_flexicontent&view=category&layout=author&authorid= ' . $item->created_by . 'alt="' . JText::_('MY_STRING_THIS_AUTHOR_CONTENT') . '">' . JText::_('MY_STRING_MORE_CONTENT_FROM_THIS_AUTHOR') . '   </a>'; ?>
4. Edit the field "Author profile 2"and select the layout (inside the viewing TAB) 'value_author_profile.php'
5. Add new field in a template position of the ITEM layout (that your items are using for being displayed)


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!
Last edit: 7 years 8 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
7 years 8 months ago - 7 years 8 months ago #73648 by alog
Hello,
it sounds good.. Thanks for the hint.
I have just attempted  to create a new custom layout 'valueauthor_profile.php' for the FC 'text' field type in:
 /plugins/flexicontent_fields/text/valueauthor_profile.php

but my new custom layout 'valueauthor_profile.php' is not found underneath 'default' layout selection.

Besides i'm not be able to create and edit a new text field = error page ...  with url :  /en/administrator/index.php.   (??)
what do it happens ?
Last edit: 7 years 8 months ago by alog.

Please Log in or Create an account to join the conversation.

More
7 years 8 months ago #73649 by ggppdk
Hello

i forgot the underscore,
filename should be

value_author_profile.php
instead of
valueauthor_profile.php


about saving the new field, and having this redirection to
 /en/administrator/index.php. 
it is some custom rule in your server , same problem occurs when you try to edit a file with phoca commander too and you click close


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
7 years 8 months ago - 7 years 8 months ago #73690 by alog
Hello,
I find this method most viable, but sorry, it does not work...
as described i created a custom layout for the 'text' field type and (re)name it 'value_author_profile.php'
then I'm trying to set layout but the new layout 'value_author_profile' doesn't appear on the drop down select in the values layout. Only default layout value is present.
Any ideas?

And should we add add Prefix/Suffix values and removed space as suggested in the FAQ article ?
Last edit: 7 years 8 months ago by alog.

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save