By klaus on Friday, 16 March 2018
Posted in General Issues
Replies 13
Likes 0
Views 441
Votes 0
Hi!
I would like to achieve:
I have my grid layout of blog posts = wonderful...
I am using the mod_easyblogmostpopularpost
at about line 68:
<div class="eb-mod-title">
<a href="/<?php echo $post->getPermalink(); ?>" class="eb-mod-media-title"><?php echo $post->title;?></a>
<h4> hiermuss das eventdatum aus dem extra field rein</h4>
</div>

I want to display extrafields at this position.
I would like to know:
- possible?
- if yes, can u tgell me the snippet I need to add there?
I reallllly need to learn that

Thanks Klaus
Hi!
I would like to achieve:
I have my grid layout of blog posts = wonderful...
I am using the mod_easyblogmostpopularpost
at about line 68:
<div class="eb-mod-title">
<a href="/<?php echo $post->getPermalink(); ?>" class="eb-mod-media-title"><?php echo $post->title;?></a>
<h4> hiermuss das eventdatum aus dem extra field rein</h4>
</div>

I want to display extrafields at this position.
I would like to know:
- possible?
- if yes, can u tgell me the snippet I need to add there?
I reallllly need to learn that

Thanks Klaus
·
Friday, 16 March 2018 23:40
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Klaus,

This is how one could get the fields associated with the post,

[gist]
<?php
$fields = $post->getCustomFields();

var_dump($fields);
?>
[/gist]
·
Saturday, 17 March 2018 00:06
·
0 Likes
·
0 Votes
·
0 Comments
·
hi, I have to admit, I have nooo idea how to add this php snippet in my file:-( --> default_item_content.php

but I fail..

I thought just add it at here:
<div class="eb-mod-title">
<a href="<?php echo $post->getPermalink(); ?>" class="eb-mod-media-title"><?php echo $post->title;?></a>
<h4> here the php ????? to display the extra field?!</h4>
</div>
is it just to add the php you send me between the <h4> style?
I get only errors and tired eyes:-(

So sorry,,,
klaus
·
Saturday, 17 March 2018 01:02
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Klaus,

I have a little bit lost here the way you mentioned that 'extrafields'?

Are you referring to the post inside that custom fields? e.g. http://take.ms/54sa0

If yes, perhaps you can take a look this following code, you might be understand more.


<div class="eb-mod-title">
<a href="<?php echo $post->getPermalink(); ?>" class="eb-mod-media-title"><?php echo $post->title;?></a>
<h4>
<?php
// this will return you an array related the group which contain all the field inside this post
$groups = $post->getCustomFields();

foreach ($groups as $group) {
// in this part you can retrieve all the field object data
var_dump($group->fields);
}
// if you exit here you can view all the field object at this post
exit;
?>
</h4>
</div>
·
Saturday, 17 March 2018 10:59
·
0 Likes
·
0 Votes
·
0 Comments
·
hi Arlex,
sorry that I confused you using the wrong word in German is called extra field:-)

Yes, I am talking about custom field:
customfield1.png=
I added a custom field date to the group event
customfield2.png=
I add this field to a blog post
Customfield3.png=
It appears(correct) at the bottom of the post
customfield4.png=
I want to display this custom field in the EasyBlog - Most Popular Post Module under the Headline of the blogpost.

possible?

Thanks again for you never ending patient:-)

Klaus
·
Saturday, 17 March 2018 12:57
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Klaus,

Perhaps if you can provide us with the access and FTP access to the site and we'll try to cook up some sample codes for you.
·
Saturday, 17 March 2018 13:13
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Klaus,

Perhaps if you can provide us with the access and FTP access to the site and we'll try to cook up some sample codes for you.


thanks so much--> I add it to the site details
·
Saturday, 17 March 2018 13:22
·
0 Likes
·
0 Votes
·
0 Comments
·
Hm, can't access the site with the provided logins. Also, the site at https://new-heritage.de/ looks different than your screen shot
·
Saturday, 17 March 2018 13:41
·
0 Likes
·
0 Votes
·
0 Comments
·
Hm, can't access the site with the provided logins. Also, the site at https://new-heritage.de/ looks different than your screen shot

Its for a new project where I want to use easy blog, if they agree with my idea...
I changed the site details
thanks
Klaus
·
Saturday, 17 March 2018 13:56
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Klaus,

I have applied the hacks for you in the file /templates/jsn_shine_pro/html/mod_easyblogmostpopularpost/default_item_content.php and it is rendering the custom field value now, http://take.ms/wxpFo

Just for your information, in accordance to our license, support would only be provided to 1 domain only but I will make this an exception just this once so that you can preview this to your client.
·
Saturday, 17 March 2018 14:06
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Klaus,

I have applied the hacks for you in the file /templates/jsn_shine_pro/html/mod_easyblogmostpopularpost/default_item_content.php and it is rendering the custom field value now, http://take.ms/wxpFo

Just for your information, in accordance to our license, support would only be provided to 1 domain only but I will make this an exception just this once so that you can preview this to your client.

thanks so much, and yes, I understand the license thing, be sure, if they agree, will order the license for them!
Klaus
·
Saturday, 17 March 2018 14:14
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for understanding Klaus
·
Saturday, 17 March 2018 14:22
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post