By Albert on Saturday, 19 August 2017
Posted in General
Likes 0
Views 334
Votes 0
I created a link to a category of posts EasyBlog and chose to display posts only User1. Is it possible to make this page to display the miniheader User1.
If you fail to insert the code of miniheader it can be to create a module containing miniheader a specific user EasySocial.
Is it possible to create this module using insert PHP code. Tell me what to do to insert the code
You could make use of the API that we have and it is extremely easy Example code,

[gist]
<?php
include_once(JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/easysocial.php');

// We need css / js on this page
ES::initialize();

// Replace 999 with the user id
$user = ES::user(999);
?>
<div id="es">
<?php echo ES::themes()->html('html.miniheader', $user);?>
</div>
[/gist]
·
Saturday, 19 August 2017 23:19
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for the example code. I will try to create a module. Is it possible to insert it on the category page of the blog.
·
Saturday, 19 August 2017 23:41
·
0 Likes
·
0 Votes
·
0 Comments
·
Hm, if you are on the single category layout, there is only module position before and after the entries. You could add your own module position by modifying the file /components/com_easyblog/themes/wireframe/blogs/categories/item.php

The code should look something like,

[gist]
<?php echo EB::renderModule('custom-module-position');?>
[/gist]
·
Saturday, 19 August 2017 23:50
·
0 Likes
·
0 Votes
·
0 Comments
·
Yes module position I might add. But how to do to add a user name that is used when creating links
·
Sunday, 20 August 2017 00:18
·
0 Likes
·
0 Votes
·
0 Comments
·
Not sure what do you mean here Albert
·
Sunday, 20 August 2017 16:20
·
0 Likes
·
0 Votes
·
0 Comments
·
When I create a link to a category blog of "1-Categories BLOG (1)" I set a filter to display posts created by user "User1" (Screenshot 1.jpg).
I want to click on this link to display miniheader User1.(Screenshot - 2.jpg)

When I create a link to a category blog of "1-Categories BLOG (2)" I set a filter to display posts created by this user "User2" (Screenshot 3.jpg).
When you click on this link I want to display miniheader User2. (Screenshot - 4.jpg)

In the file .../components/com_easyblog/themes/wireframe/blogs/categories/item.php I can only a person to ask. Is it possible to ask user id has varied depending on what I choose when creating links.

In the file - .../components/com_easyblog/themes/wireframe/blogs/categories/item.php, I can only specify a specific user. Whether it is possible to set that the id of the user varied depending on what I choose at creation of the link.
·
Sunday, 20 August 2017 17:10
·
0 Likes
·
0 Votes
·
0 Comments
·
You need to get the params from Joomla menu, not really an EasySocial thing

[gist]
<?php
$active = JFactory::getApplication()->getMenu()->getActive();
$authorId = $active->params->get('cat_bloggerid');
[/gist]
·
Sunday, 20 August 2017 17:23
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you very much! Everything will work properly.
·
Sunday, 20 August 2017 17:44
·
0 Likes
·
0 Votes
·
0 Comments
·
But if when you create the link do not select the user, then displays miniheader logged on to the site user. Tell me how to write a check you select user when creating links
·
Sunday, 20 August 2017 19:16
·
0 Likes
·
0 Votes
·
0 Comments
·
You need to have a better understanding of PHP to create customizations. We can't be assisting you with php queries all the time,

[gist]
<?php
include_once(JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/easysocial.php');

// We need css / js on this page
ES::initialize();

$active = JFactory::getApplication()->getMenu()->getActive();
$authorId = $active->params->get('cat_bloggerid');

// Replace 999 with the user id
$user = ES::user($authorId);
?>
<div id="es">
<?php echo ES::themes()->html('html.miniheader', $user);?>
</div>
[/gist]
·
Sunday, 20 August 2017 22:04
·
0 Likes
·
0 Votes
·
0 Comments
·
Yes, I understand. It works fine. Thank you very much. Only I couldn't create a rule to define is used or not when creating links to the user filter. If it is easy to write this rule. Sorry for my molestation....
·
Sunday, 20 August 2017 22:52
·
0 Likes
·
0 Votes
·
0 Comments
·
It okay Albert, glad to heard your issue resolved now.

As a gentle reminder, kindly start a new thread if you have any other issue in the future so it will be easier for us to manage your inquiry. I will lock and mark this thread as resolved.
·
Monday, 21 August 2017 09:51
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post