By Eric Weston on Thursday, 18 June 2015
Posted in Technical Issues
Likes 0
Views 1K
Votes 0
Hi

I'm testing out EasyBlog 5 in my staging area at the moment - I like what I see so far!

The new custom fields feature is great - but how do I make the field group appear at the head of the article in the front-end, instead of at the bottom of the article? (I'm trying to provide 'pre-requisites' for 'how-to' articles)

Also, I might want to change the field group title from h4 to h2... how would I do that?

Thanks!
Hello Eric,

I am sorry for the delay of this reply.

Unfortunately there is not setting to achieve this. You can however manually modify the following file, /components/com_easyblog/themes/wireframe/blogs/entry/default.php and search for the following code from roughly at line 186,
<?php if ($post->fields && $this->entryParams->get('post_fields', true)) { ?>
<?php echo $this->output('site/blogs/entry/fields', array('fields' => $post->fields)); ?>
<?php } ?>

copy the code and place it somewhere higher above the code. You can try to put it at line 79 which is above the title of the blog post.

I might want to change the field group title from h4 to h2... how would I do that?

You can go to /components/com_easyblog/themes/wireframe/blogs/entry/fields.php and change the following <h4>,
<h4 class="eb-section-heading reset-heading"><?php echo $field->group->getTitle();?></h4>
// with
<h2 class="eb-section-heading reset-heading"><?php echo $field->group->getTitle();?></h2>


Hope these help.
·
Friday, 19 June 2015 11:37
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Ezrul

Thanks for this, very helpful. I experimented with your suggestion for moving the custom field group and actually moved the code to line 162. Now it appears after the publishing details and blog cover image but before the main content of the post, as I prefer. This looks good.

The only problem is that the field group is now also shown in the list view. This might be acceptable, except that it appears AFTER the (truncated) intro text. It'd be much better if the field group either didn't show at all in the list view, or if it came BEFORE the intro text (like it does in the post itself). What additional edits should I make to fix this?

[On a side note, I suppose there is also quite a risk that a future update will overwrite such customisations.
Perhaps an option to set top/bottom position of each custom field group could be a new feature? Information after an article can be good, but I imagine many people would like to use custom fields for important/helpful information at the head of an article.]
·
Friday, 19 June 2015 17:56
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Eric,

I am sorry for the delay of this reply as it weekends for all of us here.

You can hide the custom field in the frontpage listing by going to your backend > menu manager > your easyblog frontpage menu > custom fields > show custom fields to "Hide", http://screen.stackideas.com/2015-06-22_1251.png .

Hope these help.
·
Monday, 22 June 2015 12:52
·
0 Likes
·
0 Votes
·
0 Comments
·
Erzul

I didn't think to look there, thanks. However, it doesn't work - even after I choose 'Hide' and save the changes the custom fields are still displayed on the front page (see attached image).

Perhaps moving the block of code to change position in the post somehow interferes with the 'show/hide' mechanism on the front page?

Staging site details attached in case it helps you investigate.
·
Monday, 22 June 2015 18:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Eric,

I am sorry for the delay of this reply.

Can you provide us with your FTP as well so we can check the code directly?
·
Tuesday, 23 June 2015 10:58
·
0 Likes
·
0 Votes
·
0 Comments
·
At the moment I do everything through the website or from cPanel. I don't actually use FTP and I'm not keen on setting it up and managing more authentication details unless I really have to.

Can I provide any further information for you? Or if FTP access is essential let me know and I'll try to find time to look into it. Thanks
·
Thursday, 25 June 2015 21:38
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Eric,

Hm, I've tried the modification that I made myself and its working fine in my local instance. Can you provide us with the modification file of yours so I can see what went wrong with your modification?
·
Friday, 26 June 2015 11:48
·
0 Likes
·
0 Votes
·
0 Comments
·
Sure - see attached for my edited version of
/components/com_easyblog/themes/wireframe/blogs/entry/default.php
·
Friday, 26 June 2015 19:30
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Eric,

I am sorry for the delay of this reply as it weekends for all of us here.

Seeing from your modification file it seems like everything is correct and should be working properly. However I notice that you are using older version of easyblog (5.0.7). Perhaps you can update your easyblog to the latest version (version 5.0.13) first so that we can eliminate any possible issue before we proceed?

Please advise.
·
Monday, 29 June 2015 17:13
·
0 Likes
·
0 Votes
·
0 Comments
·
Erzul

Updated to EasyBlog 5.0.13. Problem remains the same I'm afraid.

[Also, as a sidenote about another bug - I've noticed that the EasyBlog Dashboard always says 'up to date' - I can only tell there is a new version by checking on the StackIdeas website]
·
Monday, 29 June 2015 19:16
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Eric,

I am sorry for the delay of this reply.

It seems like there are some typo in the parameters setting for "Plain" themes that you are currently using. Kindly download the attachment below and place it inside your /components/com_easyblog/themes/plain/blogs/latest/ folder and see how it goes.
·
Tuesday, 30 June 2015 13:54
·
0 Likes
·
0 Votes
·
0 Comments
·
Did that - custom field group no longer displays in the list view, but... now it has returned to the BOTTOM of the post view, which puts us back to the start of this thread.
·
Tuesday, 30 June 2015 23:20
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Eric,

I am sorry for the delay of this reply. Since recently you just updated your easyblog to the latest version, the customization will get override too. You need to manually put place the customization back for every each update of your easyblog.

You can however use template overriding so that for each update, your customization will get preserved. Kindly download your customization file here and place it inside your /templates/[your current template]/html/com_easyblog/blogs/entry folder. If the file path does not exist, you need to manually create the folder following the order above. For more information, you can read on our documentation here on how to do template override for easyblog, http://stackideas.com/docs/easyblog/administrators/customizations/template-overridden .
·
Wednesday, 01 July 2015 10:49
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for your attention on this problem, but I have now switched to Wordpress. I have another Joomla site and might switch EasyBlog over to that at some point, but have no plans so I won't be doing any further testing at the moment.
·
Tuesday, 07 July 2015 00:17
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Eric,

Thanks for the update.
·
Tuesday, 07 July 2015 10:29
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post