- Posts: 8
COMMUNITY FORUM
[SOLVED] not show auhtor on 1 specific writer
- ThomasB
- Topic Author
- Offline
- New Member
Less
More
6 years 11 months ago #165643
by ThomasB
not show auhtor on 1 specific writer was created by ThomasB
Hi,
i need a solution for the following issue. The website i am about to set up has multiple writers and for all of them it is fine to have the author published ... except for one. For this one author i do need a solution that hides the complete author information part in the article.
how can this be realized. if code needs to be changed, pls inform me not only what code, but also what file and which place as i am not a joomla pro.
best regards
Thomas
ps. having a fake author is not a solution ... the author line shall stay invisible for this particular writer
i need a solution for the following issue. The website i am about to set up has multiple writers and for all of them it is fine to have the author published ... except for one. For this one author i do need a solution that hides the complete author information part in the article.
how can this be realized. if code needs to be changed, pls inform me not only what code, but also what file and which place as i am not a joomla pro.
best regards
Thomas
ps. having a fake author is not a solution ... the author line shall stay invisible for this particular writer
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
Less
More
- Posts: 3722
6 years 11 months ago #165644
by william white
Replied by william white on topic not show auhtor on 1 specific writer
You will need to create an override
Search in item.php for <!-- Item Author -->
You will need to wrap the entire author block in a php if statement so as not to display if the id is the author you want to hide
Search in item.php for <!-- Item Author -->
You will need to wrap the entire author block in a php if statement so as not to display if the id is the author you want to hide
Please Log in or Create an account to join the conversation.
- Steven Trooster
- Offline
- Premium Member
Less
More
- Posts: 130
6 years 11 months ago #165647
by Steven Trooster
Replied by Steven Trooster on topic not show auhtor on 1 specific writer
What if you leave the author information empty?
Or you could enter an author alias with the same name as the author. In this case the author info will not been shown (but will also not link to other article from this autor)
Or you could enter an author alias with the same name as the author. In this case the author info will not been shown (but will also not link to other article from this autor)
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
Less
More
- Posts: 3722
6 years 11 months ago #165650
by william white
Replied by william white on topic not show auhtor on 1 specific writer
Whenever you create an item there is a created_by field that holds the id of the person who created it. This is numeric and it what i would test for
Please Log in or Create an account to join the conversation.
- ThomasB
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
6 years 11 months ago #165654
by ThomasB
Replied by ThomasB on topic not show auhtor on 1 specific writer
@Wiliam
i do understand your idea, but at the end you overestimate my skills
@Steven
i did not know about this feature in K2, but it works fine for our needs. Just need to find out how to change the template-file the way that it does not only take off the author section, but takes also the author out of the breadcrumb
thx
i do understand your idea, but at the end you overestimate my skills
@Steven
i did not know about this feature in K2, but it works fine for our needs. Just need to find out how to change the template-file the way that it does not only take off the author section, but takes also the author out of the breadcrumb
thx
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
Less
More
- Posts: 3722
6 years 11 months ago #165657
by william white
Replied by william white on topic not show auhtor on 1 specific writer
A good starting point would be here. getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates
After you create an override start reading the item.php within the override files and search for "author" and you will find the block of code that displays it
A good video on templating can be found here getk2.org/documentation/k2class2012/865-k2-template-and-overrides
After you create an override start reading the item.php within the override files and search for "author" and you will find the block of code that displays it
A good video on templating can be found here getk2.org/documentation/k2class2012/865-k2-template-and-overrides
Please Log in or Create an account to join the conversation.
- ThomasB
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
6 years 11 months ago #165658
by ThomasB
Replied by ThomasB on topic not show auhtor on 1 specific writer
@steven
@william
Worked fine finally ...
added the same if condition to the breadcrumb as for the author section in the override and the result is as wanted ; not even necessary to use a separate extra user to hide the author
THX
@william
Worked fine finally ...
added the same if condition to the breadcrumb as for the author section in the override and the result is as wanted ; not even necessary to use a separate extra user to hide the author
THX
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
Less
More
- Posts: 3722
6 years 11 months ago #165659
by william white
Replied by william white on topic not show auhtor on 1 specific writer
welcome
Please Log in or Create an account to join the conversation.