By Douglas McCarroll on Tuesday, 29 January 2019
Posted in General Issues
Replies 11
Likes 0
Views 615
Votes 0
Hi,

Is there any way to set up EasyBlog so that, by default, the author's name isn't displayed on blog post, but I (the author) am able to specify that I'd like to display it (my name) on specific blog posts?

The only setting that I've found so far that is relevant to this is Settings > General > Automatically Use Author's Header.

Can I disable this, but then specify - in specific posts - that I'd like to use the "author's header"?

Thanks,

Douglas
Hey Douglas,

Unfortunately there isn't a settings for this but you can always set an author alias for the blog post as you can see here, http://take.ms/XPYyB

Also, what you can do is to tweak the theme file so that it would only render the author alias when there is a value set. You can test if the author alias exists using the following,

[gist]
if ($post->author_alias) {
// Post has an author alias
}
[/gist]
·
Tuesday, 29 January 2019 22:04
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for the feedback.

A few questions:

It looks as though EasyBlog defaults to the Vintage theme. Is this correct?

If not, how do I tell which theme I'm currently using?

What is the name of "the theme file" that you refer to?

Thanks,

Douglas
·
Wednesday, 30 January 2019 22:24
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey there,

It looks as though EasyBlog defaults to the Vintage theme. Is this correct?


The default theme for EasyBlog is Wireframe.

If not, how do I tell which theme I'm currently using?


You can check it out at Backend > EasyBlog > Themes and see which theme is set to default as shown in the screenshot.

What is the name of "the theme file" that you refer to?


Your current theme which is the default theme.
·
Thursday, 31 January 2019 11:35
·
0 Likes
·
0 Votes
·
0 Comments
·
>> What is the name of "the theme file" that you refer to?
> Your current theme which is the default theme.

I don't understand.

I'm guessing that you mean that, if Wireframe is set as the default theme, that the theme file will be named "Wireframe.php" or "Wireframe.css" or some such.

But when I click on the "Edit Files" button for the theme, I don't see any files with "Wireframe" in their name.

Could you please:

  • Give me a specific name for the theme file for the Wireframe theme, and
  • Tell me how to find/access this file so that I can edit it?


Thanks,

Douglas
·
Thursday, 31 January 2019 20:27
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Douglas,

I cannot seem to access your site's administration area as it is password protected. The name "wireframe" is just the name of the theme. You will not see any wireframe.css specifically.

When you click on the "Edit Files" button for the wireframe theme, you would be brought to a page that looks like this, http://take.ms/d3gnU

You can then edit the files that are responsible to render the author's name. In this case it would be:

On Listing Page:
* blogs/latest/default.main.php

On Entry Page:
* blogs/entry/default.posts.php
·
Thursday, 31 January 2019 22:47
·
0 Likes
·
0 Votes
·
0 Comments
·
I'm not seeing all the files that your image shows. I've set the Pastel theme as my default theme. When I click on Edit Files, then open the Select A File dropdown, I only see these files (as shown in the attached image):

  • /structure/css.php
  • /styles/style-5.2.11-rtl.min.css
  • /styles/style-5.2.11-min.css


Just to be clear, I'd like to add the code you suggested in your first response, i.e. this code...


if ($post->author_alias) {
// Post has an author alias
}


... to the template file.

I'm still not sure which file to add this to.
·
Thursday, 31 January 2019 23:48
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

Currently, we have centralised our files structures on Wireframe, which means you will need to check them(those necessary files) on Wireframe theme instead of Pastels. For more infos, you can refer https://stackideas.com/docs/easyblog/administrators/customizations/template-overriding

Give it a check and see how it goes.
·
Friday, 01 February 2019 10:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

Thanks for your response. It helps a bit.

Now, when I go in to edit the Wireframe theme's files, I find hundreds of files.

And I understand that the other themes inherit styling from this theme.

But I still don't know which file I should edit, i.e. which file I should add this code to...


if ($post->author_alias) {
// Post has an author alias
}


... as Mark suggested in the first response on this thread.

Could you please specify the file path and name?

Thanks,

Douglas
·
Friday, 01 February 2019 20:16
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey there,

I am really sorry for the delay of this reply as it is a weekend for us here.

You can modify on this file JoomlaFolder/components/com_easyblog/themes/wireframe/blogs/latest/default.main.php , check my attached screenshot below which line of code need to apply it.

Once you done already, you have to copy this default.main.php file override into your current template JoomlaFolder/templates/YourCurrentTemplate/html/com_easyblog/blogs/latest/default.main.php so your changes will not get lost when you update next Easyblog version.
·
Saturday, 02 February 2019 11:27
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post