- Posts: 32
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- Title for Extra Field Group to replace generic sounding Additional Info?
Title for Extra Field Group to replace generic sounding Additional Info?
- EasiStudio
- Topic Author
- Offline
- Junior Member
Less
More
13 years 2 months ago #99148
by EasiStudio
Title for Extra Field Group to replace generic sounding Additional Info? was created by EasiStudio
Now starting to get to grips with K2 and have a suggestion for future releases.
Instead of having 'Additional Info' above the extra fields, instead have the name of the Extra Field Group that they are from or perhaps create an extra field within Extra Field Groups to accommodate a title for this additional information. The term 'Additional Info' is a bit generic.
Instead of having 'Additional Info' above the extra fields, instead have the name of the Extra Field Group that they are from or perhaps create an extra field within Extra Field Groups to accommodate a title for this additional information. The term 'Additional Info' is a bit generic.
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
Less
More
- Posts: 3722
13 years 2 months ago #99149
by william white
Replied by william white on topic Title for Extra Field Group to replace generic sounding Additional Info?
Create anoverride
Open the newly created item.php file
Search for <h3><?php echo JText::_('Additional Info'); ?></h3> (around line 250-260
Change the wording
You will also find this wording in other files for other views like category_item.php - you can change it there also
Open the newly created item.php file
Search for <h3><?php echo JText::_('Additional Info'); ?></h3> (around line 250-260
Change the wording
You will also find this wording in other files for other views like category_item.php - you can change it there also
Please Log in or Create an account to join the conversation.
- EasiStudio
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 32
13 years 2 months ago #99150
by EasiStudio
Replied by EasiStudio on topic Title for Extra Field Group to replace generic sounding Additional Info?
Thanks for this information, very useful.
Please Log in or Create an account to join the conversation.
- esther
- Offline
- New Member
Less
More
- Posts: 1
11 years 11 months ago #99151
by esther
Replied by esther on topic Re: Title for Extra Field Group to replace generic sounding Additional Info?
Where exaclty can I locate the item.php file in com_k2 directory.
The only one I have have found displays: <h3><?php echo JText::_('K2_ADDITIONAL_INFO'); ?></h3>.
However, changing the above text did nothing.
I'm new to php, please bare with me.
I appreciate the help.
The only one I have have found displays: <h3><?php echo JText::_('K2_ADDITIONAL_INFO'); ?></h3>.
However, changing the above text did nothing.
I'm new to php, please bare with me.
I appreciate the help.
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
Less
More
- Posts: 3722
11 years 11 months ago #99152
by william white
Replied by william white on topic Re: Title for Extra Field Group to replace generic sounding Additional Info?
Another way to do it is to
Create a file
Your SiteRoot/languages/overrides/en-GB.override.ini
and place this line of code in it
K2_ADDITIONAL_INFO="What you want here"
Create a file
Your SiteRoot/languages/overrides/en-GB.override.ini
and place this line of code in it
K2_ADDITIONAL_INFO="What you want here"
Please Log in or Create an account to join the conversation.
- Mary Stremmel
- Offline
- Junior Member
Less
More
- Posts: 28
11 years 11 months ago #99153
by Mary Stremmel
Replied by Mary Stremmel on topic Re: Title for Extra Field Group to replace generic sounding Additional Info?
I did exactly what you want for the nbwcc.com website:
for member profiles I changed the language file:
Here is my profiles: www.nbwcc.com/component/k2/item/2-fusion-web-marketing.html
For Member Offers I changed the custom "Offer" profile
item.php around line 253
<div class="itemExtraFields">
<h3><?php echo JText::_('NBWCC Member to Member Offers:'); ?></h3>
<ul>
Here is my offer listing:
www.nbwcc.com/component/k2/item/41-free-facebook-tab.html
Thanks K2 for making this membership site possible. I moved away from standard Joomla articles because it was so time consuming and this way with K2 I can give each member the opportunity to update their own profile and their own offer 24/7
for member profiles I changed the language file:
Here is my profiles: www.nbwcc.com/component/k2/item/2-fusion-web-marketing.html
For Member Offers I changed the custom "Offer" profile
item.php around line 253
<div class="itemExtraFields">
<h3><?php echo JText::_('NBWCC Member to Member Offers:'); ?></h3>
<ul>
Here is my offer listing:
www.nbwcc.com/component/k2/item/41-free-facebook-tab.html
Thanks K2 for making this membership site possible. I moved away from standard Joomla articles because it was so time consuming and this way with K2 I can give each member the opportunity to update their own profile and their own offer 24/7
Please Log in or Create an account to join the conversation.
- Naoufal EL Hilali
- Offline
- New Member
Less
More
- Posts: 1
11 years 6 months ago #99154
by Naoufal EL Hilali
Replied by Naoufal EL Hilali on topic Re: Title for Extra Field Group to replace generic sounding Additional Info?
Hi,
Could you please detail me the code to override the word "Additional Info" and to display the Extra Fields Group Name ?
I would much appreciate your help.
Thank you very much
Naoufal El Hilali
This email address is being protected from spambots. You need JavaScript enabled to view it.
Could you please detail me the code to override the word "Additional Info" and to display the Extra Fields Group Name ?
I would much appreciate your help.
Thank you very much
Naoufal El Hilali
This email address is being protected from spambots. You need JavaScript enabled to view it.
Please Log in or Create an account to join the conversation.
- Milaim Ajdari
- Offline
- New Member
Less
More
- Posts: 1
11 years 3 months ago - 11 years 3 months ago #99155
by Milaim Ajdari
Replied by Milaim Ajdari on topic Display Extra Field Group Category Name in K2
@Naoufal EL Hilali
If you take a look into each item inyou can see an item parameter called "group".
This is the group ID of the Extra Field Category.
Here is an example how you could get the Extra Field Category Name:
@K2 Developers: This should be automatically loaded from the getExtraFieldsByGroup function in extrafields.php. I think the Category name is much more important than the groupid. Isnt it?
Best regards
Milaim Ajdari
If you take a look into each item in
$this->item->extra_fields
This is the group ID of the Extra Field Category.
Here is an example how you could get the Extra Field Category Name:
$groupId = (int) $this->item->extra_fields[0]->group;
/* I used the first array index of extra_fields, because every array item has the same groupid in k2. There is only one group allowed in every category. If you use the MEFG Plugin developed by Joomrem, you have to handle each cagetory seperate. */
$db = JFactory::getDBO();
$query = "SELECT `name` FROM #__k2_extra_fields_groups WHERE `id`={$groupId}";
$db->setQuery($query);
$groupName = $db->loadResult();
@K2 Developers: This should be automatically loaded from the getExtraFieldsByGroup function in extrafields.php. I think the Category name is much more important than the groupid. Isnt it?
Best regards
Milaim Ajdari
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- Title for Extra Field Group to replace generic sounding Additional Info?